namesColin/DSH-Plugin-Account-HUD ↗★ 1
dsh-account-hud
DeepSeek account HUD: API balance + service status floating widget, draggable, i18n zh/en, optional better-sidebar tab.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:namesColin/DSH-Plugin-Account-HUD说明文档
阅读完整 README ↗配置 API Key / Configure the API key
余额功能需要 DeepSeek API Key。DSH 从凭据系统读取——可在 DSH Web UI 的设置页配置,或在启动 DSH 的环境里导出(/ Set it in the DSH UI, or export it in the launching environment):
export DEEPSEEK_API_KEY=sk-your-key
没有 key 时,余额区域显示「未配置 API Key」,服务状态仍正常显示(/ Without a key, the balance area shows "No API key configured"; status still works)。
使用说明 / Usage
- 📌 停靠顶栏:启动后默认出现在会话顶栏(【PTC 模式】标签旁),显示 CNY 余额 + 状态点 + 最新状态 + ▼(▼ 表示还有更多状态)
- 🖱️ 悬停展开:鼠标放在胶囊上(不点击)即弹出完整详情面板(余额/统计/服务状态时间线),移开自动收起
- 🖱️ 拖出浮动:按住胶囊往下拖——拖动中的就是浮动窗本体(跟手移动)——松手即停在松手位置,且默认展开
- 📌 拖回吸附:把浮动窗拖回页面顶部 40px 带内,出现蓝色虚线停靠槽,松手即吸回顶栏
- 🔄 数据实时刷新:余额/状态每次请求都从官方 API 实时获取,前端 60s 轮询
- 🔌 装有 better-sidebar 时,侧边栏「+」菜单多一个「账户」Tab;未装则仅停靠/浮动窗 / With better-sidebar: an "Account" tab appears; without it, the widget works standalone
后端路由(参考)/ Backend routes (for reference)
| 路由 / Route | 用途 / Purpose |
|---|---|
GET /api/account-hud/balance | 实时余额(每次请求实时获取)/ Live balance |
GET /api/account-hud/status | 实时服务状态 / Live status |