Inline Command Code plan usage badge in the DSH composer toolbar beside the model selector: 5h and weekly window usage plus remaining credits, clicking the badge opens an upward detail popover with reset countdowns; reuses the commandcode/report remote from @mars-sea/dsh-commandcode-provider.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:345420242/dsh-commandcode-usage-inline
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
Inline Command Code plan usage badge for the DSH composer toolbar — a one-line readout right beside the model selector, zero screen space beyond a compact pill.
![示意] composer 工具栏: CC 5h 12% | 周 34% | 剩 1826
功能
- 跟随当前模型: 当前会话 provider 是
commandcode时显示徽章;切到其它 provider 自动隐藏。 - 一行概览(composer 内联,紧邻 model select):
CC 5h X% | 周 Y% | 剩 N5h X%— 5 小时窗口已用百分比(超限时变红)周 Y%— 周窗口已用百分比(超限时变红)剩 N— 剩余 credits(购买 + 免费)
- 点击展开详情浮层(向上弹出,样式与模型选择浮窗一致):
- 当前账户(多账户轮换时绿点标注)、套餐名
- 5h / 周窗口的重置倒计时
- 剩余 credits 构成(订阅月包 + 购买 + 免费)
- 其它已配置账户的分窗口占用
- 刷新 / 关闭按钮
- 60s 自动轮询; 失败时徽章变黄
CC ⚠, 点击查看错误并可重试。 - 悬停徽章有胶囊背景反馈。
与 sidebar 版 (zouxiaoyang/dsh-commandcode-usage) 的区别
已收录的 zouxiaoyang/dsh-commandcode-usage 是一个侧边栏 footer 面板。本插件是不同的形态:composer 输入栏内的内联薄徽章(conversation.input.right slot,紧贴 model select),不占侧边栏空间、不打断对话流,打开浮层才展示明细。两者定位互补。
数据来源
纯客户端插件。复用 @mars-sea/dsh-commandcode-provider 已 mount 在浏览器 remote 服务上的 commandcode/report Remote(accounts[].report.credits.fiveHour / .weekly + .plan + .account),不自己直连 Command Code API,不接触你的 API key。
前置依赖: 已安装并启用 @mars-sea/dsh-commandcode-provider。
安装
dsh plugin add github:345420242/dsh-commandcode-usage-inline
然后重启 DSH 即可。
卸载
dsh plugin remove dsh-commandcode-usage-inline
与 dsh-musage 的关系
dsh-musage 支持 MiniMax / DeepSeek / Kimi / OpenRouter / Zhipu 五家,遇到 commandcode 时无法显示数据。本插件补上这块:commandcode 激活时显示真实用量,其它 provider 时自己隐藏,两者共存不冲突。
License
MIT
Links
More in this category
bowenliang123/dsh-context★ 3724
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
Han-1413141/dsh-cost-meter★ 556
Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
wssfk12138/dsh-damage-pulse★ 276
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 199
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 186
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
PolinniZhong/dsh-personal-center★ 114
Personal center for DeepSeek Harness: cross-session usage statistics, per-model cost estimation, global custom instructions, a global font-size adjuster, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.