Skip to main content
W

dsh-restart-app

witty-ming/dsh-restart-app

Adds a Restart button to the DSH desktop title bar that restarts the whole desktop app after a confirmation.

Install

dsh plugin --profile web add github:witty-ming/dsh-restart-app

README

dsh-restart-app

dsh-restart-app

Adds a Restart button to the DSH desktop title bar — right of Edit — that restarts the whole app after a confirmation.

中文 · English


What it does

The DSH desktop shell has no in-app way to restart itself: closing the window usually just hides it to the tray, and a real restart means hunting down the process. This plugin adds a Restart button to the Windows caption menu strip (☰ · App · Edit · Restart), asks once, and then restarts the app for real.

  • One click, one confirmation. A modal appears; the restart only happens after you confirm.
  • Real process restart. It relaunches DeepSeek Harness.exe, not just the page, so a new server port and a fresh module graph are expected.
  • Fits the title bar. The button is appended to the same menu bar DSH renders, so it inherits the menu’s own styling and hover behaviour.
  • About one second of downtime. The helper kills the process, waits for it to actually exit, then relaunches.

Requirements

  • Windows. The button lives in the Windows caption menu strip; macOS and Linux use a different title bar and are not supported.
  • DSH desktop app (DeepSeek Harness.exe), not the browser-based dsh web — the button only exists where that menu strip does.
  • Node.js 22.19+ (the same floor DSH itself has).

The plugin makes no network requests of its own: the only call it issues is a loopback POST to the DSH host that serves the UI, which performs the restart.

Install

From the plugin market

Search for dsh-restart-app in the DSH plugin market (or paste this repository’s address into Add plugin) and install it. Then fully quit DSH from the tray icon and reopen it.

With the installer script

powershell -ExecutionPolicy Bypass -File .\install.ps1

The script copies the plugin into %USERPROFILE%\.dsh\profiles\desktop\plugins\ (a durable copy that survives DSH upgrades), links it into node_modules\, registers the dependency in package.json and pnpm-lock.yaml, and adds it to dsh.profile.bundles. Every file it touches is backed up first. See INSTALL.md for the manual five-step version.

Then quit DSH from the tray icon — closing the window only hides it — and reopen it. The title bar should now read ☰ · App · Edit · Restart.

Why it survives DSH upgrades

A plugin that exists only in node_modules/ disappears the next time DSH reinstalls its profile. This one is registered in three places — package.json (dependencies and dsh.profile.bundles) and pnpm-lock.yaml — so pnpm install puts it back automatically after an upgrade.

The plugin-market toggle is honoured too: turning the plugin off removes it from dsh.profile.bundles and the button disappears. (An early hand-install left an - insert: block in the profile’s cordis.patch.yml, which kept the plugin loaded regardless of the toggle; install.ps1 cleans that up.)

Uninstall

Either turn the plugin off in the plugin market and restart DSH, or run uninstall.ps1, which reverses all four changes and deletes both copies.

How it works

  1. The client half (lib/client.js) waits for the title bar’s shadow-DOM menubar and appends one button.
  2. Clicking it opens a confirmation modal rendered inside its own shadow root, so the plugin’s styles cannot leak into the app.
  3. Confirming sends POST /dsh-restart-app/restart to the DSH host over loopback; the request passes DSH’s own host-side trust check.
  4. The server half (host.js) writes a small VBScript that kills DeepSeek Harness.exe, waits for the process to exit, and relaunches it — scheduled through Windows Task Scheduler, so the helper is not a child of the process it kills.

The helper script is written to %TEMP%\dsh-restart-app\ and deleted after use.

License

MIT

Related plugins