DeepSeek Harness Plugin

julypjyt-creator/dsh-word-translate

Stars ★ 0 Downloads (30d) 348 Category UI Enhancements Added 2026-11-27 npm dsh-word-translate

Select or point at any English word in a DSH conversation and right-click to see its Chinese meaning in a card, without copying it elsewhere. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-word-translate

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:julypjyt-creator/dsh-word-translate

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

English | 中文

Right-click any English word in the DSH conversation — in your own message or in the assistant's reply — and a small card offers 翻译成中文 (translate to Chinese). Press it and the Chinese meaning appears in place, ready to copy. No copying the word into a browser or dictionary, and no API key.

Right-click a word in the chat to see its Chinese meaning

Install

dsh plugin add dsh-word-translate

Or from the Plugins page: Discover → search dsh-word-translate → Install. The bundle affects the whole profile and stays installed across restarts.

Market source

To list this plugin in the market (with its icon and localized description), add this index URL under Plugins → Discover → sources:

https://cdn.jsdelivr.net/gh/julypjyt-creator/dsh-word-translate@main/market/index.json

raw.githubusercontent.com is frequently unreachable on mainland networks and DSH fails the index fetch after a 10 second timeout, so the metadata is served through the jsDelivr mirror; the icon path is relative and resolves through the same mirror. jsDelivr caches branch content, so edits to market/index.json can take a few minutes to show up.

Use

  1. Select an English word in any message, or just point at it — the plugin also picks up the word under the pointer when nothing is selected.
  2. Right-click. The native menu is replaced by a small card showing the chosen word.
  3. Choose 翻译成中文. The translation appears in the card; 复制译文 copies it and 重试 asks again.

Press Esc, click outside the card, or scroll to dismiss it. Right-clicks inside input boxes, text areas, and editable text are left to the browser, so the composer keeps its own menu.

Selection is capped at 800 characters per request; a single word or phrase is well below that.

Configuration

Optional, in the profile's cordis.patch.yml under this plugin's config:

Key Meaning Default
providers Providers to try in order: ['bing'], ['google'], or both ['bing', 'google']
targetLanguage zh-CN (Simplified) or zh-TW (Traditional) zh-CN
maxChars Longest text translated in one request (at most 2000) 2000

Privacy

The selected text is sent to an anonymous machine-translation endpoint: Bing first, Google as a fallback. Nothing is stored — results are cached in memory only for the current process (at most 500 entries), and the plugin sends no text anywhere else. Turning the plugin off removes the right-click card, both routes, and the cache.

Endpoints

  • POST /dsh-word-translate/translate with {"text": "...", "targetLanguage": "zh-CN"} returns {"ok": true, "translation": "...", "provider": "bing", "cached": false, "truncated": false}.
  • GET /dsh-word-translate/health reports the active providers, target language, and cache size.

Both listen on the loopback interface only, like every other DSH HTTP route. One request times out after 10 seconds; the response body is capped at 1 MiB.

Limitations

  • Only Latin-script words are translated; text without A-Z is rejected.
  • Right-clicking a link or a word inside a link opens the translation card instead of the browser's link menu.
  • Results depend on the public translation endpoints; when both fail the card shows the error and offers 重试.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.