dsh-thinking-lang: Specifying the Thinking Language of Agents in DSH

Preface

DeepSeek Harness (DSH) splits system prompts, tool descriptions, and session policies into pluggable modules. The interface language and the language used for the model’s “internal reasoning” are often two different things: the UI may be in English, but you may want chain-of-thought and planning steps written in Simplified Chinese; or a team may standardize on English for reasoning to avoid mixing with Traditional Chinese materials.

The host’s built-in language setting governs the UI and does not separately constrain the model’s thinking segments. The community plugin dsh-thinking-lang (maintainer aymidasing, MIT) adds a “Thinking language” option under Settings → General and passes the choice to the model via two injection points in the system prompt. Below we describe its capabilities, installation method, and things to watch out for when using it.

What Is This

dsh-thinking-lang is a client-side plugin for DeepSeek Harness (dsh-desk): pick “Auto / 简体中文 / 繁體中文 / English” in the settings to determine the language used for the agent’s internal reasoning and planning.

The README states: the project code and documentation were generated by DeepSeek under human guidance, and it is not an official DSH component and has not been officially reviewed; the plugin runs with the permissions of the current dsh process, so please read the source code and license yourself before installing.

Core Functions

Settings Item

The plugin adds a row “Thinking language” under the host language item in Settings → General. The entire row contains only one dropdown:

Setting Values Purpose
Thinking language Auto / 简体中文 / 繁體中文 / English Language used for internal reasoning and planning

How “Auto” Is Determined

When “Auto” is selected, it takes the first source that maps to a language entry, in order:

  1. Operating system language: POSIX LC_ALL / LC_MESSAGES / LANG; on Windows, if empty, it uses Intl.DateTimeFormat().resolvedOptions().locale
  2. DSH interface language: the preference of the settings service’s locale namespace
  3. Fallback: hardcoded zh-CN

The label is normalized via BCP-47 and then parsed by Intl.Locale; Simplified vs. Traditional Chinese is distinguished by the script (CLDR maximize()), e.g. zh-TW/zh-HK map to 繁體, zh-CN/zh-SG map to 简体. When a language is explicitly selected in the dropdown, that choice takes priority over the three-level resolution above.

Example (from the README):

System UI Result
zh-CN en-US 简体中文
en-US zh-CN English
fr-FR (no matching entry in catalog) en-US English
unavailable unavailable 简体中文

Prompt Injection

A single rule is split into two segments, injected at different positions and evaluated at different times:

systemPrompt.section systemPrompt.context
Evaluation timing Assembled once per session Re-evaluated on every model call
Order order: 1 (right after persona) order: -10 (before other per-step injected blocks)

The specific English phrasings are generated by sectionText / contextText in src/core.ts; the public documentation does not reproduce the injected text verbatim. To change the behavior you must modify the source and run npm run build.

Direct consequences:

  1. Switching thinking language: takes effect for the next turn of an existing session via context, without needing a restart.
  2. Language name in the section: needs a new session to be reassembled before it updates; if you change the language mid-session, context changes but the section waits until the next assembly.

Language constraints take full effect for new sessions; changing the setting itself is reflected in context on the next turn of an existing session.

Tokens and Caching

Measured with the DeepSeek V3 tokenizer, the section is about 28–29 tokens (once per session), and the context about 15–16 tokens (once per turn); changing the language has a minimal impact on per-turn tokens.

Note: changing the thinking language alters the leading portion of the system prompt. DeepSeek context caching requires the prefix from token 0 to be fully identical; since the section sits near the front, after a language change the prefix from that line onward counts as a cache miss, making the cost of that turn significantly higher than a hit (the README cites official pricing, roughly a 50× difference). After the switch, the new prefix will be re-cached, so in practice it is best not to switch frequently mid-run after picking a language.

Installation and Enabling

Completely quit the DSH desktop app before installing; the profile corresponding to --profile desktop must already be initialized and not in use. Restart the GUI after installation.

Official Release installation (version 1.0.1):

dsh plugin --profile desktop add https://github.com/aymidasing/dsh-thinking-lang/releases/download/v1.0.1/dsh-thinking-lang-1.0.1.tgz

The same URL can also be pasted into the plugin manager in the settings. Do not install using a github: source: pnpm 11 blocks dependencies’ prepare builds by default, which easily produces ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED; the Release attachment is already a built artifact.

Update: reinstall using the new version’s attachment URL; dependencies are recorded by URL, so pnpm update does nothing.

Uninstall (the desktop app must also be fully quit):

dsh plugin --profile desktop remove dsh-thinking-lang

After uninstallation, the “Thinking language” row disappears from the settings and the related prompts are no longer injected.

Typical Usage

  1. Install and restart the GUI.
  2. Open Settings → General and find Thinking language below the language-related items.
  3. Choose Auto, 简体中文, 繁體中文, or English as needed.
  4. Start a new session so that section and context are consistent; if you change the option in an existing session, context follows from the next turn (the section still recommends a new session).

The plugin has no chat commands; switching is done only via the settings page. A /thinking-language-style command requires you to extend it yourself (the README notes you can reference the implementation of dsh-thinking-language).

Use Cases and Caveats

Suitable for: users who want to decouple the chain of thought from the interface language; teams that fix a strategy among Simplified/Traditional/English reasoning languages; users who rely on “Auto” following the OS or DSH UI language.

Limitations (as listed in the README):

  • Only the three thinking languages above are supported; adding or removing one requires editing the CATALOGUE in src/core.ts and the client-side strings.
  • The order of the section / settings row is bound to the host’s segment table and the language row order in @deepseek-ai/dsh-client-locale; the maintainer may need to adjust plugin constants when the host makes major version changes.
  • auto relies on runtime locale detection; in extreme environments it may fall back to zh-CN.

Security and trust: Community directories (such as SkillHub) have no official affiliation with DeepSeek / High-Flyer; please review the repository source code and the MIT license before installing third-party plugins.

Closing Remarks

dsh-thinking-lang decouples “what language the model uses for internal reasoning” from the UI language with a single settings row, and via the dual section + context injection balances session-level authority with per-turn immediacy. If you are already using DSH desktop 0.2.0-rc.2 or above, you can install via the Release command, pick a thinking language in the general settings, and then evaluate the caching and cost implications before adopting it.

  • Directory page: https://www.skillhub.cn/plugins/aymidasing/dsh-thinking-lang
  • GitHub: https://github.com/aymidasing/dsh-thinking-lang
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye