ddy-007/dsh-client-resume-button ↗★ 1
client-resume-button
Adds a Continue button to the DeepSeek Harness composer: when the previous turn was interrupted (by the user, a crash, or an error), one click asks the model to pick that turn back up. 在对话中断或报错时提供一键继续功能,适合频繁调试的用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ddy-007/dsh-client-resume-buttonドキュメント
README 全文を読む ↗client-resume-button
给 DeepSeek Harness 的输入框加一个「继续」按钮:上一轮被中断后,点一下就能让模型接着把那一轮做完。
English | 中文
效果

红圈处即「继续」按钮,位于模型选择器左侧。开始输入或添加附件时它收窄消失,清空后展开回来。
功能
按钮出现条件(需全部满足):
- 上一轮以
aborted(用户按停止)、interrupted(崩溃)或error结束 - 输入框为空(无文字、无附件)
- 当前无轮次运行
点击后发送两条 plugin 来源的提示给模型:一条要求继续,一条提醒检查残留进程、不重做已完成步骤。
安装
--profile 后面的名字填你实际在用的 profile。桌面客户端用 desktop,dsh web 用 web。
从 GitHub 安装:
dsh plugin --profile desktop add github:ddy-007/dsh-client-resume-button
国内网络:github.com 的 git 协议常被阻断,可走 ghproxy.net 镜像(只读,够装插件):
dsh plugin --profile desktop add https://ghproxy.net/https://github.com/ddy-007/dsh-client-resume-button.git
如果都报错(旧版 CLI 可能不认 github: 前缀),改用 pnpm 的 git 语法:
dsh plugin --profile desktop add https://github.com/ddy-007/dsh-client-resume-button.git
装完重启 DSH。浏览器端代码在启动时加载,热重载不生效。
本地开发安装
改源码时用 link:,不必每次重装。dsh 会把依赖写进 package.json 并自动追加到 dsh.profile.bundles:
dsh plugin --profile desktop add "link:"
之后改 lib/*.js 直接生效,只需重启 DSH。
手动安装
把包名 client-resume-button 加进 profile 的 dsh.profile.bundles,并在 node_modules 下建目录链接指向它。
改 package.json 时注意不要引入 BOM,否则启动报 Unexpected token '\ufeff'。用 Node 写入最稳妥:
node -e "const fs=require('fs');const p=process.argv[1];const j=JSON.parse(fs.readFileSync(p,'utf8'));if(!j.dsh.profile.bundles.includes('client-resume-button'))j.dsh.profile.bundles.push('client-resume-button');fs.writeFileSync(p,JSON.stringify(j,null,2)+'\n','utf8')" "$DSH_PROFILE/package.json"
卸载
dsh plugin --profile desktop remove client-resume-button
限制
- 按钮位于模型选择器左侧,不在主提交按钮旁。更近的
conversation.input.activity槽位是single类型,已被语音输入插件占用,抢占会导致应用无法启动。 - 开始新一轮后按钮就消失。中断标记会在下一次
turn/start时清除——中断后只要又发了消息,无论内容是什么,都无法再「继续上一轮」。 - 不能恢复中断时的半截输出。那部分内容从未写入日志,插件是新开一轮 turn 重做,而非续写原流。
兼容性
实测 DSH 0.2.0-rc.2、0.2.1-rc.2。package.json 声明了 dsh.engines.dsh: ">=0.2.0-rc.2",DSH 低于此版本时插件管理器会拒绝安装(或要求显式豁免),高于此版本则放行。
依赖以下内部约定,DSH 升级后可能失效:
| 约定 | 用途 |
|---|---|
turn/end reason 枚举 | 判断中断类型 |
conversation.input.right 槽位 | 按钮挂载位置 |
_primary 类名 | 判断草稿是否为空 |
agent.inbox.prepend / agent.steer | 投递续跑消息 |
window.__ModuleLoader__.load | 客户端入口格式 |
许可
MIT