Introduction¶
When conversing with models in DeepSeek Harness (DSH), the scattered text between thinking chains and thinking blocks is often presented in English. Manually cross-referencing the original text to check translations disrupts your flow and easily leads to oversights. Existing solutions either rely on browser translation extensions or require copying content elsewhere for processing—neither aligns with DSH’s plugin-based philosophy.
What This Is¶
dsh-text-translator is a DSH plugin maintained by fengnowuyu-beep, categorized as a network tool. It automatically translates the scattered text between thinking chains and thinking blocks into Chinese during streaming output, with individual toggles for each content item. The plugin runs in a host half + browser half architecture and is controlled via the settings page once configured.
Core Features¶
Translation Module¶
- Both content types are translated: The one or two sentences of English the model says between thinking chains and thinking blocks (e.g., “Now let me update the tests…”).
- Incremental translation with persistence: Translation requests are split by paragraph; once saved, translations replay as-is when reopening a conversation or refreshing the page, without calling the model again.
- Only newly generated content is translated: Content streamed after the page is opened is automatically translated; historical content requires manual translation item by item.
- Requests sent from the local Host: Directly connects to the configured DeepSeek or any OpenAI-compatible endpoint, unaffected by browser CORS restrictions. The API Key is stored only in the local settings file.
- Configurable via Settings page (Settings → Text Manager): Toggle, API Key (viewable in plaintext), endpoint URL, model (selectable from the endpoint’s model list or manually entered), thinking mode for the translation model (auto/enable/disable), whether to auto-expand thinking chains, whether to translate scattered text between thinking blocks, whether to translate history as well, English-only translation, segment size cap, timeout, and built-in “Test Connection” and “Test Translation” buttons.
Buttons on Each Content Item¶
- Translate: Appears next to untranslated paragraphs; click to translate that paragraph.
- Refresh: Appears next to already-translated paragraphs; re-translates and overwrites the saved translation.
- Copy / Collapse: Appears when a translation exists; allows copying the Chinese text or collapsing/expanding the translation block.
Three Translation Style Variants¶
- Thinking block translation: 2px solid brand-color vertical bar, card background, rounded corners, badge “Chinese Translation”.
- Scattered text translation: 3px dashed
label-tertiarygray vertical bar, no background, square corners, badge “Narration Translation”. - Main response translation: 2px solid brand-color vertical bar, card background, rounded corners, badge “Body Translation”.
Text Styles Module (Independent of dsh-text-styles)¶
- Customize fonts, sizes, colors, spacing, and borders for various text types within conversations (body/narration/quotes/command descriptions/thinking translations/narration translations, etc.).
- Each item comes with 3–6 presets, plus nearly twenty fine-tuning knobs (font, size, line height, font weight, italic, letter spacing, text color, opacity, alignment, background, border radius, underline, padding on all four sides, margin on all four sides, border toggle, etc.).
- Border toggle is available for all 14 items (none/left/right/top/bottom/all sides, with adjustable thickness, line style, and color).
- “Apply immediately in conversation” (enabled by default): changes are written directly to the current conversation without needing to save or refresh.
- All styles are injected as a single
<style>rule, based on DSH’s DOM contract (data-chat-flow-kind/data-chat-group-part/data-chat-call-id/data-caption/class*="markdown"), so they won’t conflict with DSH rendering.
Settings¶
| Field | Default | Description |
|---|---|---|
| Enable auto-translation | On | When off, no requests are sent and all displayed translations are removed |
| DeepSeek API Key | Empty | Stored only in local %DSH_HOME%/text-manager/settings.json; the API only returns a masked value normally—click “Show Plaintext” to fetch the full key once via loopback |
| Endpoint URL | https://api.deepseek.com |
OpenAI-compatible base URL; /v1/chat/completions is appended automatically |
| Translation model | deepseek-chat |
Selectable from the endpoint’s model list or entered manually; the list is cached in the settings document |
| Thinking mode for translation model | Auto | Auto = the field is not sent; Enable/Disable sends thinking: { type: 'enabled' \| 'disabled' } |
| English-only thinking translation | On | Content already mostly in Chinese is skipped; segments over 60 characters with virtually no recognizable English words (pure paths/links/identifier lists) are also skipped |
| Translation granularity | Balanced | Determines the block size of translations, i.e., the number of requests; smaller is more responsive but more costly |
| Auto-expand thinking chains | Off | Automatically expands the thinking chain itself and its wrapping collapsible row (Turn duration row + step group header) |
| Also translate scattered text between thinking blocks | On | Translates the one or two sentences of explanation the model outputs between tool calls |
| Auto-translate history as well | Off | By default, only content streamed after the page is opened is automatically translated |
| Max characters per translation request | 1800 | Paragraphs exceeding this are split at word boundaries |
| Request timeout (ms) | 45000 | Maximum wait time for a single translation request |
Installation and Activation¶
Already installed into the desktop profile via the official plugin manager:
dsh-text-manager → file:E:/Data/Project/DeepSeekHarness/DSH-Homemade-Plugins/dsh-text-manager
The installation process performs three actions:
- Adds the dependency
dsh-text-managerto%DSH_HOME%/profiles/<profile>/package.json; - Adds
dsh-text-managertodsh.profile.bundles; cordis.patch.yml(pointed to bydsh.bundle.patch) inserts the Loader linetext-manager.
Changes to the Host half require restarting DeepSeek Harness to take effect. The browser half supports hot reload, but the Host half must be restarted.
To uninstall, disable/uninstall via “Settings → Plugins”, or remove the dependency and bundles entries from the profile’s package.json, then delete the junction in node_modules.
Typical Usage¶
- Install the dsh-text-translator plugin in DSH.
- Open Settings → Text Manager and fill in your DeepSeek API Key and endpoint URL.
- Confirm that “Enable auto-translation” and “Also translate scattered text between thinking blocks” are enabled in the translation module.
- Converse with the model—thinking chains and narrations will display Chinese translations paragraph by paragraph during streaming output.
- For untranslated historical content, click the “Translate” button next to each paragraph to process them individually.
- If a translation needs updating, click the “Refresh” button to re-translate and overwrite.
Use Cases and Notes¶
- Suited for DSH users who frequently need to read thinking chains and narrations in Chinese, especially when the model outputs thinking chains in English.
- The plugin runs with the current dsh process privileges. Review the source code and license (MIT) before installation.
- Translation requests are sent from the local Host; the API Key is stored only in the local settings file and never in browser storage.
Conclusion¶
dsh-text-translator uses incremental translation and local caching to automatically translate thinking chains and narrations into Chinese. Combined with its independent text styles module, it makes different types of content clearly distinguishable within a conversation. The plugin aligns with DSH’s philosophy—installation and configuration are completed entirely within the settings page—making it well-suited for agentic developers who need to continuously read thinking chains.
- Directory page: https://www.skillhub.cn/plugins/fengnowuyu-beep/dsh-text-translator
- GitHub: https://github.com/fengnowuyu-beep/dsh-text-translator