dsh-quota-cards
Manifest validDSH Quota Lookup Plugin: A persistent quota Card is always displayed on the **left side of the message input box**, automatically switching based on the current model to show the quota/traffic for the corresponding account. Supports manual refresh (with debounce) and periodic automatic refresh. No need to publish to npm — just package it as a zip and send it to the other party to install.
dsh-quota-cards
A DSH account-quota plugin. It keeps a resident Card at the left end of the composer that follows the selected model and shows the matching account readout — DeepSeek balance, or OpenCode Go remaining token usage over the 5h (rolling) / weekly / monthly windows — with a debounced manual refresh button and interval-based auto refresh.
Features
Composer-left quota Card (conversation.input.left)
- DeepSeek: account balance (total, with granted/topped-up detail in the tooltip). Credential reference and refresh interval are configured in Settings.
- OpenCode Go: remaining token traffic for the 5h (rolling) / weekly / monthly windows as percentages (tooltip carries the used share and reset time).
- Follows the model: each refresh re-resolves the current provider via the
session.modelsRPC; providers whose id containsdeepseekshow the balance card,opencodeproviders show the usage card, anything else shows a muted placeholder. The model is re-checked on mount, after each finished turn (runningflips), on connection reset, and on settings changes. - Manual refresh (debounced): a click refreshes immediately (bypassing the host cache); clicks inside the 2 s cooldown window, or while a request is in flight, are ignored.
- Auto refresh: every configured interval (1 / 5 / 10 / 30 / 60 min); the next tick is re-scheduled with the latest interval after each fetch.
Settings → 额度查询
- DeepSeek balance: credential reference (default
DEEPSEEK_API_KEY) + refresh interval, with a configured/missing badge. - OpenCode Go usage: credential reference (default
OPENCODE_GO_API_KEY) + refresh interval. - Saves apply live; credential values never reach the browser.
Data sources & security
- DeepSeek:
GET https://api.deepseek.com/user/balancewithAuthorization: Bearer <key>. - OpenCode Go:
GET https://opencode.ai/zen/go/v1/usagewithAuthorization: Bearer <key>(the same Anthropic-compatible key used whenANTHROPIC_BASE_URLpoints atopencode.ai/zen/go). - Keys are resolved host-side via
ctx.credentials.resolve(); the browser only receives read-only fetched results. Settings writes require a same-origin POST. - The host caches each provider's readout for its configured interval; manual
refresh (
force=1) bypasses the cache.
Installation
Prerequisites: DSH installed (dsh web runs) and pnpm on PATH (dsh plugin
forwards to pnpm).
# 1. Unzip to a folder, e.g. D:\plugins\dsh-quota-cards
# 2. Install into the web profile:
dsh plugin --profile web add file:D:/plugins/dsh-quota-cards
dsh plugin add runs pnpm and adds @dsh-external/dsh-quota-cards to the
profile's dsh.profile.bundles.
# 3. Restart dsh web
# 4. Open Settings → 额度查询, confirm both credential references, and make
# sure the keys exist (e.g. in .credentials.yaml or env):
# DEEPSEEK_API_KEY: sk-xxxx
# OPENCODE_GO_API_KEY: sk-yyyy
# 5. Back on the chat page, the quota Card sits at the left of the composer.
Uninstall
dsh plugin --profile web remove @dsh-external/dsh-quota-cards
# then restart dsh web
Compatibility
- Host services:
settings,credentials,sessions,agentDefaultModel, optionalwebServer; client servicesslots,connection; slotsconversation.input.leftandsettings.section(declared by the shipped ui-conversation / ui-settings bundles). - Provider matching is by provider id (
deepseek→ balance card,opencode→ usage card); DeepSeek's official provider id isdeepseek-officialand the common OpenCode Go id isopencode-go. - No third-party runtime deps of its own (schemastery and the
@deepseek-aipackages are peerDependencies resolved from the profile).
Comments
Loading…
Similar plugins
by AnLifeX
DeepSeek Harness(dsh web)额度插件:跟随当前模型显示官方余额或 OpenCode Go 订阅用量,支持本会话估算、跨会话累计消耗与可视化设置。
★ 3
↓ 89/wk
MIT
JavaScript
Sep 7, 2026
dsh plugin --profile web add dsh-creditsby jsoncode
余额与费用查询插件,支持多账号查询,实时token实时统计,中英双语,界面交互直观、开箱即用
★ 0
JavaScript
Sep 11, 2026
dsh plugin --profile web add dsh-get-balanceby FengHuoLinShan
DSH 插件:可拖动的 API 余额/配额悬浮卡片(DeepSeek / Moonshot / Kimi For Coding 自动发现、分档变色、实时刷新)| Draggable API balance/quota card for DeepSeek Harness
★ 3
↓ 190/wk
MIT
JavaScript
Sep 13, 2026
dsh plugin --profile web add dsh-plugin-llm-balanceby cn-scuo-oo
DeepSeek Harness Web 侧边栏 DeepSeek API 额度卡片 + 充值面板插件 | Sidebar quota card & recharge panel for DeepSeek Harness: real-time official /user/balance (60s auto-refresh), recharge tiers/payment methods matc
★ 3
↓ 455/wk
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-deepseek-quotaby KouzakiUmi
DeepSeek Harness 插件:在模型选择器和设置页显示订阅用量、配额与重置时间,支持 Z.ai、Kimi、MiMo、OpenCode Go 等服务商。
★ 0
MIT
JavaScript
Oct 9, 2026
dsh plugin --profile web add dsh-subusageby marisa-4219
DeepSeek Harness 多供应商额度监控插件:余额型 API 查询 + 限额型本地用量计量,侧边栏实时卡片 + 可视化配置。
★ 7
↓ 76/wk
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add deepseek-harness-quota-monitor