- Home
- Plugins
- Tools & Capabilities
- dsh-quit-restart
dsh-quit-restart
lalalawang/dsh-quit-restart
Adds one row to the sidebar that quits DeepSeek Harness Desktop and relaunches it in a single click. It ends both the Electron main process and the host process it spawned, waits for both PIDs to disappear, then starts the app again through a windowless relaunch so no console flashes up. The route only accepts loopback same-origin POSTs and never takes a PID from the request. Windows only. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
dsh plugin --profile web add github:lalalawang/dsh-quit-restartREADME
dsh-quit-restart
Adds one row to the DSH sidebar: Quit and restart DSH. Click it, the app closes and comes back on its own.
No tray menu, no hunting for the shortcut again.
Install
In the app: Plugins → Add plugin, then enter dsh-quit-restart (npm) or https://github.com/lalalawang/dsh-quit-restart.
Restart DSH once afterwards. Bundles are only scanned at startup.
Use
The last row of the sidebar, next to Settings. Click it: the button changes to "Quitting…", the page drops, the app starts again.
Nothing to configure.
What it actually does
On Windows it writes a one-off VBScript to %TEMP% and launches it with wscript.exe, detached, so no console window appears. The script does three things:
taskkillon two processes: the Electron main process and the host process this plugin runs inside. Killing only the main process is not enough: the host is its child, it keeps the port, and the new instance cannot start.- Polls every 250 ms to see if both PIDs are gone, for up to 10 s. If they are still there, it kills by image name.
- Clears the inherited
ELECTRON_RUN_AS_NODE(otherwise the new process starts as node and shows no window), then launches the original exe.
The script deletes itself when done.
Routes
| Route | Purpose |
|---|---|
GET /api/quit-restart/status | Resolved exe path, where it was found, main PID, whether the platform is supported |
POST /api/quit-restart/restart | {"dryRun": true} resolves only; otherwise restarts |
Both accept loopback requests only, and when an Origin header is present it must match the serving host, otherwise 403. Non-Windows returns 501.
If the exe path cannot be resolved
Normally it is derived from the parent process image, so nothing is hardcoded.
If that fails, set DSH_QUIT_RESTART_APP_EXE to the full path.
When something goes wrong
Logs land in %TEMP%\dsh-quit-restart-<pid>-<timestamp>.log, one line per stage.
A "Restart failed" button usually means the kill step was denied. Check the last line of the newest log.
Notes
- Restarting drops any in-flight generation. Session records are already on disk.
- The relaunched app is an independent process; closing the terminal you started DSH from does not affect it.
License
MIT
Related plugins
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
weknora
tencent/weknora