Preface¶
DSH emphasizes the philosophy of “everything is a plugin.” When using DeepSeek models in the DSH Web interface, you can check your account balance and exit the local service without leaving the page. dsh-balance-float is a Web plugin that adds a floating window in the top-right corner to display your DeepSeek model account balance, manually refresh the balance, and close the local DSH service after confirmation.
What This Is¶
The following introduces the positioning and boundaries of this plugin.
- Plugin name:
dsh-balance-float - Type: DSH Web plugin
- Maintainer:
x2802490130-prog - License:
MIT - GitHub repository:
https://github.com/x2802490130-prog/dsh-balance-float
It belongs to the Web plugin category within the DSH community plugin ecosystem. The community directory is an independent site with no official affiliation with DeepSeek / High-Flyer. Please do not interpret it as an official app store application.
Core Features¶
Here’s what it can do:
- Display the DeepSeek model account balance in a floating window in the top-right corner
- Auto-refresh the floating window every 60 seconds, showing the
total balance / gift / top-upbreakdown - Click the
↻button to manually refresh the balance - Click the
⏻button to trigger a graceful exit; pressYto confirm, orN/Escto cancel - After exit, close the local DSH service and the
http://127.0.0.1:3080web page - Provide local HTTP endpoints:
GET /api/dsh-balanceandPOST /api/dsh-exit
Environment Requirements¶
Please verify your environment before installation:
- DeepSeek Harness CLI installed:
npm install -g @deepseek-ai/dsh
- Node.js version requirement:
Node.js >=18
- DeepSeek API Key configured. If not configured, the floating window will display a “Retrieval failed” red indicator.
Installation and Activation¶
Installation command:
dsh plugin --profile web add dsh-balance-float
After installation, restart dsh, or hard-refresh the web page:
Ctrl+F5
After the steps above, a balance floating window will appear in the top-right corner of the DSH Web page.
Typical Usage¶
Below is a reproducible operation flow:
- Click the floating window body to expand the balance details, including
total / gift / top-up / update time. - Click
↻to instantly refresh the balance. - Click
⏻to bring up the exit confirmation dialog. - Press
Yto confirm exit; the local DSH service and thehttp://127.0.0.1:3080web page will be closed. - Press
NorEscto cancel the exit. - Click
⏻again to close the confirmation dialog.
Configuring Balance Retrieval¶
Balance retrieval depends on the DeepSeek API Key. You can configure it via environment variables or set DEEPSEEK_API_KEY in the credentials file.
Configuration parameter:
DEEPSEEK_API_KEY
Example credentials file:
DEEPSEEK_API_KEY: <Your Key>
The API Key is used only for server-side requests and will not appear in web page responses.
Local HTTP Endpoints¶
Both endpoints are only exposed on the local dsh service and are not accessible externally:
GET /api/dsh-balance
POST /api/dsh-exit
GET /api/dsh-balance is used for balance retrieval.
POST /api/dsh-exit is used for graceful exit: it executes SIGINT to close dsh, with a 6-second fallback force-kill.
Applicable Scenarios and Notes¶
This plugin is suitable for scenarios where you are already using the DSH Web interface and want to view your DeepSeek balance directly within the page and exit the local service.
Please note the following:
- The plugin runs with the permissions of the current
dshprocess; review the source code and theMITlicense before installation. - If no API Key is configured, the balance area will show a “Retrieval failed” red indicator.
- The exit endpoint closes the local service and web page, suitable when you explicitly intend to end the current DSH Web session.
- The local endpoints are not exposed externally, but this does not mean the exit endpoint can be invoked casually, as it will terminate the current
dshservice.
Conclusion¶
dsh-balance-float brings DeepSeek balance viewing, manual refresh, and local DSH service exit into the Web interface. If you are already using DSH Web, it serves as a lightweight entry point in the top-right corner.
GitHub repository:
https://github.com/x2802490130-prog/dsh-balance-float