Introduction

DSH supports extending the interface and data display through plugins. When using DeepSeek, in addition to the current conversation itself, it is also necessary to see the account balance, estimated current session consumption, historical conversation costs, and how many times each model can still be used based on historical average consumption.

@gongshiyun/dsh-usage-dashboard is a DSH plugin maintained by gongshiyun, used to display DeepSeek account balance, estimated current session consumption, historical conversation details, and estimate the remaining conversation rounds for each model based on historical average consumption.

Plugin Positioning

  • Package Name: @gongshiyun/dsh-usage-dashboard
  • Maintainer: gongshiyun
  • License: MIT
  • Applicable Profile: desktop or web
  • Node.js Requirement: ^22.19.0 || >=24.0.0

Note: The dsh-usage-dashboard without a scope on npm is another unrelated plugin with the same name. When installing, you should use:

@gongshiyun/dsh-usage-dashboard

Core Capabilities

Balance Display

Call the DeepSeek official interface:

GET /user/balance

Display total balance, recharge balance, and bonus balance. The currency can be CNY or USD.

Current Session Estimation

Display below the input box in real-time:

  • Current session estimated amount
  • Current balance
  • Estimated remaining conversation rounds

This information automatically refreshes every 4 seconds.

Global Dashboard

Display in “Settings -> Usage and Balance”:

  • Balance card
  • Historical conversation details
  • Remaining conversation rounds for each model

Historical Session Details

Display historical conversation details in reverse order of creation time:

  • Creation time
  • Input tokens
  • Output tokens
  • Calculated amount

Empty sessions will be skipped automatically.

Model Aggregation

The plugin aggregates historical sessions by model to estimate remaining conversation rounds and displays:

  • Number of sessions
  • Average consumption
  • Cumulative consumption
  • Token details

Cost Calculation

Supports cost calculation via the pricing pricing history based on effective time, model, and peak/off-peak hours.

Installation and Activation

The plugin must be resolvable by Cordis Loader from the profile directory by name. The following takes the desktop profile as an example; for the Web version, simply replace desktop with web in the command.

Recommended install command:

dsh plugin --profile desktop add @gongshiyun/dsh-usage-dashboard

After installation, restart or refresh DSH Desktop. You can use the following command to verify that the usage-dashboard entry is effective:

dsh --profile desktop --dump-config

Manual Installation

If manual installation is required, first install the package into the profile’s node_modules, then edit cordis.patch.yml and restart.

  1. Enter the profile directory and install dependencies:
cd "$DSH_HOME/profiles/desktop"
pnpm add <local path or package name of this package>
  1. Edit:
$DSH_HOME/profiles/desktop/cordis.patch.yml

Insert usage-dashboard configuration. Minimum configuration example:

- insert:
  - id: usage-dashboard
    name: '@gongshiyun/dsh-usage-dashboard'
    config:
      currency: CNY
  1. Restart DSH Desktop.

Configuration

Plugin configuration items include:

Key Description
apiKeyEnv Reference name for the API Key credential, default is DEEPSEEK_API_KEY
currency Currency for pricing and balance display, can be CNY or USD, must be consistent with the pricing unit
baseURL DeepSeek API root address
balanceCacheMs Balance cache duration
pricing Pricing history, used to calculate costs based on effective time, model, and peak/off-peak hours

The default pricing history is built-in and will not automatically follow future official price changes from DeepSeek.

Limitations and Notes

  • The balance interface uses on-demand polling: sidebar capsule 60s, dashboard 4s, not real-time push.
  • When there is no network or no API Key configured, the balance will show an error prompt; cost statistics can still be used, depending on local session data.
  • Cross-session historical average depends on the dsh-session-query service, which is included in the default DSH bundle.
  • The plugin runs with the permissions of the current DSH process. Before installing, check the source code, configuration, and license, and confirm the package name is @gongshiyun/dsh-usage-dashboard.

Conclusion

@gongshiyun/dsh-usage-dashboard is suitable for viewing DeepSeek balance, current session consumption, historical conversation costs, and remaining conversation rounds for each model in DSH.

Project Address:

https://github.com/gongshiyun/dsh-usage-dashboard