zq0929/dsh-coding-plan-balance ↗★ 0
dsh-coding-plan-balance
Coding Plan额度与使用窗口显示工具 适合需要实时监控Coding Plan额度及5小时滚动窗口用量的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zq0929/dsh-coding-plan-balance说明文档
阅读完整 README ↗配置
在你自己 profile 的 cordis.patch.yml 里按行 id 覆盖(profile 层在 bundle 层之后应用):
- id: coding-plan-balance
config:
apiKeyEnv: MY_CTRIP_KEY
refreshSeconds: 120
| 字段 | 默认 | 说明 |
|---|---|---|
baseUrl | https://ada-cli-go.ctripcorp.com | Coding Plan API 主域名 |
fallbackBaseUrl | http://ada-cli-golang.ctripcorp.com | 主域名不可达时回退;留空关闭回退 |
apiKeyEnv | CTRIP_API_KEY | 凭据名 |
apiKey | 空 | 显式密钥,优先于 apiKeyEnv |
refreshSeconds | 60 | 页面轮询间隔,小于 20 按 20 处理 |
cacheSeconds | 10 | Host 端快照复用窗口:不带 refresh 的读取在此窗口内复用同一份快照;并发读取一律合并成一次上游请求 |
timeoutMs | 8000 | 单次上游请求超时 |
routePath | /api/coding-plan.balance | 页面读取额度用的 Host 路由(必须以 /api/ 开头) |
tool | true | 是否注册 coding_plan_balance 工具 |
Configuration
Override the row by id in your profile's cordis.patch.yml:
- id: coding-plan-balance
config:
apiKeyEnv: MY_CTRIP_KEY
refreshSeconds: 120
| Field | Default | Meaning |
|---|---|---|
baseUrl | https://ada-cli-go.ctripcorp.com | Primary Coding Plan API origin |
fallbackBaseUrl | http://ada-cli-golang.ctripcorp.com | Tried once when the primary is unreachable; empty disables it |
apiKeyEnv | CTRIP_API_KEY | Credential name |
apiKey | empty | Explicit key, takes priority over apiKeyEnv |
refreshSeconds | 60 | Page poll interval (minimum 20) |
cacheSeconds | 10 | Host-side reuse window: reads without refresh share one snapshot inside it, and concurrent reads always collapse into one upstream request |
timeoutMs | 8000 | Upstream request timeout |
routePath | /api/coding-plan.balance | Host route the page reads (must start with /api/) |
tool | true | Register the coding_plan_balance tool |