Introduction¶
DeepSeek Harness (DSH) extends its functionality in a “everything is a plugin” manner, and many developers interact with it in non-English languages. When non-English text is sent directly, the model has to process it with extra overhead, which increases cost and reduces stability. At the same time, there are many scenarios where you want the model to always respond in English, and the user simply reads the translation locally. Shadow Bilingual (影译) is a DSH client plugin designed for exactly this need: you type in your own language, and the plugin translates the text into English before it is sent. The model’s responses stay in English, with your chosen local-language counterpart displayed below.
What It Is¶
Shadow Bilingual is a DSH client plugin maintained by Naskita, currently at version 1.0.13. It was forked from an upstream plugin and focuses on enhancing the “send-side” interception and translation capability while preserving the upstream assistant-side bilingual display. Its core value proposition: the model only ever receives English input and produces English output, while the user converses in their local language and gets a bilingual side-by-side view.
Core Features¶
1. Native-language input, English-only for the model¶
- You type in your native language (e.g., Chinese) in the main input box, and a gray English line appears below the draft — this is the content actually sent to the model.
- The model is forced to respond in English via the system prompt
bilingual:response-language, so it is not distracted by other languages. - The interceptor listens for the Enter key and the send-button click on the document, then executes
preventDefault→ translate →inputActions.setDraft(English)→inputActions.submit(). Shift/Alt combinations, IME composition states, and auto-repeat are skipped.
2. Full coverage of all three send paths¶
To prevent non-English text from leaking through any path, the plugin covers three send paths:
| Path | Entry Point | Trigger Timing | Handling |
|---|---|---|---|
| Main input box | composer | Immediately when the current step is idle | Translation preview → submit the translation on send |
| Steer box | dsh-steer-note textarea |
When the current step ends | Set value + input event → click the steer box’s own send button |
| Message queue | DSH inbox next-turn |
After the entire turn completes | In-place translation in the queue via useProjection('inbox') + updateQueue({kind:'edit'}) |
3. Bilingual display on the output side¶
- Assistant responses keep the English body text, with your chosen local-language counterpart appended below each paragraph.
- Supported local display languages (18 total):
zh(Simplified),zh-TW(Traditional),ja,ko,es,fr,de,pt,ru,it,nl,pl,tr,ar,hi,th,vi,id. - Translations are cached by target language. When you switch the display language, only uncached paragraphs are re-translated.
4. Prevention of premature and double sends¶
- You cannot send before the translation is complete. If you click send while a translation is in progress, the panel shows “translating… (will send when done)” and swallows the event.
- Once the translation finishes, it is sent automatically — no second click required. This avoids the double-send problem where the original is sent first and the English version follows.
- If the translation fails or times out (15 seconds), it automatically falls back to sending the original text. The translated content must be non-empty, start with a Latin letter, and differ from the original; otherwise it is treated as a failure.
5. Preview and update mechanism¶
- After you stop typing for 900 ms, a gray English preview line appears below the input box. It is compared paragraph-by-paragraph against the cache, and only uncached paragraphs are requested.
- During translation, the previous version remains visible but dimmed, labeled “updating…”, to avoid flicker.
Installation & Enablement¶
Install from the DSH plugin marketplace or via the terminal:
# desktop app (profile "desktop")
dsh plugin --profile desktop add github:Naskita/shadow-bilingual
# hosted web build (profile "web")
dsh plugin --profile web add github:Naskita/shadow-bilingual
Installation does not auto-start the plugin. Quit the application normally (e.g., ⌘Q) and reopen it; the host side imports it at process start, and the client side activates it when the window loads.
Go to Settings → Shadow Bilingual, paste your DeepSeek API Key, or use the environment variable DEEPSEEK_API_KEY. The plugin will also reuse any key already stored by DSH. Without a key, the plugin remains installed but all translations will fail, and text will be sent as-is.
Typical Usage¶
- Install and restart the DSH application, then open any session.
- Type in Chinese in the main input box. After pausing for about 0.9 seconds, the corresponding English preview appears below.
- Click send. Once translation completes, the English content is sent automatically, and the model replies in English.
- Below each paragraph of the assistant’s reply, your chosen local-language counterpart (e.g., Simplified Chinese) is displayed automatically.
- If you enter non-English content in the steer box, it will also be translated to English before sending.
- If you send new messages while the model is processing, they enter the queue and are translated and inserted at the next turn.
Use Cases & Caveats¶
- Ideal for developers or users who need to converse in a non-English language while keeping the model working exclusively in English.
- The plugin runs with the permissions of the current DSH process. Review the source code and license (MIT) before installing.
- The plugin does not provide a standalone npm package; React is supplied by the DSH client runtime.
- If you need to modify the interception or display logic, read the “How it works” section in the README first.
Summary¶
Shadow Bilingual fills the gap on the “send side” that was missing from the upstream plugin, ensuring the model always works with English input and output while you read and type in your local language. It covers all three send paths — main input box, steer box, and message queue — and uses translation previews, automatic sending, and failure fallbacks to keep the experience smooth. If you want to interact with the model in DSH with English as the primary language and your local language as the secondary, grab the plugin from the directory page or the GitHub repository and enable it using the steps above.