diff options
| -rw-r--r-- | dotfiles/helix/config.toml | 2 | ||||
| -rwxr-xr-x | dotfiles/scripts/ai | 4 | ||||
| -rwxr-xr-x | dotfiles/scripts/hx.hexai-action-prompt | 17 | ||||
| -rwxr-xr-x | dotfiles/scripts/hx.hexai-prompt | 9 |
4 files changed, 2 insertions, 30 deletions
diff --git a/dotfiles/helix/config.toml b/dotfiles/helix/config.toml index b77ab54..bc17b1f 100644 --- a/dotfiles/helix/config.toml +++ b/dotfiles/helix/config.toml @@ -68,7 +68,7 @@ C-q = ":buffer-close" # AI commands are good here. C-p = { c = ":pipe ai correct this sentence and only print out the corrected text", r = ":pipe ai restructure and reword the input and dont leave information out and only print out the new text", a = ":pipe ai rewrite this in a more casual style", n = ":pipe ai these are book notes of mine. correct the grammar and re-organize the notes. use bullet points for short information and whole paragraphs for longer one. the output must be in Gemini Gemtext format with the star * as the bullet point symbol and not the minus - . dont leave out any content.", p = ":pipe ai" } # Will replace the above -C-a = ":pipe ai hexai-action" +C-a = ":pipe hexai-action" # Git commands C-g = { d = ":run-shell-command git diff", p = ":run-shell-command git pull", u = ":run-shell-command git push", t = ":run-shell-command tmux new-window -n hx-git-tig tig", c = ":run-shell-command tmux split-window -v 'git commit -a'" } diff --git a/dotfiles/scripts/ai b/dotfiles/scripts/ai index 085baad..abcf490 100755 --- a/dotfiles/scripts/ai +++ b/dotfiles/scripts/ai @@ -1,8 +1,6 @@ #!/usr/bin/env zsh -if [ $1 = hexai-action ]; then - exec hx.hexai-action-prompt -elif [ $(uname) = Darwin ]; then +if [ $(uname) = Darwin ]; then exec hx.nvim-copilot-prompt "$@" else exec hx.hexai-prompt "$@" diff --git a/dotfiles/scripts/hx.hexai-action-prompt b/dotfiles/scripts/hx.hexai-action-prompt deleted file mode 100755 index cd1e233..0000000 --- a/dotfiles/scripts/hx.hexai-action-prompt +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env zsh - -declare -r INPUT_FILE=~/.hx-action-input -declare -r REPLY_FILE=~/.hx-action-reply -if [ -f "$REPLY_FILE" ]; then - rm "$REPLY_FILE" -fi - -cat > $INPUT_FILE - -tmux split-window -v "echo hello;set -x;touch $REPLY_FILE.tmp; hexai-action -infile $INPUT_FILE -outfile $REPLY_FILE.tmp; mv $REPLY_FILE.tmp $REPLY_FILE" - -while [ ! -f "$REPLY_FILE" ]; do - sleep 0.2 -done - -cat "$REPLY_FILE" diff --git a/dotfiles/scripts/hx.hexai-prompt b/dotfiles/scripts/hx.hexai-prompt deleted file mode 100755 index ef413c0..0000000 --- a/dotfiles/scripts/hx.hexai-prompt +++ /dev/null @@ -1,9 +0,0 @@ -#!/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" 2>/dev/null -else - hexai "$@. $INSTRUCTIONS" 2>/dev/null -fi |
