MeteorNOX/DeepSeek-Balance-Whale-Widget

DeepSeek Harness(DSH)一只住在 DSH 界面右下角的小鲸鱼娘,帮你盯着DeepSeek账户余额。QQ弹弹,支持拖拽吸附、左吸附翻转、数字滚动动画,随界面自动启用,建议直接喊来你的dsh安装

DeepSeek Balance Whale Widget (DSH 小鲸鱼记账挂件)

A plug‑in for DeepSeek Harness (DSH) that lives in the lower‑right corner of the DSH web UI (and also works in the official Electron desktop client). It shows your DeepSeek account balance, today’s spend, per‑turn cost, and lets you customise the little “whale” bubble that displays the information.


What it does

  • Live balance display – pulls the current DeepSeek balance every 60 s (or on click) using either a DEEPSEEK_API_KEY or the logged‑in DSH account.
  • “Small‑whale accounting” – tracks the change in balance to compute today’s usage without needing any extra token. Increases (recharges/gifts) are recorded separately and can be reconciled manually.
  • Per‑turn cost bubbles – after each model turn the widget shows a bubble with the monetary cost derived from the exact token usage (input, cache, output, reasoning). The bubble text is fully customisable.
  • Peak‑off‑peak pricing – automatically applies DeepSeek’s weekday peak rates (9‑12 & 14‑18 CST) and off‑peak rates (weekends are all off‑peak from 2026‑08‑23).
  • Usage history window – view today’s spend, the last 7 days, or the full record, with model‑wise breakdowns and searchable entries.
  • Rich UI interactions – drag‑and‑drop positioning, edge‑snapping, mirror‑flip on left‑side snap, press‑and‑hold “toy” animation, and a full‑screen menu for settings.
  • Modular bubble system – bubbles are built from rows of modules (text, links, random sentences, images/gifs, balance placeholders, model name, etc.). Modules can be saved to a library and reused.
  • Custom alerts – low‑balance warnings and daily‑budget alerts with editable content (including images/random sentences).
  • Audio feedback – press/release sounds, task‑end chime, question/authorization prompts, each with independent volume controls and a library for custom audio clips.
  • Multi‑vendor API support – beyond DeepSeek, you can add other providers (OpenRouter, Kimi, StepFun, OpenAI‑compatible gateways, etc.) and track their balances, quotas, and per‑token pricing. The UI automatically creates balance and quota placeholders for each model.

Why it matters

For heavy LLM users, keeping an eye on token‑based spend is essential to avoid surprise charges. This widget turns the otherwise hidden API‑key‑driven accounting into a visual, interactive dashboard that lives right inside the DSH interface, requiring no extra tokens or external services. It also gives power users the ability to script custom bubble messages and integrate dozens of other AI providers.


Installation (Web profile)

# Preferred: install the published npm package
dsh plugin --profile web add dsh-whale-widget

# Or install directly from GitHub
# dsh plugin --profile web add github:MeteorNOX/DeepSeek-Balance-Whale-Widget

If you already have a local copy or a zip, use the link: or file: syntax as described in the README.

Desktop (Electron) client – the widget is the same package but must be installed from within the running DSH desktop session using the built‑in plugin_manager (the CLI --profile web flag does not work for the desktop profile).


Basic usage

  1. After installation, restart the DSH host (or quit‑and‑restart the desktop client) and refresh the browser.
  2. The whale icon appears in the lower‑right corner. Click it to:
    • Refresh the balance manually.
    • Open the main menu where you can adjust size, position, audio groups, and enable/disable individual alerts.
  3. Open “每轮消耗提示” under 音效与提示 → 全局设置 to edit the per‑turn cost bubble template (use {cost} placeholder).
  4. Use the “自定义泡泡” window to build custom bubble sequences, add random sentences, images, or balance placeholders.
  5. Access the usage window from the menu to see daily/weekly totals and filter by model name.

Extensibility

  • Bubble modules – create reusable rows (text, random sentence, image/gif, balance placeholders) and store them in the module library.
  • Custom providers – add a new model in 小鲸鱼记账 → 模型 and select one of the 34 built‑in vendor templates, or choose 自定义 HTTP to point at any endpoint. You can also enable the “allow credentials to custom address” flag for self‑hosted gateways.
  • Audio library – import your own .wav/.mp3 clips, crop them in‑app, and assign them to any of the four event groups (press, turn‑cost, question, authorization).
  • Positioning – configure edge‑snap values (percentage or pixel) and turn on/off mirroring for left‑side snap.

Security notes

  • API keys are never stored in plain text; the plugin only writes the credential name to its config and the actual secret lives in DSH’s credential service.
  • Credentials are only sent to the endpoints defined in the vendor template. Sending them to a custom URL requires explicit user consent per model.
  • All write operations are restricted to localhost; remote hosts receive a 403 unless whitelisted via DSHW_ADMIN_HOSTS.

Where to find more

  • Full specification and prompt for developers: whale-widget-prompt.md
  • Source code layout is described in the README’s 目录结构 section.
  • Issues, feature requests, and releases are handled in this repository (or the separate Codex‑Whale repo for the Codex‑only version).

Related

  • Project
  • Project
  • Project
  • Project