Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In practice, developers often face two specific pain points: first, tasks may be interrupted due to API rate limits or quota exhaustion and require manual intervention; second, they may want to take advantage of DeepSeek’s peak/off-peak price difference to run long-running tasks during low-peak periods and reduce costs. dsh-auto-continue is a dual-purpose plugin designed to solve these two problems.
Plugin Overview¶
This plugin is maintained by Meowrium and distributed under the MIT License. It uses a single-package structure and includes both host-side logic (lib/index.js) and browser-side interaction (lib/client.js), packaged through cordis.patch.yml and dsh.client.
Installation and Enablement¶
Before installing, make sure your local DSH version meets the requirement (>= 0.1.5-alpha.1).
- Run the installation command:
dsh plugin --profile web add github:Meowrium/dsh-auto-continue
- After installation, restart the
dsh webservice.
After restarting, open any conversation window. Two pill buttons will appear in the input bar: “Idle Task” and “Auto Continue”.
Core Features¶
1. Auto Continue¶
When a running session encounters a RATE_LIMIT or QUOTA error, the plugin will automatically resume the session.
- Retry mechanism: By default, it retries after 60 seconds. If the server returns a
Retry-Afterheader, that value is used; the maximum retry interval is 24 hours. - Persistent toggle: This feature is saved through the
dsh settingsservice. Once enabled, the status line indicates whether auto continue is currently on.
2. Idle Task¶
This feature automatically pauses or resumes sessions based on peak/off-peak pricing windows.
- Time basis: Beijing Time (UTC+8), no daylight saving time.
- Peak pricing periods: 09:00–12:00 and 14:00–18:00. During these periods, all running sessions are paused.
- Off-peak pricing periods: All times outside the peak periods; sessions automatically resume running.
- Interaction and feedback:
- Clicking the “Idle Task” button toggles the switch.
- The status line displays the current window (for example, “Off-peak”) and the countdown to the next switching point (peak).
- State changes take effect immediately, and paused sessions receive a resume signal during off-peak periods.
Technical Details¶
- Settings storage: The plugin stores user configuration under the
auto-continuenamespace in DSH, including two boolean values:idleTaskEnabledandautoContinueEnabled. - Plugin structure:
cordis.patch.yml: Defines the host-side plugin entry point.dsh.client: Maps tolib/client.js, responsible for browser-side UI rendering and event injection.lib/index.js: Host-side logic, handling time boundaries, session state management, and error hooks.
Notes¶
- Dependency version: Due to API changes in the DSH settings service, the plugin does not directly use the old named exports from
@deepseek-ai/dsh-settings. Instead, it retrieves the service instance viactx.inject(["settings"]), consistent with the implementation approach used by the official plugindsh-agent-default-model. - Browser registration: Browser-side modules are registered via
slots.injecttoconversation.input.leftandconversation.composer.dock, ensuring UI elements are rendered correctly.