Utmotc/dsh-balance-card ↗★ 0

@utmotc/dsh-balance-card

Provider API balance and subscription quotas as an always-visible dsh Web sidebar card (or the original composer pill): the balance of the provider behind the model this conversation uses, with per-package percentage bars, correct units for money vs credits vs quotas, a settings tab, WorkBuddy/Qoder credits, and dsh-plugin-subscriptions (ChatGPT, Claude, Grok, Copilot, Antigravity) quota monitoring. 适合需要监控DeepSeek等模型API余额和额度消耗的用户。

Package
@utmotc/dsh-balance-card
Compatibility
Unverified
Version
1.4.0
License
MIT
Last updated
Sep 29, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Utmotc/dsh-balance-card

配置

loader 行的 config 接受(全部可选——任何不可用的值回落到默认):

键默认含义
apiKeyEnvDEEPSEEK_API_KEYDeepSeek 的凭据引用
baseURL$DEEPSEEK_BASE_URL,再退到官方 APIDeepSeek 接口基址
timeoutMs15000对厂商的单请求超时
minIntervalMs2000同一厂商两次上游读取的最短间隔
okTtlMs60000好读数被直接复用的时长
errorTtlMs15000失败读数被复用的时长
defaultProviderdeepseek请求未指名厂商时的应答对象

刻意不导出 config schema:schema 意味着要 import schemastery,而上面每个 值都已有安全默认——写错字只损失一个默认值,不损失激活。

用户设置(余额监测 页)

从设置页进入——不需要 profile 补丁,不需要重启。文档存在本插件自己的文件里 ($DSH_HOME/dsh-balance-card/balance-settings.json,或该行的 settingsFile),因为走 loader 行写设置会重建整个插件树并热重载 fiber (约 1–1.5 秒,外加一次客户端镜像风暴),每拨一个开关都要付一次这个代价。

字段默认取值
placementsidebarsidebar(设置旁卡片)· composer(输入框下胶囊)· both · none(隐藏读数;插件保留设置与接口)
pollMs6000015000 – 3600000
warnPercent200 – 100;低于此值进度条与百分比转告警色
showUpdatedAttrue显示最后更新时间
unitStylesymbolsymbol(¥100 / 🎫100)· name(100 元 / 100 积分)· none
groupDigitstrue千位分隔(1,261)
cardBordertrue画侧边栏卡片的细描边

null 把一个字段重置为默认。校验是封闭的:未知的字段名、越界的数字、未列出的枚举一律 HTTP 400 拒绝,什么都不写——而且文件在读取时会再校验一遍,手改出的坏值只损失那一个设置。