DSH 网页 MiniMax 配额悬浮卡:会话输入区显示水滴形 5h 已用百分比,点击展开详情面板,列出每个模型的 5h/周用量与重置倒计时,当前默认模型非 MiniMax 时自动隐藏。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:mtty-ai/mmx-quota-tool
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
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
链接
同类插件
zhu1090093659/dsh-web-ui#packages/dsh-web-ui-all★ 2842
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
omdsh-dev/DSH-better-sidebar★ 1343
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
ccch1mneyyy/dsh-TUI★ 1323
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
omdsh-dev/dsh-at-file★ 228
Codex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
huiliyi37/dsh-tianshu-tui★ 175
DeepSeek Harness 的终端 UI(TUI)。
Nagi-ovo/dsh-visualize★ 126
对话内生成式 UI:模型把交互式 HTML 卡片直接画进会话流,带流式预览与沙箱渲染。