The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” As a sidebar extension mechanism, dsh-better-sidebar allows developers to inject custom capabilities. When reading paper PDFs, directly copying selected terms into the main chat for translation can pollute the context, and frequently switching windows is inefficient. dsh-bilingual-reader solves this problem. It is a plugin that natively renders PDFs inside dsh-better-sidebar and uses a large model to translate selected text.
Plugin Positioning¶
This is a sidebar plugin that runs in the DeepSeek Harness environment and is maintained by developer Johnblur. It primarily addresses the need to quickly and accurately obtain translations of specific paragraphs or terms while reading long papers, while keeping the main chat context clean. The plugin reuses existing DSH model configurations, and the translation process is fully isolated from the main chat.
Core Features¶
- Native PDF Rendering: Uses the browser or Electron PDF engine to display documents, preserving perfect layout and supporting page navigation and text selection.
- Text Selection Translation: Select and copy text; the desktop version can automatically trigger translation. If automatic translation is unavailable, you can trigger it by clicking the “Translate” button or pressing
Ctrl+V. - Multilingual Translation: Supports mutual translation among Chinese, English, Japanese, and Korean, and also allows manually adding any language.
- Automatic Language Detection: When the source language is set to “Auto-detect”, it first uses character-set heuristics (with high accuracy for Chinese, Japanese, and Korean); if uncertain, it leaves the detection to the large model.
- Context Awareness: Locates the unique position of selected content in the full text and extracts surrounding text as context for translation to ensure accuracy.
- Adjustable Context Length: Controls the length of the extracted context via a slider.
- Persistent Settings: The source language, target language, context length, and custom language settings are saved and automatically loaded the next time it is opened.
- Source and Translation Display: Displays the original text and translation together at the bottom of the interface, and supports one-click copying of the translation.
- Main Chat Isolation: Translation calls are performed through a separate
ctx.llm; results are not written back to the main session and do not consume main-chat tokens.
Installation and Activation¶
Installing this plugin requires a ready DSH environment. Run the following command to install it:
dsh plugin add github:Johnblur/dsh-bilingual-reader
After installation, completely quit the DSH Desktop application from the system tray and restart it to ensure the plugin takes effect.
Usage Steps¶
- Open the
dsh-better-sidebarsidebar and click the+icon to add a tab. - In the new tab, find the “Bilingual Reader” or “Translate” option (depending on the interface language) and click to enter.
- Click the “Browse…” button to select a PDF file in the workspace, or directly enter a path and click “Load”.
- Select a passage in the PDF reader and copy it (the desktop version supports automatic clipboard-monitoring translation).
- The original text and translation are displayed below. You can select the translation language pair from the dropdown, drag the “Context” slider to adjust the extraction range, or specify or automatically detect the “Domain”.
Dependencies and Version Requirements¶
Running this plugin depends on specific services injected by the DSH runtime, and it has explicit DSH version requirements:
- Dependencies:
dsh-better-sidebar,@deepseek-ai/dsh-llm,pdfjs-dist. -
DSH Version Compatibility:
@deepseek-ai/dsh-llmmust be version0.1.2-rc.1or higher.dsh-better-sidebarmust be version0.17.1or higher.- If you see the message
does not provide an export named 'deepFreeze'after installation, upgradedsh-llmto v1.0.2 or higher.
-
DSH Desktop Compatibility:
- In DSH Desktop
2.0.9+,electron.clipboardis no longer available because it runs inutilityProcess. - In this version, the plugin must be upgraded to
v1.1.1+to work properly.
- In DSH Desktop
-
Configuration Overrides: The plugin reuses the existing DSH model and API key and does not require additional configuration. It can also be overridden via environment variables:
DSH_BILINGUAL_PROVIDER(default:deepseek-official)DSH_BILINGUAL_MODEL(default:deepseek-v4-flash-vision-exp)
-
Web Limitation: The “Auto-translate” feature depends on the host reading the system clipboard and may be unavailable in a pure web environment. In that case, use the “Translate” button or press
Ctrl+V.
Conclusion¶
dsh-bilingual-reader provides DeepSeek Harness users with a lightweight paper-reading assistant. By isolating the translation context, it helps keep the main chat clean and focused while reading long documents. For developers or researchers who frequently consult bilingual literature, this plugin can effectively improve reading efficiency.
- Plugin directory: dsh-bilingual-reader
- Source repository: GitHub