dsh-cost-meter 1.9.11 → 1.9.12
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.12.md +47 -0
- package/lib/client.display.js +2 -2
- package/lib/client.js +4 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -10,20 +10,20 @@ Community and feedback: [Join the WeChat group →](#community). The WeChat grou
|
|
|
10
10
|
|
|
11
11
|
Per-conversation cost · daily totals · OpenCode Go subscription quota display · budget with usage percentage · official account balance · custom provider balance · balance progress bar · history · peak/off-peak pricing hours display (peak hours UTC 01:00–04:00, 06:00–10:00; weekends and Chinese public holidays are off-peak all day, with separate labels) · pre-switch popup & system-notification alerts for peak/off-peak changes (position / lead time / alert type configurable) · one-click price sync from the official docs · Codex-style token usage heat grid · multi-vendor model pricing (built-in 170+ model-ID catalog with auto-matching) · mainstream Coding Plan quota queries & display (Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / Volcano Ark / Qwen / Xiaomi MiMo / Factory Droid) plan/API dual-track billing (subscription quota vs pay-as-you-go money separated, per-1% & full-window token/equivalent-cost estimates with daily/weekly/monthly curves) · subscription plugin compatibility (Codex / ChatGPT subscription plans) · mobile layout (dsh-pocket) · quota strip above the input box (budget / Go / coding-plan usage in one row, toggleable)
|
|
12
12
|
|
|
13
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
14
14
|
|
|
15
15
|
**Minimum supported host: DSH 0.2.0.** The plugin declares the floor in `engines.dsh`, the host's admission gate for plugins, and no longer supports any DSH 0.1.x release; the adaptation target is the npm `next` release **0.2.1-rc.2**. Exact ranges and how the host reads them: [compatibility declaration](docs/dsh-0.2.1-compatibility.md#english).
|
|
16
16
|
|
|
17
17
|
Supports [official Search/Fetch request fees](docs/web-request-fees.md#english), separately from model tokens.
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.12** restores the side-by-side display inspector, groups compact controls, previews hidden nested components in gray, and fixes the enlarged preview close target.
|
|
20
20
|
|
|
21
21
|
Configuration and verification: [OpenDesign queries](docs/opendesign-billing.md), [dynamic ports / LAN / WorkBuddy2API setup](docs/custom-balance-sources.md), and [opacity fixes with performance measurements](docs/performance-2026-10-18.md).
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
Desktop users: follow the [Desktop installation instructions](docs/install-troubleshooting.md#desktop-安装与更新) for the application's own CLI and `desktop` Profile.
|
|
25
25
|
|
|
26
|
-
Release notes: [v1.9.
|
|
26
|
+
Release notes: [v1.9.12](docs/update-notes-1.9.12.md#english). Fully restart DSH after updating.
|
|
27
27
|
|
|
28
28
|
Host records inside the declared range, and the earlier 0.1.x history, are in the [compatibility record](docs/host-compatibility.md); the per-release list lives in `package.json` (`dsh.compatibility.dshReleases`).
|
|
29
29
|
|
|
@@ -341,22 +341,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
|
|
|
341
341
|
dsh plugin --profile web add dsh-cost-meter
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
**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.
|
|
344
|
+
**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.12`** — review the script before running):
|
|
345
345
|
|
|
346
346
|
```powershell
|
|
347
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
347
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.12/install.ps1 | iex
|
|
348
348
|
```
|
|
349
349
|
|
|
350
350
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
351
351
|
|
|
352
352
|
```sh
|
|
353
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
353
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.12
|
|
354
354
|
```
|
|
355
355
|
|
|
356
356
|
Without git, use the GitHub tag archive:
|
|
357
357
|
|
|
358
358
|
```sh
|
|
359
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
359
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.12.tar.gz
|
|
360
360
|
```
|
|
361
361
|
|
|
362
362
|
After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
|
|
@@ -421,7 +421,7 @@ Workarounds:
|
|
|
421
421
|
|
|
422
422
|
```yaml
|
|
423
423
|
minimumReleaseAgeExclude:
|
|
424
|
-
- dsh-cost-meter@1.9.
|
|
424
|
+
- dsh-cost-meter@1.9.12
|
|
425
425
|
```
|
|
426
426
|
|
|
427
427
|
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
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 自定义 Provider 余额查询(可配任意 HTTP 端点) · 余额三段进度条 · 历史记录 · 峰谷计价时段显示(UTC 01:00–04:00、06:00–10:00 为峰时段;周末与中国法定假日全天按谷价,分别标注) · 峰/谷切换前弹窗与系统通知提醒(位置/提前量/提醒类型可配) · 官方价格一键同步 · 类 Codex Token 用量热图 · 多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配) · 主流 Coding Plan 额度查询与显示(Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / 火山方舟 / 千问 / 小米 MiMo 十一家,含 Volcano Ark AK/SK 签名与 MiMo 控制台 Cookie 查询) · Plan/API 双轨计费(订阅额度与按量金额分离统计,每 1% 额度与满窗的 token/等值金额估算及日/周/月曲线) · 订阅插件兼容(Codex / ChatGPT 订阅) · 手机端适配(dsh-pocket) · 输入框上方额度横条(预算/Go/Coding Plan 用量一条横排显示,可开关)
|
|
12
12
|
|
|
13
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
14
14
|
|
|
15
15
|
**最低支持宿主:DSH 0.2.0。** 插件把下限声明在 `engines.dsh`(宿主准入插件的闸门),不再支持任何 DSH 0.1.x 版本;本轮适配目标为 npm `next` 标签的 **0.2.1-rc.2**。具体范围与宿主的读取方式见[兼容声明](docs/dsh-0.2.1-compatibility.md#中文)。
|
|
16
16
|
|
|
17
17
|
新增 [DeepSeek Search/Fetch API 次数费](docs/web-request-fees.md#中文),只计有结果的成功请求,并将网页抓取独立分类。
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.12** 恢复侧边调整与紧凑分组选项,隐藏组件和内部子项保留淡灰预览,并修复放大预览关闭按钮的点击范围。
|
|
20
20
|
|
|
21
21
|
配置与验证:[OpenDesign 查询说明](docs/opendesign-billing.md)、[随机端口 / 局域网 / WorkBuddy2API 配置](docs/custom-balance-sources.md)、[透明度修复与性能测量](docs/performance-2026-10-18.md)。
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
桌面端用户请按 [Desktop 安装说明](docs/install-troubleshooting.md#desktop-安装与更新),使用应用自带的 CLI 和 `desktop` Profile。
|
|
25
25
|
|
|
26
|
-
更新说明:[v1.9.
|
|
26
|
+
更新说明:[v1.9.12](docs/update-notes-1.9.12.md#中文)。更新后完全重启 DSH。
|
|
27
27
|
|
|
28
28
|
声明范围内的宿主记录与此前的 0.1.x 历史见[兼容记录](docs/host-compatibility.md);逐版本清单在 `package.json` 的 `dsh.compatibility.dshReleases`。
|
|
29
29
|
|
|
@@ -341,22 +341,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
|
|
|
341
341
|
dsh plugin --profile web add dsh-cost-meter
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.
|
|
344
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.12`**,建议先下载审阅再运行):
|
|
345
345
|
|
|
346
346
|
```powershell
|
|
347
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
347
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.12/install.ps1 | iex
|
|
348
348
|
```
|
|
349
349
|
|
|
350
350
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
351
351
|
|
|
352
352
|
```sh
|
|
353
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
353
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.12
|
|
354
354
|
```
|
|
355
355
|
|
|
356
356
|
没有 git 时可用 GitHub tag 打包直链:
|
|
357
357
|
|
|
358
358
|
```sh
|
|
359
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
359
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.12.tar.gz
|
|
360
360
|
```
|
|
361
361
|
|
|
362
362
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|
|
@@ -421,7 +421,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
|
|
|
421
421
|
|
|
422
422
|
```yaml
|
|
423
423
|
minimumReleaseAgeExclude:
|
|
424
|
-
- dsh-cost-meter@1.9.
|
|
424
|
+
- dsh-cost-meter@1.9.12
|
|
425
425
|
```
|
|
426
426
|
|
|
427
427
|
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,47 @@
|
|
|
1
|
+
# v1.9.12
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
### 恢复侧边调整,压缩控件高度
|
|
6
|
+
|
|
7
|
+
“设置 → 费用 → 显示”恢复左侧预览、右侧调整。布局根据设置面板自身宽度适配,桌面端 480、620、900 像素面板保持双栏;手机端和更窄的面板自动换行。放大预览独立计算可用宽度,不再受背后窄设置面板影响。
|
|
8
|
+
|
|
9
|
+
- “显示此组件”改为紧凑开关行;相关短选项分成两列,较长的说明和下拉框占完整一行。
|
|
10
|
+
- 模型明细的统计周期、卡片位置及数字设置成组排列。侧栏布局按需展开,“金额与语言”收在右侧可展开区域。
|
|
11
|
+
- 预览画布限制高度并允许内部滚动,避免完整模型明细把整个设置页面撑长。深浅主题和窄窗口均保留组件边界。
|
|
12
|
+
|
|
13
|
+
### 隐藏组件与内部子项保留淡灰预览
|
|
14
|
+
|
|
15
|
+
隐藏的组件保留在预览中并显示淡灰背景。选中组件后,其内部关闭的余额进度条、预算明细、Go 其他时段、模型展开内容、Token、费用占比,以及峰谷倒计时或切换时刻也保留淡灰示意。点击侧栏子项可定位右侧对应设置。
|
|
16
|
+
|
|
17
|
+
简洁布局不显示的内部明细放在带说明的淡灰示例中。当前数据缺失时使用标签或“—”,不填造费用;Codex 只返回周额度时不补造 5h 窗口。示例配置只用于预览,不保存到账本,也不启用账户查询。
|
|
18
|
+
|
|
19
|
+
输入区补齐真实的最高花费模型摘要,右下角额度按实际界面分成独立胶囊。侧栏模型卡片与输入区模型摘要使用各自的显示开关;输入区只提供实际影响该摘要的统计周期设置。
|
|
20
|
+
|
|
21
|
+
### 放大预览关闭按钮
|
|
22
|
+
|
|
23
|
+
关闭按钮使用完整 40 × 40 像素点击区域,小屏为 44 × 44 像素。标题栏避开桌面窗口拖动区域,预览内容滚动时关闭按钮保持可见。测试覆盖四角、中央、按钮外侧以及滚动后的实际鼠标点击。
|
|
24
|
+
|
|
25
|
+
### 验证
|
|
26
|
+
|
|
27
|
+
- 已构建客户端的浏览器回归覆盖两种主题、三个区域、三种侧栏布局、窄设置面板、显示开关保存与重新进入、内部滚动与点击定位。
|
|
28
|
+
- 4 倍 CPU 限速、宿主页含 20,000 个节点时,25 次重新进入显示设置的 P95 为 33 ms;预览未扫描或复制宿主对话内容,未发起外部请求。
|
|
29
|
+
- 余额关闭后重新开启、来源权限隔离、峰谷样式选择、显示控制与模型卡片回归通过;完成独立子代理复查。
|
|
30
|
+
|
|
31
|
+
更新后完全退出 DSH(包括托盘)再打开。
|
|
32
|
+
|
|
33
|
+
## English
|
|
34
|
+
|
|
35
|
+
Display settings restore a side-by-side preview and inspector. Desktop settings panes at 480, 620 and 900 pixels keep both columns; mobile and narrower panes adapt to the available space. Enlarged previews use their own width independently of the underlying settings pane.
|
|
36
|
+
|
|
37
|
+
The main visibility switch is a compact row. Related short options share two columns, long controls use a full row, and currency/language settings are collapsible in the inspector. A scrollable preview canvas prevents expanded model details from stretching the entire page.
|
|
38
|
+
|
|
39
|
+
Hidden components and disabled nested details remain visible in light gray. Sidebar child elements can focus their corresponding controls. Simple layouts show unavailable nested details in a labeled gray sample. Missing current data uses labels or an em dash, and weekly-only Codex accounts gain no fabricated 5h window. Preview configuration never changes the ledger or enables account queries.
|
|
40
|
+
|
|
41
|
+
The composer now previews the real highest-cost model summary and individual quota chips. Sidebar model cards and composer summaries have independent visibility switches, and composer controls only include options that affect its summary.
|
|
42
|
+
|
|
43
|
+
The enlarged preview has a full 40 × 40 pixel close target, increased to 44 × 44 on small screens. It avoids native drag regions and remains visible while the preview scrolls. Real mouse tests cover the corners, center, outside clicks and scrolling.
|
|
44
|
+
|
|
45
|
+
Browser regressions cover both themes, all three regions, sidebar layouts, narrow panes, persisted visibility and nested hit regions. Under 4× CPU throttling with 20,000 host nodes, the P95 for 25 settings reopenings was 33 ms, with no external requests or host conversation scans. Balance reopening, source permission isolation, peak style selection and model card checks pass; independent agent review is complete.
|
|
46
|
+
|
|
47
|
+
Fully quit DSH, including its tray process, and reopen after updating.
|