dsh-cot-translate: Real-time Chain of Thought Translation in DSH Interface; Local-first, No Session Data Modification

Preface

When using models with reasoning capabilities in DeepSeek Harness (DSH), the content within the reasoning blocks (Think) is often in English, even if the main conversation is in Chinese. Manually copying these segments to translation tools is slow and prone to mixing translations into subsequent context. Community members have resorted to general-purpose translation or opening a separate model specifically to “read thoughts,” but these methods often require manual intervention or alter conversation records.

Below is an introduction to dsh-cot-translate: a DSH plugin that operates at the display layer, translating the model’s chain-of-thought into your chosen target language in real-time. It defaults to a local translation model, ensuring the original text and conversation context remain unchanged.

What is this

Released by maintainer MUMU-DADA, dsh-cot-translate is categorized under “Model Reasoning” in the DSH Plugin Directory. The current npm package version is 0.2.0 (MIT License).

The plugin does exactly one thing: translates the Think reasoning process into readable text without modifying any conversation data. The translation appears only on the screen; it is not written back to the conversation nor enters the model’s subsequent context. The README specifies compatibility with DSH 0.2.0-rc.2 / 0.2.1-rc.2 and Cordis 4.0.4 / 4.0.5 (versions built into DSH Desktop).

Core Features

Bilingual Comparison and Interaction

Upon expanding any Think reasoning block, the reasoning area transforms into a dual-column layout with the original text on the left and the translation on the right, aligned paragraph by paragraph. Hovering over a paragraph on either side highlights the corresponding paragraph on the other side simultaneously. If the area width is less than 520px, it automatically switches to a stacked vertical layout; collapsing the Think row restores the original DSH styling.

Display Layer Isolation and Content Protection

Translation occurs strictly at the display layer: the plugin hooks only into the native ReasoningRow ([data-variant="think"]) and does not replace the assistant-step renderer. The README documents that it can coexist with GenUI plugins that only take over code blocks/panels, such as @changfenhuang/dsh-genui (tested on 2026-10-20).

Code blocks, inline code, paths, terminal commands, URLs, and function calls (e.g., fn()) are stripped and protected before translation to avoid erroneous translation. For paragraphs containing pure code or paths, the right column will be marked as technical content and left untranslated.

Translation and Interface Languages

Translations are powered by Tencent Hunyuan’s Hy-MT2 dedicated translation model, supporting 33+ target languages (Simplified/Traditional Chinese, English, Japanese, Korean, French, German, Spanish, Portuguese, Russian, Arabic, Thai, Vietnamese, Indonesian, Cantonese, etc., subject to the plugin’s language mapping table).

The settings page and bilingual panel support 9 plugin interface languages: Simplified Chinese, English, 繁體中文, 日本語, 한국어, Français, Deutsch, Español, Русский. These follow the DSH “Settings → General → Language” selection.

Translation Pipeline and Privacy Defaults

The default is Local-First: based on llama.cpp’s llama-server (Ollama optional). When translation is required, the plugin launches the service in the background on-demand (default 127.0.0.1:28457, --no-webui). You can enable “Use API model from current conversation for translation” in settings, with the local model acting as a fallback.

“Allow Online Translation (Google)” is disabled by default. If the local model is unavailable and online translation is disabled, the English original is displayed directly without pop-ups or blocking the conversation. If enabled, thinking text is sent to the free Google interface only when the local model is unavailable.

Translations are cached in ~/.dsh/cot-translate/cache/ (only translations are stored; original text is not persisted; limit 50MB). Settings are saved in ~/.dsh/cot-translate/settings.json and take effect immediately upon modification, without requiring a DSH restart.

Installation and Activation

Install to the DSH web profile. When installing from source or a local path, run npm ci in the repository root first (this builds automatically), then run the installation command. Release packages can be downloaded from GitHub Releases as dsh-cot-translate-0.2.0.tgz (includes build artifacts, excludes model weights and llama.cpp).

# Install to DSH web profile (can pass repository path directly during development)
dsh plugin --profile web add <repository-path>

Or use the downloaded release package:

dsh plugin --profile web add <path-to-downloaded-tgz>

After installation, please fully restart DSH Desktop (HMR does not watch node_modules).

Uninstallation:

dsh plugin --profile web remove dsh-cot-translate
# A full restart of DSH Desktop is also required

Typical Usage

1. Open Settings

Navigate to Settings → Chain-of-Thought Translation via the bottom left of DSH. Common options include:

Setting Description
Enable Translation Master switch
Translation Timing Semi-auto (translate on click) / Auto (background pre-translation after generation)
Target Language 33+ languages supported by Hy-MT2; defaults to DSH client language on first install
Local Translation Model Bundled fallback Hy-MT2 1.8B Q4_K_M (~1.5GB VRAM); can download 1.8B Q8_0, 7B Q4_K_M, etc.
Allow Online Translation (Google) Default off, requires explicit enablement
Local Service Port Default 28457

Local inference uses the official llama-server binary; no installer, tray icon, or startup auto-run is needed:

  1. Download the corresponding system archive from ggml-org/llama.cpp Releases, and extract it to e.g., %USERPROFILE%\tools\llama.cpp\ on Windows or ~/tools/llama.cpp/ on macOS/Linux.
  2. The fallback model is located at plugin directory models/Hy-MT2-1.8B-Q4_K_M.gguf (~1.08GB); if missing, it can be downloaded via the settings page. Other optional models are stored in ~/.dsh/cot-translate/models/.
  3. No manual service start is required; the plugin will automatically launch llama-server when translating.

3. View in Conversation

In compatible DSH versions, open a response containing Think, and expand the reasoning row to see the original on the left and translation on the right. If auto-translation is enabled, translation occurs in advance even while collapsed, so the translation is visible immediately upon expansion.

Use Cases and Notes

Target Audience: Developers who frequently read English reasoning in DSH but want to keep session records “clean”; users who prefer local translation, or wish to borrow the current conversation’s API model on-demand, and can accept optional Google fallback.

Runtime and Trust Boundaries: The plugin runs with the current DSH process privileges. It reads/writes config and cache under ~/.dsh/cot-translate/, starts llama-server locally, or calls configured online/API translations. Before installing, it is recommended to read the GitHub Repository source, LICENSE, and THIRD_PARTY_LICENSES.md (Hy-MT2 is Apache-2.0, llama.cpp is MIT).

Ecosystem Note: The DSH community plugin directory (e.g., skillhub.cn) is an independent site and has no official affiliation with DeepSeek / Hi-thinking. Installation commands should follow the repository README; do not construct undocumented dsh plugin add forms based solely on plugin names.

Conclusion

dsh-cot-translate anchors chain-of-thought translation at the “view-only, no-modify” display layer: offering bilingual comparison, prioritizing local Hy-MT2 + llama.cpp, supporting optional API and Google fallbacks, and coexisting with GenUI plugins. To try or contribute, obtain installation packages and documentation from the directory page and repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye