Foreword¶
When using the DSH web profile, token consumption, context pressure, and session costs are often scattered across different interfaces or logs. dsh-token-panel is a DSH plugin that consolidates this information into a persistent panel in the bottom-right corner of the browser. It is designed for the DSH web profile, licensed under MIT, and this article introduces version 0.4.7.
What Is This¶
dsh-token-panel provides a real-time Token consumption HUD for DeepSeek Harness. It displays a TOKEN capsule in the bottom-right corner of the browser. When expanded, it shows real-time session pressure, cumulative consumption, session cost estimation, historical trends, and daily/monthly statistics. The maintainer is juhe291, the project is licensed under MIT, and the version is 0.4.7.
Core Features¶
- Real-time Display: Shows session pressure, cumulative consumption, and session cost estimation.
- Real-time Curves: Supports 2m / 5m / 15m windows, automatic Y-axis scaling, and hover-following tooltips.
- Historical Review: A time slider below the curve allows viewing earlier time periods.
- Statistics View: Supports daily/monthly trend curves and detailed lists.
- Cost Estimation: Estimates costs using official price tables for the
deepseek-v4-flash/deepseek-v4-promodels. - Price Mode: The
autoprice mode automatically switches between peak and off-peak prices at midnight on 2026-08-17. - Budget and Balance: Monthly budget / account balance can be edited inline by clicking; the balance decreases locally based on token consumption.
- Position Memory: The panel is draggable, supports corner presets and custom default positions, and remembers its position.
- Local Persistence: Usage data is written daily to a JSONL file, preserving data across restarts.
Installation and Enabling¶
Recommended installation via npm, without local building:
dsh plugin --profile web add dsh-token-panel@0.4.7
Installation from GitHub is also possible:
dsh plugin --profile web add github:juhe291/dsh-token-panel
Installing from GitHub / locally requires Node ≥ 22.5. If using pnpm ≥ 10 to install Git dependencies, build scripts may be intercepted. After encountering such prompts, follow the instructions to add an allowBuilds entry to the profile’s pnpm-workspace.yaml, then re-run the installation command.
After installation, restart the profile and refresh the browser. The TOKEN capsule will appear in the bottom-right corner.
Uninstallation:
dsh plugin --profile web remove dsh-token-panel
New releases may be blocked by the DSH supply-chain age verification. In such cases, prefer installing with a specific version number. If uninstallation is blocked, use the uninstall script provided with the package.
Typical Usage¶
-
Click the TOKEN capsule to open the panel.
-
Drag the panel to adjust its position; long-press for 0.6 seconds to open the position menu, then choose a corner preset or set a custom default position.
-
In the real-time view, check the current session pressure, cumulative consumption, and estimated cost; switch between 2m / 5m / 15m curve windows, and drag the time bar to view earlier time periods.
-
Switch to the statistics view to see daily/monthly trend curves and detailed lists.
-
Click the monthly budget / account balance value to edit inline; press Enter to save or Esc to cancel.
-
Usage data is written daily to the
~/.dsh/cache/dsh-token-paneldirectory.
To modify the configuration, locate it in the plugin section of the profile’s cordis.patch.yml or settings.yaml.
Cost Estimation Notes¶
The plugin estimates costs using official price tables for each model, covering deepseek-v4-flash and deepseek-v4-pro. The auto price mode automatically switches between peak and off-peak prices at midnight on 2026-08-17, without manual configuration changes. Cost estimation is for display reference only; actual costs are subject to the official billing.
Applicable Scenarios and Notes¶
This plugin is suitable for developers or AI agent users who need to view token consumption, context pressure, and cost estimates in the DSH web profile. DSH’s philosophy is “everything is a plugin.” The DSH plugin directory is an independent site with no official affiliation to DeepSeek / High-Flyer and should not be considered an official app store.
The plugin runs with the permissions of the current dsh process. Before installation, review the source code, dependencies, and licenses. The version introduced in this article is licensed under MIT.
Links¶
Catalog page: https://www.skillhub.cn/plugins/juhe291/dsh-token-panel
GitHub: https://github.com/juhe291/dsh-token-panel