dsh-cost-meter 1.9.20 → 1.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/update-notes-1.9.21.md +15 -0
- package/docs/update-notes-1.9.22.md +23 -0
- package/lib/client.display.js +3 -2
- package/lib/client.js +1 -1
- package/lib/client.statistics.js +8 -8
- package/lib/index.js +6 -0
- package/lib/plan-billing.js +9 -6
- package/lib/store.js +8 -3
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Session cost tracking plugin for the DeepSeek Harness web GUI (bilingual UI)**
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.22** fixes WorkBuddy international billing classification and historical API totals, and honors explicit custom-provider classifications.
|
|
20
20
|
|
|
21
21
|
**Host floor: DSH 0.2.0** · Adaptation target: **0.2.1-rc.2** (npm `next`). Expand the compatibility notes below for exact declarations, host records and troubleshooting.
|
|
22
22
|
|
|
23
|
-
Release notes: [v1.9.
|
|
23
|
+
Release notes: [v1.9.22](docs/update-notes-1.9.22.md#english). Fully restart DSH after updating.
|
|
24
24
|
|
|
25
25
|

|
|
26
26
|
|
|
@@ -352,22 +352,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
|
|
|
352
352
|
dsh plugin --profile web add dsh-cost-meter
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
**PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.
|
|
355
|
+
**PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.22`** — review the script before running):
|
|
356
356
|
|
|
357
357
|
```powershell
|
|
358
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.22/install.ps1 | iex
|
|
359
359
|
```
|
|
360
360
|
|
|
361
361
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
362
362
|
|
|
363
363
|
```sh
|
|
364
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.22
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
Without git, use the GitHub tag archive:
|
|
368
368
|
|
|
369
369
|
```sh
|
|
370
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.22.tar.gz
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
|
|
@@ -432,7 +432,7 @@ Workarounds:
|
|
|
432
432
|
|
|
433
433
|
```yaml
|
|
434
434
|
minimumReleaseAgeExclude:
|
|
435
|
-
- dsh-cost-meter@1.9.
|
|
435
|
+
- dsh-cost-meter@1.9.22
|
|
436
436
|
```
|
|
437
437
|
|
|
438
438
|
3. For a one-off CLI operation, forward the pnpm flag: `dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0` (or add `--trust-lockfile` when only lockfile verification fails). Both flags were verified against pnpm 11.28.5 in a temporary profile.
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**DeepSeek Harness 会话费用统计插件(界面中英双语)**
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.22** 修复 WorkBuddy 国际版计费分类与历史 API 金额,并支持自定义渠道的显式分类配置。
|
|
20
20
|
|
|
21
21
|
**宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
|
|
22
22
|
|
|
23
|
-
更新说明:[v1.9.
|
|
23
|
+
更新说明:[v1.9.22](docs/update-notes-1.9.22.md#中文)。更新后完全重启 DSH。
|
|
24
24
|
|
|
25
25
|

|
|
26
26
|
|
|
@@ -352,22 +352,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
|
|
|
352
352
|
dsh plugin --profile web add dsh-cost-meter
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.
|
|
355
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.22`**,建议先下载审阅再运行):
|
|
356
356
|
|
|
357
357
|
```powershell
|
|
358
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.22/install.ps1 | iex
|
|
359
359
|
```
|
|
360
360
|
|
|
361
361
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
362
362
|
|
|
363
363
|
```sh
|
|
364
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.22
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
没有 git 时可用 GitHub tag 打包直链:
|
|
368
368
|
|
|
369
369
|
```sh
|
|
370
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.22.tar.gz
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|
|
@@ -432,7 +432,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
|
|
|
432
432
|
|
|
433
433
|
```yaml
|
|
434
434
|
minimumReleaseAgeExclude:
|
|
435
|
-
- dsh-cost-meter@1.9.
|
|
435
|
+
- dsh-cost-meter@1.9.22
|
|
436
436
|
```
|
|
437
437
|
|
|
438
438
|
3. 仅本次操作用 CLI 透传 pnpm 参数:`dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0`;若只是 lockfile 校验阶段失败,可改用 `--trust-lockfile`。这两个参数已在本机 pnpm 11.28.5 临时 Profile 上实测可用。
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# v1.9.21
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
- 修复侧栏合并卡片、简洁卡片和模型费用等组件未跟随透明度设置的问题。开启“跟随皮肤透明度”后,侧栏卡片不再叠加独立底色,关闭后恢复原样。
|
|
6
|
+
- 覆盖标准、紧凑、简洁和合并四种布局,以及今日与余额同行、余额进度条和套餐卡片;弹窗继续保留至少 90% 不透明度。
|
|
7
|
+
|
|
8
|
+
在“费用 → 显示 → 通用设置”开启“跟随皮肤透明度”。更新后完全退出并重启 DSH。
|
|
9
|
+
|
|
10
|
+
## English
|
|
11
|
+
|
|
12
|
+
- Fix sidebar cards that kept a solid background with Follow skin transparency enabled, including Combined, Simple and model-cost cards. Disabling the option restores the original surfaces.
|
|
13
|
+
- Cover all four sidebar layouts, inline today/balance rows, balance progress and plan cards. Floating dialogs retain at least 90% opacity.
|
|
14
|
+
|
|
15
|
+
Enable Follow skin transparency in Cost → Display → General. Fully quit and restart DSH after updating.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# v1.9.22
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
- **修复 WorkBuddy 国际版计费分类。** `workbuddy-ai` 现在沿用 WorkBuddy 套餐设置。启用 WorkBuddy 积分查询或显式选择 Plan 后,国际版调用的等值金额不再计入 API 支出,侧栏、每日统计和会话明细使用一致的分类。
|
|
6
|
+
- **自动修正历史 API 金额。** 升级后的启动阶段执行一次修正,覆盖每日、单会话和模型明细。原金额、各币种记录、历史价格、Token 与调用数保持不变;已有 provider/model 明细的账本无需会话日志也能修正。
|
|
7
|
+
- **显式渠道配置可正常生效。** 自定义渠道可按原始 provider 名指定 plan/api,不再因缺少内置套餐别名而被忽略。模型级覆盖仍优先,手动指定 API 的调用继续计入 API 支出,DeepSeek 官方搜索和抓取请求费也继续归 API。
|
|
8
|
+
- **减少费用明细首次打开的等待。** 优先计算并显示包含子代理的完整金额和调用数,再加载步骤图表;收起的逐次调用列表在展开时渲染。
|
|
9
|
+
|
|
10
|
+
更新后完全退出并重启 DSH。历史修正按现有分类设置执行,无需逐个模型重新配置。Plan 等值金额仍可显示,它用于比较模型用量,不代表 WorkBuddy 实际扣除的积分,免费模型也可以有非零等值金额。
|
|
11
|
+
|
|
12
|
+
感谢 [@pcs801](https://github.com/pcs801) 在 [issue #364](https://github.com/Han-1413141/dsh-cost-meter/issues/364) 提供复现数据、原因定位和修复建议。代码见 [PR #366](https://github.com/Han-1413141/dsh-cost-meter/pull/366)。
|
|
13
|
+
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
- **Fix WorkBuddy international billing classification.** `workbuddy-ai` now follows the WorkBuddy Plan settings. When WorkBuddy credits querying is enabled or its classification is explicitly Plan, international calls no longer count toward API spend. Sidebar, daily and session statistics use the same classification.
|
|
17
|
+
- **Correct historical API totals automatically.** A one-time startup correction updates daily, session and model attribution while preserving recorded amounts in each currency, prices, tokens and call counts. Existing provider/model ledger details are sufficient even when session logs are unavailable.
|
|
18
|
+
- **Honor explicit provider classifications.** Custom routes can use their exact request provider name to select plan/api without a built-in Plan alias. Model overrides still take priority. Explicit API choices and official DeepSeek search/fetch request fees remain API charges.
|
|
19
|
+
- **Reduce the wait when opening session costs.** Calculate and display complete totals, including subagents, before loading step charts. Render the individual-call list when expanded.
|
|
20
|
+
|
|
21
|
+
Fully quit and restart DSH after updating. The historical correction follows existing classification settings; individual model overrides are not required. Plan equivalents compare model usage rather than credits actually charged by WorkBuddy, so a free model can still have a nonzero equivalent amount.
|
|
22
|
+
|
|
23
|
+
Thanks to [@pcs801](https://github.com/pcs801) for the reproduction data, root-cause analysis and proposed fixes in [issue #364](https://github.com/Han-1413141/dsh-cost-meter/issues/364). Implemented in [PR #366](https://github.com/Han-1413141/dsh-cost-meter/pull/366).
|