Skip to content

[UX] oclite: Markdown rendering in response output #70

Description

@randomm

Description

Render markdown formatting in LLM response text instead of showing raw markdown.

Target UX

  • Bold text rendered with terminal bold (\x1b[1m)
  • code spans rendered 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions