- ホーム
- プラグイン
- 開発とプラグインツール
- dsh-app-restart
dsh-app-restart
rayzan-j/dsh-app-restart
Adds a restart button to the Session header, so a plugin change no longer needs the tray menu in the bottom-right corner of the screen. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
インストール
dsh plugin --profile web add github:rayzan-j/dsh-app-restartREADME
dsh-app-restart
Restart the DeepSeek Harness desktop app from a button in the Session header.
The shell's only restart entry is the tray menu in the bottom-right corner of the screen. While you are iterating on a Host-side plugin you pay that trip over and over. This bundle puts the same action in the window: one 28px icon next to the header's other utilities.
| Press | What happens |
|---|---|
| First click | the button turns red and reads 再点一次重启 / Press again to restart for four seconds |
| Second click | the page shows 正在重启…, then the app closes and reopens |
Ctrl+Alt+Shift+R | arms the button exactly like a click, so a stray chord restarts nothing |
A restart ends the page, so the press is deliberately two steps; there is no way to restart by accident.
Install
In DSH, open Plugins → Add plugin and enter one of:
dsh-app-restart— from npmRayZan-J/dsh-app-restart— straight from this repository- an absolute path to a clone of this repository
Enable the bundle, then reload the page once so the button loads.
How it works
A plugin runs inside the shell's Node host, which has no app.relaunch(): the only message the parent channel accepts from it is a shutdown request. So the bundle reproduces the tray item from the outside.
- The page
POSTs to/app-restart/restartwith anx-app-restartheader. The desktop window sends noOriginat all: the shell serves it fromdsh-app://appand deletes that header before forwarding the call to this listener. - The Host writes a PowerShell helper to
$DSH_HOME/app-restart/—restart.ps1plus arestart.jsonnaming the request — and starts it throughcmd /c start, which gives it a console and a parent chain of its own. The helper has to outlive the process that spawns it. - The helper waits, asks the app to close, stops whatever is left of the same executable, and starts it again.
- Every step is appended to
$DSH_HOME/app-restart/restart.log.
Limits
-
Desktop app only. A page served by
dsh webhas no shell to relaunch; the button reportsnot-the-desktop-appand does nothing. -
A restart ends the page and any turn that is running. Session logs, queued messages and drafts are on disk and come back.
-
The close request usually falls through to a hard stop: a shell that only hides its window never leaves the process table. Session events are committed one at a time, so a restart does not roll back what was already written.
-
A page opened from a reverse-proxy hostname is refused (
cross-origin-restart); only the Host's own origin, or the app window's origin-less call, may restart it. -
If the app does not come back, start it by hand — the log names the step that failed. The helper can also be run manually, using the request
restart.jsondescribes:powershell -NoProfile -ExecutionPolicy Bypass -File "$env:DSH_HOME\app-restart\restart.ps1"
Licence
MIT