Introduction¶
When using DeepSeek Harness (DSH) with MiniMax Coding Plan, checking the remaining quota requires switching to the MiniMax platform backend to see when the 5-hour window resets and how much usage has been logged for the week; none of this information is visible in the interface in front of you. Switching back and forth while coding is very disruptive.
The philosophy of DSH is “Everything is a plugin,” and the client UI is no exception. The dsh-plugin-minimax-usage introduced below is a client-side plugin: it renders progress bars for the 5-hour quota and weekly quota, along with reset countdowns, directly in the sidebar of the DSH web interface, refreshing automatically every 60 seconds.
What is this¶
dsh-plugin-minimax-usage is maintained by ovensi, under the MIT License. The npm package name is @dsh-external/minimax-usage, the current version is 0.1.0, and it requires Node.js >= 18.0.0.
It solves one problem: viewing the MiniMax Coding Plan quota usage without leaving the DSH web interface.
The implementation is split into two sides:
- Host side (
lib/index.js): Registers a/api/minimax/quotainterface, readsMINIMAX_API_KEY, and calls the MiniMax REST API. The results are cached on the server for 60 seconds. - Client side (
lib/client.js): Renders the quota panel in thesidebar.footer.actionslot, located above the Settings button, and fetches data viafetch('/api/minimax/quota').
Core Features¶
Implemented capabilities:
- 5-Hour Quota Bar: Real-time display of the remaining quota progress for the current 5-hour cycle.
- Weekly Quota Bar: Overview of weekly quota usage.
- Reset Countdown: Shows countdowns for each window reset, e.g., “Resets in 2h 17m”.
- Collapsible Panel: Click the arrow to collapse/expand; the collapsed state displays a compact summary.
- Auto Refresh: Automatically refreshes every 60 seconds via server-side cache.
- Sidebar Integration: Renders in the
sidebar.footer.actionslot, above the Settings button. - Lightweight: Pure
React.createElementimplementation, no CSS framework, no external images.
Panel effect schematic in README (numbers are examples):
┌──────────────────────────────┐
│ ▼ MINIMAX │
│ 5 小时 42 / 100 (42%) │
│ ████████████░░░░░░░░░░░░░░ │
│ 重置于 2h 17m │
│ 本周 78 / 100 (78%) │
│ ████████████████████████░░ │
│ 重置于 3d 12h │
└──────────────────────────────┘
↕ click to toggle
┌──────────────────────────────┐
│ ▶ MINIMAX 5h: 42% · 周: 78%│
└──────────────────────────────┘
Installation and Activation¶
First install the package, then register the plugin, and finally configure the API key.
- Go to the web profile directory to install. Local path installation (Quick Install) is recommended to avoid dependency on the npm registry:
cd ~/.dsh/profiles/web
npm link /path/to/this/plugin
Or:
cd ~/.dsh/profiles/web
pnpm add /path/to/this/plugin
The npm package name is @dsh-external/minimax-usage. The registry installation method in the README (pnpm add @dsh-external/minimax-usage) is marked (when published). Please confirm that the package is actually published before using it; local path installation has no prerequisites.
- Append the registration entry at the end of
~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: minimax-usage
name: '@dsh-external/minimax-usage'
- Export the API key in the shell key file (e.g.,
~/.zshrc.secret). The key comes from the MiniMax Open Platform (https://www.minimaxi.com/):
export MINIMAX_API_KEY="your-minimax-api-key-here"
The plugin reads this variable from ~/.zshrc.secret via source when making requests.
- Restart the DSH web server, then force refresh the browser (Cmd+Shift+R / Ctrl+Shift+R):
dsh web
After the steps above, the MINIMAX quota panel will appear at the bottom of the sidebar, above the Settings button.
Implementation Details of Reset Countdown¶
There is a notable pitfall here: The remains_time / weekly_remains_time fields returned by the MiniMax API are unreliable; the 5-hour window might return about 96 days. The plugin does not use these two fields but calculates the reset countdown using end_time - Date.now().
Several other behaviors related to data:
end_time,start_time,weekly_end_time,weekly_start_timeare processed as Unix millisecond timestamps, although the field names do not explicitly indicate this.- Quota percentage is returned by the API as an integer 0–100.
- If
MINIMAX_API_KEYis not set, the plugin will display an error message in the sidebar instead of crashing.
The refresh frequency is once every 60 seconds (server-side cache); the panel numbers will not change second-by-second, which is expected behavior.
Applicable Scenarios and Notes¶
Suitable for two types of scenarios:
- Using MiniMax Coding Plan as a common model source for DSH, needing to keep track of the 5-hour window and weekly quota during long sessions.
- Not wanting to frequently switch to the platform backend to check usage, hoping to see progress bars and reset times at a glance in the sidebar.
Notes before use:
- The plugin runs with the permissions of the current dsh process; the host side will hold your
MINIMAX_API_KEYand call the MiniMax REST API externally. It is recommended to read the source code to confirm data flow and check the license (this project is MIT) before installing. - The reset countdown is calculated based on
end_time, relying on the timestamp fields returned by the MiniMax API. If upstream field behavior changes, follow subsequent updates in the plugin repository.
Conclusion¶
What this plugin does is simple: changing quota inquiry from “switching to the backend” to “glancing at the sidebar”. For MiniMax Coding Plan users, it is a small but practical supplement.
- Plugin directory page: https://www.skillhub.cn/plugins/ovensi/dsh-plugin-minimax-usage
- GitHub repository: https://github.com/ovensi/dsh-plugin-minimax-usage
It should be noted that skillhub.cn is a community-maintained plugin directory, an independent site, with no official affiliation with DeepSeek or Huanshan (Fangfang).