返回插件市场

dsh-client-ui-monitor

监控与用量

Auran-Lu/dsh-client-ui-monitor

Web 插件,在侧边栏固定使用量仪表盘,显示当前会话的 Token 用量、预估费用和 API 余额。

  • dsh-plugin
  • dsh-plugin-market
  • dsh-plugins
GitHub Stars
3GitHub
浏览量
0DSH Plugin Hub
Forks
0GitHub
开放问题
0GitHub Issues
Manifest 版本
0.1.0@auranlu/dsh-client-ui-monitor
最近推送
2026年8月14日GitHub
许可证
NOASSERTIONJavaScript
插件类型
Client运行于 Web Client

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 web profile.
  • A DeepSeek API key configured in Settings → Models (stored as the DEEPSEEK_API_KEY credential).

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 web server and confirm the dashboard appears at the bottom of the left sidebar.

Configuration

Edit lib/client.js before installing / publishing:

ConstantDefaultMeaning
PRICING.inputPerM0.27USD per 1M prompt tokens (cache miss)
PRICING.cacheReadPerM0.07USD per 1M prompt tokens (cache hit)
PRICING.cacheWritePerM0.07USD per 1M prompt tokens (cache write)
PRICING.outputPerM1.10USD per 1M completion tokens
USD_TO_CNY7.2USD → CNY exchange rate

How it works

  • Client half (lib/client.js) registers a component into the sidebar.footer.action slot and reads the current session's tokenUsage projection.
  • Host half (lib/index.js) registers GET /api/deepseek-balance, proxying DeepSeek's balance API with the stored key.

License

MIT

评论

0
最新优先