namesColin/DSH-Plugin-Account-HUD1

dsh-account-hud

DeepSeek account HUD: API balance + service status floating widget, draggable, i18n zh/en, optional better-sidebar tab.

包名
dsh-account-hud
版本
0.1.1
许可证
AGPL-3.0
最近更新
2026年9月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:namesColin/DSH-Plugin-Account-HUD

配置 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