In the development of the DeepSeek Harness Web interface, frequently checking token consumption and balance is a common need. Manually switching pages or viewing backend data is inefficient. The dsh-usage-card plugin embeds a usage card directly in the sidebar, providing 7-day/30-day usage statistics and balance lookup, saving time spent switching windows.

What It Is

This is a DSH plugin maintained by user kazma258. It displays usage information at the top of the DeepSeek Harness Web sidebar, including token consumption, amount spent, and remaining quota. It follows the MIT license.

Core Features

  1. Sidebar display: Displays a usage card above the settings button in the Web sidebar.
  2. Time range: Supports viewing token usage and consumption for the last 7 days or the last 30 days.
  3. Balance viewing: Supports checking remaining quota.
  4. Data source switching: Supports switching between “official data” (requires a login token) and “estimated data” modes.
  5. Sidebar adaptation: When the sidebar is collapsed, the card appears as a small icon; clicking it still shows the details.
  6. Custom configuration: Supports custom price and currency settings.

Installation and Activation

Make sure you are using the DeepSeek Harness Web interface (0.1.x).

  1. Run the installation command:
dsh plugin --profile web add github:kazma258/dsh-usage-card
  1. Restart the dsh web service, and refresh the page in your browser to activate the plugin.

Typical Usage

Switching Data Mode

The card displays estimated data by default. Click the button in the upper-right corner of the card to switch between “estimated,” “official,” and “no data” modes.

To view official data, you must provide a platform login token.

Getting the Official Data Token

Open platform.deepseek.com in your browser and log in, then open the Console panel in your browser’s developer tools and enter the following command to retrieve the userToken:

JSON.parse(localStorage.getItem('userToken')).value

Customizing Prices and Currency

Override the price and currency settings in the corresponding profile configuration file cordis.patch.yml. Note that the price configuration entry is replaced as a complete line; it does not update only one field within it.

- id: usage-card
  name: dsh-usage-card
  config:
    estimatePrices:
      inputUncached: 0.28
      cacheRead: 0.07
      cacheWrite: 0.28
      output: 1.1
    estimateCurrency: USD
    officialCurrency: USD

Use Cases and Notes

  • Environment requirement: The plugin is only compatible with the DeepSeek Harness Web interface (0.1.x).
  • Token type: Viewing official data requires a platform login token (userToken), not an API key.
  • Configuration details: Price configuration uses whole-line replacement; when modifying it, you need to provide the complete configuration line.
  • Automatic updating: The card updates automatically when a conversation ends, when you switch back to the page, every 60 seconds, or when you click refresh.

DSH follows the design philosophy of “everything is a plugin.” This plugin integrates into the sidebar, making usage monitoring readily accessible.