Introduction¶
DeepSeek Harness Desktop (DSH) defaults to a single action for closing: clicking close exits. Users running agents in the background will encounter two specific issues—wanting to temporarily hide the window but keep the task running, they can only rely on closing and reopening; wanting to pull out a specific session or the entire workspace to view separately, there is no entry point. DSH’s window and exit logic are not inside the plugin runtime; the plugin only runs in the Host (Node sub-process) and the Web frontend, so it cannot access window IPC.
Below is an introduction to the plugin dsh-window maintained by lczment. It makes the close behavior optional (minimize to background / completely exit / ask every time) and supports opening individual sessions or the entire workspace in independent sub-windows. Note that this is a third-party extension, not an official DeepSeek component; the shell extension part will directly modify the local installation directory’s resources/app.
What is it¶
dsh-window is a client plugin for DeepSeek Harness Desktop, maintained by lczment, MIT licensed, npm package @lczment/dsh-window@0.1.0. It solves the two action gaps mentioned above: when closing the window, you decide whether to go to the tray or exit completely, and opening sessions / workspaces as sub-windows.
The project is divided into two parts: the plugin (index.js / client.js) handles the settings page, sidebar buttons, session row buttons, and the close dialog UI, plus Host-side routing; the shell extension (shell/install.mjs) injects into the Electron main process, taking over window closing, creating sub-windows, and reading/writing shared configuration. If only the plugin is installed, the settings page and multi-open button will appear, but the top will prompt that the shell extension is not installed, and closing the window will still follow DSH’s original behavior.
Core Features¶
Optional close behavior: When closing the main window, a dialog appears with the same style as the main interface. Options are minimize to background, completely exit, cancel, and you can check “Remember my choice”.
Settings page: Settings → “Window & Multi-open” has three options (Ask every time / Minimize to background / Completely exit), which take effect immediately and share the same configuration as the close dialog.
Sidebar shortcut entry: A new “Multi-open” button appears at the bottom of the sidebar, above the settings gear (the narrow sidebar only shows the icon). Clicking it allows you to change the close behavior or send the target to a sub-window.
Independent window per session: When hovering over a session row, a window icon appears next to the “…” menu. Clicking it opens that session in a new window.
Whole workspace: In the settings page, each workspace has “Open workspace”, which opens the entire workspace in a new window.
Background keep-alive: After selecting “Minimize to background”, the process and Agent continue running, and the tray icon can be used to reopen the app or exit.
Additional: Buttons inside the plugin have a 120ms hover transition, and the displacement effect is automatically disabled when the system is set to “Reduce motion”. Installation / upgrade completion is launched via a hidden wscript, so the console window does not flash.
Installation and Enablement¶
Prerequisites: Windows, DeepSeek Harness Desktop 0.2.1-rc.5 or newer, Node.js available. Two steps must be performed separately: install the plugin first, then install the shell extension.
Step 1, install plugin. Published to npm, the command is:
dsh plugin add @lczment/dsh-window
You can also search for DSH Window in Settings → Plugins → Discover, or install directly by repository:
dsh plugin add github:lczment/dsh-window
After installing, open Settings → Window & Multi-open, and you should see the settings page.
Step 2, install shell extension. This step writes to D:\DeepSeek Harness (or your installation directory) and runs PowerShell as the current user:
# In the repository root directory
node tools/install-shell-extension.mjs --stage-only
# Register the hidden completion task (checks every minute, auto-deletes after success)
powershell -NoProfile -ExecutionPolicy Bypass -File tools/register-completion-task.ps1
# Then: Tray icon → Exit. The app will restart with the extension within about a minute.
--stage-only does the following: unpack resources/app.asar → resources/app, stack app.asar.unpacked, patch lib/main.js (close hooks, sub-window WebSocket whitelist, sub-window IPC allow), add window.dshWindow bridge to lib/preload-app.cjs, and then rename app.asar to app.asar.orig when the app exits. Since app.asar is occupied while the app is running, the switch must be completed by the completion task after exit.
When installed via Market / npm, the plugin is located at %USERPROFILE%\.dsh\profiles\desktop\node_modules\@lczment\dsh-window (if DSH_HOME is set, it is at $DSH_HOME%\profiles\desktop\node_modules\@lczment\dsh-window). Just change tools/ in the commands above to tools/ under that directory. If the installation directory is not the default D:\DeepSeek Harness, set the environment variable first:
$env:DSH_DESKTOP_ROOT = 'E:\Apps\DeepSeek Harness'
The completion task has a 75-second health check: if no logs are written by the extension after startup, or patches are missing, it will automatically roll back to the original app.asar and restart, leaving the app in a bad state.
Step 3, verification. The top of the settings page shows green “Desktop shell extension is installed”; closing the main window shows a dialog; hovering over sidebar sessions shows a window icon.
Configuration and Behavior¶
The configuration file is at %USERPROFILE%\.dsh\desktop\window-policy.json (use $DSH_HOME\desktop\window-policy.json if DSH_HOME exists):
{ "closeAction": "ask" }
Three values: ask asks every time (default), background hides directly to tray, quit exits directly. Checking “Remember my choice” in the close dialog writes to the same file; modifications in the settings page are broadcast to all windows immediately.
Typical Usage¶
Open a specific session for a long task: Hover on session row → Click window icon, the new window loads that session. The sub-window shares the same login cookies and Host connection as the main window; session data is the same runtime.
Isolate an entire workspace to an independent window: In Settings → “Window & Multi-open”, click Open workspace for that workspace.
Close window without exiting task: Select “Minimize to background” in the settings page or check “Remember my choice” in the close dialog. After that, closing the main window will only move the app to the tray, the Agent continues running, and you can reopen or exit from the tray icon.
Restore original behavior: Set the close behavior to “Ask every time”, and the dialog will pop up every time.
Applicable Scenarios and Notes¶
Suitable for Windows users of DeepSeek Harness Desktop who want to close windows without exiting, or need to split sessions / workspaces to sub-windows for parallel viewing.
Several limitations that must be clarified: The shell extension only supports Windows (depends on DSH’s win32 tray, titleBarOverlay and PowerShell scripts); it is a patch to the local installation directory, not an official extension point. After a DSH upgrade, resources/app.asar will be replaced by new files, the old patches will become invalid, and you need to re-run the completion command from step 2; the plugin runs under the current dsh process permissions, and the shell extension needs to write to the installation directory. You should check shell/install.mjs and the repository source code before installing to confirm the MIT license. The close dialog falls back to the system native dialog when the frontend is not ready. If only the plugin is installed without the shell extension, the close behavior will not change.
After a DSH upgrade, just re-run the installation script:
node tools/install-shell-extension.mjs --stage-only
powershell -NoProfile -ExecutionPolicy Bypass -File tools/register-completion-task.ps1
The plugin part usually does not need to be reinstalled. To uninstall, exit the app first, run tools/uninstall-shell-extension.ps1 (will restore app.asar.orig, delete resources/app and resources/dsh-window-extension), and then remove this plugin in Settings → Plugins.
Summary¶
The value of dsh-window lies in making the hardcoded close actions and single-window structure in DSH Desktop optional, without needing to modify official code yourself. It is maintained personally by lczment (current stars 0, client category), and the functional boundaries and patch-style installation method are clearly written in the README. Just check against the above notes before installing.
Directory page: https://www.skillhub.cn/plugins/lczment/dsh-window
GitHub: https://github.com/lczment/dsh-window