Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” For developers using MiniMax Coding Plan, monitoring API quota consumption is a common need in daily development. This plugin renders MiniMax quota usage directly in the DSH sidebar, providing a real-time progress bar and reset countdown, so developers do not have to manually switch pages or open a web page to check usage.
Plugin Introduction¶
Name: owen-si-zhou/dsh-plugin-minimax-usage
Role: DSH client plugin
Maintainer: owen-si-zhou
Core value: Displays the remaining progress of the 5-hour window and weekly quotas directly in the DSH sidebar.
Core Features¶
- 5-hour quota bar: Displays the remaining quota progress for the current interval (5-hour window) in real time.
- Weekly quota bar: Provides an overview of this week’s quota usage and visually shows the remaining percentage.
- Reset countdown: Shows the exact reset time for the window (example:
Reset in 2h 17m). - Collapsible panel: Click the panel arrow to collapse/expand it. In the collapsed state, a compact summary is displayed.
- Auto-refresh: Data is automatically updated every 60 seconds through server-side caching.
- Sidebar integration: Rendered in the
sidebar.footer.actionarea, above the “Settings” button. - Lightweight: Built with pure React.createElement, with no CSS framework dependencies and no external image assets.
Installation and Enablement¶
The plugin installation directory is ~/.dsh/profiles/web.
- Install the plugin
Go to the plugin directory and install it using a package manager. For example, with pnpm:
cd ~/.dsh/profiles/web
pnpm add /path/to/this/plugin
Or use npm link:
cd ~/.dsh/profiles/web
npm link /path/to/this/plugin
- Register the plugin
Append the following content to~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: minimax-usage
name: '@dsh-external/minimax-usage'
- Configure the API key
The plugin readsMINIMAX_API_KEYfrom~/.zshrc.secretwhen making requests. Make sure the key is exported in this file:
export MINIMAX_API_KEY='your-minimax-api-key-here'
- Restart and refresh
Restart the DSH web service:
dsh web
Force-refresh the page in your browser to load the plugin.
Technical Details and Notes¶
- Timestamp precision: The
end_time,start_time,weekly_end_time, andweekly_start_timefields returned by the API are Unix millisecond timestamps. - Countdown calculation: The API’s
remains_timefield is unreliable (it may incorrectly return 96 days). The plugin calculates the reset time usingend_time - Date.now()to ensure accuracy. - Percentage format: The quota percentage returned by the API is an integer from 0 to 100.
- Fault tolerance: If
MINIMAX_API_KEYis not configured, the plugin displays an error message in the sidebar and does not cause the program to crash.
Use Cases¶
This is suitable for developers who need to frequently check MiniMax quota status, especially those who use DSH as their main development environment and want to integrate quota monitoring into the sidebar to reduce interruptions.
Conclusion¶
This plugin implements lightweight quota monitoring through pure React components and is integrated directly into the DSH sidebar. For more details and source code, please refer to: GitHub.