dshx-language-mirror: Language response for agents to always follow user's latest message

Preface

When running agents in DeepSeek Harness (DSH), models sometimes experience “language drift”: they might converse in Chinese initially but switch to English for the final report or summary; or if a user switches to English mid-conversation, the reply remains stuck in the language of the previous turn. This issue often stems not from a lack of model capability, but from the absence of a constraint that applies to every request. If instructions are only added temporarily when a specific skill is triggered, behavior becomes unstable across different sessions, profiles, or after uninstalling the skill.

dshx-language-mirror is a community-maintained DSH client plugin. It registers a resident system prompt via Cordis’s systemPrompt service to ensure that the AI’s replies (including final reports and summaries) always align with the language used in the user’s latest message, without modifying the agent’s main loop.

What is this

  • Repository: callaumyan-design/dshx-language-mirror
  • Maintainer: callaumyan-design
  • Category: Client (The “Client” category in the DSH plugin directory)
  • One-liner: Always reply (including final reports) in the language of the user’s latest prompt.

If the question is in Chinese, the answer is in Chinese; if the message is a mix of Chinese and English, the reply maintains that same mix; if the user switches languages midway, the next reply should follow immediately. Technical content such as code blocks, commands, paths, and identifiers remains in the original language and is not translated simply to “follow the language.”

How it Works

Below is an introduction to how the plugin mounts within DSH, to help you determine if it suits your environment.

The plugin registers a system prompt via DSH’s systemPrompt service, which is included in every request, independent of whether a specific skill is triggered. It is implemented in pure JavaScript (index.js + cordis.patch.yml) with no build step or install script; uninstalling the plugin simply removes the prompt segment and does not persistently modify the agent’s main loop.

The author states in the README that it was developed and used on DeepSeek Harness 0.2.0-rc.2 (desktop / web profile). The marketplace in package.json also lists the headless profile; you must select the --profile consistent with your environment during installation.

Configuration Options

Configuration is written in the plugin’s bundled cordis.patch.yml. The default values in the table below can be overridden via patch fields (refer to the README for details):

Field Default Description
enabled true Whether to enable
order 5 Sorting order of the system prompt segment; smaller values appear earlier
extra Empty Instructions appended after the default rules
text Empty Completely replaces the default rules

If your team has additional guidelines (e.g., “when the user message is Chinese, keep proper nouns in English”), prioritize appending them using extra; use text for a full replacement only when entirely custom rules are needed.

Installation and Activation

The installation command must include the profile, and DSH must be restarted after installation (requiresRestart: true).

Web Environment:

dsh plugin --profile web add github:callaumyan-design/dshx-language-mirror

Desktop Environment (Using the dsh bundled with DSH Desktop; fully quit Desktop from the system tray before executing):

dsh plugin --profile desktop add github:callaumyan-design/dshx-language-mirror

Uninstall (Replace <profile> with your actual profile, such as web, desktop, etc.):

dsh plugin --profile <profile> remove dshx-language-mirror

Community plugin directory page: skillhub.cn/plugins/callaumyan-design/dshx-language-mirror. This directory is a community site and has no official affiliation with DeepSeek or Hithink RoyalFlush; the DSH ecosystem emphasizes “everything is a plugin,” so it is recommended to review the repository source code and the MIT license yourself before installing.

Typical Usage

This plugin does not have a separate CLI subcommand; once enabled, behavior is driven by the “language of the user’s latest message,” requiring no manual specification of the reply language each time.

Reproducible verification steps:

  1. Install the plugin for the corresponding profile and restart DSH.
  2. Send a task in Chinese (e.g., ask the agent to write an explanation) and check if the body and final summary are in Chinese.
  3. Switch to English or a mix of Chinese and English in the next message, and confirm if the reply language switches immediately while code, paths, etc., remain in the original format.

If the default rules are insufficient, you can set extra or text in cordis.patch.yml and follow the DSH plugin update workflow to apply the configuration.

Use Cases and Notes

Who is it for

  • DSH users who need a stable “follow the user’s language” behavior, especially those who care about the final report/summary not suddenly switching languages.
  • Developers running Cordis plugins on web, desktop (or headless) profiles who are willing to use the system prompt layer for cross-cutting constraints.

Notes

  • The plugin runs with the current dsh process permissions; please read index.js and the patch content in the GitHub repository before installing.
  • Language mirroring relies on the model’s adherence to the system prompt; deviations may still occur in extreme cases. extra / text can be used to tighten team rules, but they cannot replace manual spot-checking of outputs.
  • Stars and versions are subject to real-time information on the repository and directory pages; this article is compiled based on the README and package.json (e.g., version 1.0.0). If there are conflicts with upstream updates, the repository takes precedence.

Conclusion

dshx-language-mirror solves the common pain point of “reply language inconsistency with the user’s latest message” using a resident systemPrompt. It offers clear installation and uninstallation paths, with a configuration surface focused on four fields: enabled, order, extra, and text. To learn more or submit an Issue, please visit the Plugin Directory Page and the GitHub Repository.

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

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

Xiaoye