Preface¶
When using the Web interface in DeepSeek Harness (DSH) to chat with agents, the input area defaults to left-to-right (LTR) layout. If you type Arabic or other right-to-left (RTL) text in the chat box, the cursor, alignment, and reading order often end up incorrect; if you switch the entire page to RTL, the sidebar, column layout, and the rest of the UI will also become misaligned. The community plugin dsh-rtl-chat-box (maintained by Mhmd7-7) changes only the writing direction of the chat input box (and optionally the history message area), without touching the page root layout. Below we introduce what it does, how to install it, and how to use it.
What Is This¶
dsh-rtl-chat-box is a client (Web) plugin for DSH: it adds a “chat box direction” control to the dsh web GUI. Its official description is: Adds an RTL chat box direction control to the dsh web GUI.
The plugin’s current version is 0.4.0 (MIT license). It declares compatibility with dsh 0.1.5-rc.2 in package.json; other dsh versions have not been verified by the author. The host-side lib/index.js is an empty implementation; the actual logic lives in the browser-side lib/client.js (stylesheet + settings item).
Core Features¶
Only Modify the Chat Box, Not the Entire Page¶
The sidebar, column splits, and other UI elements retain their original LTR layout; the scope of changes is limited to the composer (input box) and the transcript message text that you enable in settings.
Settings Item: Settings → General → Chat box direction¶
| Option | Effect |
|---|---|
| RTL | The chat box becomes RTL: cursor, alignment, and reading order go right to left. |
| LTR | Restore to LTR. |
| Auto | Auto-direction based on your input: Arabic paragraphs become RTL, English stays LTR; list items, paragraphs, and each line within the input box (and in sent messages under Auto) each follow the language. |
| Smart bidi | Keeps correct order for mixed Arabic-English within a single message (applies unicode-bidi: plaintext to the input box); forced on in Auto mode. |
| Also message text | Off by default: affects only the chat box. When enabled, sent messages and transcript paragraphs also follow the direction; forced on under Auto, otherwise sent Arabic would still display as LTR. |
In RTL mode, pre / code / kbd / samp are fixed to LTR to prevent code blocks from being out of order.
Integration with Lexical Rich Text Input¶
The composer in the DSH Web GUI is not a textarea, but a Lexical-bound contenteditable, where each line corresponds to a block-level element (e.g., p, li). The plugin acts on the host and its block-level children via CSS, making Auto / Smart bidi not depend on whether Lexical writes dir="auto" on blocks.
In Auto mode, ordered/unordered lists determine whether the marker is on the left or right based on the first-character language of each item (e.g., for Arabic items the marker is on the right). In full-box RTL / LTR modes, the entire list uses a unified direction, preserving outside markers and hanging indents.
Under Auto, two types of UI still follow physical defaults (because unicode-bidi: plaintext does not change the element’s direction): the blockquote vertical bar stays on the left; task list checkbox spacing still uses the GUI’s default physical margins. Full-box RTL mode mirrors the blockquote vertical bar and checkbox spacing.
Preference Persistence¶
The direction selection is saved in the browser’s localStorage under the key dsh-rtl-chat-box, and remains effective after page refresh (after installing the plugin you must restart the web profile as described below; this is unrelated to refreshing).
Installation and Activation¶
The plugin targets the web profile. The installation command comes from the repository README:
dsh plugin --profile web add "github:Mhmd7-7/dsh-rtl-chat-box"
If you use a local directory instead of the GitHub source, simply replace the spec above with the path (the README example uses a Windows path form).
After installation you must restart the web profile: the client bundle is built at server startup, and the running GUI will not hot-load new plugins; refreshing the page alone is not enough—the host uses an immutable cache for /plugins/.../client.js, and the content revision is written to window.__DSH_BOOT__ at startup.
Uninstall:
dsh plugin --profile web remove dsh-rtl-chat-box
Typical Usage¶
- Install using the command in the previous section and restart the web profile.
- Open the DSH Web interface, go to Settings → General, and find Chat box direction.
- When writing Arabic or RTL scripts, choose RTL or Auto; when writing primarily English, choose LTR or Auto.
- If you want Arabic paragraphs in the conversation transcript to also align correctly, enable Also message text (Auto automatically enables this option).
- When mixing Arabic and English, enable Smart bidi (already included under Auto).
No additional configuration files are needed; preferences are saved only via the settings item above and localStorage.
Use Cases and Notes¶
Who it’s for: Developers or users who frequently chat with agents in Arabic or other RTL text in the DSH Web GUI, while wanting the sidebar and overall interface to remain LTR.
Runtime scope and permissions: DSH plugins run with the permissions of the current dsh process. This plugin has no file, network, or child process access on the host side; on the browser side it only injects one <style> into document.head (removed when the plugin fiber is destroyed), reads/writes the localStorage key dsh-rtl-chat-box, and registers one row in the General settings. The package has no runtime npm dependencies, nor preinstall / install / postinstall / prepare scripts. A directory site listing is not a security audit; please review the source code and the MIT license yourself before installing.
Environment: Requires @deepseek-ai/cordis ^4.0.1 (resolved by the profile); the Node version depends on your installed dsh, the plugin itself has no separate build step, and installing from GitHub does not require configuring allowBuilds in pnpm-workspace.yaml.
Ecosystem notes: DSH adopts an “everything is a plugin” extension approach; community directories such as SkillHub are independent sites with no official affiliation with DeepSeek / 幻方.
Links¶
- Community directory: dsh-rtl-chat-box
- Source code and full documentation: GitHub — Mhmd7-7/dsh-rtl-chat-box
Through the steps above, you can stably switch between RTL, LTR, or auto-layout by language in the Web chat box without altering the overall page layout.