summaryrefslogtreecommitdiff
path: root/gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-10-02 11:28:55 +0300
committerPaul Buetow <paul@buetow.org>2025-10-02 11:28:55 +0300
commit2b034797107660d4d83f8a7acdc55d32db785b82 (patch)
tree522fb586193c8a65ca6aee42df64eecc3555f644 /gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish
parent4d7d90638186ac71067232007607f6637d560a4d (diff)
Update content for md
Diffstat (limited to 'gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish')
-rw-r--r--gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish39
1 files changed, 39 insertions, 0 deletions
diff --git a/gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish b/gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish
new file mode 100644
index 00000000..23ce2b20
--- /dev/null
+++ b/gemfeed/examples/conf/dotfiles/fish/conf.d/ai.fish
@@ -0,0 +1,39 @@
+abbr -a gpt chatgpt
+abbr -a gpti "chatgpt --interactive"
+abbr -a suggest hexai
+abbr -a explain 'hexai explain'
+abbr -a aic 'aichat -e'
+
+# helix-gpt env vars used
+# set -gx COPILOT_MODEL gpt-4.1 # can be changed with aimodels function
+set -gx COPILOT_MODEL gpt-4o # can be changed with aimodels function
+set -gx HANDLER copilot
+
+# TODO: also reconfigure aichat tool using this function
+function aimodels
+ # nvim for the ai tool wrapper so i can use Copilot Chat from the command line.
+ set -l NVIM_DIR "$HOME/.config/nvim/"
+ set -l COPILOT_CHAT_DIR "$NVIM_DIR/pack/copilotchat/start/CopilotChat.nvim/lua/CopilotChat"
+
+ printf "gpt-4o
+gpt-5
+gpt-o3
+gpt-4.1
+claude-3.7-sonnet
+claude-3.7-sonnet-thought
+claude-4.0-sonnet
+gemini-2.5-pro" >~/.aimodels
+
+ set -gx COPILOT_MODEL (cat ~/.aimodels | fzf)
+ set -gx OPENAI_MODEL $COPILOT_MODEL
+
+ if test -d $COPILOT_CHAT_DIR
+ set -l model_config "$COPILOT_CHAT_DIR/config-$COPILOT_MODEL.lua"
+ if test -f "$model_config"
+ echo "Using CopilotChat config from $model_config"
+ cp -v $model_config "$COPILOT_CHAT_DIR/config.lua"
+ else
+ echo "No config found at $model_config"
+ end
+ end
+end