1123762794/dsh-web-restart ↗★ 0
dsh-web-restart
One-click restart button for the DeepSeek Harness Web UI: a sidebar footer button that restarts the dsh web process (single click, no confirmation step). / DSH Web 界面一键重启按钮:侧边栏底部按钮,单击即重启 dsh web 进程(无需二次确认)。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1123762794/dsh-web-restart说明文档
阅读完整 README ↗dsh-web-restart
DeepSeek Harness Web 界面的一键重启按钮。
在侧边栏底部(设置按钮旁)增加一个圆形重启按钮(↻)。单击即可立即重启 dsh web 进程——页面断开约 15–20 秒,刷新后一切恢复(会话数据自动落盘并恢复)。按钮是常驻的:它触发的重启不会把它自己带走。
仅限 Windows:重启通过独立的隐藏 PowerShell 进程拉起
dsh web,因此即使 harness 进程被杀死,脚本也会继续执行完毕。
功能
- 单击直接重启——无需二次确认,也不用连点两下。
- 常驻:以 bundle 层插件安装,DSH 重启后依然存在(不是会话级动态插件)。
- 轻量:位于侧边栏底部设置入口旁;56px 窄轨只显示图标,宽轨显示图标 + 文字。
- 状态反馈:请求处理中按钮变红并显示「重启中…」→「已触发」。
- 防重入:重启进行中再次点击会被拒绝。
安装
通过 GitHub(本仓库)
dsh plugin --profile web add github:YOUR_OWNER/dsh-web-restart
然后重启一次 dsh web,让 bundle 层加载。
手动(编辑 profile 文件)
- 添加依赖:
// ~/.dsh/profiles/web/package.json
{
"dependencies": {
"dsh-web-restart": "github:YOUR_OWNER/dsh-web-restart"
}
}
- 添加插件行(本仓库自带
cordis.patch.yml——可将其中的行合并进你的 profile 的cordis.patch.yml,或用上面的dsh plugin命令自动完成):
# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
- id: dsh-web-restart
name: dsh-web-restart
- 在 profile 目录执行
pnpm install,然后重启dsh web。
工作原理
| 层 | 文件 | 作用 |
|---|---|---|
| Host | lib/index.js | 在 webServer 注册精确路由 POST /restart-dsh;以 danger-full-access 沙箱策略、独立隐藏 PowerShell 进程启动重启脚本 |
| Client | lib/client.js | 在 sidebar.footer.action slot 注册侧边栏底部按钮;单击 fetch POST /restart-dsh |
| Bundle | cordis.patch.yml | 同时挂载 host / client 两半的加载器行 |
host 路由在重启发生之前返回(约 1 秒宿主定时器 + 3 秒内部延迟),给浏览器留出渲染「重启中」状态的时间。