-
Notifications
You must be signed in to change notification settings - Fork 8.9k
feat(app): use opentui markdown component behind experimental flag #10900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces experimental support for the native opentui <markdown> component to fix markdown table formatting issues. The change replaces <code filetype="markdown"> with <markdown> in the TextPart component, controlled by the OPENCODE_EXPERIMENTAL_MARKDOWN flag (also enabled via OPENCODE_EXPERIMENTAL).
Changes:
- Added new experimental flag
OPENCODE_EXPERIMENTAL_MARKDOWNto enable the native markdown component - Updated TextPart component to conditionally use either the new
<markdown>component or the existing<code>component based on the flag - ReasoningPart remains unchanged and continues using the
<code>component
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/opencode/src/flag/flag.ts | Adds the OPENCODE_EXPERIMENTAL_MARKDOWN flag following the existing experimental flag pattern |
| packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | Imports Flag module and wraps TextPart's markdown rendering in a Switch/Match to conditionally use the new markdown component |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can you add a video of usage? Maybe something similar to seeing how it handles a case similar to this tweet: |
I don't think a video is needed, it's pretty much documented here anomalyco/opentui/pull/433, but also #3845 |
|
@remorses, take a look at what I shared through Discord about the conceal feature. |
Swaps
<code filetype="markdown">with the native opentui<markdown>component in TextPart, gated behindOPENCODE_EXPERIMENTAL_MARKDOWN(also enabled byOPENCODE_EXPERIMENTAL).ReasoningPart is left unchanged for now.
Fix #7671
Fix #3845
Still experimental, sometimes result does not look great, for example multiline quotes. Will land more improvements in opentui
CI seems to failing at Playwright e2e "file-tree can expand folders and open a file" which is unrelated