bowenliang123/dsh-context
bowenliang123/dsh-contextDSH 上下文洞察面板:Context 仪表盘 + /context命令 + Context 浏览器,查看 Context的分类组成、内容详情、演进趋势、压缩/注入事件、统计等一站式 Context 全生命周期管理。
DSH 网页 MiniMax 配额悬浮卡:会话输入区显示水滴形 5h 已用百分比,点击展开详情面板,列出每个模型的 5h/周用量与重置倒计时,当前默认模型非 MiniMax 时自动隐藏。
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.
dsh plugin --profile web add github:mtty-ai/mmx-quota-tool
Then restart dsh web once.
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
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.
conversation.input.left),
adjacent to the model selector.< 50% green< 80% yellow≥ 80% redminimax / minimax-cn / minimax-global / MiniMax*
or model prefixes MiniMax- / minimax-.zh (Chinese) — the language the upstream token-plan
model names resolve to most naturally. If the locale service is
unavailable the dock still renders.| 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 refreshReturns { 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.
.
├── 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>
MIT