In the development and usage workflow of DeepSeek Harness (DSH), monitoring API balance and Token consumption is a common requirement. dsh-mascot-xiadie provides a web plugin that displays a floating, interactive chibi character (Xiadie) on the screen to report account balance and usage in real time.
Installation and Activation¶
This plugin belongs to the “Fun Skins” category of the DSH ecosystem, was developed by maintainer Edison-q, and is released under the MIT license.
Installation must be completed using DSH’s command-line tools:
dsh plugin --profile web add dsh-mascot-xiadie
dsh web # 重启后刷新页面
Before use, add DEEPSEEK_API_KEY to the model configuration in DSH settings; otherwise, balance queries cannot be performed. Additionally, the data for “today / machine-wide tokens” comes from local dsh-usage-plugin records.
Core Features¶
This plugin adds a floating chibi character to the DSH web interface, with the following core capabilities:
- Real-time reporting: The floating character reports account balance and Token usage in real time.
- Interactive operations: Supports interactions such as single click, double click, and consecutive clicks; the character changes expressions and lines based on its state.
- Right-click menu: Right-click to open a menu containing “Statistics / Progress / Ledger” options, along with a slider to adjust the character size (120–360px).
- Dragging and snapping: The character can be dragged to any position; when released near a screen edge, it snaps automatically. Position memory remembers the last location.
- Milestone celebration: When machine-wide cumulative Tokens cross a multiple of 1,000,000, a celebration state is triggered (Figure 1 + celebration bubble).
- Data storage: All data is stored locally (
%LOCALAPPDATA%) and is not uploaded to any server.
Interactions¶
The character’s states and reactions are triggered by specific operations, as follows:
| Operation | Triggered State | Line/Reaction |
|---|---|---|
| Single click (while idle) | Rigorous · Reporting | “Balance remaining: ¥X. Today’s consumption: Y tokens.” (lasts 12 seconds) |
| Single click (while reporting) | Rigorous · Reporting | Refresh the data and report again |
| Double click / triple click (while reporting) | Shy | “Please don’t touch me anymore!” |
| 8 consecutive clicks (while shy) | Speechless | “…” |
| No touch for 5 seconds | Idle · Watching butterfly | Return to idle state |
Every click triggers a head-pat bounce effect. The reporting bubble and reaction bubble (lasts 2 seconds) can stack and coexist, each with its own timer.
Customization¶
Changing Images¶
The default assets are from Honkai: Star Rail. If you want to replace them, name the image files by state (PNG with a transparent background is recommended):
state1.png: Sad (milestone)state2.png: Idlestate3.png: Shystate4.png: Speechlessstate5.png: Rigorous · Reporting
Choose one placement method (restart dsh web after changes):
1. Replace files with the same names under the plugin directory assets/.
2. Set the environment variable DSH_MASCOT_DIR to point to a directory containing these images.
Changing Lines / Color Scheme¶
- Copy the default JSON configuration file (see below).
- Modify fields such as
name(character name),accent(theme color), andlines(dialogue). - Set the environment variable
DSH_MASCOT_CONFIGto point to that JSON file.
Example configuration (showing only part of the key fields):
{
"name": "遐蝶",
"accent": "#c4a8f5",
"lines": {
"report": "余额还剩 ¥{balance}。今日消耗 {tokens}。",
"shy": "不要再摸我啦",
"milestone1": "累计已使用 {tokens} Tokens……",
"milestone2": "项目会越来越成功的哦!"
}
}
Data Definitions and Storage¶
- Balance: Sourced from DeepSeek’s official
GET /user/balanceendpoint, real-time. - Today / machine-wide tokens: Read from local
dsh-usage-pluginrecords; the time baseline is Beijing time. - Project tokens: This plugin records them in real time by session workspace (folder); new projects start from zero.
All data is stored locally and is not uploaded to any server.
Copyright Notice¶
The plugin code is released under the MIT license. The character standing art in the assets/ directory (state1–5.png) consists of official assets from Honkai: Star Rail, with copyright © miHoYo. It is intended only for personal, non-commercial demonstration; please replace it with your own assets before redistribution.
Plugin repository: https://github.com/Edison-q/dsh-mascot-xiadie