Preface¶
When using the DeepSeek Harness (DSH) web interface daily, you often need to check the DeepSeek account balance, but you might not want to repeatedly switch out of the current window and open another page to query. Ho11ow8/deepseek-harness-balance-pet is a DSH plugin: when opening the DSH web interface, it displays a Deepseek Maiden in the bottom right corner of the screen and uses a dialog box to display the DeepSeek account balance in real-time, refreshing by default every 20 seconds.
Below is an introduction to what this plugin does, how to install it, how to configure it, and what logs to look at when troubleshooting.
What is this¶
- Repository/Plugin ID:
Ho11ow8/deepseek-harness-balance-pet package.jsonpackage name:deepseek-balance-pet- Maintainer:
Ho11ow8 - License:
MIT
Its function is to hang the DeepSeek account balance next to the DSH web browser window. The desktop pet appears in the bottom right corner of the screen by default, displays a single line of text like Balance: ¥xx.xx in the dialog box, and automatically scales the font size to prevent overflow.
This plugin targets Windows 10/11. The desktop pet is a compiled native WPF program requiring .NET Framework 4.8, which is mentioned as being included with the system. The plugin side requires Node.js ≥ 18 and the DeepSeek Harness web profile to be installed.
Core Features¶
Only follows DSH web browser window¶
When starting dsh web, the desktop pet appears automatically and only hangs onto the browser window corresponding to the DeepSeek Harness interface.
The desktop pet will hide when the following occurs:
- Switching to another application
- Minimizing the browser window
- Closing the browser window
After restoring the DSH web browser window, the desktop pet will reappear.
It also follows the monitor where the browser is located and appears in the bottom right corner of that monitor, with a margin of 14px.
Real-time display of DeepSeek account balance¶
The desktop pet dialog box displays:
余额:¥xx.xx
The balance is refreshed in real-time. The API called is:
GET /user/balance
The default refresh interval is 20 seconds and can be overridden by the pollSeconds configuration item.
Window size and basic operations¶
The default size of the desktop pet is 220×209px, and the size is configurable.
Daily operations include:
- Drag the desktop pet by holding the left mouse button; dragging position within the same monitor is preserved.
- Refresh balance or exit via the right-click menu.
- Double-clicking the desktop pet also refreshes the balance.
When DSH closes, the desktop pet exits automatically. If the service becomes disconnected for about 2 minutes, the desktop pet will also disappear automatically.
Local execution and API key boundary¶
The plugin side only uses built-in Node modules. The desktop pet side is a compiled native WPF applet.
The balance proxy only listens on:
127.0.0.1
The documentation explicitly states: The API Key will not enter the browser.
Installation and Activation¶
Environment requirements¶
Before installing, confirm the following environments:
- Windows 10/11
- .NET Framework 4.8
- Node.js ≥ 18
- DeepSeek Harness is installed and the web profile is enabled
Install from GitHub¶
Execute:
dsh plugin --profile web add github:Ho11ow8/deepseek-harness-balance-pet
This command adds the plugin to the web profile.
Then restart dsh web. You can close and reopen it, or double-click the DeepSeek Harness shortcut on the desktop. After restarting, the desktop pet will appear automatically.
Install from local directory¶
For development or debugging, you can install from a local directory:
dsh plugin --profile web add file:D:\DeepseekHarness\DeepseekBalance\deepseek-balance-pet
If you previously installed using file:, and now want to switch to github:, remove the old dependency first, then re-add it to avoid two sources for the same package name.
Typical Usage¶
Override configuration items¶
Override configuration items in the profile’s cordis.patch.yml. Example:
- id: balance-pet
config:
port: 41999
pollSeconds: 20
petWidth: 220
shadow: true
These example values come from the provided usage instructions:
pollSeconds: 20: Corresponds to refreshing every 20 seconds by default.petWidth: 220: Corresponds to the default width of 220.port: 41999: Used by the local balance proxy.shadow: true: Overrides display-related settings for the desktop pet.
API Key reading location¶
The order in which the plugin reads the DeepSeek API Key is:
- Environment variable
DEEPSEEK_API_KEY DEEPSEEK_API_KEYline in~/.dsh/.credentials.yaml
If balance retrieval fails, prioritize checking if the Key here is valid and if the account is in arrears. An error is also reported when the balance interface returns is_available: false.
Regenerate image¶
If you have the original image, you can regenerate the desktop pet image:
node tools/make-pet-image.mjs <original.jpg> pet.png
This step is used to process the original image into the pet.png used by the plugin.
Recompile desktop pet¶
When the WPF desktop pet needs to be recompiled, execute:
pwsh -File src\build.ps1
This step regenerates the desktop pet executable file.
Troubleshooting¶
Desktop pet does not appear¶
First confirm two points:
deepseek-balance-pethas been added to the bundles of the web profile.dsh webhas been restarted after installation.
Displays “Fetch Failed” (or “Failed to get”)¶
Check the following in ~/.dsh/.credentials.yaml:
DEEPSEEK_API_KEY
Confirm if the Key is valid and if the account is in arrears. An error is also reported when the balance interface returns is_available: false.
View logs¶
The desktop pet logs are located at:
%LOCALAPPDATA%\DeepseekBalancePet\pet.log
The plugin logs are viewed in the dsh web console, prefixed with [balance-pet].
Applicable Scenarios and Notes¶
This plugin is suitable for developers who use the DSH web interface under Windows for a long time. If your workflow often requires confirming the DeepSeek account balance, hanging the balance next to the browser window can reduce the back-and-forth switching.
It is recommended to pay attention to the following before using:
- The plugin runs with the permissions of the current
dshprocess. - Check the source code, dependencies, and license before installing.
- The balance proxy only listens on
127.0.0.1, but you should still avoid exposing the API Key to an untrusted environment. - If switching from
file:togithub:, remove the old dependency first and then add it.
Conclusion¶
This plugin does a specific thing: when opening the DSH web interface, it displays a Deepseek Maiden in the bottom right corner of the screen and continuously displays the DeepSeek account balance in the dialog box. It uses a local balance proxy, the API Key does not enter the browser, and the installation and configuration path is also quite straightforward.
Repository address:
https://github.com/Ho11ow8/deepseek-harness-balance-pet
The directory page link is unconfirmed, so this article does not list unverified addresses as facts.