fix(tui): bound diff rendering work

This commit is contained in:
kingwl
2026-07-31 12:58:30 +08:00
parent 51beb34f97
commit 81ff2894ca
14 changed files with 246 additions and 45 deletions

View File

@@ -605,6 +605,7 @@ export function createTuiChat(
parsed,
ctx.tools.get(event.data.name, agent),
resolved.maxToolOutputLines,
resolved.maxDiffEditLength,
palette,
mdTheme,
)
@@ -748,7 +749,15 @@ export function createTuiChat(
const callId = event.data.message.source.callId
let card = toolCards.get(callId)
if (card === undefined) {
card = new ToolCardComponent('tool', { value: {}, valid: true }, undefined, resolved.maxToolOutputLines, palette, mdTheme)
card = new ToolCardComponent(
'tool',
{ value: {}, valid: true },
undefined,
resolved.maxToolOutputLines,
resolved.maxDiffEditLength,
palette,
mdTheme,
)
card.setVisibility(toolsVisibility)
chat.addChild(card)
allToolCards.add(card)