feat(tui): render Mermaid diagrams as terminal images (#6320)

* feat(tui): render Mermaid diagrams as terminal images

* perf(tui): streamline Mermaid rendering and resource ownership

* fix(tui): clarify diagram navigation hints

* fix(tui): release viewer layout leases and retain retry targets

* docs(tui): keep Mermaid guide focused on usage
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-20 17:28:36 +08:00
1 parent 9b5d552f40
commit 9adbcc2cef
31 files changed
+1983 -21

No files matched your search

+8
View File
@@ -4,6 +4,7 @@ import {
SyntaxStyle,
TextAttributes,
parseColor,
rgbToHex,
type ColorInput,
type TextChunk,
} from "@opentui/core"
@@ -142,6 +143,13 @@ export function transcriptTheme(palette: Palette, backgroundKnown: boolean): Tra
userBackground: backgroundKnown ? palette.userBackground : null,
border: palette.border,
syntax: syntaxStyle(palette),
diagramColors: {
foreground: rgbToHex(parseColor(palette.text)),
muted: rgbToHex(parseColor(palette.muted)),
surface: rgbToHex(parseColor(palette.userBackground)),
border: rgbToHex(parseColor(palette.border)),
accent: rgbToHex(parseColor(palette.accent)),
},
}
}