Open
Conversation
…yntax highlighting Comprehensive markdown rendering overhaul for both CLI and TUI. Features: - Table rendering with box-drawing borders, word wrap, inline markdown - Theme integration: CLI and TUI use user's selected theme - Syntax highlighting via tree-sitter for 10+ languages - Unified architecture with shared rendering logic - Smart TTY detection for clean piped output - Escaped pipe support for TypeScript union types - Double-width character support (Unicode/emoji) Fixes (from peer review): - Table parsing now preserves all columns (fixed last column drop) - Conceal toggle works in markdown code blocks - Link width calculation includes full URL for proper alignment - Theme fetch wrapped in try/catch to prevent crashes Architecture: - New markdown-renderer.ts (1255 lines) - core rendering engine - New theme-loader.ts (98 lines) - theme loading and conversion - Unified TextChunk system for CLI (ANSI) and TUI (StyledText) - Hybrid TUI rendering: text via custom renderer, code via tree-sitter Changes: - packages/opencode/src/cli/markdown-renderer.ts (new) - packages/opencode/src/cli/theme-loader.ts (new) - packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (+117) - packages/opencode/src/cli/cmd/run.ts (+8) - packages/opencode/src/cli/ui.ts (+5) Closes anomalyco#3845, anomalyco#7671, anomalyco#4988, anomalyco#5675
…e breaks Enhances table rendering in markdown-renderer.ts: - Add <br> tag support: converts to newlines within table cells - Add word wrapping for long tokens: splits on / and - characters - Add bold text continuity across wrapped lines: ensures each line has complete **...** markers so renderInlineThemed works correctly - Recursive token breaking: continues splitting until all parts fit This enables proper rendering of complex table cells with bold headers, line breaks, and long text that needs to wrap within column widths.
Resolves build failures caused by merge that auto-resolved conflicts and removed essential SDK generated files. The missing sdk.gen.ts and client.gen.ts files have been restored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
How did you verify your code works?