[Plugin] dsh-usage-chart —— DeepSeek 用量 / 成本 / 余额仪表盘(每轮成本解释 · 多币种 · 实时汇率) #16
Max-Samson
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[Plugin] dsh-usage-chart —— DeepSeek 用量 / 成本 / 余额仪表盘(每轮成本解释 · 多币种 · 实时汇率)
1. 插件名称与仓库地址
dsh-usage-chart(npm 发布,dsh.bundle.patch→cordis.patch.yml标准 profile bundle)conversation.composer.dock+conversation.chat.assistant-actions槽位)2. 功能简介及与 DeepSeek 的关系
在 DSH Web 输入框下方实时显示 token 用量、成本估算、模型、余额与细上下文压力条;点击展开零依赖 SVG 可视化面板。核心能力(v0.2 + v0.3):
pricing.json> 内置官方刊例价 > 回退估算」解析,面板标注来源与核验日期;未定价模型显式标记,不静默按 0 计;config.currency+config.cnyPerUsd,默认 6.76),选择在浏览器记住;价格说明跟随显示币种并标注所用汇率;/dsh-usage-chart/rate代理拉取最新 USD→CNY 汇率并立即重估;多源回退(配置源 → 内置 FX 源),上次成功汇率持久化,离线刷新保持上次汇率;与 DeepSeek 的关系:token 与上下文数据来自官方 adapter 上报的会话投影(
tokenUsage/contextPressure)与会话事件流(turn/*/request/context/assistant/*);余额来自官方GET /user/balance(经宿主侧代理,API Key 不暴露给浏览器);成本为官方刊例价估算值,非官方账单。非官方项目,无 DeepSeek 背书。3. 安装或使用方式
可选配置(
cordis.patch.yml,v0.3):GitHub(源码构建)与本地目录(开发自测)安装方式见 README。升级后必须重启
dsh web:宿主进程在启动时缓存插件代码(无热重载),新路由只在重启后生效。4. 界面预览
5. 技术要点与路线图
docs/ARCHITECTURE.md(深模块:RoundFold / PricingSource 接缝 / RoundBars / Anomaly);docs/ROADMAP.md记录 v0.2 / v0.3 交付与后续方向(上下文诊断:contextBreakdown组成视图 +compaction/summary压缩时间线 + 上下文增长归因)、v0.4(跨会话概览);npm run verify28 项全绿(折叠 / 价格解析 / 异常判定 / 汇率与币种),scripts/verify-render.mjs对运行中的 DSH Web 端到端验证。6. 相关链接
All reactions