summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-20 08:36:14 +0300
committerPaul Buetow <paul@buetow.org>2025-08-20 08:36:14 +0300
commita5ff7a1b797076ae1235977eae56f1896d0fec99 (patch)
tree8d4ce1c4993605f65accbf753626a8f9ed1f51f7
parenteded3da976ebeed1ddaa2fbd4351eed1171b2d5a (diff)
add hexai prompt
-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