dsh-session-cost
Session cost estimate in a status bar at the bottom of the conversation (per-model token pricing, CNY) plus the live DeepSeek account balance via the official balance API.
对话底部的会话费用状态栏:按模型逐条计价估算 Token 费用(CNY),并实时显示 DeepSeek 账户余额(官方余额接口)。
How to install
dsh plugin add @kidli1412/dsh-session-cost About
dsh-session-cost DSH(DeepSeek Harness)Web 插件:在**对话底部状态栏**(输入框下方、自带统计行之下)显示**本次会话的 Token 费用估算**与 **DeepSeek API 余额**。 费用估算:服务端按**模型逐条计价**——从会话事件日志折叠出每个模型的输入/输出/缓存命中 token(语义与 dsh-token-meter 的 tokenUsage 投影一致),再按 CNY 单价表(lib/cost.js)计算费用,混合多模型的会话也精确。 余额查询:复用官方余额接口 GET {baseURL}/user/balance(参考插件 dsh-usage-stats 的余额方案),凭据经 DSH 的 credentials 缝解析,2 分钟内存缓存 + 单飞防抖;?refresh=1 可强制绕过缓存(状态栏的 ⟳ 手动刷新即用此参数)。 状态栏每 30 秒刷新费用、每 5 分钟刷新余额;token 用量变化后自动触发费用刷新;悬停显示分模型明细与余额构成(充值/赠送),⟳ 按钮手动刷新(强制查询上游,成功后短暂显示"已更新 HH:MM")。 界面 两种显示方式可在 **设置 → 插件 → 插件配置 → 会话费用显示** 中切换(localStorage 持久化,即时生效): **显示方式**:独立状态栏(默认)/ 并入统计栏。 **…
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 3
- mo. downloads
- 1.8K
- Last push
- 2026-09-14
- Created
- 2026-08-16
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- balance, deepseek-harness, dsh-plugin, token-usage
Related plugins
TokenLedger
zh667/TokenLedger
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
dsh-context
bowenliang123/dsh-context
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
dsh-usage-statistics-panel
HaoyueQin/dsh-usage-statistics-panel
Usage statistics settings panel: 26-week activity heatmap, daily token trend with a cache hit-rate curve, per-model donut and breakdown, time-range filters, summary cards, one-time historical backfill and lossless rebuild.
dsh-all-usage
ParticleLight/dsh-all-usage
Analyze usage across models, providers, workspaces, and time ranges — including custom start/end dates over the full retained history — with live cache-hit visibility and separate model and provider breakdowns. Includes hourly single-day trends, daily cross-day trends, a 53-week GitHub-style heatmap, usage streaks, model and workspace Token-share donut charts with Token, cost, and percentage details, independent combinable filters, cache-efficiency trends, DeepSeek account balance, workspace aliases, CSV export, and a durable ledger that preserves successfully flushed usage after session deletion — and after a workspace is deleted, where its recorded usage is summed into one Deleted row — and rebuilds incrementally — on restart, unchanged sessions are applied from the ledger without re-reading their logs (a per-session log revision is the change signal), and only changed/new events are folded. The workspace registry is kept fresh automatically through the DSH domain/changed probe: only added/removed workspaces are reprocessed incrementally, unchanged workspaces reuse their computed aggregates and ledger with zero rescan, and usage is strictly limited to DSH-registered workspaces (unregistered cwds are ignored). After a scan, lightweight revision status fetches full history only when the Host/data state changes and exposes non-sensitive sync health (revision reuse, rereads, ledger recovery, and failures). Token accounting is explicit: input is fresh (cache read/write and reasoning are separate buckets) and zero-usage replays never overwrite recorded usage. Chinese uses local time, English uses UTC; API access is loopback-only.