DeepSeek Harness plugin

dsh-l10n-hardpatch

dsh 硬编码中文化补丁:导入后自动将命令菜单/权限预设/计划审查/轨迹视图等包内英文 UI 字符串替换为中文(幂等,dsh 更新后自动重打)。

Jump to install

Source facts

Repository
lingyingaojue/dsh-l10n-hardpatch
Latest update
Aug 20, 2026
Category
Workflow & Automation
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/lingyingaojue/dsh-l10n-hardpatch
Plugin: dsh-l10n-hardpatch
Author: lingyingaojue

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-l10n-hardpatch

DeepSeek Harness (dsh) 硬编码中文化补丁插件 —— 导入即汉化,dsh 更新后自动重打。

解决的问题

dsh 的部分 UI 字符串(命令菜单描述、权限预设描述、plan 审查按钮、轨迹视图标签等)是包内硬编码英文,官方没有提供 i18n 覆盖点,只能直接修改包文件。手动打补丁在 dsh 升级后会丢失。

本插件在加载时(apply)自动扫描所有实际生效的包副本,把已知英文硬编码幂等替换为中文:

  • 导入即汉化:安装后重启 DSH Web 生效
  • 自动重打:dsh 升级导致英文回归时,重启自动重新汉化
  • 覆盖全面:同时扫描全局 npm 依赖树、~/.dsh/profiles 各级 node_modules(含 pnpm store 布局),保证命中实际加载的文件
  • 安全:行级精确替换(不误伤代码逻辑),替换后语法校验通过;任何异常只告警、绝不阻断插件加载

汉化范围

内容
dsh-command-compact压缩对话命令描述
dsh-command-feedback反馈命令描述
dsh-command-goal目标命令描述
dsh-session-log-export导出会话命令描述
dsh-permission-presets权限预设描述
dsh-plan-mode计划审查按钮(批准 / 继续规划等)
dsh-client-ui-trajectory轨迹视图全部 UI 标签(约 100 处)

> 注:advisor 预设与 client-connection 的中文为官方 rc.7 自带,无需补丁。

安装

本插件是本地目录型 bundle 插件,需要先下载到本地,再让 dsh 引用该目录:

1. 下载插件(任选):

# 方式 A:git 克隆
 git clone https://github.com/lingyingaojue/dsh-l10n-hardpatch

# 方式 B:GitHub 页面 Code → Download ZIP,解压到任意目录

2. 安装到 dsh(把 <路径> 换成你下载/解压的目录):

dsh plugin --profile web add <路径>\dsh-l10n-hardpatch

3. 重启 DSH Web(或 Web UI 设置 → 插件 → 添加本地插件 → 选择目录),汉化即生效。

已知坑

dsh plugin add 可能因 pnpm 的 ERR_PNPM_IGNORED_BUILDS(如 @jackwener/openclinode-pty)以退出码 1 中断:此时依赖已安装但 package.jsondsh.profile.bundles 未更新,插件不会被加载。解决方法:手动把包名加入 dsh.profile.bundles 数组后重启。

原理

插件通过 dsh 的 bundle patch 机制注册(cordis.patch.ymlinsert)。加载时读取 patches.json(144 组「原版英文行 → 中文行」精确替换对),对所有候选副本文件执行整行匹配替换

  • 文件已含中文目标行 → 跳过(幂等)
  • 文件含英文原行 → 替换为中文行
  • 无匹配 → 保持不动

patches.jsonextract_lines.py 从「npm 原版包 vs 已汉化文件」的逐行 diff 自动生成,可随时重新生成以适配新版本。

更新维护

dsh 升级后若替换对失效(英文串变化),重新生成替换对:

# 1. 下载对应版本原版包
npm pack @deepseek-ai/dsh-client-ui-trajectory@<version>
# 2. 运行提取脚本(需配置路径)
python extract_lines.py
# 3. 替换 patches.json 后重启 DSH Web

License

MIT