Skip to content

[FEATURE]: Add RTL (Right-to-Left) language support in the chat panel #26915

@datacodexlab

Description

@datacodexlab

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Summary

OpenCode currently does not support RTL text rendering in the chat panel. Arabic, Hebrew, and Persian-speaking users experience broken text alignment and poor readability when writing in their native languages.

Problem

When a user types in Arabic (or any RTL language) in the chat input:

  • Text alignment is LTR by default, making RTL text appear reversed or unreadable.
  • There is no option to manually switch the chat panel direction.
  • Mixed LTR/RTL content (e.g., Arabic prompt + English code) is not handled gracefully.

Proposed Solution

  1. Auto-detect text direction using the Unicode Bidirectional Algorithm (bidi) — automatically switch alignment based on the first characters typed.
  2. Manual toggle — allow users to set a preferred text direction in settings:
    {
      "chat": {
        "textDirection": "auto"
      }
    }
    Options: "auto" | "ltr" | "rtl"
  3. Per-message direction — each chat bubble should render in the correct direction based on its content language.

Why This Matters

Arabic-speaking developers are a significant and growing user base in the Middle East and globally. RTL support is a basic accessibility requirement for these users and is standard in all major chat-based tools (Slack, Discord, VS Code chat extensions).

Without RTL support, Arabic developers are forced to write their prompts in English even when they prefer Arabic — this creates a significant barrier to adoption.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions