Introduction¶
When modifying plugins or profile configurations in the DeepSeek Harness Desktop version, you often need to fully exit or restart the process for changes to take effect. Closing the DSH Desktop window only minimizes it to the system tray; to truly exit or restart, you usually have to find “Exit” in the tray menu, which involves too many steps. The community plugin dsh-power-menu (maintainer xichen-62) adds a power button to the top right corner of the session title bar. The menu contains only two items: “Close DSH” and “Restart DSH,” moving these operations directly into the current interface.
Below is an introduction to the plugin’s location, capabilities, installation methods, and usage notes. The plugin only supports DSH Desktop on Windows and is licensed under MIT; the current package version is 0.1.17 (subject to the repository).
What is this¶
dsh-power-menu is a client-side plugin for DSH: it mounts a power menu in the desktop UI and triggers a shutdown or restart of the entire DeepSeek Harness desktop application (Electron main process and Host) via a local loopback HTTP interface. It does not rely on external services; the README explicitly states it is purely local and has no telemetry.
- Directory Page: skillhub.cn/plugins/xichen-62/dsh-power-menu
- Source Code & Docs: github.com/xichen-62/dsh-power-menu
The community plugin directory is maintained by an independent site and has no official affiliation with DeepSeek / High-Flyer; it is recommended to review the source code and license yourself before installing. The plugin runs with the permissions of the current DSH process; closing and restarting will interrupt ongoing response generation, tools, and background tasks.
Core Functions¶
Verified via the README, the plugin primarily provides the following capabilities:
- Top-right Power Button: Located at the far right of the icon row in the session title bar, following the order “Layout / Sidebar / Power”. The welcome page and conversation page share the same mount location.
- Close DSH: Ends the entire desktop application without auto-restarting; the user needs to manually reopen DSH.
- Restart DSH: Ends the application, waits for the old port to be released, and then relaunches the original executable, with the window automatically returning.
- Keyboard & Feedback: The menu supports arrow keys,
Home/End,Enter/Space, andEsc; during execution, a semi-transparent overlay covers the entire page displaying “Closing DSH…” or “Restarting DSH…”. - Security Boundary: The Host registers
POST /api/dsh-power-menu/shutdown,POST /api/dsh-power-menu/restart, andGET /api/dsh-power-menu/health. It only accepts local loopback addresses and performs related same-origin checks; underdsh web, it returns 409 and does not kill other processes.
Compatibility Notes (from README): Windows 10 / 11; tested on DSH Desktop 0.2.1-rc.2 (2026-10-18); engines requires dsh >= 0.2.0-rc.1, node >= 22 (following the Node bundled with DSH).
Installation & Activation¶
The DSH plugin manager may only write the package to dependencies without automatically writing to dsh.profile.bundles. The README emphasizes: after installation, you must run enable.ps1 once more (or use the repository’s install.ps1 to handle it all), and then restart DSH; otherwise, clicking the button may result in an HTTP 404.
Method A: One-click Script (Recommended)¶
Run the following in the plugin repository directory:
powershell -ExecutionPolicy Bypass -File .\install.ps1
If direct connection to GitHub is slow, you can add a mirror parameter:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Mirror
The script will clean up old link/junction remnants, install via DSH CLI, supplement dsh.profile.bundles, and prompt for a restart. If git is not available, the script can download dsh-power-menu-0.1.17.tgz from Releases for local installation (see README for -TgzPath, -Sha256, etc.).
Method B: Plugin Marketplace¶
- Open DSH Desktop Plugins / Plugin Marketplace, select Add Plugin, and input:
github:xichen-62/dsh-power-menu
- After installation is complete, run the following in the repository directory:
powershell -ExecutionPolicy Bypass -File .\enable.ps1
- Restart DSH and confirm that
dsh-power-menushows as “Enabled” in Installed.
Method C: Command Line¶
dsh plugin --profile desktop add github:xichen-62/dsh-power-menu
Then, run enable.ps1 in the repository directory (as above) and restart DSH. If dsh is not in your PATH, use dsh / dsh.cmd from the DSH installation directory.
If git is not available and github: installation fails, the README provides a tarball example:
dsh plugin --profile desktop add https://github.com/xichen-62/dsh-power-menu/releases/latest/download/dsh-power-menu-0.1.17.tgz
Typical Usage¶
- Click the power icon in the top right corner of the session title bar.
- Select Close DSH or Restart DSH.
- Wait for the overlay prompt; “Close” will exit the application, while “Restart” will automatically bring the window back within seconds.
| Action | Result | Manual Reopen Needed? |
|---|---|---|
| Close DSH | Ends the entire desktop application | Yes |
| Restart DSH | Relaunches after ending the application | No |
The README notes: Clicking executes immediately with no secondary confirmation; please save your work before operating. If you require the cleanest exit and Chromium storage flushing, you can still use the tray “Exit”—the plugin hands over control by ending the main process, and the main process before-quit might be skipped (explained in the README’s FAQ).
For troubleshooting, view the local log directory: %USERPROFILE%\.dsh\dsh-power-menu\ (contains power-menu.log, helper-*.log).
How it Works (Brief)¶
The plugin runs inside the Host subprocess and cannot directly call Electron’s app.quit() / app.relaunch(). During a shutdown or restart, the Host writes handover information to %USERPROFILE%\.dsh\dsh-power-menu\, then spawns a detached lib/helper.cjs: the helper executes taskkill (without /T) on the Electron main process, allowing the Host to proceed with application.shutdown after IPC disconnects; in restart mode, the helper waits for the port to be released and relaunches the original executable. For details and flowcharts, see the “How it Works” section in the repository README.
Use Cases & Notes¶
Who it’s for: Developers primarily using DSH Desktop on Windows, frequently modifying plugins or profiles, and needing quick restarts.
Not suitable for: Non-Windows environments; scenarios using only dsh web (the interface will reject the request).
Installation & Permissions: The plugin has the same permissions as DSH; please read the MIT License and source code before installing. If installation reports “No write permission,” the README indicates the common cause is ERR_PNPM_EPERM caused by junctions left from previous link: installations; you can delete the node_modules\dsh-power-menu link or re-run install.ps1.
Conclusion¶
dsh-power-menu consolidates “Exit / Restart the entire DSH Desktop” into a single power menu in the title bar, reducing the hassle of digging through the system tray. It is suitable for daily development and debugging on the Windows desktop version.
- Community Directory: https://www.skillhub.cn/plugins/xichen-62/dsh-power-menu
- GitHub: https://github.com/xichen-62/dsh-power-menu