fix: tool logs rendering (#2315)

This commit is contained in:
yetone
2025-06-24 11:00:26 +08:00
committed by GitHub
parent b6668e2e4c
commit c48808b4a8
5 changed files with 41 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ local M = {}
M.__index = M
---@param message AvanteLLMMessage
---@param opts? {is_user_submission?: boolean, visible?: boolean, displayed_content?: string, state?: avante.HistoryMessageState, uuid?: string, selected_filepaths?: string[], selected_code?: AvanteSelectedCode, just_for_display?: boolean, is_dummy?: boolean, turn_id?: string}
---@param opts? {is_user_submission?: boolean, visible?: boolean, displayed_content?: string, state?: avante.HistoryMessageState, uuid?: string, selected_filepaths?: string[], selected_code?: AvanteSelectedCode, just_for_display?: boolean, is_dummy?: boolean, turn_id?: string, is_calling?: boolean}
---@return avante.HistoryMessage
function M:new(message, opts)
opts = opts or {}
@@ -23,7 +23,8 @@ function M:new(message, opts)
if opts.selected_code ~= nil then obj.selected_code = opts.selected_code end
if opts.just_for_display ~= nil then obj.just_for_display = opts.just_for_display end
if opts.is_dummy ~= nil then obj.is_dummy = opts.is_dummy end
obj.turn_id = opts.turn_id
if opts.turn_id ~= nil then obj.turn_id = opts.turn_id end
if opts.is_calling ~= nil then obj.is_calling = opts.is_calling end
return obj
end