Introduction

When running tasks with DeepSeek Harness (DSH), there is a common inconvenience: if you want to know how much money is left in your account, how much was spent today, and how many tokens the current session consumed, you have to leave the webpage and go to the official platform to check the usage page. With many tasks, this back-and-forth switching interrupts your train of thought.

whale-purse brings this functionality back inside the DSH webpage: a whale girl desk pet floats on the page, and clicking it reveals the balance, official “Today’s Consumption,” current session usage and spending, and the past 7 days of historical trends. Below, I will introduce its features, installation methods, and configuration options.

What is whale-purse

whale-purse (liuherong808-dev/dsh-whale-purse) is a DSH web plugin, released under the MIT license, with the current version being 1.1.0. It is a derivative of Suiwan/whale-purse (MIT, © 2026 Zijian Li), with the addition of the official “Today’s Consumption” capability; the whale girl visual assets are sourced from 1190fasheqi/dafeiyu-pet.

One-sentence positioning: A whale girl desk pet living inside the DSH webpage, monitoring your DeepSeek account balance, official “Today’s Consumption,” current session usage/spending, and the past 7 days of historical trends.

Core Features

Desk Pet and Notifications

  • A transparent sprite floats over the DSH webpage, swaying with the waves, displaying foot shadows, and responds with a squash-and-stretch bounce when clicked.
  • Draggable to change position; the position is saved in localStorage and persists after refresh or restart.
  • When a background session finishes, the whale girl bounces and a bubble pops up “Task Completed!”, clicking the bubble takes you directly to the finished session.
  • When a task is running, it vibrates with a “Busy…” label.
  • Automatically clips the desk pet back into the viewport when switching between external screens and laptops.

Balance and “Today’s Consumption”

The balance comes from the DeepSeek official Get User Balance interface (GET https://api.deepseek.com/user/balance), polled every 30 seconds with concurrent deduplication. “Today’s Consumption” calls platform.deepseek.com/api/v0/usage/cost, displaying data consistent with the official usage page. This item requires separate configuration of the platform token (see below).

Session usage reads the tokenUsage projection from sessionProjections, bucketing and calculating based on official prices for input, cache read, cache write, and output: messages already saved are priced according to the peak/valley tier they occurred in, while ongoing increments are priced at the current tier. This part is local accounting (sessionProjections + session log replay + official prices) and requires no extra credentials.

Clicking the desk pet opens a dual-tab panel: the “Current” tab shows balance, today’s consumption, and real-time spending; the “History” tab shows a 7-day spending bar chart, as well as the cost details of each question in the current session.

Peak/Valley Pricing and UI Adaptation

Peak prices for Beijing Time 9:00-12:00 / 14:00-18:00 switch automatically, and the official pricing page is fetched automatically every 6 hours. The panel colors and bar chart adapt to the DSH light/dark theme via --dsw-alias-* tokens.

Installation and Usage

Prerequisites: Node.js and pnpm, and dsh installed:

npm i -g @deepseek-ai/dsh
dsh plugin --profile web add github:liuherong808-dev/dsh-whale-purse

The package declares dsh.bundle, and dsh plugin automatically adds it to the profile’s bundle layer. Then, restart dsh web and refresh the page.

Method 2: Manual Installation

First, symlink the repository into the web profile’s dependencies directory:

ln -s "$(pwd)" ~/.dsh/profiles/web/node_modules/whale-purse

Then, add an insert entry in ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: whale-purse
      name: 'whale-purse'
      config:
        model: pro
        refreshIntervalSeconds: 30

Finally, restart dsh web and refresh the browser.

Configuration

Field Default Description
model pro Pricing model: pro / flash
refreshIntervalSeconds 30 Balance polling interval (seconds)
apiKeyEnv DEEPSEEK_API_KEY Credential reference name for the API key
baseUrl https://api.deepseek.com Base URL for the balance interface
pricingRefreshHours 6 Official pricing page fetch interval (hours)
enabled true Whether to enable balance query

The balance interface needs to resolve to DEEPSEEK_API_KEY. The resolution order is credential file, startup environment, and process.env as a fallback layer.

“Today’s Consumption” requires a platform session token: after logging in to https://platform.deepseek.com, execute the following in the DevTools Console:

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

Write the obtained value into the credential DEEPSEEK_PLATFORM_TOKEN (~/.dsh/.credentials.yaml or the startup environment). When not configured, this item shows “Platform token required,” but other functions are not affected.

Use Cases and Notes

Suitable for users who run tasks with the DSH webpage for a long time and want to keep track of balance and spending on the go, especially scenarios with multiple background sessions open and needing task completion reminders.

There are two points to note before installation:

  1. The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license (MIT) before installing.
  2. “Today’s Consumption” requires a platform session token, which carries relatively high permissions. You should weigh the risks yourself regarding whether to configure it; not configuring it does not affect the balance and local accounting functions.

Conclusion

whale-purse puts information like balance, consumption, and session spending—information that originally required page switching—into a draggable desk pet. The local accounting part requires no extra credentials and is ready to use immediately after installation.

  • Plugin Directory Page: https://www.skillhub.cn/plugins/liuherong808-dev/dsh-whale-purse
  • GitHub Repository: https://github.com/liuherong808-dev/dsh-whale-purse

It should be noted that the plugin directory is a community-maintained site and has no official affiliation with DeepSeek or Fantom.