DSH | dsh-usage | Token usage & quota, unified: per-request cost badge, global billing dashboard, GLM/Kimi Coding Plan quota bars #6896
nanami-0713
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
English TL;DR: one plugin that answers "how much am I spending right now / in total / what's left" — a live per-session cost badge priced per request (model × pricing era × peak/off-peak), a global billing dashboard built from session logs, and Coding Plan quota progress bars (5-hour / weekly / monthly) for GLM & Kimi. npm:
@hsinsekai-nanami/dsh-usage· repo: https://github.com/nanami-0713/dsh-usage.dsh-usage:把「正在花多少、一共花了多少、还剩多少」装进一个插件
三个 UI 面,同一套计价内核 —— 是
dsh-token-cost/dsh-usage-board/dsh-quota-visor三个插件的合并后继。① 实时徽标(对话头部左侧)
当前会话累计 Token 与费用。按每条请求实际使用的模型 × 涨价时代 × 峰谷时段逐桶计价,不做"当前单价 × 累计 tokens"的粗估;悬停可看逐模型明细与上下文组成。
② 全局用量看板(设置页)
扫描
~/.dsh/sessions全部会话日志,按官方刊例精确折算全局账单:1/7/30 天与全部时间筛选、各模型花费折线图、模型/文件夹维度明细,支持自定义单价与汇率。③ 订阅额度徽标 + 看板「订阅额度」板块
GLM / Kimi Coding Plan 的 5 小时/周/月/订阅周期进度条,切换模型自动对齐 provider;设置页看板里当前 DSH 配置的全部 Coding Plan 一屏一览。
安装
设计上比较坚持的两点
~/.dsh/.credentials.yaml),浏览器只经同源 API 取数。从三个旧插件迁移
首次启动自动合并旧配置(旧文件改名保留、绝不删除),旧 API 路径(
/api/dsh-token-cost/*、/api/dsh-usage-board/*、/api/dsh-quota-visor/*)作为别名继续工作;旧插件可直接卸载,回退只需把config.migrated.json改回config.json。欢迎反馈——尤其想知道下一批该优先适配哪家 provider 的窗口语义。
All reactions