refactor: providers config (#2117)

This commit is contained in:
yetone
2025-06-03 04:01:01 +08:00
committed by GitHub
parent b89e6d84a0
commit e9ab2ca2fd
12 changed files with 327 additions and 251 deletions

View File

@@ -118,7 +118,7 @@ cmd("SwitchProvider", function(opts) require("avante.api").switch_provider(vim.t
complete = function(_, line, _)
local prefix = line:match("AvanteSwitchProvider%s*(.*)$") or ""
---@param key string
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, Config.provider_names)
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, vim.tbl_keys(Config.providers))
end,
})
cmd(