feat(tui): add syntax highlighting for code blocks

Add syntax highlighting to markdown code blocks in the TUI using
cli-highlight with a VS Code Dark-inspired color theme.

Features:
- 191 languages supported via highlight.js
- Auto-detection fallback for unknown languages
- Graceful fallback to plain styling on errors
- VS Code Dark-inspired color palette

Colors:
- Purple: keywords (const, function, if, etc.)
- Teal: built-ins (console, Math, print, etc.)
- Orange: strings
- Green: numbers, comments
- Yellow: function names
- Blue: literals (true, false, null)
- Red: diff deletions
- Light blue: variables, parameters

🤖 AI-assisted (Claude) - fully tested locally
This commit is contained in:
Vignesh Natarajan
2026-01-18 16:24:14 -08:00
parent dec71dbcf1
commit 0e3c9e4a0e
4 changed files with 168 additions and 0 deletions

3
pnpm-lock.yaml generated
View File

@@ -76,6 +76,9 @@ importers:
chromium-bidi:
specifier: 12.0.1
version: 12.0.1(devtools-protocol@0.0.1561482)
cli-highlight:
specifier: ^2.1.11
version: 2.1.11
commander:
specifier: ^14.0.2
version: 14.0.2