godpanzz/dsh-usage

godpanzz★ 0JavaScript最后同步: 2026-08-17

在 GitHub 打开

DSH 插件:统计今日 token 用量与费用(按模型价格与峰谷计费),Web 侧栏面板 + /usage 命令

README 摘要

dsh-usage DSH plugin — today's token usage & cost, priced per model with DeepSeek peak/off-peak (峰谷) billing . Ships a Web sidebar panel (above Settings) plus a /usage command. DSH 插件 — 统计今日(或指定日期)的 token 用量与费用,按 模型价格 与 峰谷计费 (DeepSeek 官方峰谷定价)计算。含 Web 左侧栏「今日费用」面板 (设置按钮上方)与 /usage 命令两种使用方式。 Features / 功能 English - Scans every session log under $DSH HOME/sessions (default /.dsh/sessions , JSONL / zstd compressed) and folds each model call's usage: - input · cache miss ( inputTokens ) - input · cache hit ( cacheReadTokens ) - output ( outputTokens ; reasoning tokens are part of output and are not billed again) - Prices per model and splits billing by peak / off-peak windows (DeepSeek peak/valley pricing effective 2026-08-17): - Peak hours (Beijing time): 09:00–12:00, 14:00–18:00 - Off-peak: all other hours, at half price - Web sidebar panel : registers the usageToday session projection unit, so each session's "today" usage & cost rides session.list / session.history projections to the browser. The client plugin renders a "今日费用" card at the bottom of the sidebar (above the Settings row), aggregated across sessions, auto-refreshing every 20 s (click to refresh). A compact ¥ icon shows wh…

在 GitHub 查看完整 README →
工具/开发deepseekdshdsh-pluginplugintoken-costtoken-usagesidebar

分类