Introduction¶
When developing with or interacting with DeepSeek Harness daily, having real-time visibility into Token consumption and account balance helps control costs and monitor runtime status. This section introduces a sidebar plugin that directly displays these key data points in the Web interface.
Plugin Overview¶
Maintained by zdjmrq, this plugin is a client-side plugin. It adds a label row at the bottom of the sidebar to provide overview and detailed query capabilities for usage and balance, allowing you to retrieve data without leaving the current page.
Core Features¶
-
Usage / Balance Label Row
Above the “Settings” button at the bottom of the sidebar, a concise “Usage | Balance” label row is displayed. The label has the same visual hierarchy as Settings and the Cordis panel and is stacked vertically with the Cordis panel without conflicts. -
Glassmorphism Detail Card
When hovering over the label row, a glassmorphism detail card expands on the right. The card contains four data items:- Uptime (xxmxxs, updating every second)
- Token count (input/output)
- Estimated cost (calculated based on a built-in pricing table)
- Official account balance (real API data)
-
Pill Toggle Switch Control
A pill-shaped toggle switch at the bottom of the detail card is used to switch between “Hover Display” and “Fixed/Persistent Display” modes. -
Adaptive Layout
The detail card width adapts to the desktop environment. If there is insufficient space on the right, the card automatically flips to expand on the left. When the sidebar is collapsed into a vertical bar, only a ¥ badge is displayed. -
Theme Following
The overall styles use DSH theme variables (--dsw-*) and support automatic switching between light and dark themes.
Installation and Configuration¶
Prerequisites:
* Node.js ≥ 20
* DeepSeek Harness (must include the dsh plugin command)
Installation command:
dsh plugin --profile web add github:zdjmrq/dsh-usage-balance
After installation, restart dsh web to apply the changes.
Usage Instructions¶
- View overview: A “Usage | Balance” label row appears at the bottom of the sidebar.
- View details: Hover over the label row to expand the glassmorphism detail card.
- Switch modes: Drag the toggle switch at the bottom of the card to fix the detail card in the sidebar for persistent display.
Notes¶
- Cost Estimation: The amount shown on the card is an estimated value. Actual billing is subject to DeepSeek’s official statements.
- Network and Permissions: The balance query feature requires a network environment that can access
api.deepseek.comand reuses the API Key from thellm-deepseeksettings. If the network is unavailable or the Key is invalid, the balance item may not be displayed.
Conclusion¶
By integrating through the sidebar, this plugin simplifies the process of viewing usage and balance. The related source code and plugin catalog page can be accessed via the links below.