dsh-chinese-language: Keep the DeepSeek Harness Agent in Simplified Chinese

Preface

DeepSeek Harness (DSH) defaults to using English system prompts. Since the model’s hidden reasoning process follows this prompt, long-running sessions are prone to “language drift,” eventually outputting results in English unless explicitly requested in subsequent prompts. Repeating “answer in Chinese” in every message is inefficient and easily forgotten, and it becomes invalid immediately in resumed sessions or new windows. The dsh-chinese-language plugin solves this problem by registering a rule in a location the model is bound to read, thereby locking in the language constraint.

What is it

This is a DeepSeek Harness plugin designed to ensure the agent’s internal reasoning and final answers consistently use Simplified Chinese.

  • Maintainer: fzy3232
  • Category: Model Reasoning
  • License: MIT
  • Core Value: Registers rules through two distinct channels to ensure they remain effective during session resumption and long conversations.

Core Features

The plugin registers language rules through two different channels to cover various scenarios:

  1. System Prompt Block: Registers a rule at the very end of the system prompt. This serves as the default entry point for new sessions, ensuring that initial reasoning is conducted in Chinese.
  2. Runtime Context Reminder: Registers a reminder at the very front of the dynamic context snapshot. When historical conversations are filled with English reasoning, this rule sits adjacent to the latest conversation content, forcing the model to correct its language tendency in the current turn, thus enabling session resumption.

The two channels work synergistically:
* New sessions are covered by the Block.
* Long sessions or resumed sessions are covered by the Reminder, as it is positioned at the head of the history and carries higher weight.

Design characteristics:
* Lightweight: Token-optimized; the text is short and positioned stably, preserving prompt caching.
* Purely Additive: Only adds rules; it never overwrites personaPrefix, personaSuffix, or tool definitions.
* Graceful Degradation: If one channel is unavailable, the other remains effective, ensuring the rule does not vanish.

Installation and Activation

Installing this plugin requires the use of DSH’s package manager.

  1. Install Plugin:
    dsh plugin --profile web add github:fzy3232/dsh-chinese-language
  1. Restart Profile:
    You need to restart the current Profile after installation to load the plugin configuration.
    dsh web
  1. Verify Installation:
    Check if the plugin was successfully inserted into the configuration.
    dsh --profile web --dump-config | grep -A2 dsh-chinese-language

Typical Usage and Configuration

By default, the plugin inserts two rules at the end of the system prompt and one reminder into the runtime context. The default text is as follows:

Language Rule: Always use Simplified Chinese for internal reasoning (thinking) and final answers; this applies even when historical content is in English.
Code, commands, paths, URLs, raw error text, and proper nouns remain in their original language.
Language Reminder: Use Simplified Chinese for internal reasoning and visible answers in this turn.

Custom Configuration

You can adjust the rule content or disable specific channels via a YAML configuration file.

  • Disable Reminder: Set context: false in the configuration to use only the system prompt block.
  • Modify Text: Use the lines or text keys to customize the rule content.

Example configuration (YAML format):

- insert:
    - id: dsh-chinese-language
      name: dsh-chinese-language
      config:
        lines:
          - Always answer in Simplified Chinese.
          - Code, commands, and raw error text remain in their original language.
        contextText: Reminder: Use Simplified Chinese.

Notes

  • Environment Requirement: Requires Node.js version >= 20.
  • Dependencies: Dependency-free ES module, with no extra dependencies.
  • Permissions: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license (MIT) before installation.
  • Ecosystem Context: DSH adopts a plugin architecture. This plugin is listed in the community directory SkillHub and has no direct affiliation with DeepSeek or High-Flyer (Fanjia) officials.

Conclusion

Through the synergy of two channels, dsh-chinese-language solves the language drift issue in DeepSeek Harness agents during long sessions and session resumption, while maintaining extremely low Token costs. For more details, please refer to the GitHub Repository.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye