Preface¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. When calling the API, the billing policy (peak price or idle price) often takes effect only at the moment the request is issued. If developers want to know the rate for the current time slot in advance, they usually have to manually check it against the official pricing page. The dsh-peak-badge plugin calculates this using the local clock and provides a visual status capsule on the left side of the DSH chat input box, clearly displaying the current billing mode and helping avoid initiating long-running requests during peak hours.
Plugin Scope¶
dsh-peak-badge is a client-side plugin that runs on the DSH desktop client (desktop profile).
* Function: Displays in real time whether the current price is peak or idle.
* Maintainer: tuoLuoSuan.
* License: MIT.
Core Features¶
-
Status Capsule
Displays a status capsule at the far left of the DSH input toolbar row. A small dot on the left side of the capsule changes color based on the status: amber during peak hours and neutral during idle hours. -
Detail Card
Click the capsule to expand a card. The card contains:
* Current status (peak/idle).
* Billing mode description.
* Next switch time and countdown.
* Detailed reason for the status switch. -
Pre-switch Alert
Supports alerts before switching to a new time slot, helping prevent initiating long-running requests during peak hours.
* Configurable lead time: disabled, 1, 2, 5, 10, 15, or 30 minutes (default is 2 minutes).
* Each switch point is announced only once, based on boundary-time judgment, to avoid duplicate prompts. -
System Notifications
Supports browser system-level notifications.
* User authorization is required.
* Handles four states, including denied permissions and unsupported notification interface.
* The checked state is reconciled in real time with browser permissions. -
Local Calculation and Theming
* Calculated based on the local clock, without relying on network requests.
* Supports switching between Chinese and English interfaces.
* Supports dark/light theme adaptation.
Installation and Enabling¶
Before installing, make sure DeepSeek Harness (DSH) version >= 0.2.0-rc.2 and the dependency package @deepseek-ai/dsh-client-ui-conversation is installed.
- Install from the repository (recommended)
Use the following command to add the plugin to thedesktopprofile:
dsh plugin --profile desktop add github:tuoLuoSuan/dsh-peak-badge
- Local development installation
If you are in a local development environment, you can useplugin_managerto specify a path:
plugin_manager action: install_bundle target: D:\path\to\dsh-peak-badge
Local Verification¶
The plugin logic is calculated entirely locally. You can use the verification script provided in the repository to confirm whether the billing policy logic is correct:
node verify-policy.mjs
Notes¶
- Behavior Boundary: The plugin only displays status and provides alerts; it does not change any billing behavior and does not block any requests.
- Exit Codes:
0: Verification passed.1: Assertion failed (logic error).2: Runtime error (for example, DSH not found).- Clock Mechanism: The clock is bound to the plugin instance rather than the capsule component, ensuring that alerts can still be delivered normally when switching sessions or pages.
Reference Links¶
- GitHub: https://github.com/tuoLuoSuan/dsh-peak-badge
- Ecosystem Directory: https://www.skillhub.cn/plugins/tuoLuoSuan/dsh-peak-badge