Problem
Fenced code blocks in the TUI are recognized and rendered, but their contents have no syntax highlighting. This makes types, literals and keywords harder to distinguish when reading code in an assistant response.
Verified in local source at 9cb5cc93c03f8d07550e739164d5e33168892563: packages/cli/src/pi-transcript.ts uses pi-tui's Markdown component; markdownTheme in packages/cli/src/pi-transcript-format.ts sets codeBlock: (text) => text and does not configure the available highlightCode(code, lang) hook. This is a presentation enhancement, not a claim that fenced-code parsing is broken.
Representative input:
```typescript
todos: { content: string, status: "pending" | "in_progress" | "completed", activeForm?: string }[]
```
Desired outcome
Enable syntax highlighting by default for supported code-block languages in both the live conversation and detailed transcript reader, using consistent terminal styles.
Scope is code-block syntax highlighting. Fence appearance, wrapping redesign, Ctrl+O semantics, a raw-Markdown mode, clipboard features and general tool-card redesign are outside this issue. Related reading/navigation work remains in #5016; this issue does not imply those capabilities need to be rebuilt.
Alternatives or workarounds
Read the current plain code blocks or inspect code in an external editor. Replacing the Markdown renderer is not required; the existing pi-tui hook provides an integration point. Select the highlighting implementation during development based on terminal compatibility, dependency cost and streaming behavior.
AI assistance disclosure: Drafted with Codex at the author's direction.
Problem
Fenced code blocks in the TUI are recognized and rendered, but their contents have no syntax highlighting. This makes types, literals and keywords harder to distinguish when reading code in an assistant response.
Verified in local source at
9cb5cc93c03f8d07550e739164d5e33168892563:packages/cli/src/pi-transcript.tsuses pi-tui's Markdown component;markdownThemeinpackages/cli/src/pi-transcript-format.tssetscodeBlock: (text) => textand does not configure the availablehighlightCode(code, lang)hook. This is a presentation enhancement, not a claim that fenced-code parsing is broken.Representative input:
Desired outcome
Enable syntax highlighting by default for supported code-block languages in both the live conversation and detailed transcript reader, using consistent terminal styles.
Scope is code-block syntax highlighting. Fence appearance, wrapping redesign, Ctrl+O semantics, a raw-Markdown mode, clipboard features and general tool-card redesign are outside this issue. Related reading/navigation work remains in #5016; this issue does not imply those capabilities need to be rebuilt.
Alternatives or workarounds
Read the current plain code blocks or inspect code in an external editor. Replacing the Markdown renderer is not required; the existing pi-tui hook provides an integration point. Select the highlighting implementation during development based on terminal compatibility, dependency cost and streaming behavior.
AI assistance disclosure: Drafted with Codex at the author's direction.