diff --git a/packages/ui/tui/src/chat/helpers.ts b/packages/ui/tui/src/chat/helpers.ts index e411ce27c9..08e6fa050f 100644 --- a/packages/ui/tui/src/chat/helpers.ts +++ b/packages/ui/tui/src/chat/helpers.ts @@ -110,11 +110,9 @@ export function transcriptToolCallIds(session: Session): Set { * `tool/result`, a regenerated `assistant/message`) rewrite one node for the * model and mark no boundary in the conversation. * - * The replacement check is redundant at both current call sites, because a - * surface-eligible non-append event is a replacement: the marker is mandatory, - * so `Session.append` and the replay fold reject an event that carries none. - * The check keeps the exported predicate true to its name for a third caller, - * rather than making that caller repeat it. + * Both current call sites already test the replacement themselves. The check + * keeps the exported predicate true to its name for a third caller, rather than + * making that caller repeat it. * @param event - event to test. * @returns true when the event compacted a surface range. */ diff --git a/packages/ui/tui/tests/tui.snapshot.ts b/packages/ui/tui/tests/tui.snapshot.ts index f563c88b16..09ff6ba26e 100644 --- a/packages/ui/tui/tests/tui.snapshot.ts +++ b/packages/ui/tui/tests/tui.snapshot.ts @@ -195,7 +195,10 @@ interface CompactionRange { /** * Append one prompt / tool-call / tool-result step, the history a compaction - * shadows on the model surface and the transcript must keep showing. + * shadows on the model surface and the transcript must keep showing. The prompt + * text is rendered verbatim; the tool card's body comes from `bash`'s static + * presenter, so the fixtures pin that the shadowed step's card survives rather + * than the result content below. */ function appendPreCompactionLog(session: Session): CompactionRange { const user = session.append('user/message', createUserMessage({ @@ -220,7 +223,7 @@ function appendPreCompactionLog(session: Session): CompactionRange { step: 1, message: createToolResultMessage({ callId: CallId('old-tool'), - content: [{ type: 'text', text: 'tool output that stays readable after compaction' }], + content: [{ type: 'text', text: 'shadowed step tool output' }], isError: false, }), }, { surfaceOp: 'append' })