Problem
Current markdown renderer (cli/lite/markdown.ts) is broken:
- Bold text not showing
- Code blocks show raw backticks
wrap() function corrupts ANSI escape codes
Solution
Replace with Markdansi — purpose-built for streaming LLM output.
Benefits
| Feature | Current | With Markdansi |
|---|
| Bold | ❌ broken | ✅ |
| Code blocks | ❌ shows backticks | ✅ with box, gutter |
| Tables | ❌ | ✅ GFM, unicode |
| Hyperlinks | ❌ | ✅ OSC-8 |
| Streaming | ❌ breaks mid-token | ✅ hybrid buffering |
Integration
import{createMarkdownStreamer,render}from"markdansi"conststreamer=createMarkdownStreamer({render: (md)=>render(md,{width: 80,theme: "default"}),mode: "hybrid",})// Stream: streamer.push(chunk) → ANSI string// Finish: streamer.finish() → final ANSIPackage
- npm: markdansi
- Size: ~70KB
- Node: >=22 (matches oclite)
- License: MIT
Acceptance Criteria
Problem
Current markdown renderer (
cli/lite/markdown.ts) is broken:wrap()function corrupts ANSI escape codesSolution
Replace with Markdansi — purpose-built for streaming LLM output.
Benefits
Integration
Package
Acceptance Criteria