dsh-think-any-lang
其他 活跃维护

dsh-think-any-lang

lco117/dsh-think-any-lang

轻量级模型设置插件,在通用设置页新增思维语言选择项,可通过系统提示让模型按选定语言开展链式思考,无需额外配置即可快速切换推理语言。

3
Stars 标星
0
Forks 分支
3
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
98 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:lco117/dsh-think-any-lang
git clone https://github.com/lco117/dsh-think-any-lang.git
git clone git@github.com:lco117/dsh-think-any-lang.git
README.md main

dsh-think-any-lang

DeepSeek Harness Plugin

[![GitHub Stars](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/stars/lco117/dsh-think-any-lang?style=social)](https://github.com/lco117/dsh-think-any-lang/stargazers) [![GitHub Forks](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/forks/lco117/dsh-think-any-lang?style=social)](https://github.com/lco117/dsh-think-any-lang/network/members) [![GitHub Issues](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/issues/lco117/dsh-think-any-lang)](https://github.com/lco117/dsh-think-any-lang/issues) [![GitHub Pull Requests](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/issues-pr/lco117/dsh-think-any-lang)](https://github.com/lco117/dsh-think-any-lang/pulls) [![License](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/License-MIT-blue)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/LICENSE) [![English](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/🇺🇸_English-Current-blue)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/README.en-US.md) [![简体中文](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/🇨🇳_简体中文-Available-green)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/README.md)
[![dsh-plugin](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/dsh--plugin-46C6FF?style=flat-square&logo=github)](https://github.com/topics/dsh-plugin) [![Languages](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/languages-13-4D6BFE?style=flat-square)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/index.js) [![Zero latency](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/zero%20latency-zero%20extra%20calls-2ea44f?style=flat-square)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/index.js) [![Plain JS](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/badge/plain%20JS-no%20build-F7DF1E?style=flat-square)](https://raw.githubusercontent.com/lco117/dsh-think-any-lang/main/client.js)

A DeepSeek Harness plugin that adds a Thinking Language dropdown under Settings → General, letting you choose which language the model uses for its reasoning / chain of thought (中文, English, 日本語, 한국어, Deutsch, …). The final reply stays in the user's language.

Screenshots · Features · How it works · Installation · Usage · Development · Publishing · Star History


Screenshots

Thinking language selector in Settings → General
Selector in General settings
Pick it right from the settings page
The thinking-language selector box
The selector box
Click to expand and pick a language
Expanded language dropdown
All languages in one dropdown
off plus 12 languages in one list
dsh-think-any-lang in the plugin list
In the plugin list
Listed under plugin management after install

Features

  • Settings → General → Thinking Language: a dropdown to pick the language the model thinks in.
  • Zero latency, zero extra calls: implemented as a system-prompt instruction (systemPrompt.section) — no extra model calls or response delay like "translate the reasoning" approaches.
  • Instructions written in the target language: each instruction is written in its own language (e.g. the English instruction is written in English), which improves model adherence.
  • Persisted: the choice is stored in the user settings document (settings service) and survives restarts.
  • Plain JS, no build step: both the host and browser halves are hand-written JavaScript; install straight from GitHub with zero friction.

Supported languages: off (follow default, no instruction), Simplified Chinese, English, 日本語, 한국어, Deutsch, Français, Español, Português, Русский, Italiano, العربية, हिन्दी.


How it works

Half Responsibility
index.js (host half) Registers the think-any-lang settings namespace (language field, enum, default zh); watches for changes and mounts systemPrompt.section (named think-any-lang) when non-off, unmounts on off; also registers a private loopback RPC channel /think-any-lang (get/set) that the browser half uses to read/write the namespace
client.js (browser half) Registers a settings.general.item row via the window.__ModuleLoader__.load contract; renders the dropdown and reads/writes the setting through the host half's /think-any-lang RPC channel

Why a private RPC channel instead of the settings RPC surface? dsh-host-apiproxy only exposes an explicit allowlist of settings namespaces to configuration clients (WEB_SETTINGS_NAMESPACES / PRODUCT_SETTINGS_NAMESPACES); a third-party namespace answers settings-not-exposed, so the selection would never persist. The browser half therefore talks to a private channel registered in-process (ctx.connection.rpc.handle), and in-process ctx.settings access is not filtered by that allowlist — persistence and the systemPrompt linkage stay unchanged.

The language table is maintained in two places — index.js (instruction texts) and client.js (display labels): the browser factory's require only resolves platform modules and cannot read local modules, so each half keeps its own language view. Keep both files in sync when adding a language.


Installation

Requirements: dsh CLI installed with an initialized profile (dsh plugin --profile <name> add auto-initializes).

From GitHub (recommended)

dsh plugin --profile web add github:lco117/dsh-think-any-lang

The package is pure JS with no prepare build script, so no pnpm ≥10 allowBuilds approval is needed — install straight from GitHub. Pinning to a commit is recommended as in the official docs: github:lco117/dsh-think-any-lang#<commit-sha>.

From a local directory (development)

dsh plugin --profile web add ./dsh-think-any-lang

Verify

dsh --profile web --dump-config   # should show a "# == dsh-think-any-lang" layer

Usage

  1. Start dsh web.
  2. Open Settings → General.
  3. Pick a language in the Thinking Language dropdown (default: Chinese).
  4. Subsequent model calls receive the thinking-language instruction in the system prompt; DeepSeek reasoning models typically output reasoning_content in the chosen language.

Development

dsh-think-any-lang/
├── package.json       # declares dsh.bundle and dsh.client
├── cordis.patch.yml   # plugin row: mounts both halves of this package
├── index.js           # host half: settings namespace + systemPrompt.section
├── client.js          # browser half: settings row UI (hand-written factory bundle)
├── README.md          # 中文说明
├── README.en-US.md    # English docs
└── screenshots/       # README screenshots (webp)

Tech Stack

Category Tech
Plugin platform DeepSeek Harness (DSH)
Plugin framework Cordis
Language JavaScript (ESM)
Schema @deepseek-ai/schemastery
Build None (plain JS, install straight from GitHub)

License

MIT © 2026 lco117


⭐ Star History

If this project helps you, give it a ⭐ to help more people discover dsh-think-any-lang.

Star History Chart