dsh-toolbox: DSH Desktop Personal Toolbox

Introduction

The DeepSeek Harness (DSH) desktop client offers good extensibility, but the default interface lacks some high-frequency action entries, such as restarting the app, checking for updates, and fine-grained window display control. For developers or heavy users who frequently switch sessions and adjust configurations, repeatedly clicking through menus or relying on keyboard shortcuts reduces efficiency.

dsh-toolbox is a personal toolbox plugin that consolidates these operations into prominent positions via title bar buttons, Settings page toggles, and an optional system tray mini-app. It does not depend on any third-party icon packages—all icons are inline SVGs.

Plugin Positioning

Positioning: A practical operations supplement plugin for the DSH desktop client.

Maintainer: fengnowuyu-beep.

Core Value: Moves restart, update check, window control, and session rename operations out of hidden menus and keyboard shortcuts into the title bar and system tray, reducing click counts and easing the memory burden of shortcuts.

Installation

In DSH: Settings → Plugins → Install, then enter the directory or package name:

E:/Data/Project/DeepSeekHarness/DSH-Homemade-Plugins/dsh-toolbox

Or install via the profile’s package.json:

// ~/.dsh/profiles/desktop/package.json
"dependencies": {
  "dsh-toolbox": "file:E:/Data/Project/DeepSeekHarness/DSH-Homemade-Plugins/dsh-toolbox"
},
"dsh": { "profile": { "bundles": [ /* … */ "dsh-toolbox" ] } }

Then run pnpm install in the profile directory.

Once installed, the plugin loads automatically. A DSH restart is required for it to take effect (the loader caches already-imported modules).

One-Click DSH Restart

The restart button is located among the icon buttons in the window title bar (immediately to the left of the system minimize/maximize/close buttons).

Why a Direct Restart Is Not Possible

DSH’s process architecture means a plugin cannot simply request the shell to restart:

  • The Electron main process is the parent; DSH’s Node half (the Host) is its IPC child process;
  • The main process exposes no plugin extension points, and it validates every IPC message—unrecognized types are treated as “Host anomaly” and immediately terminate the entire application;
  • When the child process exits on its own, the main process interprets it as a crash and shows a recovery dialog rather than restarting.

The plugin therefore adopts a “restart helper” approach: it launches a Node script in detached mode. The helper first writes a “ready marker” file, then waits for the Host to poll that marker before terminating the Electron main process. Once the main process is gone, DSH’s Node half executes its own shutdown(0), flushing session logs and background tasks to disk. After confirming the application process has exited and the HTTP port has been released, the helper relaunches the same executable with a cleaned-up environment.

Tray Restart and Quit

If “Tray Mini-App” is enabled, the tray right-click menu includes “Restart DeepSeek Harness” and “Quit DeepSeek Harness,” both with a confirmation prompt. Quit does not automatically relaunch; any in-progress tasks will be interrupted.

Check for Desktop Updates

The title bar icon button can check for desktop updates. When an update is available, the button turns green, and hovering displays “current version → latest version.”

Version Retrieval

The Desktop Node half cannot access app.getVersion(), so the version is read from the installation directory: it first tries resources/app.asar/package.json, falls back to parsing the asar header itself, and further falls back to resources/app/package.json.

Update Source

The update check reads resources/app-update.yml (the feed written by electron-builder for this installation), follows its declared provider/url/channel to fetch the corresponding <channel>.yml, and then uses semantic version comparison to determine whether an update is available.

Enter / Ctrl+Enter Send Behavior

This does not replace the input box—it only remaps a single keypress:

  • Ctrl+Enter (or ⌘+Enter on macOS) → prevents the default event and replays a plain Enter (no modifiers) to the editor, which is DSH’s own defined “send” action;
  • Enter → prevents the default event and replays Shift+Enter, which is DSH’s own defined “insert newline” action;
  • Shift+Enter, Alt+Enter, Enter during IME composition, and editors that are not the input box are all left untouched.

This way, autocomplete popups, the busy queue, and the IME continue to be governed entirely by DSH. The default behavior remains DSH’s “Enter to send.”

The “General” section of the Settings page has a dedicated line indicating the current send mode, and a persistent line of subtle text next to the input box’s send button also describes the mode.

AI Session Rename

Right-click any session in the left sidebar session list, and an extra “AI Rename” entry appears in the context menu. Clicking it uses that session’s own model (reasoning off) to regenerate the title and writes it directly into the session log—if you don’t like it, just click again.

Reusing DSH’s Existing Channels

  • Session row context menu: uses the sidebar.workspaces.session.menu.item slot;
  • Title persistence: uses ctx.sessionTitle.rename(session, title), appending a session/title event (source: user);
  • Model invocation: uses ctx.llm.stream({ ..., purpose: 'session-title', reasoningEffort }), explicitly requesting the lowest tier (typically off);
  • Model source: consistent with how the session controller selects the next-turn model;
  • Session content: uses DSH’s own turnOutline projection.

Turn Selection Strategy

The budget defaults to 4 KiB and is adjustable from 1–24 KiB in the Settings page. Rules are tried in order:

  • all: if the entire outline fits, it covers roughly 7 turns;
  • sample: when there are too many turns, the first and last are always included, and the middle is uniformly random-sampled to fill the budget;
  • prompts: when even first + last + a reply preview don’t fit, only prompts are sent, covering anywhere from a dozen to several dozen turns.

For a single overly long item, the tail is preserved by Unicode code points.

Open Settings Page & Window Control

The leftmost gear button in the title bar opens DSH’s Settings page. If “Tray Mini-App” is enabled, the 4th item in the tray right-click menu is also “Settings” with the same behavior.

Auto-Maximize on Launch

The Settings page has an “Auto-Maximize on Launch” toggle (enabled by default). You can also click “Maximize Now” to try it immediately (uses the system API, does not depend on the shell).

Tray Mini-App

The tray mini-app is a separate, side-by-side tray icon. Its right-click menu is fixed from top to bottom:

  1. Show/Hide DeepSeek Harness: if the window is on screen it hides; if hidden or minimized it restores and brings to the foreground (double-clicking the icon does the same);
  2. Restart DeepSeek Harness: restarts after a confirmation prompt;
  3. Check for Updates: immediately checks for desktop updates;
  4. Settings: opens DSH’s own Settings page;
  5. Quit DeepSeek Harness: quits after a confirmation prompt; does not automatically relaunch.

How to enable: Settings → Toolbox → Tray Mini-App. To remove the icon, simply toggle it off.

Tray Implementation Details

The tray process must use PowerShell (WinForms NotifyIcon), so detached mode cannot be used. If the process exits immediately, the reason is written to ~/.dsh/toolbox/logs/tray.log and displayed in the Settings page.

The tray icon reuses DSH’s own artwork with only a color change: the ink shifts from dark ink to the plugin’s blue.

Use Cases & Cautions

Suitable for DSH desktop users who frequently need to restart DSH, check for updates, control window visibility, or rename sessions.

The plugin runs with the current DSH process’s privileges. Review the source code and license before installing.

In Short

dsh-toolbox consolidates high-frequency operations—restart, update check, window control, and session rename—into the title bar and system tray, reducing click counts. It’s ideal for developers who use DSH intensively.

  • Directory page: https://www.skillhub.cn/plugins/fengnowuyu-beep/dsh-toolbox
  • GitHub: https://github.com/fengnowuyu-beep/dsh-toolbox
羽毛球分组比赛记分
小程序二维码

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

Xiaoye