Introduction¶
The DeepSeek Harness (DSH) web interface does not provide a GitHub Copilot usage panel out of the box. If dsh-oauth-copilot is already installed, the authorization and the models available to your account are saved in your credentials; the Harness often only makes you realize the quota is exhausted when a request triggers a QUOTA or RATE_LIMIT failure. If you want to glance at how much chat, completion, and AI credit remain before starting a daily conversation, you need an extra piece of frontend UI. Below is the community plugin dsh-copilot-quota (maintained by vowa-antilamer), which mounts a real-time badge next to the composer send button and fetches the remaining quota from the Copilot internal API using the same account.
What Is This¶
dsh-copilot-quota is a Web client plugin for DSH (platform: web); the current npm package version is 0.1.0, licensed under MIT. In one sentence: given that a Copilot login grant already exists, it aggregates the current account’s metered quota (buckets such as chat, completion, and AI credit) into a small badge inline with the composer; when there is no Copilot grant it does not render, avoiding display of metered items that do not exist.
Relationship with the Harness’s built-in behavior: dsh-oauth-copilot is responsible for OAuth and grant storage; this plugin only reads credentials, calls the GitHub Copilot internal user API on your behalf, and passes the derived numbers to the browser via a same-origin API. Tokens are never sent to the browser.
Core Features¶
The UI is shown in the README: Copilot 200/200, where the dot on the left indicates “the worst remaining percentage across all metered buckets” — green for normal, amber at ≤40%, red at ≤15%. The number defaults to the chat bucket’s remaining/total; if there is no chat, it falls back to the first metered bucket.
| Interaction | Behavior |
|---|---|
| Hover | Login info, plan and SKU, per-bucket details, quota reset date, last refresh time |
| Click | Force refresh, bypassing the server cache |
| Hidden | Not shown when there is no Copilot grant, or when a bucket is 0 of 0 (e.g., no AI credit pool on the free plan) |
The server caches GitHub responses for 5 minutes by default (configurable); when a refresh fails, the UI keeps the last successful reading. The client mounts into the conversation.input.right slot, polls roughly every 2 minutes, and updates when the window regains focus.
Environment and Dependencies¶
- DeepSeek Harness:
>= 0.1.0-rc.6and< 0.3.0, using the web profile (the README notes it has been verified on0.2.0-rc.2). - Node:
>= 18(seepackage.jsonengines). - Copilot login (completed manually in the terminal, by design):
npx -y dsh-oauth-copilot login
- GitHub scope: only github.com; GitHub Enterprise is not supported, consistent with
dsh-oauth-copilot.
Installation and Activation¶
Install from GitHub (no clone or build required):
dsh plugin --profile web add github:vowa-antilamer/dsh-copilot-quota
Install from a local directory:
dsh plugin --profile web add /path/to/dsh-copilot-quota
The Live profile will reorganize itself (the server routes and client bundle become available); please refresh the browser page to load the client module. If there is still no badge after refreshing, consider restarting dsh web.
Uninstall:
dsh plugin --profile web remove dsh-copilot-quota
Optional Configuration¶
You can set the following in a profile patch or in the config of the plugin row in the GUI:
- id: copilot-quota
config:
cacheMs: 300000 # GitHub response cache duration (milliseconds); 0 disables the cache
Typical Usage and Self-Check¶
- Complete
dsh-oauth-copilot login, and start or keepdsh webrunning. - Add this plugin to the web profile using the command above, then refresh the page.
- Look at the badge on the right side of the conversation input box; click the badge to force a refresh when you need the latest data.
Without opening the GUI, you can probe the API on the local Harness default port (the README example port is 3080):
curl http://127.0.0.1:3080/copilot-quota/api
Implementation Notes (for Troubleshooting)¶
| Half | File | Responsibility |
|---|---|---|
| Server | index.js |
Reads llm-pi-ai/github-copilot via ctx.credentials, requests GitHub, and provides GET /copilot-quota/api |
| Client | client.js |
Uses the conversation.input.right slot; polls and fetches same-origin /copilot-quota/api on focus |
The server request uses the same endpoint as VS Code:
GET https://api.github.com/copilot_internal/user
Authorization: Bearer <token>
It is compatible with quota_snapshots (newer accounts) as well as monthly_quotas + limited_user_quotas (the older form).
Use Cases and Cautions¶
Suitable for: developers who already use Copilot models inside DSH Web, want to see the remaining chat / completion / AI credit before a conversation, and are willing to maintain the grant together with dsh-oauth-copilot.
Limitations and risks (all taken from the upstream README):
copilot_internal/useris a non-public GitHub API; if the response structure changes, errors will appear in the tooltip rather than breaking the whole page UI.- The badge reflects the quota of the currently logged-in account and is independent of the model selected in the composer.
- Scheduled polling + server caching means the numbers lag behind actual usage, with the lag capped at roughly the cache window.
- The plugin runs under the permissions of the current dsh process; please review the source code and LICENSE yourself before installing. The community directory skillhub.cn is an independent ecosystem index with no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
After the steps above, you can continuously see the Copilot quota next to the input area in the Harness Web, instead of being passively notified only when a rate-limit error occurs. For more information, see the directory page dsh-copilot-quota @ skillhub.cn and the repository github.com/vowa-antilamer/dsh-copilot-quota.