Back to marketplace

dsh-chinese-mode

Agent & Workflow

dawnliming/dsh-chinese-mode

Global Chinese-mode toggle for DeepSeek Harness Web: a compact '中文' switch in the input box; when enabled, injects Simplified-Chinese language requirements into every session's system prompt, with separate toggles for reply, thinking, and tool areas.

  • dsh-plugin
GitHub Stars
8GitHub
Views
1DSH Plugin Hub
Forks
0GitHub
Open issues
2GitHub Issues
Manifest version
0.2.1dsh-chinese-mode
Latest push
Aug 18, 2026GitHub
License
MITJavaScript
Plugin type
Host + ClientRuns in both Host and Web Client

Verification and compatibility

This section shows evidence collected by the catalog. Undeclared information is labeled as unknown.

Static checked
01Exact source: github · dsh-chinese-mode@0.2.102Validated: Aug 23, 202603Verified Harness: 0.1.0-rc.7
Current-version compatibility
Verified on the catalog Harness version
Declared Harness range
Not declared
Declared platforms
Not declared
Profiles
web
Build approval
Unknown
Permissions
Not declared
External services
Not declared
Telemetry
Unknown
No known risk flags found

This is not a security endorsement. Review source, permissions, and configuration before installing.

View evidence and scope

Verification covers only the named source, version, and Harness environment. It does not guarantee future compatibility.

  • github:dawnliming/dsh-chinese-mode#830f1fce7f199c0683311c3c5afe251a5d869af0
  • The manifest and static structure passed checks; a runtime load check has not completed.

README

View source

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;输入框左侧的「中文」胶囊开关可直接切换语言注入,是否显示该开关可在设置页控制。

设置字段

字段默认说明
enabledfalse总开关;关闭后完全不注入,输入框状态键保留为关闭状态。
showInputSwitchtrue是否显示输入框左侧的「中文」胶囊开关;独立于总开关。
replyChinesetrue回复区域语言:开=中文,关=英文。
thinkingChinesetrue思考区域语言:开=中文,关=英文。
toolsChinesetrue工具/界面区域语言:开=中文,关=英文。
textReply / textThinking / textTools各区域默认中文文案内置中文文案(英文文案内置对应英文版);设置页不提供编辑,避免污染。
anchoredPresetKeywordsliangshen, 梁神, anchored, 锚定视为锚定模式的 preset 名称关键词(逗号分隔,设置页可编辑)。
anchoredModefalse默认关闭;启用后锚定 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

Comments

0
Newest first