fix(tui): keep read result on the dim-Markdown body path
A read result now carries card:'read', but render()'s genericContent gate was card==='generic' only, so the read body kept its text yet lost the dim-Markdown dimBody treatment the generic card gave it. Admit card:'read' to that gate so its content fallback takes the same dim path, restoring read's TUI rendering to what it was before the read card existed. Refresh the parallel-file-reads TUI golden accordingly and correct the Note's TUI claim on both language sides.
This commit is contained in:
@@ -389,7 +389,13 @@ export class ToolCardComponent implements Component {
|
||||
const glyph = this.result === undefined ? '○' : '●'
|
||||
const rawBody = this.renderBody()
|
||||
const view = this.resultView ?? this.callView
|
||||
const genericContent = view.card === 'generic' ? view.content ?? this.result?.content : undefined
|
||||
// A generic card carries its UI content on the view; a read card is the same
|
||||
// for the TUI, which has no dedicated read rendering — its `content`
|
||||
// fallback (the envelope-stripped file text) takes the generic dim-Markdown
|
||||
// body, so read output is unchanged from before the read card existed.
|
||||
const genericContent = view.card === 'generic' || view.card === 'read'
|
||||
? view.content ?? this.result?.content
|
||||
: undefined
|
||||
const unknownXml = this.definition === undefined && genericContent !== undefined
|
||||
? renderUnknownXml(
|
||||
displayText(contentText(genericContent)),
|
||||
|
||||
Reference in New Issue
Block a user