DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-prompt-zh-cn

d

dsh-prompt-zh-cn

Manifest valid

Replace the system prompt sections, runtime context, automatically injected messages, and tool definitions built into DSH with Chinese.

hasBundlePatch

中文提示词(dsh-prompt-zh-cn)

DeepSeek Harness 中文提示词插件:在运行时把 DSH 内置的系统提示词 sections、运行时上下文、自动注入消息与工具定义替换为中文,不修改任何 DSH 源码,卸载即恢复英文。

本项目借鉴并重构了 zjl1989-li/dsh-harness-zh-cn(MIT); 差异与本项目重写的部分见文末「来源与致谢」。

它翻译什么

  • 系统提示词 sections:身份行、部署人格前缀、计划模式策略、团队策略、各内置工具的使用指导、文件引用规范、交付物规范、结构化输出指令、PTC 模式说明等。
  • 运行时上下文:当前工作目录、沙箱文件策略、审批策略、委派限制、Harness 检出目录、Web GUI URL、子代理身份等。
  • 工具定义:内置工具的描述(description)以及参数 schema 中每一层 description / title,覆盖原生工具模式与 PTC 模式。
  • 自动注入的上下文消息:time-context 的时间快照、skill-catalog 的 <system-reminder> 框架句与内置技能描述。

工具名称、参数名、命令、路径、[exit code: N]、[sandbox: ...]、<system-reminder> 等机器协议标识保持原样,不改变 DSH 的解析与执行行为。

安装

从 npm 安装

打开 设置 → 插件 → 添加插件,输入包名:

dsh-prompt-zh-cn

检查后安装并启用;如果提示重启,重启 DSH。

配置

安装后可在 profile 的 cordis.patch.yml 中按 id 覆盖配置:

- id: dsh-prompt-zh-cn
  config:
    sections: true    # 翻译系统提示词 sections
    contexts: true    # 翻译运行时上下文
    tools: true       # 翻译工具描述与参数描述
    messages: true    # 翻译 time-context / skill-catalog 注入消息
    diagFile: ""      # 可选:写入首次组装快照与漏译样本的绝对路径
    verbose: false

diagFile 仅用于排查覆盖率:写入一次组装结果、工具 schema 与未命中的英文文本,不含用户消息。

工作原理

  • 包装 ctx.systemPrompt.assemble() 与 refreshContext(),在组装结果返回后按名称/文本替换 sections 与 contexts。这样也能覆盖声明为 complete: true 的完整人格提示词。
  • 启动时只读遍历 ctx.tools.definitions() 翻译已注册定义;之后新注册/作用域工具由 assemble() 返回的 assembly.tools 统一翻译(原生执行器与 PTC tools:sdk 的共同来源),不包装 tools 服务方法。
  • 包装每个 agent 所属 session 的 deriveMessages():在每次请求构建历史前,把 time-context / skill-catalog 消息克隆并翻译成中文;不修改会话日志与 source.entries。因此当前会话里已有的英文快照/目录也会在模型侧变成中文。
  • 文本匹配顺序:精确匹配 → 空白折叠匹配 → 正则模板;未命中时原样返回并记录诊断,不做猜测性替换。

GUI 原始记录与模型侧内容的差异

time-context 与 skill-catalog 在 GUI 的“上下文注入”里仍可能显示英文,但模型实际收到的是中文。

原因:GUI 读取持久化的会话日志(原始消息不可变),模型请求读取 session.deriveMessages() 每次派生的历史。插件只在派生层克隆并翻译这两类消息,不改会话日志、source.entries 或用户消息。

因此这是预期行为,不是翻译失败;历史里已有的英文快照/目录也会在每次请求时翻译。

覆盖范围与限制

  • 覆盖 DSH 0.2.2-rc.3 当前 Desktop profile,以及随发行版提供的 standard、ptc、minimal、cordis 四个内置预设所用到的系统提示词 section、运行时上下文、77 个内置工具 schema(含 PTC 模式 run_code 的固定说明段落),以及 time-context / skill-catalog 注入消息。
  • MCP 服务器自带的外部工具描述、第三方插件自定义的提示词、用户自己的 AGENTS.md、技能正文(加载后的 SKILL.md 内容)与工具输出不翻译。
  • 会话日志本身保持原样;插件只在模型请求的历史派生中替换文本,UI 的原始会话记录仍可能显示英文。新请求与历史消息都会翻译。
  • 技能目录只翻译框架句与内置技能描述;用户/第三方技能的描述保持原文。
  • 可选的 Computer Use(CUA)、Stagehand 浏览器等独立可选包自带的整段提示词不在默认覆盖内;它们未安装时不会出现。
  • 内部辅助提示(压缩摘要、插件市场描述)不属于系统提示词,不在此插件范围内。
  • DSH 升级若改动内置提示词措辞,未命中的段落会保持英文;可通过 diagFile 定位后补充字典。

卸载

在插件页停用或移除本插件,下一次请求即恢复英文提示词;不残留任何源码改动。

来源与致谢

本插件借鉴并重构了 zjl1989-li/dsh-harness-zh-cn(MIT,Copyright (c) 2026 dsh-harness-zh contributors)。原项目面向旧版 DSH,通过 system-prompt/assemble 瀑布、commands.list 与客户端 locale.lookup 做汉化;本项目针对 DSH 0.2.2-rc.3 重新实现了运行时接入(systemPrompt.assemble/refreshContext + session.deriveMessages),并重新整理、扩充了系统提示词与工具定义词典。原项目的词典组织方式与术语(agent→代理、job→任务、session→会话、provider→提供方、fiber→纤程)给了我们重要参考。

本插件不包含原项目的运行时代码或词典副本。如果后续复制其代码或词典,需要同时附上原项目的 MIT 版权与许可声明。

DeepSeek Harness 及其官方中文文档同样以 MIT 许可证发布;本插件的英文原文与工具 schema 取自本机安装的 DSH 0.2.2-rc.3。

许可证

MIT

Comments

Loading…

Similar plugins

dsh-custom-prompt-mode

by OSHANG-NOVA

DSH plugin: a Custom prompt agent mode whose system prompt is entirely your own text, with auto-discovered tool switches and model-assisted Chinese descriptions.

Manifest valid

★ 0

MIT

JavaScript

Nov 14, 2026

dsh plugin --profile web add dsh-custom-prompt-mode

Injects a fixed system-prompt section so the agent always replies in Simplified Chinese — including the short narration between tool calls — unless you explicitly ask for another language. Applies to

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-lang-zh

DSH 全局中文模式:输入框「中文」按钮展开语言面板,回复、思考、工具说明三项语言独立开关,配置随 profile 持久化。

UI & ExperienceTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add dsh-chinese-mode-modern

by dawnliming

DSH global Chinese-mode toggle: a 中 switch in the input box; when on, a Simplified-Chinese requirement is injected into every session system prompt.

UI & ExperienceManifest valid

★ 9

MIT

JavaScript

Aug 18, 2026

dsh plugin --profile web add dsh-chinese-mode

by CAI-MH

Force the model to write all replies in a chosen language (Simplified Chinese by default) via a system-prompt section, switchable anytime with a tool.

Tools & CapabilitiesNotifications & IntegrationsDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 4, 2026

dsh plugin --profile web add dsh-reply-language

Translates the English text of DSH approval prompts and ask_user_question cards into Chinese for display only: approval outcomes, option labels, tool names and JSON arguments stay unchanged, and appro

UI & ExperienceManifest valid

★ 1

MIT

JavaScript

dsh plugin --profile web add dsh-approval-zh