fix: refine tools (#2229)

This commit is contained in:
yetone
2025-06-16 01:27:39 +08:00
committed by GitHub
parent b8aa182c3f
commit fcf457ed7f
15 changed files with 247 additions and 169 deletions

View File

@@ -15,6 +15,8 @@ After each tool use, the user will respond with the result of that tool use, i.e
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
]]
M.support_streaming = true
M.enabled = function() return Config.mode == "agentic" end
---@type AvanteLLMToolParam
@@ -54,7 +56,7 @@ M.returns = {
},
}
---@type AvanteLLMToolOnRender<AttemptCompletionInput>
---@type avante.LLMToolOnRender<AttemptCompletionInput>
function M.on_render(opts)
local lines = {}
table.insert(lines, Line:new({ { "✓ Task Completed", Highlights.AVANTE_TASK_COMPLETED } }))