summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdotfiles/scripts/ai2
-rwxr-xr-xdotfiles/scripts/hx.hexai-prompt9
2 files changed, 10 insertions, 1 deletions
diff --git a/dotfiles/scripts/ai b/dotfiles/scripts/ai
index 7515659..abcf490 100755
--- a/dotfiles/scripts/ai
+++ b/dotfiles/scripts/ai
@@ -3,5 +3,5 @@
if [ $(uname) = Darwin ]; then
exec hx.nvim-copilot-prompt "$@"
else
- exec hx.aichat-prompt "$@"
+ exec hx.hexai-prompt "$@"
fi
diff --git a/dotfiles/scripts/hx.hexai-prompt b/dotfiles/scripts/hx.hexai-prompt
new file mode 100755
index 0000000..358b64a
--- /dev/null
+++ b/dotfiles/scripts/hx.hexai-prompt
@@ -0,0 +1,9 @@
+#!/usr/bin/env zsh
+
+declare -xr INSTRUCTIONS='Answer only. If it is code, code only without code-block at the beginning and the end.'
+
+if [[ $# -eq 0 ]]; then
+ hexai "$(hx.prompt). $INSTRUCTIONS"
+else
+ hexai "$@. $INSTRUCTIONS"
+fi