FuriousKinght/dsh-restart-button ↗★ 0

dsh-restart-button

Adds a button at the foot of the sidebar that restarts the DSH desktop app and reloads the page when it comes back. 适合Windows桌面端用户,免去手动关闭并重新双击图标的繁琐操作。

패키지
dsh-restart-button
호환성
미검증
Harness peer 범위
^0.2.0-rc.2
버전
1.0.0
라이선스
MIT
최근 업데이트
2026. 10. 10.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:FuriousKinght/dsh-restart-button

dsh-restart-button

A button at the foot of the sidebar that restarts the DSH desktop app: it closes itself, comes back, and the page reconnects on its own. No more closing the window by hand and double-clicking the icon again.

  • Platform: Windows desktop only.
  • Requires DSH 0.2.0-rc.2 or newer — the version this plugin was developed and verified against, and the oldest build it is claimed to work on. The requirement is declared in package.json as peerDependencies on @deepseek-ai/dsh-host-webserver (the route registration this needs) and @deepseek-ai/dsh-client-ui-slots (the footer slot the button mounts into). DSH checks those before importing a plugin, so an older build refuses the install with a named reason instead of mounting a button that never draws.
  • Applies to: the packaged desktop app. It refuses to run under dsh web in a terminal, where killing the parent process would kill your shell.
  • Cost of a restart: it is a force-kill (taskkill /T /F), so a task that is currently running is interrupted. That is why the button needs two clicks — the first arms it for 5 seconds, the second confirms.
  • Nothing to configure: the plugin declares no settings namespace and has no dependencies outside the Node standard library.

Version requirement

The range is ^0.2.0-rc.2, which resolves to >=0.2.0-rc.2 =0.2.0-rc.2 <0.3.0),DSH 用 semver.satisfies(运行时版本, 范围, { includePrerelease: true }) 判定。实测结果:0.2.0-rc.1 装不上,0.2.0-rc.2 正常,后续的 0.2.0-rc.3 / 0.2.0 / 0.2.1 都可以,0.3.0 会因上界被挡下(新的次版本需要重新确认)。被挡下不是崩溃:只会有一行说明是哪个插件、哪个版本、哪个 peer 不匹配;确实想装可以用 dsh plugin allow-version 显式豁免。

  • 只支持 Windows 桌面版。 判断依据是 Host 与 Electron 之间有没有 IPC 通道(process.connected)。命令行跑的 dsh web 没有这条通道,按钮会拒绝执行并说明原因——在那里"杀掉父进程"等于杀掉你的终端。
  • 重启会中断正在跑的任务。 这是强杀,没有优雅退出:所以按钮要点两下,第二下才是真的。
  • 第一次装完需要手动重启一次 DSH。 补丁层会热加载,但运行中的进程持有旧的 entry.js——Node 的 ESM 缓存不带 cache-busting,重新挂载同一个包名拿到的还是旧模块。这一次之后按钮才真正生效。
  • 助手目录 %DSH_HOME%\restart-helper\ 会留下 config.json 和 relaunch.log。日志是重启出问题时唯一的现场记录,卸载脚本刻意不删它。