dsh-zh-cn Plugin: Forces All Sessions and Models to Use Simplified Chinese

Introduction

The core philosophy of DeepSeek Harness is “everything is a plugin.” In actual usage, especially when using default or custom models, the model’s thinking process and replies often mix in English, leading to a fragmented reading experience. This document introduces dsh-zh-cn, which ensures that all thinking processes and replies permanently use Simplified Chinese by injecting rules on the model side.

Plugin Positioning

This is a client-side plugin maintained by LiangHeOvO. Once installed, it takes effect for all sessions and all models (including default and custom models) until actively uninstalled via the plugin manager. It does not touch the rendering layer; instead, it directly modifies the instructions received by the model.

Core Features

  1. Forced Simplified Chinese: Both the thinking process (Thinking) and replies (Reply) use Simplified Chinese, preventing the mixing of English due to topics, code, or tool outputs.
  2. Three-layer Injection Mechanism: Ensures rules remain effective even in long contexts through three layers of rule injection: the main segment, the tail segment, and per-step snapshots.
  3. No Runtime Dependencies: Ready to use upon installation, with low system environment requirements.
  4. Automatic Revocation: When the plugin is uninstalled, the registered rules are automatically revoked without leaving any residue.

Installation

Open the Plugin Manager in DeepSeek Harness, click Install bundle, and paste the repository address. DSH’s install_bundle natively supports git repository URLs as well as local absolute paths.

https://github.com/LiangHeOvO/dsh-zh-cn

You can also clone it first and then install using the absolute path:

git clone https://github.com/LiangHeOvO/dsh-zh-cn.git
# Then enter the absolute path of the cloned directory in the Plugin Manager

Usage Examples

After installation, it works by default without configuration. If you need to adjust behavior, you can add config to the zh-cn line in the profile’s cordis.patch.yml file.

Configuration Example:

- id: zh-cn
  name: 'dsh-zh-cn'
  config:
    enabled: true      # Change to false to temporarily disable
    order: -900        # Position of the main segment in the system prompt; smaller values appear earlier
    tail: true         # Layer 2: System prompt tail segment; set to false to turn off
    snapshot: true     # Layer 3: Per-step snapshot at the end of history; set to false to turn off
    extra: "讨论代码时可以保留英文术语。"   # Appended to the end of the main segment
    text: "……"         # Completely replaces the main segment body (default body is no longer used if you write your own body)

Mechanism Explanation

The plugin ensures rules take effect through a three-layer injection mechanism:
1. Main Segment: Injected at the very beginning of systemPrompt.section (order: -900) as a stance declaration.
2. Tail Segment: Injected at the end of systemPrompt.section (order: 10500), placed immediately before the last sentence of the current generation.
3. Per-step Snapshot: Injected into systemPrompt.context (order: 130), entering the end of history as a user snapshot with a source.

This design solves the problem of rules being diluted in long contexts. Layer 3 does not accumulate with the number of steps; it is projected by RuntimeContextProjection, and no new messages are generated if the content remains unchanged.

Precautions

  1. Modifies Instructions, Not Rendering: This plugin rewrites the instructions received by the model, not the rendering layer. It cannot rewrite already-generated English reasoning into Chinese; it only lowers the probability of English output through rules.
  2. Fixed Token Overhead: Each request incurs additional tokens for the three layers of rules (approx. 300 characters for the main segment, 50 for the tail segment, and 60 for the snapshot).
  3. Restart Required for Code Changes: After modifying index.js, you must restart DeepSeek Harness to load the new module. The profile’s HMR configuration only monitors config changes, not source code.
  4. Environment Requirements: The profile requires nodeLinker: hoisted (the default DSH profile is set to this).
羽毛球分组比赛记分
小程序二维码

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

Xiaoye