插件目录 / Knowledge / dsh-client-ui-monitor
dsh-client-ui-monitor
已验证 · 实测可装 Auran-Lu
功能简介
监控会话额度、预估费用及 API 余额
可用 — 实测通过,早期项目
监控会话额度、预估费用及 API 余额 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
@auranlu/dsh-client-ui-monitor
A DeepSeek Harness Web plugin that pins a usage dashboard to the bottom-left of the sidebar.
It shows, live for the current session:
- Token usage — input (with cache read/write), output.
- Estimated cost — computed from DeepSeek's published pricing, displayed in CNY or USD.
- API balance — your DeepSeek account balance, queried via
GET https://api.deepseek.com/user/balance.
Features: Chinese/English toggle, currency selector (CNY/USD), manual balance refresh, auto-refresh every 30s.
Prerequisites
- DeepSeek Harness
webprofile. - A DeepSeek API key configured in Settings → Models (stored as the
DEEPSEEK_API_KEYcredential).
Install
Method 1 — GitHub
dsh plugin --profile web add github:Auran-Lu/dsh-client-ui-monitor
After installing, register the plugin and restart:
Edit ~/.dsh/profiles/web/cordis.patch.yml and add this entry to its top-level array:
- insert:
- id: ui-monitor
name: '@auranlu/dsh-client-ui-monitor'
Then restart the server (dsh web) and expand the left sidebar.
Method 2 — one-sentence install (paste to an LLM agent)
Copy the whole block below to a coding agent that has shell access to the machine:
Install the DeepSeek Harness client plugin from github.com/Auran-Lu/dsh-client-ui-monitor: run
dsh plugin --profile web add github:Auran-Lu/dsh-client-ui-monitor, then append this entry to the top-level array of~/.dsh/profiles/web/cordis.patch.yml:- insert: - id: ui-monitor name: '@auranlu/dsh-client-ui-monitor'Finally restart the
dsh webserver and confirm the dashboard appears at the bottom of the left sidebar.
Configuration
Edit lib/client.js before installing / publishing:
| Constant | Default | Meaning |
|---|---|---|
PRICING.inputPerM |
0.27 |
USD per 1M prompt tokens (cache miss) |
PRICING.cacheReadPerM |
0.07 |
USD per 1M prompt tokens (cache hit) |
PRICING.cacheWritePerM |
0.07 |
USD per 1M prompt tokens (cache write) |
PRICING.outputPerM |
1.10 |
USD per 1M completion tokens |
USD_TO_CNY |
7.2 |
USD → CNY exchange rate |
How it works
- Client half (
lib/client.js) registers a component into thesidebar.footer.actionslot and reads the current session'stokenUsageprojection. - Host half (
lib/index.js) registersGET /api/deepseek-balance, proxying DeepSeek's balance API with the stored key.
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-client-ui-monitor」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Auran-Lu/dsh-client-ui-monitor Headless(CLI)profile:
dsh plugin --profile headless add github:Auran-Lu/dsh-client-ui-monitor 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。
适合谁
跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。
二次开发建议
记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。