mmx-quota-tool
by mtty-ai
DSH 网页 MiniMax 配额悬浮卡:会话输入区显示水滴形 5h 已用百分比,点击展开详情面板,列出每个模型的 5h/周用量与重置倒计时,当前默认模型非 MiniMax 时自动隐藏。
MiniMax token-plan quota dock for the Web UI: a drop-shape 5h-usage % chip in the conversation input area, click for a detail panel listing every model's 5h & weekly usage and reset countdown, auto-hidden when the active default model is not a MiniMax model.
安装
dsh plugin --profile web add github:mtty-ai/mmx-quota-toolGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
MiniMax token-plan quota dock for DeepSeek Harness (DSH) web.
Shows a drop-shape icon + 5h usage % in the conversation input area (next to the model selector). Click for a detail panel listing every model's 5h & weekly usage, reset countdown, and absolute numbers. Auto-hides when the active default model is not a MiniMax model.
Install
dsh plugin --profile web add github:mtty-ai/mmx-quota-tool
Then restart dsh web once.
Manual install (development)
git clone https://github.com/mtty-ai/mmx-quota-tool
cd mmx-quota-tool
# copy or link the package into your profile's node_modules
cp -R . ~/.dsh/profiles/web/node_modules/mmx-quota-tool/
Then add the row to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: mmx-quota-tool
name: mmx-quota-tool
Configuration
This plugin requires a MiniMax API key. Export it before launching dsh web:
export MMX_API_KEY='sk-cp-your-key-here'
dsh web
Or put it in your shell rc (~/.zshrc, ~/.bashrc).
Optional environment variables:
| Var | Default | Purpose |
|---|---|---|
MMX_API_KEY |
(required) | MiniMax Bearer + x-api-key |
MMX_REGION |
cn |
cn (api.minimaxi.com) or global (api.minimax.io) |
MMX_REFRESH_MS |
60000 |
Host poll interval against upstream |
MMX_POLL_INTERVAL_MS |
5000 |
(client bundle) Client fetch interval |
The client bundle polls the host every 5 s so model-switch visibility is
within 5 s; the actual upstream fetch runs every MMX_REFRESH_MS.
Behavior
- The dock appears in the conversation input area (
conversation.input.left), adjacent to the model selector. - Icon is a drop/water shape, filled by 5h usage % (lower bar = better):
< 50%green< 80%yellow≥ 80%red
- Click toggles a detail panel; mouse-leave the dock or panel closes it.
- Shift+click forces an immediate upstream refresh.
- The dock is hidden entirely when the active default model is not a MiniMax
model — matched providers
minimax / minimax-cn / minimax-global / MiniMax*or model prefixesMiniMax- / minimax-. - Model name labels follow the active DSH UI locale:
- zh: 通用 / 视频 / 图像 / 音频 / 语音 / 音乐 / 视觉 / 向量 / 实时 / 长文本
- en: General / Video / Image / Audio / Speech / Music / Vision / Embedding / Realtime / Long context
- The dock label, panel header / headline / footer hint all switch language when the user changes DSH's interface language.
- The default is
zh(Chinese) — the language the upstream token-plan model names resolve to most naturally. If the locale service is unavailable the dock still renders.
Architecture
| Half | File | Responsibility |
|---|---|---|
| Host | src/index.js |
60 s upstream poll + exposes two HTTP routes |
| Client | client/client.js |
5 s poll + mounts the dock UI in conversation.input.left |
The host registers two routes on the profile's webServer:
GET /api/mmx-quota-tool/quota— current snapshotPOST /api/mmx-quota-tool/refresh— force refresh
Returns { rows, lastFetchedAt, lastError, lastStatus, model, isMmx, refreshIntervalMs }.
The client polls quota and renders null when isMmx === false, so
switching to a non-MiniMax model hides the dock within 5 s.
Files
.
├── README.md
├── LICENSE
├── package.json # dsh.bundle + dsh.client declaration + exports
├── cordis.patch.yml # dsh bundle patch (registers the row)
├── src/index.js # host: HTTP routes + 60s upstream poll
└── client/client.js # browser: 5s poll + React UI + injected <style>
License
MIT
原始 README: https://github.com/mtty-ai/mmx-quota-tool/blob/main/README.md ↗
同类插件
查看全部 →
dsh-usage-plugin
DeepSeek Harness 用量与消耗插件(dsh-usage)—— 每次调用的 token 用量/缓存命中统计、峰谷计费、余额查询、CSV/JSON/PNG 导出,可经桌面端一键安装或命令行 dsh plugin add 安装。

dsh-whale-report
🐋 鲸鱼记事本 — 你的 Agent 年度报告:从会话事件日志生成日报/周报/月报/年报,任意区间、只读不改写

dsh-balance-meter
输入框 dock 显示 DeepSeek 账户余额与会话花费,自动拉取官方定价,支持高峰/低谷计价。

dsh-usage-stats
DeepSeek Harness 使用统计插件|Token 总量与构成、7/30 天趋势、年度活跃热力图、模型占比、工作区/任务筛选、CSV/JSON 导出

dsh-balance
DeepSeek 余额实时显示插件: 在 dsh Web UI 输入框 下方、命中率/输入输出 token 统计条所在的同一行 , 实时显示:

dsh-balance-monitor
DeepSeek 账户余额、剩余比例条与今日花费,显示在 dsh 侧边栏底部 · DeepSeek balance, remaining-ratio bar and today's spend in the dsh si