Introduction

DeepSeek Harness (DSH) Web Client is a client built on a plugin architecture. During long conversations, batch tests, or resource-consumption monitoring, developers need real-time visibility into the current session’s context window usage and account balance. The @achasoft/dsh-usage-info plugin adds a button to the session header, integrating context visualization and account balance reading into the Web UI, and solves the problems of manual lookups and cost estimation.

What is this

This is a plugin designed for DeepSeek Harness Web Client to display context usage and account balance. It includes a readout button in the session header, a balance-reading capability interface (Seam), and a DeepSeek provider. The plugin is maintained by navid-kianfar and follows the MIT license.

Core features

The plugin mainly provides the following features:

  1. Header readout: Shows a button in the session header toolbar. The button displays a ring chart for context usage and the first currency unit of the account balance. It shows a dashboard icon before data loads; shows an amber dot when balance reading fails; and turns red when the balance is at or below the threshold.
  2. Context visualization: Displays the context percentage, used/window token count (~used / window), and uses a colored bar chart to show the estimated proportions of the system prompt, tool definitions, and conversation segments.
  3. Session cost calculation: Calculates session cost based on configured rates, including total token count and cost by bucket (uncached input, cache write, cache read, and output). Before the first charge, token count displays as “—”.
  4. Balance reading: Supports reading the DeepSeek provider balance through a host API key, without exposing the key to the browser.
  5. Settings card: Provides toggles in plugin configuration to control section visibility, refresh interval (seconds), low-balance threshold, cost currency, and rates.

Installation and enablement

Install the plugin into the web profile (the profile started by dsh web):

dsh plugin --profile web add @achasoft/dsh-usage-info

After installation, restart dsh web to load the plugin.

Typical usage

  1. Enable balance reading: Enable the built-in DeepSeek provider in dsh web; this is a prerequisite for balance reading.
  2. Open the panel: Click the button in the session header to open the usage panel and view context and cost. Click outside the panel or press the Escape key to close it.
  3. Configure settings: Go to Settings > Plugins > Plugin configuration, then expand Usage information. Adjust the refresh interval, low-balance threshold, or rates here.

Use cases and notes

  • Version requirement: You must use DeepSeek Harness Web Client version 0.1.5-rc.2.
  • Runtime environment: Node.js ^22.19 or >=24 is required, and pnpm must be available in PATH.
  • Balance reading limitations: Balance reading relies on a host-side API key. OpenAI-compatible gateways usually do not provide a balance endpoint (returning 404), in which case the plugin stops polling. Only one provider can be mounted at a time.
  • Auto-save: The settings card has no save button. Any toggle or text field is saved automatically once a valid value is entered; the refresh interval is saved on blur or Enter.
  • Source review: Before installing, review the source code and license, because the plugin runs with the permissions of the current DSH process.

Short conclusion

This plugin provides intuitive context monitoring and cost tracking for DeepSeek Harness Web Client. Its host-side balance-reading design helps keep API keys secure. See the GitHub repository for more details and source code.