forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Description
Render markdown formatting in LLM response text instead of showing raw markdown.
Target UX
- Bold text rendered with terminal bold (
\x1b[1m) code spansrendered with distinct styling- Code blocks with syntax highlighting (basic)
- Bullet points and numbered lists formatted properly
- Headers with appropriate sizing/coloring
Current behavior
Raw markdown characters are written to stdout (**bold**, \code`, ##` headers).
Requirements
- Parse streaming text for markdown tokens
- Apply ANSI styling in real-time as chunks arrive
- Handle partial markdown (e.g., first
*arrives in one chunk, second*in the next) - Keep it lightweight — no full AST parser, just regex-based token matching
Files
packages/opencode/src/cli/lite/index.ts— text chunk rendering- New file:
packages/opencode/src/cli/lite/markdown.ts(potential)
Metadata
Metadata
Assignees
Labels
No labels