chencmb2077-ui/dsh-token-monitor

chencmb2077-ui★ 0JavaScript最后同步: 2026-08-18

在 GitHub 打开

DSH 静态 Host 插件:Web 界面右下角实时监控 token 用量与 DeepSeek 账户余额

README 摘要

dsh-token-monitor Real-time token usage and DeepSeek account balance monitor for the DeepSeek Harness (DSH) web shell — a floating widget pinned to the bottom-right corner of the page. A pure static host plugin : no client bundle, no build step, no Remote/typert surgery. It registers two JSON HTTP routes and injects a small vanilla-JS widget into index.html via tapIndex . Loads automatically with the deployment config and survives restarts. English Features - Token usage (provider-reported) : listens to session/event assistant/message events (durable, deduplicated TokenUsage ), accumulated per session plus a global total. llm/stream provides live in-flight call visibility and the active session; tokenMeter.measure() estimates current context pressure. - Balance : resolves DEEPSEEK API KEY through the credentials seam and queries https://api.deepseek.com/user/balance via a node subprocess (OpenSSL TLS, works under the sandbox). 60s cache + manual refresh. The API key never leaves the machine and never reaches the browser. - Widget : fixed bottom-right card; polls usage every 2.5s and balance every 60s; collapsible to a compact pill; uses theme CSS variables ( --dsw-alias- ) so it ad…

在 GitHub 查看完整 README →
工具/开发deepseekdeepseek-harnessdsh-pluginmonitoringtoken-monitor

分类