Overview¶
The DeepSeek Harness desktop version typically resets the main window to its default size on startup. To address this issue, the dsh-window-state plugin remembers the main window’s size, position, and maximization state. The following section describes how to install and use this plugin.
Plugin Introduction¶
dsh-window-state is a DeepSeek Harness desktop plugin maintained by developer muqing-kg under the MIT License. It automatically saves and restores the main window’s geometry state through the Win32 API.
Core Features¶
- State memory: Remembers the main window’s size, position, and maximization state.
- Automatic restoration: Automatically restores the previous window state on the next startup.
- Safe isolation: Only operates on the host application’s own window and prevents accidental operations through process path validation.
- Periodic checking: Automatically checks and records window state changes every 2 seconds.
- Platform limitation: Supports Windows only and depends on
user32.dll.
Installation and Activation¶
After installation, restart DSH for the changes to take effect.
dsh plugin --profile desktop add github:muqing-kg/dsh-window-state
Usage¶
No configuration is required after installation. The current window state is saved automatically when DSH exits.
- Adjust the main window to the desired size, position, or maximized state.
- Exit DSH.
- On the next DSH startup, the window will automatically restore to the previous state.
To reset, delete the state file:
Remove-Item "$env:USERPROFILE\.dsh\window-state.json"
State File¶
The state file is saved by default in $DSH_HOME/window-state.json (that is, ~/.dsh/window-state.json).
{
"schema": 1,
"x": 234,
"y": 234,
"width": 1920,
"height": 1023,
"maximized": false,
"savedAt": "2026-09-29T12:00:00.000Z"
}
Notes¶
- Platform limitation: Windows only; macOS and Linux are not supported.
- Startup flicker: The window may briefly appear at the default size on startup.
- Fullscreen and crashes: Fullscreen state is not tracked; force-killing or crashing may cause the last saved state to be lost.
- Snapping behavior: It does not alter Windows snapping behavior.
Summary¶
dsh-window-state solves the window-state retention issue for the DSH desktop version. For users who need to work in a fixed layout, it can be used immediately after installation.
GitHub repository: https://github.com/muqing-kg/dsh-window-state