工具与能力
#dsh-plugin
dsh-usage-widget
DSH plugin: 在左侧栏实时查看 DeepSeek 余额与 Kimi Code 用量(5 小时窗口 + 每周配额)。In-sidebar live usage monitor for DeepSeek balance and Kimi Code quota (5-hour window + weekly).
ahui-lab
@ahui-lab
⬇ 2
★ 0
main
安装
dsh plugin --profile web add github:ahui-lab/dsh-usage-widget
需要可复现安装时,可在仓库后追加 #commit 固定提交。
DSH plugin: 在左侧栏实时查看 DeepSeek 余额与 Kimi Code 用量(5 小时窗口 + 每周配额)。In-sidebar live usage monitor for DeepSeek balance and Kimi Code quota (5-hour window + weekly).
该插件未提供要点说明,请参考仓库 README。
dsh-plugin
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/ahui-lab/dsh-usage-widget |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-09-08 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-usage-widget A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) plugin that keeps a compact **usage widget inside the left sidebar** of the Web GUI: - **DeepSeek account balance** — `GET https://api.deepseek.com/user/balance` - **Kimi Code quota** — `GET https://api.kimi.com/coding/v1/usages` (5-hour window + weekly quota) The panel is always visible in the sidebar footer, click to collapse/expand, auto-refreshes every 60 s, and offers a DeepSeek / Kimi toggle. > Community plugin, not an official DeepSeek plugin. ## Install Requires a DSH Web/Desktop profile (the plugin targets the browser client). ```bash # from GitHub (repo ships prebuilt lib/, no build step needed) dsh plugin --profile add github:AHui-Lab/dsh-usage-widget # once published to npm dsh plugin --profile add dsh-usage-widget # if no global dsh CLI npx --yes @deepseek-ai/dsh plugin --profile add github:AHui-Lab/dsh-usage-widget ``` Restart DSH, then look at the bottom of the left sidebar for the "用量" entry. ## How the data flows The browser cannot call `api.kimi.com` directly (its CORS preflight rejects the `Authorization` header), so the plugin keeps two data paths: 1. **Host route** `GET /usage-monitor/deepseek|kimi` (registered on the host webserver) proxies the upstream. It prefers the API key the client sends in the `Authorization` header, otherwise falls back to the DSH credentials service / env. 2. **Browser-direct fallback** (used when the host route is unreachable): fetch the upstream directly with a key the user stored in the panel. Works for DeepSeek (CORS allowed); Kimi is CORS-blocked in this mode. ## API keys Keys are **per-machine** and never ship with the plugin: - **Host route mode**: put `DEEPSEEK_API_KEY` / `KIMI_CODING_API_KEY` in `~/.dsh/.credentials.yaml` or the environment (host reads them). - **Browser-direct fallback**: open the panel → gear icon → paste the DeepSeek API Key and the Kimi Code token. They are kept in the browser's `localStorage` only (key prefix `usage-monitor.key.*`) and sent only to the upstream API. > Note: keys are intentionally **not** distributed with the plugin. Each machine configures its own. ## Layout The widget registers into the `sidebar.footer.action` list slot and renders inline inside the sidebar column (full column width, no floating overlay, no overlap with the chat area). All styles are scoped under `data-plugin="dsh-usage-widget"`. ## Development / publishing notes - Host entry: `lib/index.js` (registers the two `/usage-monitor/*` routes; `inject: ["webServer"]`). - Client bundle: `lib/client.js` (ModuleLoader bundle; only `react` + `@deepseek-ai/dsh-client-ui-primitives` from the baseline). - `lib/` is committed so both GitHub and npm installs need no build step. - Environment overrides: `USAGE_MONITOR_DEEPSEEK_REF`, `USAGE_MONITOR_KIMI_REF`, `USAGE_MONITOR_DEEPSEEK_BASE`, `USAGE_MONITOR_KIMI_BASE`. Verify before releasing: ```bash npm run check npm pack --dry-run --ignore-scripts ``` ## License [MIT](LICENSE)
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。