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

  1. 5-hour quota bar: Displays the remaining quota progress for the current interval (5-hour window) in real time.
  2. Weekly quota bar: Provides an overview of this week’s quota usage and visually shows the remaining percentage.
  3. Reset countdown: Shows the exact reset time for the window (example: Reset in 2h 17m).
  4. Collapsible panel: Click the panel arrow to collapse/expand it. In the collapsed state, a compact summary is displayed.
  5. Auto-refresh: Data is automatically updated every 60 seconds through server-side caching.
  6. Sidebar integration: Rendered in the sidebar.footer.action area, above the “Settings” button.
  7. 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.

  1. 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
  1. Register the plugin
    Append the following content to ~/.dsh/profiles/web/cordis.patch.yml:
   - insert:
       - id: minimax-usage
         name: '@dsh-external/minimax-usage'
  1. Configure the API key
    The plugin reads MINIMAX_API_KEY from ~/.zshrc.secret when making requests. Make sure the key is exported in this file:
   export MINIMAX_API_KEY='your-minimax-api-key-here'
  1. 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, and weekly_start_time fields returned by the API are Unix millisecond timestamps.
  • Countdown calculation: The API’s remains_time field is unreliable (it may incorrectly return 96 days). The plugin calculates the reset time using end_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_KEY is 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.