Dogtiti/dsh-quota-meter ↗★ 0

dsh-quota-meter

A usage panel for provider plans: shows how much of each quota window is left (GLM Coding Plan and OpenCode Zen) as a compact chip next to the model selector, with a detail popover.

パッケージ
dsh-quota-meter
互換性
未検証
Harness ピア範囲
^0.2.1-0
バージョン
0.3.0
ライセンス
MIT
最終更新
2026/11/03

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Dogtiti/dsh-quota-meter

ドキュメント

README 全文を読む ↗

dsh-plan-usage

给 DeepSeek Harness 加一个供应商套餐用量面板:在模型选择器右侧显示一枚小图标,悬停(或点击)展开当前套餐的窗口明细。

已接入两家:

套餐面板列
GLM Coding Plan(智谱 / Z.ai)5 小时 · 每周 · 工具调用
OpenCode Zen(Go)滚动窗口 · 每周 · 每月
  • 按会话实际使用的供应商显示:面板问 Host「这个会话在跑哪家」,Host 从会话自己的 model/selection 事件读 provider id,所以 newapi 之类的网关不会误显示
  • 平时不发任何请求:只有悬停/点击时才查一次(?refresh=1 绕过缓存),移开即关闭
  • API key 只在 Host 进程内使用,不下发到浏览器;上游结果按 refreshSeconds 缓存

安装

dsh plugin install dsh-plan-usage

或在 Plugins 页安装后重启。

配置

键默认说明
sourceautoauto / glm / opencode;auto 按当前 provider 判断
apiKeyEnvZAI_CODING_CN_API_KEY智谱 key 的凭据名
baseUrlhttps://api.z.ai智谱接口域名;BigModel 用 https://open.bigmodel.cn
opencodeApiKeyEnvOPENCODE_GO_API_KEYOpenCode key 的凭据名
opencodeBaseUrlhttps://opencode.ai/zen/go/v1OpenCode 接口域名
refreshSeconds20缓存时间(下限 10 秒)

两个 key 都只在 Host 进程内使用,不会下发到浏览器。只配一家也能用,另一家会显示「未配置 API Key」。

数据来源

与各家客户端自己用的接口一致:


## 配置

| 键 | 默认 | 说明 |
| --- | --- | --- |
| `source` | `auto` | `auto` / `glm` / `opencode`;`auto` 按当前 provider 判断 |
| `apiKeyEnv` | `ZAI_CODING_CN_API_KEY` | 智谱 key 的凭据名 |
| `baseUrl` | `https://api.z.ai` | 智谱接口域名;BigModel 用 `https://open.bigmodel.cn` |
| `opencodeApiKeyEnv` | `OPENCODE_GO_API_KEY` | OpenCode key 的凭据名 |
| `opencodeBaseUrl` | `https://opencode.ai/zen/go/v1` | OpenCode 接口域名 |
| `refreshSeconds` | `20` | 缓存时间(下限 10 秒) |

两个 key 都只在 Host 进程内使用,不会下发到浏览器。只配一家也能用,另一家会显示「未配置 API Key」。