When reading or debugging content in the DeepSeek Harness (DSH) web interface, users often encounter mixed-language situations. Manually copying and translating is inefficient, and frequent operations interrupt the flow of thought. The dsh-auto-translate plugin aims to solve this scenario by implementing on-demand translation through browser-side inference, without consuming DSH model resources or incurring API costs.
Installation and Activation¶
This plugin is maintained by gst20060726 and is licensed under MIT. To install, simply execute the following command:
dsh plugin --profile web add dsh-auto-translate
After installation, restart DSH Web and refresh the page to use it. If the “Translate” dot does not appear in the bottom left corner, use the shortcut Ctrl+Alt+T to open the settings panel to check the status.
Core Features¶
The plugin primarily offers the following capabilities:
- Zero-Token On-demand Translation: Uses browser-side WASM inference by default; translations are not sent to DSH models or external APIs. The model only needs to be downloaded from a CDN on first use.
- Flexible Triggering: Supports triggering translation via mouse hover or text selection; does not automatically translate the entire page.
- Multi-engine Switching: Supports three modes: local offline, online key-free (MyMemory), and custom endpoints.
- Smart Filtering: Automatically skips input boxes, code blocks, editors, and similar areas, translating only text content within the DSH interface, not interfaces outside the page.
Usage¶
Hover Translation¶
Hover the mouse over text for about 0.6 seconds; the area will be replaced in-place with Chinese. Move the mouse away and hover again to switch back to the original text. This can be toggled repeatedly.
Drag-select Translation¶
Drag-select a piece of text and release; a floating layer pops up by default displaying the original and translated text (copyable). In the settings panel, the selection method can be changed to “Replace in-place”.
Shortcuts¶
Ctrl+Alt+T: Open/Close settings panel.Ctrl+Alt+H: Show/Hide the dot in the bottom left corner.Ctrl+Alt+P: Pause/Resume translation (pauses restore the original text).Alt+ Hover: Translate immediately without waiting for the 0.6-second delay.
Engines and Models¶
The plugin provides three translation engines:
- Local Offline (Recommended): Uses ONNX Runtime for browser-side inference, consuming zero tokens. The model needs to be downloaded on first use (en↔zh is approx. 425MB), and is completely offline thereafter.
- Online Key-free: Uses the MyMemory API; free but subject to anonymous daily quota limits.
- Custom Endpoint: Translation requests are sent to a user-hosted service (e.g., LibreTranslate).
Scope and Limitations¶
- Browser Requirements: Requires Chrome or Edge 116+.
- Side-side Engine Requirements: Requires Chrome/Edge 138+.
- Single Translation Limit: A single selection translates up to 4000 characters by default (modifiable in the panel, 0 means unlimited).
- Non-Translatable Content: Translation is not triggered in input boxes, code blocks,
contenteditableareas, or interfaces outside the DSH page.
Summary¶
dsh-auto-translate is suitable for users who need to quickly read multilingual content within the DSH interface. It ensures privacy and cost-efficiency through client-side inference, and avoids distraction through on-demand triggering. For more details, please visit the GitHub repository.