dsh-ECNU-quota: View East China Normal University Open API Quota in the DSH Interface

Preface

When using the ecnuchat route in DeepSeek Harness (DSH) to call the East China Normal University (ECNU) Open API (chat.ecnu.edu.cn), the quota operates on a weekly window with a cap. The common practice is to open a separate browser tab to log into the Usage Console, or to manually curl the quota interface in the terminal—both of which are separate from the main interface used for coding and adjusting models. The community plugin dsh-ecnu-quota (Maintainer: Taulee, Category: Client) solves this by turning the quota into a persistent card at the bottom of the DSH web interface sidebar. Clicking it reveals the details. It is a read-only display that does not consume quota or upload any data.

What is this

dsh-ecnu-quota is a Web client plugin for DSH (current package version 0.1.2, MIT License). The host side provides a same-origin read-only route that sends GET requests to the official quota interface using the locally configured ECNU Open API key; the browser side renders the sidebar card and details panel. The full key only travels between the DSH host process and ECNU; the panel displays at most the last 4 digits of the key and its source hierarchy.

Directory Page: skillhub.cn/plugins/Taulee/dsh-ecnu-quota. Source Code & Issue Feedback: github.com/Taulee/dsh-ecnu-quota.

Core Features

When the sidebar is expanded, there is a “Weekly Quota” summary row at the bottom: remaining amount, total amount, remaining percentage, and a progress bar. When the remainder is below 20%, the progress bar changes to a warning color; when the remainder is 0, a thin bar remains to avoid a completely blank visual state.

When the sidebar is collapsed, the card collapses into a ring button. The lit proportion of the ring corresponds to the remaining quota. Hovering over it shows the same summary row as in the expanded view (including update time), and clicking it opens the details panel.

Quota Details Panel

Clicking the card enters the panel, which includes the following from top to bottom:

  • Remaining credits (Remaining / Total)
  • Percentage of the total quota for this cycle
  • Percentage used in this cycle and the progress bar
  • Countdown to reset (less than one day will be shown in hours and minutes)
  • Small text information such as key source, refresh status, cache hints, etc.

The top right corner provides a “Usage Console” link (opens the ECNU console in a new tab), “Updated at” time, “Refresh” button, and close button. The interface language follows DSH, providing both Simplified Chinese and English text.

Refresh and Cache

The client fetches data automatically every 5 minutes; when the window regains focus, if the data is older than 1 minute, it updates as well. The panel’s “Refresh” button skips the cache and sends an immediate request. The host side caches upstream results for 15 seconds by default (cacheMs) to reduce duplicate upstream calls when multiple tabs are open; the “Cache” indicator on the panel means the current display may come from the cache and is not a real-time value.

Error Prompts

In cases such as key not configured, 401/403, 429 rate limiting, timeout, network unavailable, upstream 5xx, unparseable response, credential read failure, or valid key but no quota window, the card or panel will provide specific text responses rather than empty placeholders.

Installation and Activation

Requires DSH Desktop, terminal, and an ECNU Open API key shared with the ecnuchat route (Environment variable name: ECNUCHAT_API_KEY). The plugin runs with the current DSH process permissions. Please review the source code and the MIT License on GitHub before installing.

  1. Run the installation command in the terminal (installs to the desktop profile by default):
dsh plugin --profile desktop add github:Taulee/dsh-ecnu-quota

The command writes the package to ~/.dsh/profiles/desktop and registers dsh-ecnu-quota in the profile’s bundles. If the target is not the desktop version, change --profile to web or tui.

  1. Completely exit and restart DeepSeek Harness. A cold start is required after modifying bundles; simply refreshing the page will not load the new plugin.

  2. After restarting, if the ECNU Chat quota card appears at the bottom of the sidebar, the installation is successful. If there is no card at all, and accessing /plugins/dsh-ecnu-quota/quota returns 404, please verify that dependencies in package.json and bundles contain dsh-ecnu-quota, that node_modules/dsh-ecnu-quota exists and is not a broken link, and confirm that a full restart has occurred.

Key Configuration

The plugin reads ECNUCHAT_API_KEY in order and uses the first one found:

  1. Environment variable ECNUCHAT_API_KEY when starting DSH
  2. DSH Credential Store (the panel’s “Key Source” indicates the actual hierarchy)
  3. .env in the project directory
  4. .env in the DSH home directory

Keys are generated in the Usage Console. If not configured, the card displays “ECNU Key Not Configured”; after configuration, click “Refresh” or wait for the automatic refresh to recover.

Note: This plugin only recognizes ECNUCHAT_API_KEY; chatecnu / CHATECNU_API_KEY belong to a different set of credentials and are out of scope.

Typical Usage

No additional commands are needed for daily development: after configuring the key and installing the plugin, you can glance at the remaining weekly quota in the DSH web interface sidebar. Click the panel to check the reset time or source when necessary. To immediately align with console data, click “Refresh” on the panel. To change the key or quota strategy, use the “Usage Console” link on the panel to jump to the official site.

The upstream usually currently returns only a single fixed_168h weekly window with no resource pack list, so the interface is presented as a single window; if the upstream returns multiple windows in the future, the card will list them row by row.

Optional Configuration

Default values are generally sufficient. If adjustments are needed, add config to the ecnu-quota entry in the corresponding profile’s cordis.patch.yml (all fields are optional):

- id: ecnu-quota
  config:
    apiKeyEnv: ECNUCHAT_API_KEY
    quotaUrl: https://chat.ecnu.edu.cn/open/api/v1/quota
    consoleUrl: https://aiconsole.ecnu.edu.cn
    providerLabel: ECNU Chat
    route: /plugins/dsh-ecnu-quota/quota
    cacheMs: 15000
    timeoutMs: 15000

The client’s 5-minute refresh interval is fixed behavior and is not affected by cacheMs. Refreshing the page is sufficient after changing the frontend logic under lib/; changing the bundle or host-side logic still requires restarting DSH.

Scenarios and Notes

Who it is for: Users who have already configured ECNU Chat (ecnuchat) in DSH and wish to view weekly quotas read-only within the local development interface, reducing the need to repeatedly open the console or write manual requests.

Operation and Security: Requests are made by the DSH host directly to quotaUrl, and the browser only reads same-origin routes; the plugin does not sign in, claim, or consume quota. Display results are for reference only; the official Usage Console prevails.

Ecosystem Note: DSH adopts an “everything is a plugin” extension method; community directory sites have no official affiliation with DeepSeek / High-Flyer. This plugin is a community implementation and is not associated with East China Normal University, Qoder, or DeepSeek officials; the plugin may require updates to follow changes in quota interface strategies.

The interface layout aligns with the card and panel design of the community plugin dsh-qoder-connect and has no relation to Qoder officials.

Conclusion

dsh-ecnu-quota embeds the weekly quota of the chat.ecnu.edu.cn Open API into the DSH sidebar: persistent card, details panel, timed and focus refresh, and readable prompts for common errors. See above for installation commands; for more screenshots and troubleshooting tables, see the GitHub README.

  • Directory Page: https://www.skillhub.cn/plugins/Taulee/dsh-ecnu-quota
  • Repository: https://github.com/Taulee/dsh-ecnu-quota
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye