anomalyco / anomalyco/opencode
RTL/bidi support for mixed Arabic/English chat output
@kommander is already working on this.
Since Aug 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Problem
When the agent outputs mixed Arabic and English text in the TUI, the bidirectional (bidi) text rendering is broken and hard to read. Arabic text gets interleaved with English in a way that makes the output confusing and unreadable.
Example
When asking a question that requires both Arabic and English in the response, the output looks jumbled:
استخدم `deepseek-v4-flash-free` لأنه أقوى نموذج مجاني
The inline code, English words, and Arabic text don't render in the correct reading order.
Expected Behavior
- Arabic text should render RTL
- English text/code should render LTR
- Mixed content should follow Unicode bidirectional algorithm (UBA) properly
- The reading order should be natural for bilingual users
Suggestion
- Integrate a bidi text library (e.g.,
bidi-jsor similar) to properly render mixed-direction text in the TUI - Or use a terminal that supports bidi natively and document it
Environment
- OpenCode TUI
- Windows (but likely affects all platforms)
Use Case
Many developers work in bilingual environments (Arabic + English) and need clear, readable output when the agent mixes both languages in responses.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.