pinkllo/dsh-reasoning-translator
DeepSeek Harness插件:让模型用你的语言写下思维链
Project Overview项目介绍
DSH Web plugin that translates DeepSeek's visible reasoning and final answers only inside the Web UI, leaving session logs untouched. It uses the Host process to call Chrome's built-in Translator API (desktop Chrome 138+ or Edge 138+) or an OpenAI-compatible endpoint, skips text already in the target language, and offers per-block translate buttons. Use it for multilingual reading without external API keys. Note: Cursor's embedded browser lacks Chrome's on-device Translator, so test in desktop Chrome.
DSH Web 翻译插件,仅在 Web UI 内翻译 DeepSeek 的可见推理与最终回复,会话日志保持原样。核心能力是通过 Host 端调用 Chrome 内置 Translator API(桌面 Chrome 138+ 或 Edge 138+)或 OpenAI 兼容接口翻译,并自动跳过目标语言文本,提供按块翻译按钮。适用于需要本地、无需 API 密钥的多语言阅读场景。注意:Cursor 内置浏览器缺少 Chrome 翻译器,需在桌面 Chrome 中测试。
请帮我了解并安装插件:【dsh-reasoning-translator】【https://github.com/pinkllo/dsh-reasoning-translator】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-reasoning-translator
把 pinkllo/dsh-reasoning-translator 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-reasoning-translator
English | 中文
A DeepSeek Harness plugin that translates visible reasoning and final answers in the Web UI only. Session logs are not rewritten.
How it works
The plugin is a Host + browser pair:
- Chrome Translator / LanguageDetector (desktop Chrome 138+ or recent Edge): free, on-device, no API key. The first use of a language pair may download a pack and needs a click.
- OpenAI-compatible API: the Host process calls the endpoint you configure in Settings, so the browser does not hit CORS.
Before translating, the plugin detects the source language and skips text that is already in the target language. You can translate reasoning, the final answer, or both; run automatically or from a per-block Translate button. Preferences restore instantly from localStorage (the API key is never cached there) and sync to the Host settings.yaml translation section, debounced; when the two copies differ, the most recently edited one wins. The Web settings RPC does not expose out-of-tree namespaces, so the plugin uses its own same-origin route.
This is not Chrome’s right-click “Translate this page”. Web pages cannot invoke that menu. The plugin uses the Translator API instead.
Install
# From a local checkout
dsh plugin --profile web add /absolute/path/to/dsh-reasoning-translator
# From GitHub (source install — allow the prepare build when prompted)
dsh plugin --profile web add github:pinkllo/dsh-reasoning-translator
# From npm, once published
dsh plugin --profile web add dsh-reasoning-translator
Then start dsh web (or pnpm dsh web from a harness checkout). Open Settings → Translation.
Settings
| Option | Default | Effect |
|---|---|---|
| Target language | zh |
Language of the displayed translation. |
| Translate reasoning | on | Show a control on Think blocks. |
| Translate answer | on | Show a control on the final answer. |
| Mode | On demand | always translates when a turn settles; on demand waits for the button. |
| Display | Original and translation | Translation only replaces the reasoning/answer body instead of showing both languages. |
| Backend | Chrome built-in | Or OpenAI-compatible. |
| Endpoint / model / API key | OpenAI defaults | Used only for the OpenAI backend. TRANSLATION_OPENAI_API_KEY or OPENAI_API_KEY can supply the key instead. |
Develop
pnpm install
pnpm run build
pnpm test # pure-function unit tests, needs Node 22.6+ (type stripping)
# from a deepseek-harness checkout:
pnpm dsh plugin --profile web add /absolute/path/to/dsh-reasoning-translator
pnpm dsh web
Open http://127.0.0.1:3080. After changing client sources, rebuild and restart dsh web.
Cursor’s embedded browser is Chromium without Chrome’s on-device Translator. If 'Translator' in self is false there, retest in desktop Chrome at the same URL.
ZSeven-W/dsh-openpencil
HanaAyane/dsh-reasoning-effort
HuanLinOTO/dsh-plugin-better-sidebar-plugin-office
omdsh-dev/dsh-office
dingyi222666/dsh-focus-chat
609476965/dsh-LorebookMD