deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
📌 版本更新:见 doc/ver/0.2.3.md
🪟 DeepSeek Harness(DSH)Web 悬浮用量面板 —— 未央最爱的 macOS 毛玻璃 · 中文界面 · 官方余额 · Token 用量曲线。
Floating macOS-glass usage panel for DeepSeek Harness Web: live official
balance + token usage (today / session / 24 h smooth trend / per-model).
Token 等有歧义名词未做翻译。
GET /user/balance,只显示官方字段(当前余额、充值余额)。ESC 收起(带过渡动画);面板按胶囊位置自动选择展开方向;↻ 一键刷新(旋转 + 「已刷新」反馈)。# 方式一:在线安装(推荐)
dsh plugin --profile web add dsh-deepseek-usage-panel
# 方式二:从源码安装
dsh plugin --profile web add "link:/你的路径/dsh-deepseek-usage-panel"
装完重启 dsh web 并硬刷新浏览器(Ctrl/Cmd + Shift + R)。若未自动加入
bundle,把 dsh-deepseek-usage-panel 追加到 profile package.json 的
dsh.profile.bundles。
API Key(余额必需) —— 在 ~/.dsh/.credentials.yaml 配置(插件直读,不注入浏览器):
version: 1
refs:
DEEPSEEK_API_KEY: sk-你的key
也可设置环境变量 DEEPSEEK_API_KEY 或 DSH_USAGE_HUD_API_KEY。
# 方式一:CLI 卸载(移除依赖与 bundles 项)
dsh plugin --profile web remove dsh-deepseek-usage-panel
# 方式二:手动清理
pnpm --dir C:\Users\Administrator\.dsh\profiles\web remove dsh-deepseek-usage-panel
# 并手动把 package.json 的 dsh.profile.bundles 中的 "dsh-deepseek-usage-panel" 移除
重启 dsh web 即完全生效。(可选)删除本地数据目录
$DSH_HOME/dsh-deepseek-usage-panel/ 或 <profile>/.dsh-usage/ 以清理历史用量记录。
ESC 收起;右上 ↻ 立即刷新。在 profile 的 cordis.patch.yml 中按行 id 覆盖:
- id: usage-panel
config:
pollIntervalMs: 300000 # 余额轮询间隔(毫秒,最小 60000)
historyHours: 72 # 历史小时桶保留数
baseURL: https://api.deepseek.com # 覆盖接口地址
apiKeyRef: DEEPSEEK_API_KEY # 凭据引用名
dataDir: null # 覆盖数据目录(默认 $DSH_HOME/dsh-deepseek-usage-panel)
state.json(原子写入、自动裁剪),更换安装方式自动迁移旧数据。「今日 / 近 24 小时 / 按模型 / 会话」的 Token 数据是本插件对 Harness 会话的本地测量, 不是 DeepSeek 平台的官方账目,因此可能与 platform.deepseek.com/usage 的数字存在差异。原因如下:
usage(未命中输入 + 缓存命中输入 + 输出含推理),
与官方计费同源;所以单条记录的 token 计算是准的,偏差主要来自“统计时间窗口不完整”,而非算错。cacheReadTokens)单独列出;输出含推理 token,均与官方分桶一致。结论:数字可信的方向是“相对趋势/构成”,绝对总量请以官方 usage 页为准。 我们计划在后续版本中加入「统计自插件启用时间 / 完整性提示(完整 or 可能不完整)/ 手动重置」, 让口径更透明。若你对某天数据差异有疑问,可按“统计窗口”理解,而非视为错误。
MIT License —— 见 LICENSE。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。