dsh-restart-key
> 中文说明
A dsh plugin that adds a one-click restart button to the dsh web profile. It is especially handy when you install a new plugin and want the web process to pick it up immediately.
The button appears directly below Settings → General → Busy Enter key behavior. It shows a description on the left and a Restart button on the right. Clicking it opens a confirmation dialog; restart only runs after you confirm. Cancelling does nothing.

Features
- Adds a native-looking row to the dsh General settings section.
- Matches dsh web's design language using the same CSS tokens and UI primitives.
- Shows a secondary confirmation dialog before doing anything.
- Restarts the current dsh web process with the same command line, working directory and environment.
- Polls the new process and automatically reloads the page once it is ready.
- Web profile only; the host half stays inactive outside
dsh web/dsh --profile web.
Install
dsh plugin --profile web add link:/absolute/path/to/dsh-restart-keyOr from this repository:
dsh plugin --profile web add github:TaNgent-Owl/dsh-restart-keyAfter installation, restart dsh web once manually so the plugin is loaded:
dsh webThen use the Restart button in Settings → General whenever you need a quick restart.
How it works
1. The host plugin registers two loopback routes: - GET /dsh-restart-key/status - POST /dsh-restart-key/restart 2. After confirmation, the client calls the restart endpoint. 3. The host starts a small supervisor process, then asks dsh's own appExit seam to shut the tree down gracefully. 4. The supervisor waits until the old process is really gone (with a bounded force-kill fallback), then re-runs the exact original dsh web command. 5. The client polls the status route until it sees a new process id, then reloads the page.
Files
lib/index.js Host half: routes + restart scheduling
lib/supervisor.cjs Restart supervisor
lib/client.js Browser half: settings row + confirmation dialog
cordis.patch.yml dsh bundle patchLicense
MIT