dsh-hot-restart: DeepSeek Harness Hot Restart and Diagnostic Plugin

In day-to-day development with DeepSeek Harness (DSH), we often need to reset client state or troubleshoot environment issues. Closing and reopening windows manually is inefficient, and problems caused by antivirus interception or policy anomalies are hard to diagnose. The dsh-hot-restart plugin addresses these pain points by embedding a fixed button inside the window, enabling one-click hot restarts and built-in diagnostics.

The plugin is maintained by xiaolu511 under the MIT license. It does not spawn new processes and only reads policies and state, so it never triggers antivirus authorization prompts. Core capabilities include one-click DSH restart and right-click generation of diagnostic reports.

Installation & Activation

Pin an exact version number in your spec to prevent supply-chain policies from skipping the install. The command is:

dsh-hot-restart@0.3.16

If installation fails or you need an offline install, use a GitHub URL or a local .tgz file instead:

github:xiaolu511/dsh-hot-restart
file:/path/to/tgz

After installation, you must manually restart DSH once: host-side code is cached by module URL and the injection table is only collected at startup, so the page scripts require an actual process restart to take effect.

Core Features

Hot Restart

The button is docked to the bottom-left corner of the main area, styled with the theme color and white text without crowding the content. Clicking it opens a confirmation dialog; choose “Hot Restart Now” to continue. You will see a “DSH hot restart complete” notification. Press Esc to dismiss the dialog.

No console windows appear during the restart. The plugin triggers it by sending POST /dsh-hot-restart/restart (with the header x-dsh-hot-restart: 1) to the host. The host then invokes wscript.exe //B lib\relaunch.vbs via WMI, leveraging the GUI subsystem to avoid creating a console.

Built-in Self-Check

Right-click the button and select “Self-Check & Generate Diagnostic Report”. A progress card appears in the center of the screen; after roughly nine seconds the report is generated and opened in Notepad. It includes the dispatch capability matrix, security environment (WSH policies, antivirus status), DSH process and command line, plugin logs, and more.

By default the plugin does not create any processes and only reads policies and state, so it will not trigger antivirus authorization prompts.

Typical Usage

  1. Restart DSH:
    - Click the bottom-left button.
    - In the confirmation dialog, choose “Hot Restart Now”.
    - DSH closes and automatically reopens.

  2. Silent restart:
    - Double-click tools/restart-dsh.vbs in the plugin directory to restart DSH without a confirmation dialog.

  3. Generate a diagnostic report:
    - Right-click the button and select “Self-Check & Generate Diagnostic Report”.

Limitations & Notes

  • Environment: Windows desktop client only; the button is disabled in other environments.
  • Restart is forced: running tasks will be interrupted.
  • Launch method: do not start DSH from a console window; if you do, DSH remains attached to that window and the plugin cannot inject.
  • Button position: fixed at the bottom-left of the main area; edit lib/ui.js if you need to move it.

Files & Logs

When the plugin runs, it writes restart.log and last-restart.json under $DSH_HOME/hot-restart/, recording restart events.

Plugin repository: https://github.com/xiaolu511/dsh-hot-restart

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

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

Xiaoye