feat(app): use opentui markdown component behind experimental flag#10900
feat(app): use opentui markdown component behind experimental flag#10900rekram1-node merged 1 commit intoanomalyco:devfrom
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.
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. |
|
Thanks, this feature is so nice |
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