DeepSeek Harness 插件

dsh-usage-dashboard

DeepSeek Harness 用量页签:展示 DeepSeek 账户余额、官方峰谷时段价格、动态倒计时、平台用量页入口和本地余额告警灯。

跳到安装方式

来源信息

GitHub 仓库
Hann428/dsh-usage-dashboard
最近更新
2026年8月20日
分类
用量与账单
GitHub stars
0

安装

默认先复制一段 Prompt,让 Agent 读页面和仓库;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读页面和仓库。

请先不要安装。阅读这个 DeepSeek Harness 插件,说明它解决什么问题、会访问哪些文件、网络或密钥,以及如何安装和卸载。

插件页面:https://deepseekplugins.org/zh/plugins/Hann428/dsh-usage-dashboard
GitHub:https://github.com/Hann428/dsh-usage-dashboard
插件名:dsh-usage-dashboard
作者:Hann428
安装命令:dsh plugin --profile web add github:Hann428/dsh-usage-dashboard

确认前不要执行安装命令。

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-usage-dashboard

DeepSeek usage and billing panel for DeepSeek Harness Web.

It adds a compact Usage tab to the conversation view. The tab shows the DeepSeek account balance, current official peak/off-peak pricing, the next price-window countdown, and a direct link to the DeepSeek platform usage page.

Quick install from GitHub

dsh plugin --profile web add github:Hann428/dsh-usage-dashboard

Restart dsh web, then open any conversation and select the Usage tab.

Requirements:

  • DeepSeek Harness Web with plugin support.
  • A configured DEEPSEEK_API_KEY credential in Harness Settings -> Models.
  • Network access to https://api.deepseek.com and DeepSeek's official pricing docs.

中文简述:这是一个 DeepSeek Harness 用量面板插件,会在会话页添加“用量”标签页,展示账户余额、官方峰谷价格、切换倒计时、平台用量页入口,并提供可本地保存的余额告警灯设置。

Features

  • Account balance from DeepSeek's official GET /user/balance endpoint.
  • Current official prices for deepseek-v4-flash and deepseek-v4-pro.
  • Peak/off-peak status based on Beijing time, with orange peak and green off-peak labels.
  • Live countdown to the next peak/off-peak switch.
  • Compact balance health light on the Usage tab label: green when usable, orange when balance is below an enabled amount or percentage warning threshold, dim neutral when both switches are off.
  • Inline warning threshold switches and inputs for amount and percentage. Values are saved in browser localStorage and update the tab light immediately.
  • Host-side API-key handling: the browser receives only the query result, never the key.
  • Optional dev_usage_balance tool for agents to inspect balance and pricing data.

Configuration

The plugin uses the standard DEEPSEEK_API_KEY credential reference by default.

- id: dsh-usage-dashboard
  name: dsh-usage-dashboard
  config:
    keyRef: DEEPSEEK_API_KEY
    baseURL: https://api.deepseek.com
    platformUsageURL: https://platform.deepseek.com/usage
    timeoutMs: 10000
    healthCurrency: CNY
    alertBalance: 50
    alertBalancePercent: 20
    balancePercentBase: 100

Configure the key in Harness Settings -> Models. The plugin reads the credential through the Harness credentials service.

alertBalance and alertBalancePercent are optional default warning thresholds. The Usage panel also exposes inline amount and percentage fields; those browser-local values override the displayed tab light immediately. Set either threshold to 0 or leave the panel field blank to disable that check. balancePercentBase is the user-defined amount treated as 100% for percentage checks.

Notes

  • DeepSeek's platform page login is separate from Harness. The "open usage page" link may require a browser login.
  • The pricing table is fetched from DeepSeek's official docs at runtime so price changes are reflected after refresh.
  • If the docs page cannot be reached or parsed, the balance still renders and the price row reports the pricing error.

Development

pnpm install
pnpm run typecheck
pnpm run build:client

The built lib/ files are committed so GitHub-source installs can run without a local build step.