feat(model): add model selection (#961)

* feat(model): add model selection with keybinding

* lint

* rename model_select to model_selector
This commit is contained in:
Michael Gendy
2025-02-18 20:01:21 +02:00
committed by GitHub
parent 85370a5a1b
commit 9a191abce5
4 changed files with 67 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ H.keymaps = function()
vim.keymap.set({ "n", "v" }, "<Plug>(AvanteConflictCursor)", function() Diff.choose("cursor") end)
vim.keymap.set("n", "<Plug>(AvanteConflictNextConflict)", function() Diff.find_next("ours") end)
vim.keymap.set("n", "<Plug>(AvanteConflictPrevConflict)", function() Diff.find_prev("ours") end)
vim.keymap.set("n", "<Plug>(AvanteSelectModel)", function() require("avante.api").select_model() end)
if Config.behaviour.auto_set_keymaps then
Utils.safe_keymap_set(
@@ -126,6 +127,12 @@ H.keymaps = function()
noremap = true,
silent = true,
})
Utils.safe_keymap_set(
"n",
Config.mappings.select_model,
function() require("avante.api").select_model() end,
{ desc = "avante: select model" }
)
end
if Config.behaviour.auto_suggestions then