DeepSeek Harness 插件

dawnliming/dsh-chinese-mode

Star 数 ★ 1 分类 模型与账号接入 收录于 2026-08-16

全局中文模式:输入框「中」字开关,开启即向任意 preset 的 system prompt 注入中文要求,锚定模式晋升后自动生效。

安装

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

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

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

DeepSeek Harness Web 全局中文模式插件:在输入框权限选择后提供一个「中」字开关,开启后向任意 preset 的 system prompt 注入中文要求。

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

功能

  • 全局且持久化:开关存于宿主侧设置(dsh-chinese-mode 命名空间),对所有会话生效。
  • 无条件注入:开启即注入,不做「已有中文」检测;注入位置在 persona 之前。
  • 任意 preset 均生效,包括 complete persona。
  • 锚定模式感知:梁神 / 锚定 preset 首轮晋升前跳过注入,晋升后自动生效。
  • 关闭即移除:关闭开关后从后续组装中移除该 section;不翻译历史消息,也不插入可见聊天内容。

安装

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

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

安装后重启 dsh web,在输入框权限选择后拨动「中」开关即可。

设置字段

字段 默认 说明
enabled false 总开关(「中」滑块)。
text (中文要求文案) 注入 system prompt 的具体文本。
anchoredPresetKeywords liangshen, 梁神, anchored, 锚定 视为锚定模式的 preset 名称关键词。
skipAnchoredFirstRound true 锚定 preset 首轮(晋升前)跳过注入。
force / customKeywords 兼容保留,已不再参与注入逻辑(注入为无条件)。

原理

宿主侧包装 systemPrompt.assemble 并监听官方 system-prompt/assemble waterfall 事件,在组装完成后把 dsh-chinese-mode:language section 插到 persona 之前(或追加到末尾),从而保证发给模型的 system 消息始终携带中文要求。客户端渲染绑定到 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

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →