dsh-plugin-mascot
显示Token缓存、上下文压力与余额的看板娘 用于直观监控账户状态。适合需要随时查看Token消耗、余额和上下文压力的用户。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗Configuration
Add a config block to either form (see Configuration):
- insert:
- id: mascot
name: dsh-plugin-mascot
config:
baseUrl: 'https://api.deepseek.com'
cacheTtlMs: 30000
Usage
| Interaction | Result |
|---|---|
| Click the sprite | Toggle the panel |
| Click either mini portrait in the panel | Switch mascot (choice is stored in localStorage) |
Click the backdrop or press Esc | Close the panel |
| Click "刷新" | Re-read the balance immediately (it also refreshes every 2 minutes while open) |
While open, the pill under the sprite shows the balance. If the lookup fails it reads "点我 Token / 余额" instead of pretending to know.
Configuration
Every field has a default, so the config block is optional.
| Field | Default | Meaning |
|---|---|---|
routePrefix | /dsh-mascot | Path prefix this plugin claims on the host webserver |
baseUrl | https://api.deepseek.com | Provider origin hosting the balance endpoint |
apiKeyRef | DEEPSEEK_API_KEY | Credentials reference name (~/.dsh/.credentials.yaml) |
cacheTtlMs | 60000 | Freshness of one balance answer; failures are never cached |
timeoutMs | 10000 | Upstream request budget |
Behind a proxy or self-hosted gateway, point
baseUrlat it — the only requirement is that it implementsGET /user/balance.