dsh-fa-rtl
メンテナンス: 活発mehdinikzad68/dsh-fa-rtl
DeepSeek Harness Web GUIでペルシャ語の会話文を右から左へ表示し、文章ごとの方向を自動判定します。
$ dsh plugin add dsh-fa-rtl0
スター
0
フォーク
JavaScript
言語
MIT
ライセンス
2026-10-16
作成日
2026-10-16
最終プッシュ
README
dsh-fa-rtl
Right-to-left display for Persian (Farsi) chat messages in the DeepSeek Harness Web GUI.
فارسی | English
Persian answers from the model — and your own Persian messages — render right-to-left and right-aligned, while English paragraphs, code blocks, and tables keep their original left-to-right layout. It is a pure DSH plugin: no modification to the application's files, no build toolchain, nothing to configure after install.
How it works
Every chat row DSH ships is laid out left-to-right (LTR); Persian text inside it is bidi-reordered by the Unicode algorithm, but the base direction stays LTR — so Persian paragraphs stay left-aligned and punctuation drifts to the wrong edge.
The web-standard fix is dir="auto". Since plugins cannot touch the React-rendered DOM, this plugin uses its exact CSS equivalent:
unicode-bidi: plaintext;
text-align: start;
unicode-bidi: plaintext (CSS Writing Modes 4) lets each text block choose its own direction from the block's first strong character — a paragraph starting with Persian renders RTL and right-aligns; a paragraph starting with English is unchanged. Consequences:
- Mixed answers (Persian prose + code + tables) render correctly: prose RTL,
<pre>code deliberately untouched (stays LTR), table cells per-cell, list markers flip with their list. - The selector scopes only to stable
data-*attributes thatdsh-client-ui-chatemits on its flow items (data-chat-flow-kind,data-chat-group-part,data-turn-process-answer). Build-time hashed class names are never referenced, so the plugin survives UI updates. If an attribute ever changes, the CSS simply stops matching — it cannot break the app.
Install
Requires DSH ≥ 0.2.0-rc.2 with a web composition (desktop or web profile). Any Chromium/Electron ≥ 105 works.
From the DSH Web UI
Open the Plugins page in the sidebar and install the bundle from this repository's GitHub address (github:mehdinikzad68/dsh-fa-rtl). Installation runs pnpm in the profile directory and enables the bundle by default.
From the CLI
dsh plugin --profile desktop add github:mehdinikzad68/dsh-fa-rtl
# or, for the web profile:
dsh plugin --profile web add github:<owner>/dsh-fa-rtl
Installation normally enables the bundle automatically; if not, toggle it on from the Plugins page. Restart the app once if your profile applies patches only at startup.
From an agent session
Ask the agent to use the plugin_manager tool with action install_bundle and the GitHub spec. Each management call requires your approval.
Local development (no installation)
Clone the repo and point a profile patch row at the module file (ESM cannot import a directory). In <profile-dir>/cordis.patch.yml:
- insert:
- id: fa-rtl
name: 'C:\path\to\dsh-fa-rtl\lib\index.js'
Verify
- Ask the model something in Persian — the Persian text renders RTL and right-aligned; numbers and punctuation sit correctly; code stays LTR.
- Browser console (or DevTools) shows:
[dsh-fa-rtl] active — Persian chat text now renders right-to-left <head>contains a<style data-plugin="dsh-fa-rtl">tag.- Settings → Plugins shows no synchronization error for the bundle.
Uninstall
Remove the bundle from the Plugins page or with dsh plugin --profile <profile> remove dsh-fa-rtl (installed route), or delete the fa-rtl insert block from cordis.patch.yml (local route). The module system removes the plugin's stylesheet when the entry is disabled.
Package layout
dsh-fa-rtl/
├── package.json # manifest: dsh.bundle.patch + dsh.client declaration
├── cordis.patch.yml # bundle patch: registers the fa-rtl Loader row on install
├── lib/index.js # Host half (Node): imports cleanly, mounts as a Cordis plugin
├── lib/client.js # Client half (browser): hand-written DSH client bundle, injects CSS
├── README.md / README.fa.md
└── LICENSE # MIT
Extend
- Want more surfaces RTL (e.g.
ask_user_questioncards)? Widen the scope selector list inlib/client.jsand save — HMR hot-swaps the bundle, or restart once. - Want forced RTL for everything (even English text)? Replace
unicode-bidi: plaintextwithdirection: rtlin the same file.
Known limitations
- A paragraph that starts with a Latin word (e.g. «VS Code را نصب کن») resolves LTR in auto mode — the same behavior as
dir="auto"everywhere on the web; the Persian runs inside still order correctly. - Overflowing wide tables keep their physical margins; very wide Persian tables may align slightly differently.
- Question cards (
ask_user_question) and some side bars are intentionally out of scope for v1.
License
その他 の他のプラグイン
deepwiki-rs
by sopaco
コードから正確な技術ドキュメントと、AIエージェントが扱いやすいコンテキストを生成するツール。人とエージェント向けに構造化された資料作成を支援します。
dsh-purge
by mmparko
YuJunZhiXue/dsh-purgeの全履歴ミラーで、ブランチ、73個のタグ、コミット履歴を収録しています。利用時はREADMEの著作者表示と二次利用条件を確認してください。
dsh-plugin-radar
by adamplatin123
DSH プラグイン生態系のオープンソース・レーダー。1.5 万件超の候補を自動発見し、k8s ランタイムで 1 万件超を実測、15 分ごとのスナップショット処理を実行。プラグイン目録は自動生成される成果物です。
picgo-core
by picgo
CLI と API の両方で使える画像アップロードエンジン
