LemCAE/dsh-balance
LemCAE★ 3TypeScriptLast synced: 2026-08-15
一个适用于deepseek-harness的插件,功能是显示当前账户余额以及当前会话预估的费用消耗 | A plugin for deepseek-harness that displays the current account balance and the estimated cost consumption of the current session.
README excerpt
dsh-balance English 中文 A Host + Web Client composition plugin for deepseek-harness ( dsh ): queries the DeepSeek Open Platform account balance and estimates the current session's spend. Installable via dsh plugin add . Features - Balance : queries the official GET https://api.deepseek.com/user/balance using the harness's own DEEPSEEK API KEY credential (the key travels only over a bounded node subprocess's stdin — never in command lines, logs, or UI). - Session spend estimate : folds the provider-reported token usage from the session log (uncached input / cache-hit input / output) and prices each step with the official table (old fixed prices until 2026-08-16 23:59 Beijing time, then peak/off-peak pricing with peak 9:00–12:00 and 14:00–18:00 Beijing time). Estimate only — the official bill is authoritative. - Top-bar chip (session header): 余额 ¥x 会话 ≈¥y , click to refresh; hover (500 ms) shows a detail tooltip below the button , horizontally centered and viewport-clamped. - Settings page (设置 → DeepSeek 余额): balance rows, an auto-refresh on/off switch, refresh-interval selector (15 s … 5 min or custom), UI-language selector ( auto follows the host UI / 中文 / English), and an editable …
View full README on GitHub →