Introduction¶
Every time the DSH desktop client starts, the window creation code is hardcoded to width: 1280, height: 820, and there is no persistence logic. The result is that every time the client restarts, the window shrinks back to its default size; if you are used to dragging the window to a secondary monitor and maximizing it to see the full conversation, you have to drag it again. dsh-window-keeper fills this gap: it remembers the position, size, and maximized state of the DeepSeek Harness desktop window, returning to where you left off the next time you start.
Below is an introduction to the plugin’s positioning, installation methods, workflow, and known limitations.
What is it¶
dsh-window-keeper (version 0.1.2, MIT license) is a community-maintained DSH plugin, categorized as “Client” on the directory page, maintained by mm24trg2gy-star. Its scope is narrow, doing only one thing: writing window geometry to disk and restoring it on the next startup.
The plugin adopts a “dual-track” design: the actual window logic is a PowerShell script that uses only the Win32 API and does not depend on the DSH client version; the plugin shell is only responsible for installation, autostart, and the settings page toggle, containing no window logic. Therefore, regardless of how the DSH client is upgraded, the window memory itself is unaffected. In the README acknowledgments, the author of the window logic is credited as Big Fat Fish (Whale Girl · CETACEA_LOLI).
Core Capabilities¶
- Automatically remembers the window state when closing, no manual save needed;
- Restores the position, size, and maximized state, including maximizing;
- If the saved position runs out of the current virtual screen bounds (e.g., changing monitors, disconnecting a screen), it is immediately invalidated and reverts to the default, ensuring the window is not placed in an invisible location;
- Does not bind to the client version;
- Only recognizes windows ending with
DeepSeek Harnessand does not interfere with other programs.
Compared to the similar plugins listed in the README (myxiyues/dsh-window-size, flying4055/dsh-window-bounds), this plugin aligns with or exceeds the other plugins in the areas of “auto-remember on close,” “restore maximize,” and “no version binding.”
Installation and Activation¶
The plugin provides two installation paths; choose based on your preference.
The script track is suitable for those who want a one-time fix and do not mind having an extra background process:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1
The script installs to %LOCALAPPDATA%\dsh-window-keeper and places an autostart entry in the “Startup” folder. To uninstall:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1 -Uninstall
The plugin shell is suitable for those who want a one-click install and a settings page toggle:
dsh plugin --profile desktop add dsh-window-keeper
After installation, restart the client and toggle it in “Settings → Window Memory.” The plugin shell itself does not contain window logic; it deploys the script to %LOCALAPPDATA%\dsh-window-keeper, manages autostart, and provides a toggle on the settings page.
The runtime conditions declared in package.json are Node >= 20 and dsh >= 0.2.0-rc.2.
Configuration¶
The configuration file is located at %LOCALAPPDATA%\dsh-window-keeper\config.json:
{ "enabled": true, "autostart": true }
When enabled: false, the daemon exits immediately upon startup and will not touch the window. This switch works for both the script track and the plugin shell.
How it Works¶
- The daemon script reads the window state (
GetWindowPlacement) every approximately 0.9 seconds; - If the size, position, or maximized state changes, it writes to
window-state.json; - Upon detecting that DSH has reopened a window, it waits for approximately 1.2 seconds and applies the previous geometry (
MoveWindow+ShowWindow(SW_MAXIMIZE)); - If the saved position goes out of the current virtual screen bounds, it is invalidated and reverts to the default.
The code organization is as follows:
lib/index.js Host half: install/uninstall scripts, autostart, HTTP interface
lib/client.js Settings page "Window Memory"
assets/window-keeper.ps1 Actual window logic
scripts/install.ps1 Standalone installer (script track)
Known Limitations¶
- Windows only (Win32); macOS and Linux are not supported.
- There will be a jump of approximately 1.2 seconds on startup: the script must wait for the window to appear before it can act. To achieve a completely seamless experience, the shell’s display timing would need to be changed, which the plugin cannot do.
- The plugin shell’s settings page depends on DSH plugin ecosystem conventions (
slots/webServer); it may require updates when the client undergoes major version upgrades; the script track is unaffected.
Applicable Scenarios and Notes¶
It is suitable for users already using the DSH desktop client who are accustomed to customizing window sizes. Its capability boundary is window geometry only; it does not involve any session, model, or tool invocation logic.
Two reminders:
- The plugin runs with the permissions of the dsh process that installed it. The script track runs in the background and writes to the “Startup” folder. Before installing, you should open the source code to verify
scripts/install.ps1andassets/window-keeper.ps1to ensure there are no other side effects. The license is MIT, so you can read it freely. - If you only want to verify the effect and do not want it running persistently, you can install it using the plugin shell path, turn off the toggle in “Settings → Window Memory,” and observe whether
window-state.jsonunder%LOCALAPPDATA%\dsh-window-keeperis generated as expected.
Summary¶
dsh-window-keeper solves a very specific problem: DSH desktop windows lack persistence. It uses a script track that does not bind to the client version, combined with an optional plugin shell, to fill this gap. The trade-off is a background daemon process and a startup jump of approximately 1.2 seconds.
Directory page and source code:
- Directory page: https://www.skillhub.cn/plugins/mm24trg2gy-star/dsh-window-keeper
- GitHub: https://github.com/mm24trg2gy-star/dsh-window-keeper