hnmrxz/dsh-plugin-deepseek-balance ↗★ 5
dsh-plugin-deepseek-balance
Real-time DeepSeek account balance in the DSH bottom status bar (composer dock).
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-deepseek-balance
在 DeepSeek Harness (dsh) 底部状态栏实时显示 DeepSeek 账户余额。
Real-time DeepSeek account balance in the DSH bottom status bar (the band under the composer, next to the shipped stats line).
Features
- 实时余额:总余额 / 赠送 / 充值一目了然,悬停查看明细
- 每 30 秒自动刷新,点击立即刷新
- 复用 DSH 的
DEEPSEEK_API_KEY凭据(与自带llm-deepseek适配器同一引用),无需再填 Key - 尊重
llm-deepseek设置里的baseURL(自定义网关也能用) - API Key 只停留在 Host 进程,浏览器端永远拿不到
- 中英文自动跟随 DSH 界面语言
Screenshots

Install
需要 DSH 0.1.0-rc.x(Web profile)。
1. 安装到 profile
在 DSH 的 web profile 目录(通常 ~/.dsh/profiles/web)里把本包加为依赖:
cd ~/.dsh/profiles/web
npm install dsh-plugin-deepseek-balance
# 或 pnpm add dsh-plugin-deepseek-balance
# 本地开发:npm install /path/to/dsh-plugin-deepseek-balance 或 pnpm add ../dsh-plugin-deepseek-balance
2. 加入 composition
编辑同一个 profile 下的 cordis.patch.yml(没有就新建),插入一行:
- insert:
- id: deepseek-balance
name: dsh-plugin-deepseek-balance
3. 重启 dsh
dsh --profile web
打开 Web UI,composer 下方的状态带上就会出现 DeepSeek ¥xxx · 可用。
Configuration
无需配置。Key 来源(按顺序):
- DSH 设置页 Models 里配置的
DEEPSEEK_API_KEY(推荐,通过 credentials 服务写入) - 启动环境里的
DEEPSEEK_API_KEY环境变量
How it works
┌─────────────┐ ┌──────────────────────┐
│ Browser │ │ dsh Host process │
│ client.js │ GET │ webServer route │
│ (composer │ ─────► │ /dsh-deepseek- │
│ .dock slot) │ ◄───── │ balance │
└─────────────┘ JSON │ │ │
│ ├─ credentials │
│ │ .resolve( │
│ │ DEEPSEEK_ │
│ │ API_KEY) │
│ ▼ │
│ fetch │
│ {baseURL}/user/ │
│ balance │
└──────────────────────┘