chore: make tool func type more accurate (#1369)

This commit is contained in:
Peter Cardenas
2025-02-24 05:49:06 -08:00
committed by GitHub
parent c2188e1afd
commit fe496a9573
3 changed files with 37 additions and 69 deletions

View File

@@ -323,10 +323,12 @@ vim.g.avante_login = vim.g.avante_login
---@field on_stop AvanteLLMStopCallback
---@field on_tool_log? function(tool_name: string, log: string): nil
---
---@alias AvanteLLMToolFunc fun(input: any, on_log?: (fun(log: string): nil) | nil): (boolean | string | nil, string | nil)
---
---@class AvanteLLMTool
---@field name string
---@field description string
---@field func? fun(input: any): (string | nil, string | nil)
---@field func? AvanteLLMToolFunc
---@field param AvanteLLMToolParam
---@field returns AvanteLLMToolReturn[]
---@field enabled? fun(): boolean