You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
در نسخه فعلی ، هنگام استفاده از زبان فارسی، کادر چت و محتوای پیامها بهصورت چپچین نمایش داده میشود. و امکان راست چین کردن وجود ندارد.
این موضوع باعث کاهش خوانایی، تجربه کاربری ضعیفتر و ناسازگاری با استانداردهای زبانهای راستبهچپ میشود.
درخواست دارم امکان راستچین شدن کامل رابط چت (شامل ورودی، خروجی و جهت متن) برای زبانهای RTL مانند فارسی اضافه شود.
این قابلیت تجربه کاربران فارسیزبان را بهطور چشمگیری بهبود میدهد.
In the current version, when using the Persian language, the chat box and message content are displayed left-aligned, and there is no option to align them to the right.
This reduces readability, weakens the user experience, and creates inconsistency with the standards of right-to-left languages.
I would like to request the addition of full right-to-left alignment support for the chat interface, including the input field, output messages, and text direction, for RTL languages such as Persian.
This feature would significantly improve the experience for Persian-speaking users.
Checks for any Arabic character within the first 30 characters of the text:
Arabic found → RTL
No Arabic → LTR
Solves mixed-language cases:
"This is a long English sentence... مع عربي في النهاية" → LTR (Arabic after 48 chars)
"Hello مرحبا" → RTL (Arabic within first 30)
2. Prompt Input
Uses only 3 characters instead of 30 — switches to RTL instantly when the user types the first Arabic character.
3. List Containers (<ol>, <ul>)
These are skipped — they inherit direction from their parent (the Arabic paragraph). Individual <li> elements get direction based on their own content.
4. Locking Code & Links LTR
When an element is RTL, all code and anchor elements inside are forced LTR:
For those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
Injects RTL system prompts so the AI responds in your language
Protects inline code (console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolates
Works out-of-the-box for Arabic, Persian, Hebrew, Urdu, etc.
Fixes character ordering and mixed-direction (BiDi) text issues
Current limitations:
Right-alignment: The plugin fixes the ordering of words and code (which fixes a lot of the unreadable output), but the text is still left-aligned. Full right-alignment requires native support in the renderer (like CSS dir="rtl" as discussed in this issue, or native alignment in the CLI TUI).
Streaming: It formats the text after the response completes. (We are proposing a streaming hook to fix this).
Activity
mynameistito commentedon Jun 21, 2026
Translation to English:
SaberMarandi commentedon Jun 26, 2026
هنوز این مشکل برطرف نشده
NXR8 commentedon Jul 16, 2026
RTL OpenCode — Arabic RTL Support System
A system that adds Right-to-Left (RTL) text support to the OpenCode Desktop app while keeping code blocks LTR.
How It Works
1. Arabic Detection
Checks for any Arabic character within the first 30 characters of the text:
Solves mixed-language cases:
2. Prompt Input
Uses only 3 characters instead of 30 — switches to RTL instantly when the user types the first Arabic character.
3. List Containers (
<ol>,<ul>)These are skipped — they inherit direction from their parent (the Arabic paragraph). Individual
<li>elements get direction based on their own content.4. Locking Code & Links LTR
When an element is RTL, all code and anchor elements inside are forced LTR:
5. MutationObserver for Streaming
Monitors DOM changes with:
Re-attaches the
inputevent listener on the prompt input when React re-renders it.Console Snippet
Testing
allow pastingin the Consolerazavioo commentedon Jul 29, 2026
Community plugin available:
opencode-rtlFor those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
What it fixes today:
console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolatesCurrent limitations:
dir="rtl"as discussed in this issue, or native alignment in the CLI TUI).Repo: https://github.com/razavioo/opencode-rtl
razavioo commentedon Sep 27, 2026
برای راستچین شدن کادر چت میتونید از پلاگین opencode-rtl استفاده کنید.
این پلاگین متنهای فارسی/عربی رو با کاراکترهای یونیکد bidi ایزوله میکنه تا ترمینال درست نمایش بده.
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #26915, which tracks RTL (right-to-left) support in the desktop chat. Please add your details and 👍 there.
بهعنوان تکراریِ #26915 بسته شد؛ لطفاً جزئیات و 👍 را آنجا اضافه کنید.