fix: pass context to provider for stream data parsing (#1475)

* fix: pass context to provider for stream data parsing

* fix: luatype

---------

Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
brook hong
2025-03-04 00:20:27 +08:00
committed by GitHub
parent c6d5527ea8
commit 6bd966e8e2
4 changed files with 8 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ vim.g.avante_login = vim.g.avante_login
---@field tool_use_list? AvanteLLMToolUse[]
---@field retry_after? integer
---
---@alias AvanteStreamParser fun(line: string, handler_opts: AvanteHandlerOptions): nil
---@alias AvanteStreamParser fun(ctx: any, line: string, handler_opts: AvanteHandlerOptions): nil
---@alias AvanteLLMStartCallback fun(opts: AvanteLLMStartCallbackOptions): nil
---@alias AvanteLLMChunkCallback fun(chunk: string): any
---@alias AvanteLLMStopCallback fun(opts: AvanteLLMStopCallbackOptions): nil