DeepSeek Harness Window State Memory Plugin

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

  1. State memory: Remembers the main window’s size, position, and maximization state.
  2. Automatic restoration: Automatically restores the previous window state on the next startup.
  3. Safe isolation: Only operates on the host application’s own window and prevents accidental operations through process path validation.
  4. Periodic checking: Automatically checks and records window state changes every 2 seconds.
  5. 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.

  1. Adjust the main window to the desired size, position, or maximized state.
  2. Exit DSH.
  3. 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

羽毛球分组比赛记分
小程序二维码

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

Xiaoye