feat: disable tools with config (#1459)

* chore: use missing generic for AvanteLLMToolFunc

* feat: add disabled_tools config
This commit is contained in:
Peter Cardenas
2025-03-01 19:29:23 -08:00
committed by GitHub
parent e471f2347b
commit ac9d2b3888
3 changed files with 5 additions and 3 deletions

View File

@@ -569,7 +569,9 @@ end
function M.get_tools()
return vim
.iter(M._tools)
:filter(function(tool)
:filter(function(tool) ---@param tool AvanteLLMTool
-- Always disable tools that are explicitly disabled
if vim.tbl_contains(Config.disabled_tools, tool.name) then return false end
if tool.enabled == nil then
return true
else