Xyz10088/dsh-quick-restart1

dsh-quick-restart

装完新插件/新技能,点一下「刷新 DSH」即可生效,无需手动重启:侧边栏一键刷新 dsh web,服务恢复后页面自动重载。Activate new plugins and skills with one click, no manual restart: sidebar refresh button for dsh web with auto page reload.

包名
dsh-quick-restart
版本
0.1.0
许可证
MIT
最近更新
2026年8月21日

安装

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

或使用预构建包(推荐)

dsh plugin --profile web add https://github.com/Xyz10088/dsh-quick-restart/releases/download/v0.1.0/dsh-quick-restart-0.1.0.tgz


重启 `dsh web`,侧边栏底部即出现「刷新 DSH」按钮。

### 工作原理

- **host 半区**(`lib/index.js`):注册 `POST /restart-dsh` 与 `GET /dsh-health` 路由;重启处理器以分离进程拉起重启脚本,脚本杀掉 3080 端口监听进程后重新启动 `dsh web`(`--no-open`)。
- **client 半区**(`lib/client.js`):注册 `sidebar.footer.action` 槽位按钮;点击后 `POST /restart-dsh`,随后轮询 `/dsh-health`,观察到服务离线→恢复后自动 `location.reload()`。

> 注意:`lib/index.js` 中 `RESTART_SCRIPT` 常量默认指向 `C:\Users\Administrator\.dsh\desktop-launcher\restart-dsh-web.ps1`,不同机器请按需修改为你自己的重启/启动命令。

### 卸载

```sh
dsh plugin --profile web remove dsh-quick-restart

License

MIT


English

✨ Selling point: one click to activate, no manual restart

Installed a new plugin (from dsh-market or dsh plugin add) or a new skill (dropped into ~/.dsh/skills)? No need to manually restart dsh from the terminal — just click the "Refresh DSH" button in the sidebar:

  1. The service restarts in the background (a toast says "please wait ~20s")
  2. New plugins / skills are all loaded and live
  3. The page auto-reloads once the service is back — zero manual steps

Easier than a manual command-line restart: one button does it all, and the page recovers by itself.

Features

  • "Refresh DSH" button in the sidebar footer with a live status dot (green = online / red = offline)
  • Single click triggers the refresh, no confirmation step; a toast appears on click
  • Page auto-reloads once the service is back — no manual refresh needed
  • Restart command uses --no-open so no extra browser tab is opened
  • Probes service health via /dsh-health every 5 seconds

Install