dsh-plugin-api-quota
Manifest valid★ 1DSH Web UI plugin: check your DeepSeek API key balance/quota (GET /user/balance) from the sidebar, with a GUI panel showing total/granted/topped-up balance.
dsh-plugin-api-quota
DSH Web UI plugin — check your DeepSeek API key balance from the sidebar.
What It Does
Adds an API Quota entry to the Web sidebar footer (next to Settings). Clicking it opens a panel that queries the DeepSeek official balance endpoint (GET /user/balance) and shows:
- Total balance, granted balance, topped-up balance
- Currency and availability
- Query time, with a refresh button
The API key never crosses into the browser: the browser half fetches a same-origin route (/api-quota/balance) served by the plugin's host half, which resolves the key through the credential seam (ctx.credentials) and talks to DeepSeek server-side.
How It Works
| Half | Responsibility |
|---|---|
Host (src/index.ts) | Registers GET /api-quota/balance on the web server; resolves DEEPSEEK_API_KEY via ctx.credentials, calls https://api.deepseek.com/user/balance |
Browser (src/client/) | Registers the sidebar.footer.action slot entry; fetches the route and renders the balance panel (Modal) |
The credential reference and endpoint are configurable via the plugin config (apiKeyEnv, baseURL, balancePath), defaulting to DEEPSEEK_API_KEY / https://api.deepseek.com / /user/balance.
Quick Start
DSH plugins install into a profile (dsh web → web profile). Install, restart dsh web, done.
# from the plugin repo root
npm install && npm run build
# register in the profile patch layer (~/.dsh/profiles/web/cordis.patch.yml):
# - insert:
# - id: plugin-api-quota
# name: dsh-plugin-api-quota
# symlink into the profile's node_modules:
# ln -s "$PWD" ~/.dsh/profiles/web/node_modules/dsh-plugin-api-quota
Configuration
| Field | Default | Meaning |
|---|---|---|
apiKeyEnv | DEEPSEEK_API_KEY | Credential reference (environment-variable-shaped) holding the API key |
baseURL | https://api.deepseek.com | DeepSeek API base URL |
balancePath | /user/balance | Balance endpoint path appended to baseURL |
License
MIT
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Comments
Loading…
From the same category
by omdsh-dev
开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,
★ 3.7k
↓ 49.5k/wk
MIT
TypeScript
Sep 22, 2026
dsh plugin --profile web add dsh-better-sidebarby ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol
★ 3.2k
↓ 6.2k/wk
MIT
TypeScript
Sep 22, 2026
dsh plugin --profile web add @deepseek-harness-tui/dsh-tuiby MeteorNOX
DeepSeek Harness(DSH)一只住在 DSH 界面右下角的小鲸鱼娘,帮你盯着DeepSeek账户余额。QQ弹弹,支持拖拽吸附、左吸附翻转、数字滚动动画,随界面自动启用,建议直接喊来你的dsh安装
★ 3k
↓ 19.1k/wk
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add dsh-whale-widgetby Devin-AXIS
DeepSeek Harness 可编辑设计系统:AI 生成、可视化编辑、模板市场与 PPT|Native Design & PPT Studio for DeepSeek Harness.
★ 1.5k
↓ 440/wk
NOASSERTION
JavaScript
Sep 4, 2026
dsh plugin --profile web add deepseek-idesignby omdsh-dev
GenUI for DeepSeek Harness: interactive UI components rendered inline in assistant replies via the dsh-ui fence — layout, charts, plots, forms, quizzes, mermaid, 3D scenes, and an action event loop ba
★ 474
↓ 5.1k/wk
MIT
TypeScript
Sep 22, 2026
dsh plugin --profile web add @changfenhuang/dsh-genuiby chenxiachan
Your thinking deserves a map: an infinite canvas where LLM conversations grow into an editable thought graph. Wires are the context.
★ 472
MIT
TypeScript
Sep 21, 2026