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
- 0
- mo. downloads
- –
- Last push
- 2026-08-16
- 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
dsh-usage-stats
Make0209/dsh-usage-stats
GitHub-style usage heatmap dashboard: per-workspace turn counts and token spend (with cache-hit rate), DeepSeek account balance, and workspace aliases.
dsh-balance-meter
Ghost011118/dsh-balance-meter
DeepSeek account balance and session cost in the composer dock, with auto-fetched official pricing and peak/off-peak support.
dsh-usage-billing
940842546/dsh-usage-billing
Usage and cost statistics with peak/off-peak pricing after the 2026-08-17 rate change, a floating summary panel, per-session breakdowns, and a day/week/month/year/all usage heatmap.
dsh-usage-stats
Ychris12138/dsh-usage-stats
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.