DSH uses a plugin-based architecture. When developing Agent workflows, a common issue is that when tools return English content, the Agent’s internal reasoning (chain of thought) also experiences “language drift,” resulting in confusing final output. The dsh-language-control plugin resolves this issue by forcing language constraints to be injected before every inference step.

Plugin Introduction

dsh-language-control is a DSH workflow plugin maintained by wodongx123. It injects language constraints into the System Prompt before every inference step, forcing the Agent’s chain-of-thought reasoning, planning, tool-call reasoning, and internal thinking to all use Chinese, even when tools return English content.

Core Features

  1. Per-Step Constraint Refresh
    The plugin does not inject the constraint only once at the start of the session; instead, it re-injects the constraint before every inference step. The injection is placed at the very top of the System Prompt (order: -200), with the highest priority, so it will not be diluted by content returned from tools.

  2. Forced Chinese Thinking
    The constraint requires all of the Agent’s internal thinking processes—including chain-of-thought reasoning, planning, and tool-call reasoning—to use Chinese, ensuring language consistency between the chain of thought and the final answer.

  3. Visual Settings Panel
    You can find the “Language Control” option under DSH Settings → Plugins. It supports editing custom constraint text, switching between custom and default modes, and restoring the default text with one click.

  4. No Dependencies, Zero Configuration, Ready to Use
    The plugin has no additional dependencies and takes effect automatically after installation.

Installation and Activation

Use the official command to install it:

dsh plugin --profile web add @deepseek-ai/dsh-language-control

Or search for language-control in the dsh-market app store and install it with one click.

After installation, the plugin takes effect automatically without additional configuration.

Usage and Configuration

After the plugin is installed, before each Agent inference step, the language constraint is automatically injected at the very top of the System Prompt (by default, it requires Chinese thinking and responses).

In DSH Settings → Plugins → Language Control, you can:
- Edit and save custom constraint text.
- Disable custom text and use the default constraint directly.
- Click to restore the default text.

How It Works

The plugin implements language control through coordination between the server side and the client side:

  • Injection Timing
    It is implemented via systemPrompt.section() and is re-evaluated on every assemble() call (i.e., before each inference step).

  • Injection Location
    It sets order: -200 to ensure the language constraint appears on the first line of the System Prompt.

  • Server Side
    It registers HTTP routes /language-control/{status,update,reset} for reading and writing constraint text.

  • Client Side
    It uses dsh.client.inject to register the settings panel into settings.section.

Notes

The plugin runs with the permissions of the current DSH process. Before installing, we recommend reviewing the source code and license (MIT).

Conclusion

dsh-language-control uses technical means to solve the common language drift problem in Agent workflows, maintaining language consistency between the thinking process and the final output.