summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-05 21:49:35 +0300
committerPaul Buetow <paul@buetow.org>2025-06-05 21:49:35 +0300
commit953bfc13e54a942ff1266fccafb7060c7f2ad0ba (patch)
tree3f04a9646d5f054538203bbc6f2d98855dddbb30
parent6b9d74f1e82fb61200a07b9a78d9278b92312634 (diff)
Update
-rw-r--r--dotfiles/fish/conf.d/ai.fish18
-rwxr-xr-xdotfiles/scripts/aimodel23
2 files changed, 18 insertions, 23 deletions
diff --git a/dotfiles/fish/conf.d/ai.fish b/dotfiles/fish/conf.d/ai.fish
index 4e89bbb..f11a642 100644
--- a/dotfiles/fish/conf.d/ai.fish
+++ b/dotfiles/fish/conf.d/ai.fish
@@ -3,3 +3,21 @@ abbr -a gpti "chatgpt --interactive"
abbr -a suggest 'gh copilot suggest'
abbr -a explain 'gh copilot explain'
abbr -a aic 'aichat -e'
+
+function aimodels
+ set -l NVIM_DIR "$HOME/.config/nvim/"
+ set -l COPILOT_CHAT_DIR "$NVIM_DIR/pack/copilotchat/start/CopilotChat.nvim/lua/CopilotChat"
+
+ printf "gpt-4o\ngpt-4.1\nclaude-3.7-sonnet\nclaude-3.7-sonnet-thought\n" >~/.aimodels
+ set -gx COPILOT_MODEL (cat ~/.aimodels | fzf)
+
+ 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
diff --git a/dotfiles/scripts/aimodel b/dotfiles/scripts/aimodel
deleted file mode 100755
index 5352248..0000000
--- a/dotfiles/scripts/aimodel
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env zsh
-
-declare -r NVIM_DIR="$HOME/.config/nvim/"
-declare -r COPILOT_CHAT_DIR="$NVIM_DIR/pack/copilotchat/start/CopilotChat.nvim/lua/CopilotChat"
-
-cat <<END >~/.aimodels
-gpt-4o
-gpt-4.1
-claude-3.7-sonnet
-claude-3.7-sonnet-thought
-END
-declare -r COPILOT_MODEL="$(cat ~/.aimodels | fzf)"
-
-if [ -d $COPILOT_CHAT_DIR ]; then
- local model_config="$COPILOT_CHAT_DIR/config-$COPILOT_MODEL.lua"
- if [ -f "$model_config" ]; then
- echo "Using CopilotChat config from $model_config"
- cp -v $model_config "$COPILOT_CHAT_DIR/config.lua"
- else
- echo "No config found at $model_config"
- fi
-fi
-