hadesybil-hub/dsh-restart-button0

dsh-restart-button

Adds a restart button next to the shutdown button in the bottom-right of the DeepSeek Harness Web GUI. One click restarts the dsh web process (new server + reopen browser) instead of just exiting.

AI 분석

核心用途是提供一键重启 DSH 服务端和前端界面的快捷方式。适合频繁调整配置、安装插件,需要快速重启 DSH 进程的开发与折腾玩家。

패키지
dsh-restart-button
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 28.

설치

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

dsh-restart-button

A small DeepSeek Harness (DSH) plugin that adds a restart button just above the existing bottom-right shutdown button in the Web GUI.

Click it once → a confirm dialog asks if you're sure → restart the dsh web process: the server comes back up and the browser reopens — no need to close and double-click the desktop icon.

What it does

Floating restart buttonPinned above the shutdown power button
Confirm gateOne click → "确定重启?" dialog → restart only if confirmed
Server routePOST /api/dsh-restart/restart (loopback-only)
Restart flowSpawns a detached node waiter → waits for the port to free → starts a fresh dsh web (which auto-opens the browser)

Install

dsh plugin --profile web add "dsh-restart-button"

Then restart dsh web. The restart button appears in the bottom-right, above the shutdown button.

How it works

  • Server half (lib/index.js): a cordis plugin that registers the loopback-only POST /api/dsh-restart/restart route. On request it writes a self-contained node waiter (~/.dsh/desktop-launcher/dsh-restart-waiter.mjs) and spawns it fully detached, then asks the host to exit gracefully (with a hard process.exit fallback so the port always frees).
  • Waiter: waits for port 3080 to be free, then spawn(node …/dsh/lib/bin.js web) detached. dsh web auto-opens the browser, so no manual browser-open step is needed. It also logs to ~/dsh-restart-waiter.log.
  • Client half (lib/client.js): plain-DOM, no React, no build step. Loaded through window.__ModuleLoader__, it appends the floating restart button with the confirm gate.

Security

  • The route is loopback-only (peer socket + Host header + same-origin fence), matching the DSH plugin family convention.
  • The restart uses node's child_process with detached/unref so the new server survives the old process's exit.

License

MIT

Repository

https://github.com/hadesybil-hub/dsh-restart-button