feat: tools (#1180)

* feat: tools

* feat: claude use tools

* feat: openai use tools
This commit is contained in:
yetone
2025-02-05 22:39:54 +08:00
committed by GitHub
parent 1726d32778
commit 1437f319d2
17 changed files with 1321 additions and 74 deletions

View File

@@ -141,8 +141,10 @@ L5: pass
history_messages = history_messages,
instructions = vim.json.encode(doc),
mode = "suggesting",
on_start = function(_) end,
on_chunk = function(chunk) full_response = full_response .. chunk end,
on_complete = function(err)
on_stop = function(stop_opts)
local err = stop_opts.error
if err then
Utils.error("Error while suggesting: " .. vim.inspect(err), { once = true, title = "Avante" })
return