dawnliming/dsh-chinese-mode 预览 preview

dawnliming/dsh-chinese-mode

DSH全局中文模式开关:输入框中的“中”按钮;开启后,每个会话的系统提示中都会注入简体中文要求。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness Web that adds a configurable global Chinese language mode to the agent interface. It adds a compact toggle capsule labeled “Chinese” to the left of the input box, and when toggled on, it automatically injects language requirements matching the current settings into the system prompt of any active agent preset. The plugin supports separate language settings for three output regions: model replies, internal thinking, and tool calls, and it adds a dedicated “Chinese Mode” configuration page to DSH’s native settings panel for easy management.

This plugin is designed for users who want DeepSeek Harness to consistently output Chinese content according to their personal preferences. The global toggle state is persistently stored in DSH’s host settings, so it applies to all sessions and does not get lost when switching sessions or restarting the DSH client. When the main toggle is enabled, users can quickly switch the injection state directly from the input box with one click, or open the settings page to adjust language preferences per region and configure custom special rules for anchored presets.

You can install this plugin with one click from the DSH plugin marketplace, or install it manually via the command line provided in the repository. After installation, you need to restart the dsh web service for the plugin to take effect. Note that the plugin does not work with complete persona presets, which is a core mechanism limitation of DSH itself, not a bug in the plugin. The entire project is open source under the MIT license, so there is no cost to use it, and you can freely clone and modify the source code for your own use.

这是一款专为 DeepSeek Harness Web 设计的原生 DSH 插件,用于提供全局可配置的中文输出模式。它会在输入框左侧常驻一个紧凑的「中文」胶囊开关,开启后自动向任意预设的系统提示词注入符合当前设置的语言要求。插件支持对回复、思考、工具三个区域分别设置输出语言,还在 DSH 原生设置面板中添加了专属的「中文模式」配置页,方便统一管理所有开关选项。

这款插件适合希望让 DeepSeek Harness 稳定输出符合要求的中文内容的用户使用,全局开关状态是持久化存储在 DSH 宿主设置的,对所有会话都生效,切换会话或者重启客户端后设置都不会丢失。开启总开关后,用户既可以在输入框一键快速切换当前注入状态,也可以进入设置页分别调整各个区域的语言偏好,还可以对锚定预设配置特殊的语言规则。

插件可以从 DSH 官方插件市场一键安装,也可以通过提供的命令行代码手动添加安装,安装完成后需要重启 dsh web 服务才会生效。它对 complete persona 预设不生效,这是 DSH 本身的核心机制限制,不是插件本身的问题。整个项目采用 MIT 许可证开源,没有任何使用成本,用户也可以自行克隆修改源码进行二次开发。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 8 stars - very few users, little community feedback星标只有 8,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:dawnliming/dsh-chinese-mode

把 dawnliming/dsh-chinese-mode 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-chinese-mode

DeepSeek Harness Web 全局中文模式插件:在输入框左侧提供一个紧凑的「中文」胶囊开关,开启后向任意 preset 的 system prompt 注入语言要求。

简体中文是默认文档语言。英文版见 README.en.md。

功能

  • 全局且持久化:开关存于宿主侧设置(dsh-chinese-mode 命名空间),对所有会话生效。
  • 无条件注入:开启即注入,不做「已有中文」检测;注入位置在 persona 之前。
  • 分区域语言开关:回复、思考、工具三块区域各自开关——开启=中文,关闭=英文(正向指令,实测有效)。
  • 设置页:在 dsh 设置中提供「中文模式」配置页(总开关、区域开关、锚定关键词与行为)。文案由内置默认值管理,避免手动填写污染 system prompt。
  • 输入框胶囊开关:输入框旁常驻紧凑「中文」开关,使用双字标签与微型胶囊清晰表达状态;开启时为浅蓝选中态,关闭后保留中性状态并可一键重新启用。设置页可独立隐藏该开关。
  • 任意 preset 均生效(complete persona 除外,DSH 机制限制,见「原理」)。
  • 锚定兼容:默认关闭;启用后锚定 preset 晋升后思考用英文、回复/工具仍按设定(首轮由 preset 的 tool-bootstrap 自行锚定,插件 section 会被过滤)。关闭时无视锚定,按常规设定。
  • 关闭即移除:关闭总开关后从后续组装中移除该 section;不翻译历史消息,也不插入可见聊天内容。

安装

插件市场上架后可一键安装,或命令行:

dsh plugin --profile web add github:dawnliming/dsh-chinese-mode

安装后重启 dsh web;输入框左侧的「中文」胶囊开关可直接切换语言注入,是否显示该开关可在设置页控制。

设置字段

字段 默认 说明
enabled false 总开关;关闭后完全不注入,输入框状态键保留为关闭状态。
showInputSwitch true 是否显示输入框左侧的「中文」胶囊开关;独立于总开关。
replyChinese true 回复区域语言:开=中文,关=英文。
thinkingChinese true 思考区域语言:开=中文,关=英文。
toolsChinese true 工具/界面区域语言:开=中文,关=英文。
textReply / textThinking / textTools 各区域默认中文文案 内置中文文案(英文文案内置对应英文版);设置页不提供编辑,避免污染。
anchoredPresetKeywords liangshen, 梁神, anchored, 锚定 视为锚定模式的 preset 名称关键词(逗号分隔,设置页可编辑)。
anchoredMode false 默认关闭;启用后锚定 preset 下思考用英文,回复/工具按设定。

旧版单个 text 字段会在升级后自动作为「回复文案」保留。

原理

宿主侧通过官方 systemPrompt.section() 把 dsh-chinese-mode:language 注册为系统提示的一个 section(order 为负,排在 persona 之前),text 是每次组装实时计算的函数:总开关关闭时返回空串、渲染时自动丢弃。锚定判断通过 DSH 的 resolveSessionPreset(session) 读取最新的 agent-preset/selected 事件,而不是只读取会话创建时的 header;因此空白会话切换 preset 后也会使用当前选择。锚定 preset 的首轮会被其 tool-bootstrap 按 section 名过滤掉、晋升后自动恢复,因此天然兼容锚定。限制:DSH 会在 waterfall 结束后把 complete persona 强制恢复为唯一 section,故本插件对 complete persona 不生效(这是 DSH 机制限制,非插件缺陷)。客户端渲染绑定到 dsh-chinese-mode 设置命名空间的「中文」胶囊开关。

开发

  • 宿主:lib/index.js
  • 客户端:lib/client.js(ModuleLoader bundle,修改后需重新构建)
  • 本地安装到 profile(file: 依赖):
cd ~/.dsh/profiles/web
pnpm add file:../../plugins/dsh-chinese-mode
# 并在 package.json 的 dsh.profile.bundles 加入 "dsh-chinese-mode"(或让 dsh 自动 reconcile)

License

MIT

← 上一个 Prev dsh-science 下一个 Next github-explore →