Codeman icon indicating copy to clipboard operation
Codeman copied to clipboard

it is not show correct for rtl language like persian

Open maminmsh opened this issue 1 month ago • 2 comments

it is not show correct for rtl language like persian

maminmsh avatar Oct 25 '26 13:10 maminmsh

Thanks for the report! Where you see it matters, because Codeman shows text in two different ways:

1. The terminal pane. This is xterm.js, the same terminal emulator VS Code's terminal uses, and it does not support right-to-left text yet (upstream: xtermjs/xterm.js#701, open since 2017). It puts each character in its own cell from left to right, so Persian comes out in reverse order, and the default GPU renderer also draws the letters unjoined. Codeman cannot fix that on its side without replacing the terminal.

A partial workaround on desktop: App Settings → Terminal & Input → turn off WebGL Renderer, then reload. The letters join and each word reads correctly, but the words of a sentence still run left to right. (Phones already use this renderer.)

2. The Response Viewer (the rendered view of the agent's answers). This one is HTML, so it can be fixed. Until now every paragraph was laid out left to right, so Persian was left-aligned with the punctuation on the wrong end. I have a fix ready: each paragraph, list, quote and table takes its direction from its own first letter, and code and file paths stay left to right, so a sentence that starts with npm install still reads right to left. The phone's Compose dialog gets the same treatment. The pull request will show up on this issue.

Could you tell me where you saw the problem (terminal or Response Viewer), and on phone or desktop? A screenshot would help a lot.

Ark0N avatar Oct 25 '26 15:10 Ark0N

The Response Viewer part of this is in the 1.49.0 release. Persian, Arabic and Hebrew now read right to left there and in the File Viewer's markdown view, each block by its own first letter, with code staying left to right. The phone's Compose dialog does the same.

The terminal pane is unchanged, since xterm.js has no right-to-left support yet (xtermjs/xterm.js#701). The WebGL Renderer workaround from my last comment still applies. Thanks for reporting it. If anything still reads wrong, a screenshot in a new issue helps.

Ark0N avatar Nov 06 '26 10:11 Ark0N