Taulee/dsh-ecnu-quota ↗★ 0

dsh-ecnu-quota

ECNU (chat.ecnu.edu.cn) quota display for the DSH web GUI: a read-only host route that proxies the ECNU quota API, plus a sidebar card and a detail panel. 适合使用ECNU Chat并需要实时监控API额度的用户。

Package
dsh-ecnu-quota
Compatibility
Unverified
Version
0.1.2
License
MIT
Last updated
Oct 13, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Taulee/dsh-ecnu-quota

配置

默认值一般不用改。需要改就在 profile 的 cordis.patch.yml 里给 ecnu-quota 那一行加 config,全部可省略:

- 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                               # 上游请求超时
配置项默认值说明
apiKeyEnvECNUCHAT_API_KEY读取哪一条凭据。必须是合法的环境变量名(字母或下划线开头)。
quotaUrlhttps://chat.ecnu.edu.cn/open/api/v1/quota额度接口地址。
consoleUrlhttps://aiconsole.ecnu.edu.cn控制台链接;上游响应里带 ops_console_url 时以响应为准。
providerLabelECNU Chat界面上的显示名,只影响观感。
route/plugins/dsh-ecnu-quota/quota浏览器读取额度用的同源路由,以 / 开头。
cacheMs15000缓存时长。多开标签页时靠它避免重复请求上游。
timeoutMs15000单次上游请求的截止时间。

客户端每 5 分钟刷新一次是固定值,不受 cacheMs 影响。