O789Real/dsh-usage-cost ↗★ 1

dsh-usage-cost

在用量弹窗中将Token折算为DeepSeek官方消费金额 适合使用DeepSeek官方API,需要精确掌握每轮对话具体花费(分/厘)的用户。

包名
dsh-usage-cost
兼容性
待验证
版本
0.2.0
许可证
MIT
最近更新
2026年10月8日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:O789Real/dsh-usage-cost

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」。