dsh-cost-meter 1.8.3 → 1.8.5

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 CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  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 90+ model price catalog with auto-matching) · mainstream Coding Plan quota queries & display (Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / Volcano Ark / Qwen / Xiaomi MiMo) 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) · · quota strip above the input box (budget / Go / coding-plan usage in one row, toggleable)
10
10
 
11
- [![version](https://img.shields.io/badge/version-1.8.3-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
11
+ [![version](https://img.shields.io/badge/version-1.8.5-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
12
12
 
13
- **v1.8.3** fixes the “Remote package already registered” error when opening cost statistics or conversation details (#210). Open **Conversation cost details** below the input box, or **Settings → Cost → Cost statistics**. Both DSH 0.1.7-rc.2 and 0.2.0-rc.2 client registration lifecycles are covered by regression tests. See the [statistics guide](docs/billing-statistics.md#english) and [release notes](docs/release-notes/v1.8.3.md).
13
+ **v1.8.5** aligns statistics with DSH's native theme, adds full-selection step shares and expandable turn inputs/tool calls, and captures native-search usage when the fetch transport emits no Undici diagnostics. See the [statistics guide](docs/billing-statistics.md#english) and [release notes](docs/release-notes/v1.8.5.md).
14
14
 
15
15
  Desktop users: follow the [Desktop installation instructions](docs/install-troubleshooting.md#desktop-安装与更新) for the application's own CLI and `desktop` Profile.
16
16
 
@@ -320,22 +320,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
320
320
  dsh plugin --profile web add dsh-cost-meter
321
321
  ```
322
322
 
323
- **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.8.3`** — review the script before running):
323
+ **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.8.5`** — review the script before running):
324
324
 
325
325
  ```powershell
326
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.3/install.ps1 | iex
326
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.5/install.ps1 | iex
327
327
  ```
328
328
 
329
329
  **Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
330
330
 
331
331
  ```sh
332
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.3
332
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.5
333
333
  ```
334
334
 
335
335
  Without git, use the GitHub tag archive:
336
336
 
337
337
  ```sh
338
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.3.tar.gz
338
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.5.tar.gz
339
339
  ```
340
340
 
341
341
  After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
package/README.zh-CN.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 自定义 Provider 余额查询(可配任意 HTTP 端点) · 余额三段进度条 · 历史记录 · 峰谷计价时段显示(UTC 01:00–04:00、06:00–10:00 为峰时段;周末与中国法定假日全天按谷价,分别标注) · 峰/谷切换前弹窗与系统通知提醒(位置/提前量/提醒类型可配) · 官方价格一键同步 · 类 Codex Token 用量热图 · 多厂商多模型价格计费(内置 90+ 模型价格目录与自动匹配) · 主流 Coding Plan 额度查询与显示(Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / 火山方舟 / 千问 / 小米 MiMo 十一家,含 Volcano Ark AK/SK 签名与 MiMo 控制台 Cookie 查询) · Plan/API 双轨计费(订阅额度与按量金额分离统计,每 1% 额度与满窗的 token/等值金额估算及日/周/月曲线) · 输入框上方额度横条(预算/Go/Coding Plan 用量一条横排显示,可开关)
10
10
 
11
- [![version](https://img.shields.io/badge/version-1.8.3-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
11
+ [![version](https://img.shields.io/badge/version-1.8.5-4176E6)](https://github.com/Han-1413141/dsh-cost-meter)
12
12
 
13
- **v1.8.3**:修复打开计费统计或单会话明细时出现的「Remote package already registered」错误(#210)。入口为输入框下方的 **本会话费用明细**,或 **设置 → 费用 → 计费统计**。已补充 DSH 0.1.7-rc.2 与 0.2.0-rc.2 真实客户端注册流程的回归测试。详见[统计说明](docs/billing-statistics.md#简体中文)及[更新说明](docs/release-notes/v1.8.3.md)。
13
+ **v1.8.5** 按 DSH 原生风格调整统计界面,增加全部调用的步骤占比,以及可展开的每轮输入、工具参数和结果;原生搜索新增不依赖 Undici 诊断事件的用量捕获。详见[计费统计说明](docs/billing-statistics.md#简体中文)及[更新说明](docs/release-notes/v1.8.5.md)。
14
14
 
15
15
  桌面端用户请按 [Desktop 安装说明](docs/install-troubleshooting.md#desktop-安装与更新),使用应用自带的 CLI 和 `desktop` Profile。
16
16
 
@@ -320,22 +320,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
320
320
  dsh plugin --profile web add dsh-cost-meter
321
321
  ```
322
322
 
323
- **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.8.3`**,建议先下载审阅再运行):
323
+ **PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.8.5`**,建议先下载审阅再运行):
324
324
 
325
325
  ```powershell
326
- irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.3/install.ps1 | iex
326
+ irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.5/install.ps1 | iex
327
327
  ```
328
328
 
329
329
  **或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
330
330
 
331
331
  ```sh
332
- dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.3
332
+ dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.5
333
333
  ```
334
334
 
335
335
  没有 git 时可用 GitHub tag 打包直链:
336
336
 
337
337
  ```sh
338
- dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.3.tar.gz
338
+ dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.5.tar.gz
339
339
  ```
340
340
 
341
341
  安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## English
4
4
 
5
- Open a conversation and click **Conversation cost details** below its input box. **Settings → Cost → Display** has separate switches to hide the header entry, composer entry and turn cost summaries; all remain visible by default. The header entry automatically hides at viewport widths of 640px or less. The composer entry follows its own switch. Both buttons use compact 12px text. Cost badge visibility remains independent. The conversation entry opens its entire retained history, shows API and Plan equivalents separately, and puts component details before overview charts. Switching conversations closes the previous dialog. For all conversations, open **Settings → Cost → Cost statistics**; this entry starts with the last seven calendar days, including today.
5
+ Open a conversation and click **Cost details** in the same row as turns, speed, tokens and cache-hit statistics below its input box. **Settings → Cost → Display** has separate switches to hide the header entry, composer entry and turn cost summaries; all remain visible by default. The header entry automatically hides at viewport widths of 640px or less. The composer entry follows its own switch. Both buttons use compact 12px text. Budget chips take only their content width and no longer create an extra row. Cost badge visibility remains independent. The conversation entry opens its entire retained history, shows API and Plan equivalents separately, and puts component details before overview charts. Switching conversations closes the previous dialog. For all conversations, open **Settings → Cost → Cost statistics**; this entry starts with the last seven calendar days, including today.
6
6
 
7
7
  - **Periods:** Today, Last 7 days, Last 30 days, All retained, and custom inclusive dates. Dates follow the host timezone shown on the page.
8
8
  - **Filters:** Provider and model. Choose API cost, Plan equivalent, or their combined equivalent for chart amounts and rankings.
@@ -10,6 +10,9 @@ Open a conversation and click **Conversation cost details** below its input box.
10
10
  - **Conversation detail:** Input, output, cache read, cache write, and reasoning costs; individual model, compaction and native-search calls; tokens × price per million; long-context rates and unavailable prices. Small amounts use at least eight decimal places. Fifty calls per page remain part of the complete detail total.
11
11
 
12
12
  - **Turns and call types:** Full-selection totals by logged turn number and by model / compaction / native-search call. Turn pages contain 25 complete groups, independently of the 50-call pages. Calls without a turn number remain in an explicit unassigned group. Expand a call to see its logged turn and step, routing and price formula.
13
+ - **Step shares:** Horizontal bars show cost components, call-type counts and each logged step's share. Switch between costs and call counts. The denominator covers all filtered calls, across pages; the top 12 steps plus a combined remainder preserve the full amount. Tools are not counted as additional model calls. No recorded step stays explicitly unassigned.
14
+ - **Turn inspection:** Expand a turn to load its original user inputs, then expand each tool to see arguments, result and completion/error status. Tool records paginate 20 at a time; each long text field shows up to 16,000 characters with an explicit notice. Attachments show their type; system prompts, request headers and binary data are excluded. This is the whole turn, independent of the billing filters. Opening the overview does not load these contents.
15
+ - **Appearance:** Native DSH theme tokens, neutral surfaces, light borders, compact segmented controls and collapsible explanations replace the earlier colored dashboard cards. Light/dark themes and narrow windows share the same layout rules.
13
16
 
14
17
  ### What the numbers mean
15
18
 
@@ -25,7 +28,7 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
25
28
 
26
29
  ## 简体中文
27
30
 
28
- 打开一个会话,点击**输入框下方的「本会话费用明细」**。在 **设置 → 费用 → 显示设置** 中,可分别隐藏标题栏入口、输入框下方入口和每轮回复后的费用行;默认均保留。视口不超过 640px 时,标题栏入口自动隐藏,输入框下方入口继续遵守自己的开关。两个明细按钮使用 12px 字号和紧凑间距。关闭费用徽章不影响明细入口。对话入口默认显示该对话保留的全部历史,API 与 Plan 等值分别列出,费用构成放在趋势图之前。切换会话会关闭旧明细。全部会话统计的入口为 **设置 → 费用 → 计费统计**,默认显示包含今天的近 7 个自然日。
31
+ 打开一个会话,点击**输入框下方与轮数、速度、Token 和缓存命中率同一行的「费用明细」**。在 **设置 → 费用 → 显示设置** 中,可分别隐藏标题栏入口、输入框下方入口和每轮回复后的费用行;默认均保留。视口不超过 640px 时,标题栏入口自动隐藏,输入框下方入口继续遵守自己的开关。两个明细按钮使用 12px 字号和紧凑间距;预算标签仅占内容所需宽度,不再独占整行。关闭费用徽章不影响明细入口。对话入口默认显示该对话保留的全部历史,API 与 Plan 等值分别列出,费用构成放在趋势图之前。切换会话会关闭旧明细。全部会话统计的入口为 **设置 → 费用 → 计费统计**,默认显示包含今天的近 7 个自然日。
29
32
 
30
33
  - **时间范围:**今天、近 7 天、近 30 天、全部保留记录,以及包含起止日期的自定义区间。日期按页面标明的宿主时区划分。
31
34
  - **筛选和金额口径:**提供商、模型;可选择 API 费用、Plan 等值费用或两者合计,趋势和排行同步切换。
@@ -33,6 +36,9 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
33
36
  - **单对话:**输入、输出、缓存读取、缓存写入、推理费用,以及模型调用、上下文压缩、原生搜索的逐次明细。每次调用列出 Token × 每百万 Token 单价、金额、长上下文档位及缺价提示。小额费用至少保留八位小数。每页显示 50 次调用,分页不影响完整明细合计。
34
37
 
35
38
  - **轮次和调用类型:**按日志中的轮次编号,以及模型调用、上下文压缩、原生搜索汇总。每页 25 个完整轮次,与每页 50 次调用分别翻页;一轮跨多个调用页时仍显示完整合计。日志没有轮次编号的调用单列为「未标明轮次」。逐次明细标明轮次、步骤、路由和价格公式。
39
+ - **步骤占比:**横向条形图展示费用构成、调用类型次数和各步骤占比,可切换费用或调用次数。分母覆盖筛选后的全部调用,跨页合计;显示前 12 个步骤,其余合并,保留完整金额与次数。没有步骤编号的调用单列;工具执行不额外算作模型调用。
40
+ - **展开轮次:**点击一轮才读取其用户输入和工具调用,继续展开工具可查看参数、结果、完成或失败状态。工具每页 20 条,单段文本最多显示 16,000 个字符并标明截断;附件只显示类型,不读取系统提示、请求头或二进制内容。这里显示整轮原始记录,不受计费筛选影响。打开统计首页不会加载这些正文。
41
+ - **界面:**使用 DSH 的主题颜色、轻边框、紧凑分段按钮和可折叠说明,替换原来的彩色顶部卡片;支持浅色、深色和窄窗口。
36
42
 
37
43
  ### 统计口径
38
44