dsh-usage-cost
在 DSH 自带「用量」弹窗里,把每个 token 环节折算成金额显示在 token 数字右边(DeepSeek 官方价目表 + 峰谷价,口径与小鲸鱼挂件 dsh-whale-widget 同源) 适合使用DeepSeek官方API,需要精确掌握每轮对话具体花费(分/厘)的用户。
同名パッケージの別リポジトリ
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:O789Real/dsh-usage-costドキュメント
README 全文を読む ↗dsh-usage-cost
在 DSH 自带「用量」弹窗里,把每一行 token 折算成金额,显示在 token 数字的右边,并在末尾追加一行合计。
Show the money next to the tokens in DSH's built-in usage dialogs. Prices follow DeepSeek's official CNY price list and its peak/off-peak schedule, decided by when that turn actually ran — not by when you open the dialog.
本轮用量 888,131 tok
─────────────────────────────────────────────────────────────
提供方 / 模型 deepseek-account/deepseek-flash
缓存命中 99.97%
未缓存输入 296 tok ¥0.000592
缓存读取 886,912 tok ¥0.0355
缓存写入 0 tok ¥0.00
输出 923 tok ¥0.007384
本轮费用 ¥0.0435(高峰价)
金额按这一轮发生的那一刻的峰谷价算,不是按你查看的那一刻 —— 高峰跑的轮次,晚上再点开看仍是高峰价。
- 覆盖两个用量弹窗:每条回答下面那颗「用量 xx」胶囊(本轮用量)、以及输入框下方那颗会话级胶囊(Token 用量)。
- 所有会话自动生效——它是全局界面插件,不需要逐会话开启,也没有任何按钮要按。
- 金额口径与右下角小鲸鱼挂件
dsh-whale-widget完全同源(DeepSeek 官方价目表 + 峰谷价),两处数字能对上。 - 在 DSH
0.2.0-rc.2(桌面端 / Web)上开发与验证;只用 Node 内置模块,无运行时依赖。
一、安装 / 更新 / 卸载
给使用者:一行命令(推荐)
dsh plugin --profile desktop add dsh-usage-cost
--profile 换成你自己的 profile 名(桌面端一般是 desktop,纯 Web 部署常见 web)。
也可以直接在 DSH 的 设置 → 插件 里安装。
本地开发时用 link: 指向源码目录:
dsh plugin --profile desktop add link:/绝对路径/dsh-usage-cost
维护者:发包到 npm 的完整步骤见文末「发布到 npm」。
不装 CLI / 想手工控制:用脚本
### 给使用者:一行命令(推荐)
```bash
dsh plugin --profile desktop add dsh-usage-cost
--profile 换成你自己的 profile 名(桌面端一般是 desktop,纯 Web 部署常见 web)。
也可以直接在 DSH 的 设置 → 插件 里安装。
本地开发时用 link: 指向源码目录:
dsh plugin --profile desktop add link:/绝对路径/dsh-usage-cost
维护者:发包到 npm 的完整步骤见文末「发布到 npm」。