返回目录
模型与 MCP 插件

dsh-rtl

hami-ashraafi/dsh-rtl

Right-to-left chat layout for DeepSeek Harness (Persian/Arabic)

Stars
2
Forks
1
Issues
0
更新
23 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:hami-ashraafi/dsh-rtl

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-rtl

Right-to-left, right-aligned text for DeepSeek Harness chat — built for Persian and Arabic conversations that the default LTR transcript renders badly.

فارسی · English

A small DSH profile bundle: a Host half that does nothing, plus a Client module that registers one stylesheet and removes it on dispose. No fork of the harness, no patched artifacts, no DOM rewriting.

What it changes

Surface Before After
Assistant messages (Markdown) LTR, left-aligned RTL, right-aligned
User message bubble LTR, left-aligned RTL, right-aligned
Lists inside messages marker on the left, indent on the left marker on the right, mirrored indent
Code blocks, inline code, KaTeX LTR LTR, and unicode-bidi: isolate so their punctuation cannot reorder the sentence
Composer LTR RTL while typing

The sidebar, tab strip, toolbars, and Settings keep their own direction; the stylesheet is scoped to the transcript and the composer.

Install

The bundle is installed the same way as any other DSH plugin — no build step.

From this repository

  1. Plugins in the left sidebar → Add plugin.
  2. Paste the repository address: https://github.com/hami-ashraafi/dsh-rtl
  3. Install, then switch Right-to-left Chat on.

From a local checkout

  1. Plugins → Add plugin.
  2. Paste the absolute path of this directory.
  3. Install, then switch Right-to-left Chat on.

Restart DeepSeek Harness if the manager reports restart-required.

Uninstall

Plugins → Right-to-left Chat → Remove.

How it works

package.json declares three things the Harness reads without running any code:

"dsh": {
  "bundle": { "patch": "./cordis.patch.yml" },
  "client": { "platform": "web", "immediately": true, "inject": ["@deepseek-ai/dsh-client-ui-chat"] }
}
  • dsh.bundle.patch makes this package a bundle: cordis.patch.yml inserts the dsh-rtl row into the profile composition.
  • dsh.client makes the Client module load with the Web UI at boot.

client.js is a lazy factory registered into window.__ModuleLoader__.load — the same contract every shipped DSH client plugin uses:

window.__ModuleLoader__.load({
  id: '@local/dsh-rtl',
  factory(require) {
    return {
      apply(ctx) {
        const style = document.createElement('style');
        style.setAttribute('data-dsh-rtl', '');
        style.textContent = CSS;
        document.head.append(style);
        ctx.effect(() => () => style.remove());
      },
    };
  },
});

Selectors

DSH class names are CSS-module hashes, so the stylesheet matches the stable parts instead: the data-slot="conversation.chat.flow" transcript anchor, the data-chat-turn rows, the data-conversation-scroll container, class names that contain markdown or bubble, and [data-composer-seat] for the editor. If a future Harness release renames one of them, the fix is a one-line selector change in client.js.

Compatibility

Written against DSH 0.2.1-rc.3 (Desktop and Web). It touches only presentation, so a release that changes no chat DOM keeps working.

Connecting it to the Harness project

The harness repository ships no RTL or bidi handling of its own — this repository exists to fill that gap. It follows the project's documented path for community plugins:

The upstream repository has issues and pull requests disabled, so this is distributed as a standalone bundle rather than a patch to the harness sources. The same plugin is also staged in the upstream package shape under upstream/ — packages/client/ui-rtl with the repository's TypeScript, tsconfig, and ?inline CSS conventions — ready to apply if that repository starts accepting contributions.

License

MIT © 2026 hami masoud


فارسی: توضیح کامل فارسی — نصب، حذف، سازگاری و عیب‌یابی — در README.fa.md است.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。