When running DeepSeek Harness (DSH) Web UI locally, stopping or restarting the service usually requires switching to a terminal or manually terminating the process. For developers who frequently debug or test, this interrupts their workflow. dsh-power solves this problem by adding a power icon above Settings in the DSH Web UI sidebar.

What Is This

dsh-power is a client plugin maintained by user jcfung1122. It adds a power control entry to the DeepSeek Harness Web UI, allowing you to stop DSH or restart the Web UI directly from the browser. The plugin is licensed under the MIT License.

Core Features

This plugin provides the following capabilities:

  1. Never accidentally closes other browser windows: The page closes itself via window.close(), and the host process never terminates Chrome.
  2. Environment adaptation: No hardcoded paths or ports. The restart command is reconstructed from the current process, and the reopen address follows the actual listening port.
  3. Cross-platform: Supports Windows (windowless wscript helper process), macOS (open), and Linux (xdg-open).
  4. Zero configuration: Ready to use after installation.

Installation and Enablement

Before using it, make sure the DeepSeek Harness web profile (@deepseek-ai/dsh >= 0.1.0-rc.6) is installed.

Installation command:

dsh plugin --profile web add "github:jcfung1122/dsh-power"

After installation, restart the already running dsh web process and hard-refresh the browser. A power icon will appear above Settings in the sidebar.

Uninstall command:

dsh plugin --profile web remove dsh-power

Typical Usage

Hover over the power icon and select the appropriate action:

  • Close DSH: Closes only the current page and gracefully stops the service, leaving other browser windows unaffected.
  • Restart Web UI: Restarts the service and automatically reopens the page.

Each action first shows a confirmation dialog and executes only after confirmation.

Configuration

No configuration is usually required. If you need to override the default behavior, you can add the following to cordis.patch.yml:

- id: power
  config:
    restartWaitMs: 7000     # 重新拉起前等待旧进程释放端口的时长(毫秒)
    restartCommand: ""      # supervisor 管理的部署可填完整重启命令
    reopenUrl: ""           # 覆盖自动推导的重开地址
Key Default Value Description
restartWaitMs 7000 Waits for the old process to release the port before restarting.
restartCommand (automatic) Full restart command; by default it is reconstructed from the current process.
reopenUrl (automatic) Reopen URL; by default it is http://127.0.0.1:<port>.

Notes

  1. The plugin runs with the permissions of the current DSH process, and the restart command is reconstructed from the current process.
  2. The plugin does not read any session, prompt, or model data.
  3. Regarding privacy and security, both endpoints are exact routes, located outside the RPC trust boundary, and the handlers only allow POST requests and loopback peer addresses.

Summary

dsh-power solves the cumbersome task of frequently restarting the service during local development through simple plugin integration. Its cross-platform support and zero accidental close behavior make it a practical tool for managing the DSH Web UI.

Plugin source and documentation: https://github.com/jcfung1122/dsh-power