Introduction¶
DeepSeek Harness utilizes a pluggable architecture. During development or long-running operations, the client may require a restart to load new code, release memory, or apply configuration changes. Manual restarts are cumbersome and prone to interrupting current tasks.
dsh-restart-button is a plugin designed for this scenario. By adding an intuitive restart entry point to the interface, it enables a one-click safe restart of the entire client and supports session state recovery.
Plugin Overview¶
This plugin is maintained by the developer PPsz-qqq and is released under the MIT license.
Core Functionality: It adds a restart button (↻) to the top-right corner of the DeepSeek Harness session title bar. Clicking this button triggers a safe client restart according to defined strategies, supporting both the Windows desktop version and Web mode.
Core Features¶
- UI Integration: Adds the button to the far right of the utility area in the session title bar (
conversation.session.header.utilities, order 1000). - One-Click Restart: When no tasks are running, clicking the button immediately restarts the client.
- Auto-Restart After Completion: When sessions or background jobs are running, a “Restart after completion” option appears in the confirmation dialog. Selecting this turns the button blue and makes it flash; the client will automatically restart once all tasks finish.
- State Recovery: Before restarting, the currently open sessions and interrupted sessions are recorded. Upon completion of the restart, session states are automatically restored, and a notification card appears. Clicking “Resume All” sends a “continue” command to all sessions.
- Plugin Update Reminder: When a plugin is updated in-place (upgraded or reinstalled) and requires a restart to take effect, a small orange dot appears on the button, indicating “Plugin update pending.”
- Status View: Hovering over the button reveals the Host uptime, memory usage, number of running sessions, scheduled restart status, and pending plugin updates.
- Cross-Platform Support:
- Desktop (Windows): Restarts the Electron shell and the background Host with consistent parameters.
- Web Mode: Restarts the service process and automatically refreshes the page. The service runs in the background without occupying the original terminal.
Installation & Configuration¶
On the DeepSeek Harness “Plugins” page, click “Install,” search for dsh-restart-button, and select the author PPsz-qqq to install it with one click.
After installation, you can adjust the confirmation strategy in the cordis.patch.yml file within your profile directory:
- id: restart-button
config:
confirm: when-busy # Default strategy: confirm when tasks are running | always: always confirm | never: never confirm
Typical Usage¶
- Click to Restart: Locate the restart button in the top-right corner of the session title bar and click it to trigger the restart process.
- Configure Strategy: Modify the
confirmparameter incordis.patch.ymlbased on actual needs to determine whether confirmation is required or if it should be handled automatically. - API Calls: Supports control via interfaces, such as calling
POST api/restart-button.restart. The request body can include{ when: 'now' | 'idle', activeSessionId?: string }.
Notes¶
- Desktop Limitations: The one-click restart feature currently supports Windows only; the button automatically hides on macOS / Linux desktop versions.
- Session Visibility: The button does not appear when no session is open (e.g., on the new session page).
- Recovery Validity: Session recovery information after a restart is valid for only 10 minutes.
- Web Mode Behavior: Restarting the service in Web mode does not occupy the original terminal window; logs are written to
~/.dsh/logs/restart-button-web-server.log. - Update Application: After a plugin upgrade, a restart is required once to load the new code. The interface will update first, but the Host portion requires a restart.
Conclusion¶
dsh-restart-button provides DeepSeek Harness users with convenient client restart capabilities. Combined with the session recovery mechanism, it effectively reduces maintenance costs. It is ready to use in the top-right corner upon installation, requiring no additional configuration.
Related Links:
* Plugin Directory
* GitHub Repository