Introduction¶
DeepSeek Harness (DSH) Desktop wraps the host and browser UI in an Electron shell. In release builds, the tray menu often lacks a “Restart” entry: to cleanly reopen the app, you usually have to quit first and relaunch from the Start menu. When an agent is running for long periods, or you’re tweaking profiles or debugging issues, missing that one menu item costs you an extra step.
dsh-power-button is a community plugin (maintainer: WhichWitchWin; category: client) that adds two independently toggleable power entry points to the desktop GUI: a draggable, edge-collapsing floating button, and a power icon next to the avatar row in the sidebar. Both pop the same menu, offering “Restart DSH” or “Exit DSH”. The plugin supports Windows only, is pure JavaScript with zero npm runtime dependencies, mounts through the official bundle slot, and does not rely on reading other plugins’ DOM.
Below we cover what problem it solves, how to install and use it, and the boundaries you should know before installing.
What This Is¶
| Item | Description |
|---|---|
| Package name | dsh-power-button (npm, currently 0.1.0) |
| Repository | WhichWitchWin/dsh-power-button |
| Directory page | SkillHub plugin page |
| License | MIT |
| Platform | Windows (taskkill, WMI, Windows PowerShell 5.1) |
| Peer dependency | @deepseek-ai/dsh >= 0.2.0-rc.2 |
In the DSH ecosystem, client capabilities are commonly extended via plugins; directories like SkillHub are community sites with no official affiliation with DeepSeek / High-Flyer. This plugin runs with the current DSH process’s permissions — review the source and license yourself before installing.
Core Features¶
-
Floating power button
Draggable; it snaps to and collapses into a thin edge near the left or right border, and expands again when the mouse moves onto the thin edge. Clicking it opens the “Restart DSH / Exit DSH” menu. It deliberately does not snap to the top or bottom edges, to avoid blocking window controls and input boxes. The position is saved in the browser’slocalStorage. -
Sidebar power icon
Sits in the sidebar avatar row, to the left of the avatar, styled consistently with the official icon buttons, and shares the same menu as the floating button. When competing for the same position as e.g.@linxin666/dsh-web-all, it uses the same official slot and does not depend on other plugins’ styles. -
Second confirmation while tasks are running
A confirmation dialog only appears when the host reports that an agent (including sub-agents) is running; when idle, the action executes directly. If the host cannot answer, it treats the situation as “task running”. -
Per-feature toggles in the plugin manager
The card-level toggle governs the whole package; the config page separately offers “Floating power button” and “Sidebar bottom power icon”, with changes taking effect immediately — no refresh required.
Regarding restart semantics, the plugin externally replicates a “quit and relaunch with the original command line”: Electron main process’s app.relaunch() is not exposed to plugins, so the host uses a loopback API to spawn a PowerShell helper script detached from the app’s process tree, which kills the tree, waits for the port, and then starts a new instance. The exit path uses taskkill.
Installation and Activation¶
Installation modifies the profile’s package.json and pnpm-lock.yaml — back them up first:
Copy-Item "$env:DSH_HOME\profiles\desktop\package.json" `
"$env:DSH_HOME\profiles\desktop\package.json.bak" -Force
Option 1: Install from npm (recommended)
Only this method is recognized by the plugin manager’s “Check for updates” (it compares versions of packages installed directly from the registry).
& 'D:\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' `
plugin --profile desktop add dsh-power-button
Option 2: Local directory
& 'D:\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' `
plugin --profile desktop add 'D:\path\to\dsh-power-button'
Option 3: Install directly from GitHub
& 'D:\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' `
plugin --profile desktop add 'github:WhichWitchWin/dsh-power-button#main'
The CLI path depends on your local DSH installation directory, and you must use the dsh.cmd shipped with the desktop edition (which carries manageDesktopProfile); other dsh binaries on your PATH may error out for the desktop profile. All three methods write to the profile dependencies and activate dsh.bundle.patch. After installation, quit DSH from the tray and reopen it once for both UI entry points to appear. The lib/ directory inside the package contains ready-to-load output — no build step required.
Uninstallation:
& 'D:\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' `
plugin --profile desktop remove dsh-power-button
Typical Usage¶
| Action | Result |
|---|---|
| Drag the floating button | Moves; on release near the left/right edge, it snaps and collapses |
| Move mouse onto the thin edge | Expands; moving away collapses it again |
| Click the button | Opens the power menu |
| Click blank space outside the menu | Closes the menu; the control returns to the thin bar |
Esc |
Closes the menu |
Enter / Space |
Same as clicking the button |
On the plugin config page you can disable the floating or sidebar entry points individually. Persisted config is written to dsh-power-button.json under the profile directory, e.g.:
{ "floating": true, "sidebar": true }
If you see WARNING: proceeding after ...s in the logs during restart, you can raise the host’s wait limits via a half-measure in the bundle patch (defaults: settleMs 500, waitForExitSeconds 20):
- insert:
- id: ui-restart-button
name: 'dsh-power-button'
config:
settleMs: 800
waitForExitSeconds: 30
Troubleshooting logs: restart-button.log; refusal marker: restart-button.refused. Directory resolution order: $DSH_HOME\logs → inferred from the host profile → %TEMP%.
Use Cases and Caveats¶
Who it’s for
- Users who mainly run the DSH Desktop on Windows and want in-UI one-click restart or exit instead of relaunching from the Start menu every time.
- Users who need a floating quick-access entry, or prefer operating from the bottom of the sidebar.
Boundaries you should know
- Windows only; macOS / Linux return
supported: falseand hide the UI. WMI must be available. - In
dsh webtermination mode, neither UI appears. - Restart is equivalent to quitting and reopening: it does not guarantee restoring UI state, and in-progress turns will not resume automatically; force-killing tasks while they run is an inherent cost, and the confirmation dialog will state this.
- After restart, the new window will try to be brought to the front, but immediate keyboard focus is not guaranteed.
- The sidebar layout relies on CSS
:has()and shell class suffixes; if unsupported, sidebar re-layout fails — the floating button is unaffected.
The plugin applies guardrails such as loopback, Host/Origin checks, and one-shot gates for destructive REST actions; see the “Security guardrails” section of the repository README for details.
Conclusion¶
dsh-power-button fills the missing “in-UI restart/exit” slot in the release desktop GUI: dual entry points, individually toggleable, with a second confirmation only when an agent is running. If you already use the DSH desktop profile, install via the npm method above and try it after restarting the shell.
- Directory page: https://www.skillhub.cn/plugins/WhichWitchWin/dsh-power-button
- GitHub: https://github.com/WhichWitchWin/dsh-power-button