dsh-cost-meter 1.8.14 → 1.8.15
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 +6 -6
- package/README.zh-CN.md +6 -6
- package/docs/billing-statistics.md +4 -0
- package/lib/client.js +4 -4
- package/lib/client.statistics.js +2 -2
- package/package.json +1 -1
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 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) 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
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
12
12
|
|
|
13
|
-
**v1.8.
|
|
13
|
+
**v1.8.15** keeps conversation Cost details below the Desktop title bar and inside narrow windows. Automatic refresh preserves existing content and expanded turns while fetching new usage. See the [release notes](docs/release-notes/v1.8.15.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
|
|
|
@@ -322,22 +322,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
|
|
|
322
322
|
dsh plugin --profile web add dsh-cost-meter
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
**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.
|
|
325
|
+
**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.15`** — review the script before running):
|
|
326
326
|
|
|
327
327
|
```powershell
|
|
328
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.
|
|
328
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.15/install.ps1 | iex
|
|
329
329
|
```
|
|
330
330
|
|
|
331
331
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
332
332
|
|
|
333
333
|
```sh
|
|
334
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.
|
|
334
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.15
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
Without git, use the GitHub tag archive:
|
|
338
338
|
|
|
339
339
|
```sh
|
|
340
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.
|
|
340
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.15.tar.gz
|
|
341
341
|
```
|
|
342
342
|
|
|
343
343
|
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 用量热图 · 多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配) · 主流 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
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
12
12
|
|
|
13
|
-
**v1.8.
|
|
13
|
+
**v1.8.15** 修复费用明细弹窗遮挡桌面端标题栏及窄窗口横向溢出;自动刷新时保留已有内容和展开的轮次,并同步新用量。详见[更新说明](docs/release-notes/v1.8.15.md)。
|
|
14
14
|
|
|
15
15
|
桌面端用户请按 [Desktop 安装说明](docs/install-troubleshooting.md#desktop-安装与更新),使用应用自带的 CLI 和 `desktop` Profile。
|
|
16
16
|
|
|
@@ -322,22 +322,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
|
|
|
322
322
|
dsh plugin --profile web add dsh-cost-meter
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.8.
|
|
325
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.8.15`**,建议先下载审阅再运行):
|
|
326
326
|
|
|
327
327
|
```powershell
|
|
328
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.
|
|
328
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.8.15/install.ps1 | iex
|
|
329
329
|
```
|
|
330
330
|
|
|
331
331
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
332
332
|
|
|
333
333
|
```sh
|
|
334
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.
|
|
334
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.8.15
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
没有 git 时可用 GitHub tag 打包直链:
|
|
338
338
|
|
|
339
339
|
```sh
|
|
340
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.
|
|
340
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.8.15.tar.gz
|
|
341
341
|
```
|
|
342
342
|
|
|
343
343
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|
|
@@ -14,6 +14,8 @@ Open a conversation and click **Cost details** in the same row as turns, speed,
|
|
|
14
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
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.
|
|
16
16
|
|
|
17
|
+
From **1.8.15**, the conversation dialog centers within the area below the Desktop title bar, including older Windows hosts and macOS clearance. Fullscreen and Web use the full viewport; narrow windows include padding in the width limit and scroll long content inside the dialog. Client hot reload replaces outdated styles. Automatic refresh keeps existing results and expanded turns, updates both overview and detail when usage or pricing changes, and displays background errors without clearing previous values.
|
|
18
|
+
|
|
17
19
|
### What the numbers mean
|
|
18
20
|
|
|
19
21
|
Overview amounts come from the retained DSH ledger and refresh records written by other host processes. Opening statistics does not reprice history. Rankings combine days into one row per conversation. With subagent costs enabled, each agent is grouped under its owning conversation so the ranking matches its detail. Otherwise sessions stay separate. Each cost is counted once. Historical amounts without a known model or conversation are explicitly listed as unassigned costs.
|
|
@@ -46,6 +48,8 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
|
|
|
46
48
|
- **展开轮次:**点击一轮才读取其用户输入和工具调用,继续展开工具可查看参数、结果、完成或失败状态。工具每页 20 条,单段文本最多显示 16,000 个字符并标明截断;附件只显示类型,不读取系统提示、请求头或二进制内容。这里显示整轮原始记录,不受计费筛选影响。打开统计首页不会加载这些正文。
|
|
47
49
|
- **界面:**使用 DSH 的主题颜色、轻边框、紧凑分段按钮和可折叠说明,替换原来的彩色顶部卡片;支持浅色、深色和窄窗口。
|
|
48
50
|
|
|
51
|
+
从 **1.8.15** 起,单对话弹窗在桌面标题栏下方的区域居中,兼容旧版 Windows 和 macOS 顶部空间;全屏与 Web 使用完整视口。窄窗口的宽度限制包含内边距,长内容在弹窗内滚动,热更新会替换陈旧样式。自动刷新保留已有结果和展开轮次,用量或计费配置变化后同时更新概览和明细,后台失败显示错误并保留旧值。
|
|
52
|
+
|
|
49
53
|
### 统计口径
|
|
50
54
|
|
|
51
55
|
汇总读取 DSH 账本,打开页面会同步其他进程已写入的记录,不重新定价或修改历史金额。全局日、周及全部统计中,跨天对话合并成一行,开启子代理费用合计时,排行把子代理及其后代归入所属主会话,点击后的明细与排行金额一致;关闭时各会话分别列出。每笔费用只计一次。历史中未归属模型或对话的金额会单独提示。从 1.8.10 起,账本保留全部对话记录,不再按每日 200 个裁剪。若已记录的全部 Token 与调用次数完整覆盖一个日期,旧日总额会按这些对话已记录的金额修复;匿名调用和旧版裁剪留下的金额保留。此修复不重新定价。
|