@magiczerowxy/dsh-balance
v0.1.2
Published
DeepSeek balance floating widget for the dsh web GUI: a small overlay window pinned bottom-left showing the account balance from the official API, with a collapse chip and 5-minute auto refresh.
Readme
@magiczerowxy/dsh-balance
DeepSeek 账号余额浮窗 for DeepSeek Harness web GUI:左下角悬浮窗显示官方 API 余额,支持折叠、5 分钟自动刷新。
A DeepSeek account balance floating widget for the DeepSeek Harness web GUI: a small overlay pinned bottom-left showing the balance from the official API, with a collapse chip and 5-minute auto refresh.
功能 Features
- 余额浮窗:左下角悬浮,实时显示官方 API 账户余额
- 折叠/展开:可折叠成小胶囊,点击展开
- 自动刷新:每 5 分钟自动查询;可手动刷新
- API Key 管理:在浮窗中保存/清除
DEEPSEEK_API_KEY(经 DSH credentials 服务持久化,重启不丢失,不回传密钥值) - 状态提示:未配置 Key / 请求失败等状态清晰提示
安装 Install
包已发布到 npm(@magiczerowxy/dsh-balance),用官方 dsh plugin 命令安装:
dsh plugin --profile <profile> add @magiczerowxy/dsh-balance
<profile>换成你自己的 profile 名:桌面版用desktop,Web 版用web,不带--profile操作默认 profile。 命令会自动把包写入 profile 依赖,并因声明了dsh.bundle自动加入 layer stack。
配置 API Key
两种方式任选其一:
- 环境变量:设置
DEEPSEEK_API_KEY=sk-xxx后重启 DSH - 浮窗内保存:点击浮窗 → 填入 Key → 保存(写入
~/.dsh/.credentials.yaml)
卸载 Uninstall
dsh plugin --profile <profile> remove @magiczerowxy/dsh-balance结构 Structure
dsh-balance/
├── lib/
│ ├── index.js # Host 半区:/api/dsh-balance/* 路由(查询、Key 保存/清除)
│ └── client.js # Client 半区:浮窗 UI + 折叠 + 自动刷新
├── cordis.patch.yml # bundle patch(entry id: ds-balance-widget)
└── package.jsonLicense
MIT
