feat: add generic type for llm func (#1373)

This commit is contained in:
yetone
2025-02-24 21:54:36 +08:00
committed by GitHub
parent fe496a9573
commit b627b335dd
3 changed files with 21 additions and 41 deletions

View File

@@ -2291,8 +2291,7 @@ function Sidebar:create_input_container(opts)
table.insert(tools, {
name = "add_file_to_context",
description = "Add a file to the context",
---@param input { rel_path: string }
---@type AvanteLLMToolFunc
---@type AvanteLLMToolFunc<{ rel_path: string }>
func = function(input)
self.file_selector:add_selected_file(input.rel_path)
return "Added file to context", nil