Skip to main content

dsh-board

7Stars2Forks1Issues0Watchers

DSH Web sidebar usage and cost panel: line-by-line expense estimation using official pricing, automatic Beijing peak-valley price switching, 10 tier ranks and 9 achievement badges, fully local statistics with zero data transmission.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
billingcostdashboarddeepseek-harnessdshdsh-pluginpricingsidebar

Install

cmdweb profile
$ dsh plugin --profile web add dsh-board

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin dfkai/dsh-board for me: review the repository at https://github.com/dfkai/dsh-board first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-line Summary

Adds a usage and cost panel at the bottom of the sidebar for DeepSeek Harness (DSH) Web: estimates costs per transaction according to official pricing, automatically switches between peak/off-peak rates based on Beijing time starting 2026-08-17, and packs total usage, cache hits, current session cost, ten-tier "Word勋" ranks, and 9 achievement badges into one collapsible sidebar.

Core Features

  • Cost Estimation: Prices each transaction according to official rate cards (v4-pro / v4-flash / legacy models) at the time of usage, factoring in peak/off-peak tiers; reasoning tokens are billed at output rates, matching the platform's per-request billing methodology
  • Automatic Peak/Off-Peak Switching: Starting 2026-08-17, determines peak hours (09:00–12:00, 14:00–18:00 Beijing time) or off-peak hours (half price) based on Beijing time; badge corner badge displays current tier and output unit price in real-time
  • 1M Context Usage: Current round context usage percentage, remaining budget, three-segment stacked bars for system/tools/messages, cumulative sub-agent time consumption
  • Trends & Cumulative: Input/output bar charts per round, cumulative output curve, 12-week daily heatmap, per-model usage statistics, cross-session leaderboard
  • Ten-tier "Word勋" Ranks: Membership-style阶梯 based on cumulative token volume (🌱 Unborn Word Sprout → ⚡ Trillion-word God), displaying progress, unlock ETA, and perks per level
  • Achievements & Check-ins: 9 data-driven badges (consecutive check-ins 3/7/30 days, cumulative active days, single-day token peak, cumulative session count, etc.), all triggered by real usage

Technical Implementation

  • Language: TypeScript + React (host half is Node ESM, client half is browser CJS)
  • Key Dependencies: Only runtime dependency is zod (for session projection schema validation); client-side dependencies like React, Cordis, and dsh-client-* packages are provided by the host module map, declared as externals at build time
  • Architecture Pattern: Dual-ended Cordis plugin. Host half registers id: board line via cordis.patch.yml, source code side registers three read-only projections (dominantModel / sessionCost / tokenDays) on the sessionProjections service with zero writes; browser half injects into sidebar.footer.action slot at sidebar bottom via window.__ModuleLoader__ closure factory
  • Entry Files: src/index.ts (host apply) + src/client/index.ts (client apply) + cordis.patch.yml (bundle patch) + tsdown.config.ts (dual output build configuration)

Use Cases

For users who want intuitive answers to "How much DeepSeek did I use this month, how much did it cost, is it worth starting another round before tonight's peak": DSH Web users want to see usage statistics like DeepSeek's backend without filling out extra configurations or managing another set of API keys for this panel. The plugin calculates entirely locally and sends no requests to any third-party endpoints.

Prerequisites and Compatibility

DependencyMinimum VersionNotes
DeepSeek Harness (DSH)Not declaredPlugin has no version constraint; enabling "reasoning tokens billed at output rates" in cumulative cost requires the host to apply the token-meter fix (upstream discussion at deepseek-harness discussions/2338)
Node.jsNot declaredSource code does not declare engines; build uses tsdown (depends on TypeScript 7 and newer Node), any DSH host Node works
PlatformCross-platformOnly depends on host-exposed web profile and browser sessions, no native module calls; works on macOS / Windows / Linux DSH Web
Native ModulesNonePure JS implementation, only uses module map entries provided by host like React, Cordis, dsh-client-* at runtime

Installation

dsh plugin --profile web add dsh-board

Configuration

This plugin requires no additional configuration.

The only adjustable switch: find and append disabled: true by plugin id (board) in the profile's cordis.patch.yml to disable this panel; disabled supports !!js expressions for conditional toggling. The price list is source-level constants (see MODEL_PRICES / PEAK_PRICES / OFF_PEAK_PRICES in src/pricing.ts), modifying prices requires changing source code and rebuilding; fold state uses browser localStorage (key dsh-board.collapsed), users can also manually clear it.

FAQ

Q: Why doesn't the badge appear at the sidebar bottom after installation?

A: You must restart the corresponding profile (or start a new dsh --profile <profile>) and hard-refresh the browser; cold-started profiles that haven't been restarted won't automatically load new plugins. Run dsh --profile <profile> --dump-config to verify, you should see a # == dsh-board layer in the output.

Q: Is the cost shown on the panel the actual bill?

A: No. It estimates each transaction according to official rate cards at the time of usage, with reasoning tokens billed at output rates, matching the platform's per-request billing methodology, but it's still an estimate. The final bill is subject to DeepSeek platform's statement.

Q: Why does cumulative token show billions or higher?

A: Consistent with DeepSeek backend methodology: each conversation round bills context prefixes at "cache hit" prices. Under a 1M window with dozens of rounds, cumulative hit tokens can reach hundreds of millions—they have extremely low unit prices (¥0.025/M), the "cache hit N%" sub-line on the panel helps distinguish cheap bills from actual consumption.

Q: Does data get sent to third parties? Does it write to the host?

A: No. All statistics are computed locally on this machine, data comes from host-exposed seams (session.list projection + session.history RPC), no external network requests are made. Host half only registers read-only session projections (dominantModel, sessionCost, tokenDays), zero writes; browser side only records panel fold state once in localStorage.

Q: How to completely close or uninstall this panel?

A: Close: append - id: board line in the profile's cordis.patch.yml and set disabled: true (supports !!js expressions), restart profile to take effect. Uninstall: dsh plugin --profile web remove dsh-board and restart; the browser side fold state key still exists in localStorage and can be manually cleared.

Q: Do ranks and achievements upgrade by consuming more tokens? Do they affect model calls?

A: Ranks are just a display layer segmented by cumulative token volume (10-tier membership card), achievements are data-driven badges (consecutive check-ins, single-day peak, cumulative session count, etc.). Neither affects any model calls, quotas, or billing—they're purely motivational displays.

Q: Does it depend on a specific DSH version?

A: The plugin itself doesn't declare a minimum DSH version. However, "reasoning tokens billed at output rates in cumulative cost" requires the host's token-meter fix (upstream discussion at deepseek-harness discussions/2338). On older hosts, per-model/round charts still count reasoning tokens as separate fields, but cumulative totals and costs will undercount this portion.

Q: Does it conflict with balance plugins like dsh-balance-stats?

A: No conflict. dsh-board uses host local projections and history RPC with zero external calls and zero keys; balance plugins typically need to send requests to api.deepseek.com with API keys configured. They serve complementary purposes and can be installed simultaneously.

Difficulty Level

Beginner — immediately usable after installation and restart, no configuration needed; turning off the panel is just one line of disabled: true, price list changes don't affect the vast majority of users.

Known Issues and Limitations

  • Reasoning token billing methodology depends on host token-meter fix: on unpatched older DSH, per-model/round charts still treat reasoning tokens as separate fields, but cumulative totals and costs will undercount this portion (see README.md:40)
  • Price list is source-level constants (src/pricing.ts): after DeepSeek official rate changes, source code needs modification and rebuilding; plugin doesn't declare minimum DSH version, older hosts may have missing projection fields
  • Browser side only registers in web profile: DSH instances without web profile enabled or only using headless/CLI won't see the panel
  • Peak/off-peak periods use Beijing time: isPeakHour directly uses getUTCHours() + 8 offset judgment, doesn't account for users in different time zones switching local time zones; overseas users still see "peak" tiers based on Beijing time
  • Cumulative cost prices at "last active moment's peak/off-peak tier" for each session: plugin uses session projection accumulation, old sessions may fall into outdated rate tiers; costs for long-inactive sessions won't be retroactively recalculated
  • Closing the panel requires finding by plugin id (board) in profile's cordis.patch.yml, no visible toggle exposed in DSH settings page

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/dfkai/dsh-board)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory