dsh-powerbox: One-click restart or quit DSH in the dialog title bar

Preface

When using DeepSeek Harness (DSH) to run the Web UI, the common approach to restarting the process or quitting the application is to look for the tray icon or title bar menu. This path can often be inconvenient when the window is in the foreground and a session is in progress. dsh-powerbox is a community-maintained client plugin that places “Restart DSH” and “Quit DSH” options on the right side of the current conversation’s top bar. Clicking the power icon requires selecting an action first, followed by a separate confirmation step to prevent accidental termination of sessions or interruption of ongoing tool calls.

What is this

dsh-powerbox (repository AsterLuo/dsh-powerbox) is maintained by AsterLuo and categorized as a client plugin in the SkillHub directory. It adds a power button to the conversation title area of the DSH Web UI: clicking it pops up a small dialog where you can choose Restart DSH or Quit DSH; each operation triggers a further confirmation prompt and is only executed after confirmation. Canceling, pressing Esc, or clicking the overlay will not alter the running state.

Core Features

The following section describes the two paths provided by the plugin on the interface and their constraints.

Title Bar Access

The plugin registers an item to the conversation.session.header.utilities slot (located similarly to the official “Open in App” button in the session top bar), and the button appears to the right of the conversation title. The styling utilizes only --dsw-alias-* theme variables, adapting to light/dark theme switches.

Restart and Quit

  • Restart DSH: Invokes dshDesktop.boot.restart() after secondary confirmation. This will terminate ongoing tool calls.
  • Quit DSH: Invokes dshDesktop._call('win.close-force', {}) after secondary confirmation, forcibly closing the application.

The interaction sequence can be summarized as:

[⏻]  →  Select Restart DSH / Quit DSH  →  Confirm again  →  Execute

Environment and Fallback

  • Requires DSH with Web UI (dsh --profile <name>), version 0.2 or higher.
  • Requires the desktop shell to provide window.dshDesktop. In a pure browser environment, the button will be disabled, with a tooltip explaining the reason to avoid a half-usable state.

Security and Feedback

Confirmation buttons are disabled while a request is in progress; synchronous re-entry protection prevents duplicate triggers. During action execution, Esc cannot close the dialog to prevent masking an initiated restart. After the dialog closes, focus returns to the power button. Failures are displayed within the dialog and allow for retries, ensuring errors are not silently swallowed.

Installation and Activation

The installation command provided in the official README is as follows (replace <your-profile> with your profile name):

dsh plugin --profile <your-profile> add github:AsterLuo/dsh-powerbox

The package declares dsh.bundle.patch. The new CLI will automatically write dsh-powerbox into dsh.profile.bundles, so manual editing of cordis.patch.yml or package.json is generally unnecessary. After installation, restart DSH or reload the Web UI to see the power button in the title bar.

If the CLI is older and does not automatically merge bundles, you can manually add the following to the profile’s cordis.patch.yml:

- insert:
    - id: powerbox
      name: 'dsh-powerbox'

Uninstallation:

dsh plugin --profile <your-profile> remove dsh-powerbox

If you have manually added patch lines, you need to delete them as well and restart DSH again.

Typical Usage

  1. Start DSH with the Web UI using a specific profile (desktop environment where dshDesktop is available).
  2. Open any conversation, find the power icon on the right side of the title bar, and click it.
  3. Select “Restart DSH” or “Quit DSH” in the first step dialog.
  4. Confirm in the second step confirmation box; if clicked by mistake, select Cancel or press Esc to exit.

No additional configuration options are required; the plugin has no build step. The client logic resides in lib/client.js, loaded via window.__ModuleLoader__.load, with react provided by the host.

Use Cases and Notes

Suitable for developers who frequently work in the Web conversation interface and need to quickly restart or quit DSH. Both operations are destructive: restarting interrupts unfinished calls, and quitting closes the entire application, so the plugin is intentionally designed with a two-step confirmation.

The plugin runs with the permissions of the current DSH process. It is recommended to read the repository source code and the MIT license before installation. The DSH ecosystem emphasizes “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek or Hithink RoyalFlush (幻方).

Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye