Preface

During agent development, managing quotas across multiple platforms is a common pain point. Frequently switching to OpenCode Go, Volcano Engine, or the official DeepSeek platform to check balances interrupts the workflow. DeepSeek Harness (DSH) provides plugin-based extension capabilities, and this plugin aims to solve the above problem by offering a persistent quota overview through a Web interface.

What Is It

dsh-usage-dash is a DSH Web plugin authored by yanzoro926. It displays the remaining percentage of each Coding Plan at the bottom of the DSH sidebar, helping developers quickly understand resource consumption. The plugin supports OpenCode Go, Volcano Engine CodingPlan, the official DeepSeek balance, and custom plans.

Core Features

  1. Persistent Sidebar Badge: Shows a persistent badge at the bottom of the sidebar, displaying the remaining percentage of each plan in a two-line group. When the sidebar is collapsed, it displays the remaining amount for the tightest window.
  2. Detail Popup: Clicking the badge causes a detail card to float above, showing progress bars and reset countdown.
  3. Warning Mechanism: Displays red when remaining quota ≤10%, and orange when ≤40%.
  4. Auto Refresh: Automatically refreshes data every 60 seconds.
  5. Peak/Off-Peak Status: Displays the official DeepSeek peak/off-peak status (green dot during off-peak, orange dot during peak). Peak hours are Beijing Time 09:00-12:00 and 14:00-18:00.
  6. Multi-Source Support: Supports OpenCode Go, Volcano Engine CodingPlan, the official DeepSeek API, and custom plans.

Installation and Enablement

Before installation, ensure that DeepSeek Harness CLI (dsh) is installed.

# 1. 安装插件
dsh plugin --profile web add dsh-usage-dash

# 2. 重启 DSH Web
#    在运行 dsh web 的终端按 Ctrl+C 停止,重新执行 dsh web
# 3. 浏览器硬刷新 (Ctrl+Shift+R)

Configuration and Usage

OpenCode Go

No additional configuration is required. The plugin automatically reads the Go key in ~/.local/share/opencode/auth.json for calls. If needed, you can override it by filling it in manually under settings.

Volcano Engine

We recommend using the Volcano Engine CLI for authentication:

npm i -g @volcengine/cli
ve login
arkcli auth login

The fallback is to use arkcli auth login volc-sso.

Official DeepSeek API

Enter the DeepSeek API Key in DSH settings (you can create it at platform.deepseek.com/api_keys).

Custom Plans

Add them in Settings → Quota Display → Custom Plans. The plugin automatically recognizes one of the following two JSON formats:

  • Format A (OpenCode style):
    {
      "usage": {
        "rolling": { "percent": 4, "resetsAt": "..." },
        "weekly":  { "percent": 3, "resetsAt": "..." },
        "monthly": { "percent": 1, "resetsAt": "..." }
      }
    }
  • Format B (flat list):
    {
      "windows": [
        { "label": "5h", "percent": 20, "resetAt": "..." },
        { "label": "weekly", "percent": 40, "resetAt": "..." }
      ]
    }

Security and Limitations

  • Local Execution: The plugin only accepts loopback Host (127.0.0.1 / localhost / [::1]) requests and validates based on same-origin browser markers to prevent cross-site attacks (DNS rebinding protection).
  • Data Security: All Tokens are stored only in the local user directory (0600 permissions), and the data fully belongs to the user themselves.

Summary

Through a persistent sidebar badge and detail card, dsh-usage-dash provides DSH Web users with an intuitive quota management entry point. Combined with the official DeepSeek peak/off-peak status display, it helps developers quickly grasp resource consumption and top-up status without leaving the current interface.