fix: the enabled function of the llm tool was not called (#1374)

This commit is contained in:
yetone
2025-02-24 22:04:44 +08:00
committed by GitHub
parent 22739f33f2
commit 876246b9ae

View File

@@ -549,7 +549,18 @@ function M.python(opts, on_log)
end
---@return AvanteLLMTool[]
function M.get_tools() return M._tools end
function M.get_tools()
return vim
.iter(M._tools)
:filter(function(tool)
if tool.enabled == nil then
return true
else
return tool.enabled()
end
end)
:totable()
end
---@type AvanteLLMTool[]
M._tools = {