Usage & Billing

dsh-commandcode-usage-inline

345420242/dsh-commandcode-usage-inline · ★ 1

345420242

Inline Command Code plan usage badge in the DSH composer toolbar (5h/weekly window usage + remaining credits) with an upward detail popover…

README body is shown in Chinese.

License
MIT
Added
2026-10-30
Maintenance
active
Install kind
github
Manifest details
Manifest status
Declared
Manifest path
package.json#dsh
Manifest checked
2026-10-30T09:38:04.890Z
Lifecycle scripts
None found

Static manifest checks report declarations only; they are not compatibility or security review.

安装

dsh plugin --profile web add 'github:345420242/dsh-commandcode-usage-inline#67ae01891935472467cdf77562861062e91d9b5b'

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: zh · Read Chinese README

Table of contents
  1. 功能
  2. 与 sidebar 版 (zouxiaoyang/dsh-commandcode-usage) 的区别
  3. 数据来源
  4. 安装
  5. 卸载
  6. 与 dsh-musage 的关系
  7. License

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% | 剩 N
    • 5h 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