ディレクトリに戻る

dsh-fa-rtl

メンテナンス: 活発

mehdinikzad68/dsh-fa-rtl

DeepSeek Harness Web GUIでペルシャ語の会話文を右から左へ表示し、文章ごとの方向を自動判定します。

GitHub で見る
$ dsh plugin add dsh-fa-rtl

インストール方法

dsh には中央のインストールコマンドはありません。このプラグインのエントリ(下の README に記載)をプロファイルまたはパッチ設定に追加し、再起動します。

インストールの仕組み

0

スター

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 that dsh-client-ui-chat emits 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

  1. Ask the model something in Persian — the Persian text renders RTL and right-aligned; numbers and punctuation sit correctly; code stays LTR.
  2. Browser console (or DevTools) shows: [dsh-fa-rtl] active — Persian chat text now renders right-to-left
  3. <head> contains a <style data-plugin="dsh-fa-rtl"> tag.
  4. 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_question cards)? Widen the scope selector list in lib/client.js and save — HMR hot-swaps the bundle, or restart once.
  • Want forced RTL for everything (even English text)? Replace unicode-bidi: plaintext with direction: rtl in 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

MIT

広告

DSH Plugins は DeepSeek Harness プラグインの独立したコミュニティ ディレクトリです。DeepSeek との提携・公認はありません。サードパーティ製プラグインはセキュリティ監査を受けていません。インストール前にソースコードをご確認ください。

DeepSeek Harnessの新着プラグインを毎週お届け。スパムはありません。