Foreword¶
When conducting long sessions or stress testing with DeepSeek Harness, checking the remaining balance or calculating the burn rate per minute often requires switching to the account page or doing mental math. While Harness records tokenUsage within the session, and the account balance can be obtained via the Host-side Remote, displaying this information at a glance and updating it alongside the session is not a default UI feature.
Below is an introduction to the community plugin Whale Balance Pet (dsh-whale-balance-pet): placing a draggable little whale desktop pet in the bottom right corner of the Web UI, periodically fetching the balance, and estimating the cost per minute and cumulative session cost based on the current session’s token projection.
What is it¶
- Positioning: A Web client plugin for DeepSeek Harness, MIT licensed, maintained by xinchen262.
- Version:
1.0.0inpackage.json; requires Harness enginedsh >= 0.2.1-alpha.4. - Category: Classified as “Fun Skins” in the community directory; essentially displays account and consumption metrics in the form of a desktop pet.
- What it doesn’t do: Does not read external libraries like QQ Whale or shenge-bot; contains no API keys and does not report data to third parties.
Core Features¶
Real-time Balance¶
Call getBalance(client) via Harness’s account Remote namespace. Only the Host can use account credentials; the browser side does not touch tokens. Refreshes by default every ~30 seconds; also triggers a refresh when token usage changes (throttled to 15 seconds). A “Refresh Balance” button is available in the details panel. Displays the sum of top-up balance and gift balance, with the gift portion labeled separately; shows “Not logged in” when not logged in, but token speed can still be displayed.
Cost Speed & Session Cost¶
Perform sliding window sampling on the current session’s tokenUsage projection. Convert to ¥/min (or $/min) and tok/min based on the unit prices for cache hit, cache miss, and output tokens. Cumulative cost is calculated as total tokens × current period unit price (estimated), and displays cache hit rate and current pricing period.
Whale Pet Interaction¶
Draggable; click to expand details; double-click or use the reset button to return to the default position. While running, it floats faster and lights up the status point. Position and expanded state are saved in browser localStorage. Text follows Harness language settings (locale/zh.json, locale/en.json).
Pricing Rules (Built-in PRICES)¶
The top of client.js uses the unit prices officially announced by DeepSeek on 2026-11-05 (per 1M tokens, base idle period), for example:
| Model | Cache Hit Input | Cache Miss Input | Output |
|---|---|---|---|
| deepseek-flash | ¥0.02 / $0.003 | ¥1 / $0.15 | ¥4 / $0.60 |
| deepseek-v4-pro | ¥0.15 / $0.022 | ¥4.5 / $0.66 | ¥13.5 / $1.98 |
Beijing time Monday to Friday 9:00–12:00 and 14:00–18:00 are charged at double the rates in the table above; Chinese statutory holidays are not modeled separately and are calculated based on idle period rates. For sessions crossing peak/idle periods, historical unit prices may have deviations; the README clearly marks this as an estimate.
Installation & Enablement¶
The plugin runs under DSH process permissions; it is recommended to browse the GitHub source code and LICENSE before installation to ensure it meets your environment requirements.
Install from Plugin Market¶
- Open Harness’s Plugins → Discover.
- Search for “Whale Balance Pet” or “小鲸余额桌宠”, verify the source is
xinchen262/dsh-whale-balance-pet, and install.
The community plugin directory can be found at the SkillHub Directory Page. This site is an independent community directory with no official affiliation with DeepSeek or Fangzhou.
Manual Install¶
Replace <profile> with your actual profile name:
dsh plugin --profile <profile> add github:xinchen262/dsh-whale-balance-pet
You can also install the package name dsh-whale-balance-pet in the Harness plugin manager.
The package.json configures the client for the Web platform, immediately: true, and injects @deepseek-ai/dsh-api-remotes and @deepseek-ai/dsh-client-ui-layout. After installation and enabling, refresh the Web UI to see the pet in the bottom right corner of the page.
Typical Usage¶
- Daily Chat: Keep the default position or drag it to a non-interfering area; glance at the balance thumbnail and burn rate.
- View Details: Click the pet to check gift balance, cache hit rate, pricing period, tok/min, etc. in the details; click “Refresh Balance” when needed.
- Arrange Layout: Drag to a habitable position; if it’s too far off, double-click the pet or use the reset button to return to the default position (state is written to
localStorage).
Current session selection order (from README): Priority is the session marked by retainedBy.mainView; otherwise the currently running session; otherwise the most recently updated session. Token data comes from the tokenUsage unit of ctx.sessionProjections, folded from provider usage in assistant/message by @deepseek-ai/dsh-token-meter.
Applicable Scenarios & Notes¶
Suitable for: Developers who want balance and burn rate visible on screen while debugging agents, comparing models, or observing cache hits for long periods in the Harness Web UI.
Notes:
- Cost is tied to period unit prices; if a session spans peak/idle periods, it is only an approximation.
- Balance is the sum of top-up and gift; after policy changes or official price adjustments, you need to manually modify
PRICESinclient.js. - Plugin stars and popularity are based on community directory and GitHub real-time data; at the time of writing, GitHub stars were 0, which does not represent functional completeness, only exposure.
Repository structure facilitates secondary development: index.js is the Host empty entry point; client.js carries pet and panel logic; cordis.patch.yml participates in bundle patching.
Conclusion¶
The Whale Balance Pet connects the existing account Remote and session tokenUsage projection to a corner of the desktop: draggable, expandable, balance refreshes approx every 30 seconds, and speed/cost are estimated based on the official price list. If you need to keep an eye on “how long it can run” and “how expensive it is” while writing code, you can install and use it directly from the market or CLI.
- Directory page: https://www.skillhub.cn/plugins/xinchen262/dsh-whale-balance-pet
- Source code and description: https://github.com/xinchen262/dsh-whale-balance-pet