DSH审批汉化 — 审批弹窗在渲染前自动翻译成中文:DeepSeek 驱动、宿主侧完成,React 重渲染也无法还原。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:xiyuepcl/dsh-approval-translator
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
DSH审批汉化 — DeepSeek 驱动的 DeepSeek Harness (dsh) 审批弹窗自动汉化插件。
Agent 请求审批(如沙箱权限升级)时,审批弹窗的说明文字会在到达浏览器之前被翻译成简体中文——弹窗原生渲染中文,React 重渲染也无法还原。命令行为保持英文(它是命令,不是说明)。
Approval dialog auto-translation for DeepSeek Harness (dsh). The reason text is translated to Simplified Chinese before it reaches the browser, so React can never revert it; the command line stays English on purpose.
安装 Install
npx -y @deepseek-ai/dsh plugin --profile web-desktop add https://github.com/xiyuepcl/dsh-approval-translator/releases/download/v0.1.1/dsh-translator-0.1.1.tgz
(桌面客户端 EAC 4.x 用 web-desktop profile;CLI 网页版用 web。)装完重启 Web 服务/EAC 即可。无需配置——使用你已配置的 DeepSeek provider/凭据(每次审批约 1 秒 + 少量 token)。
EAC 4.x uses the
web-desktopprofile; the CLI web usesweb. Replace the profile name accordingly.
原理 How it works
- Node 半边以
ctx.on('approval/request', ..., true)(prepend)挂一个瀑布监听器,抢在官方答案器之前用ctx.llm翻译req.reason。 - 持久化的
approval/asked审计事件保留英文原文;只有展示给用户的文本被翻译。 - 已是中文或不可翻译的 reason 原样放行;翻译失败绝不影响审批(仅记录一条错误日志)。
- 浏览器半边是无操作(早先的 DOM 改写方案被 React 重渲染击败,已弃用)。
卸载 Uninstall
npx -y @deepseek-ai/dsh plugin --profile web-desktop remove dsh-translator
License
MIT
链接
同类插件
zhu1090093659/dsh-web-ui#packages/dsh-web-ui-all★ 4254
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
omdsh-dev/DSH-better-sidebar★ 2026
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
ccch1mneyyy/dsh-TUI★ 1866
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
omdsh-dev/dsh-at-file★ 347
Codex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
huiliyi37/dsh-tianshu-tui★ 209
DeepSeek Harness 的终端 UI(TUI)。
omdsh-dev/dsh-genui★ 196
助手回复内渲染交互式 UI 组件:布局、图表、表单、测验、mermaid、3D 场景与回传事件循环。