rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:yeachofly/dsh-restart
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 加一个「重启」按钮:点一下左侧栏的 ⟳,整个应用自动关闭并重新启动。
English — A one-click restart button for DeepSeek Harness. Click the ⟳ glyph in the sidebar panel list and the whole application closes and relaunches itself. Useful after installing or updating plugins, which only take effect after a restart. The desktop shell exposes no restart IPC to plugins (only
shutdown,quit-inspectionandupdate-tasks), so the restart is performed by a two-stage launcher that escapes the Electron job object — see 工作原理 below.
| 一键重启 | 单击侧栏 ⟳ 图标立即重启,无二次确认,从点击到新窗口出现约 3–4 秒 |
| 可见即用 | 同时注册原生侧栏面板;若宿主不提供槽位服务,自动降级为右下角浮动按钮 |
| 不残留窗口 | 重启脚本以 conhost --headless 运行,不留下控制台窗口 |
| 失败可降级 | WMI 被禁用时自动改为「结束 Host」,由 Electron 弹出自带的重启确认框 |
DSH 的插件更新之后需要重启应用才生效,但桌面版没有提供重启入口——主进程只接受 shutdown / quit-inspection / update-tasks 三种 IPC 消息,没有 restart,插件无法请求外壳重启。这个插件补上了这个入口。
dsh plugin --profile <profile> add dsh-restart
或把本仓库目录作为一个插件安装(file: 依赖),再把它加入 profile 的 dsh.profile.bundles:
- insert:
- id: dsh-restart
name: 'dsh-restart'
安装后需要重启一次 DSH,图标才会出现。
点击左侧栏面板列表里的 ⟳ 图标即可重启——单击直接执行,没有二次确认。
重启期间当前会话会中断;DSH 的会话记录是持久化的,历史不会丢。
重启必须交给一个不被 Electron 进程树连带清理的进程,因此分两级:
Win32_Process.Create 启动 Stage 2。该调用由 WmiPrvSE.exe 创建进程,从而脱离 Host 所在的 Job Object——实测杀掉 Host 会连带清理其所有普通子进程。UseShellExecute 启动应用,使新进程不依附任何控制台。几个踩过的坑,都写在源码注释里:
spawn(..., { detached: true }) 会让 powershell.exe 启动约 70ms 后以退出码 0 结束,脚本根本不执行ReturnValue = 0 不代表进程真的跑起来了,因此 Stage 1 通过日志握手确认 Stage 2 是否启动,未启动则降级为「结束 Host,让 Electron 弹出自己的重启确认框」conhost.exe --headless 包装MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness-plugin。