dsh-cost-meter 1.7.24 → 1.7.25
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.en.md +7 -6
- package/README.md +7 -6
- package/lib/client.js +5 -5
- package/lib/store.js +14 -0
- package/lib/typert.host.js +1 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
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; from Aug 23, 2026 weekends are billed at off-peak prices all day, shown as “Weekend — all off-peak”) · 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) 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)
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
|
|
11
|
-
**v1.7.
|
|
11
|
+
**v1.7.25** adds a collapsible per-model cost card with Today / Last 90 days, Top-N and Other totals. Quota settings now use independent cards with enabled entries first. Enable the model card under Settings → Cost → Display. See the [guide](docs/model-cost-card.md#english).
|
|
12
12
|
|
|
13
13
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
14
14
|
[](LICENSE)
|
|
@@ -28,6 +28,7 @@ English | [中文](README.md)
|
|
|
28
28
|
|
|
29
29
|
| Feature | Location | Description |
|
|
30
30
|
|---|---|---|
|
|
31
|
+
| Per-model cost card | Sidebar / composer dock (optional) | Disabled by default; inline Top-N, Other totals, shares and optional tokens, Today / Last 90 days, remembered expansion and a Top-1 chip. See the [guide](docs/model-cost-card.md#english) |
|
|
31
32
|
| Per-conversation cost | Below the composer / session title bar | Live accumulated cost + input/cache/output tokens; position configurable |
|
|
32
33
|
| Official balance | Sidebar top / Settings page (configurable) | Total / granted / topped-up balance, auto-refresh + manual refresh; optional three-segment progress bar (blue/orange/gray), whose today segment only counts official-channel spend (coding plans / custom providers excluded) |
|
|
33
34
|
| Custom provider balance | Sidebar / Settings page (configurable) | Configurable HTTP balance lookup (e.g. LiteLLM); bilingual labels, currency, extract rules (dot path / number / add / subtract / divide — use divide for NewApi-style quota endpoints, see [example](#custom-provider-balance-example-newapi-template)); collapsible panel alongside Coding Plan quotas |
|
|
@@ -261,22 +262,22 @@ Real captures from an actual DSH sidebar of the period strip and collapsed verti
|
|
|
261
262
|
dsh plugin --profile web add dsh-cost-meter
|
|
262
263
|
```
|
|
263
264
|
|
|
264
|
-
**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.7.
|
|
265
|
+
**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.7.25`** — review the script before running):
|
|
265
266
|
|
|
266
267
|
```powershell
|
|
267
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.7.
|
|
268
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.7.25/install.ps1 | iex
|
|
268
269
|
```
|
|
269
270
|
|
|
270
271
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
271
272
|
|
|
272
273
|
```sh
|
|
273
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.7.
|
|
274
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.7.25
|
|
274
275
|
```
|
|
275
276
|
|
|
276
277
|
Without git, use the GitHub tag archive:
|
|
277
278
|
|
|
278
279
|
```sh
|
|
279
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.7.
|
|
280
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.7.25.tar.gz
|
|
280
281
|
```
|
|
281
282
|
|
|
282
283
|
After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
|
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 自定义 Provider 余额查询(可配任意 HTTP 端点) · 余额三段进度条 · 历史记录 · 峰谷计价时段显示(UTC 01:00–04:00、06:00–10:00 为峰时段;2026-08-23 起周末全天按谷价,显示「周末时段——全谷价」) · 峰/谷切换前弹窗与系统通知提醒(位置/提前量/提醒类型可配) · 官方价格一键同步 · 类 Codex Token 用量热图 · 多厂商多模型价格计费(内置 90+ 模型价格目录与自动匹配) · 主流 Coding Plan 额度查询与显示(Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / SCNet / 火山方舟 九家,含 Volcano Ark AK/SK 签名) · Plan/API 双轨计费(订阅额度与按量金额分离统计,每 1% 额度与满窗的 token/等值金额估算及日/周/月曲线) · 输入框上方额度横条(预算/Go/Coding Plan 用量一条横排显示,可开关)
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
|
|
11
|
-
**v1.7.
|
|
11
|
+
**v1.7.25**:侧栏新增可折叠的按模型花费卡片,支持今日 / 近 90 天、Top-N 与其它汇总;额度区统一为独立卡片,启用项自动置顶。入口:设置 → 费用 → 显示。详见 [使用说明](docs/model-cost-card.md)。
|
|
12
12
|
|
|
13
13
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
14
14
|
[](LICENSE)
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
| 功能 | 位置 | 说明 |
|
|
30
30
|
|---|---|---|
|
|
31
|
+
| 按模型花费卡片 | 侧栏 / 右下角 dock(可配) | 默认关闭;就地展开 Top-N、其它汇总、占比和可选 Token;支持今日 / 近 90 天、展开记忆及 Top-1 角标,见[使用说明](docs/model-cost-card.md) |
|
|
31
32
|
| 本会话费用 | 输入区下方 / 会话标题栏 | 实时累计费用 + 输入/缓存/输出 token,位置可配 |
|
|
32
33
|
| 官方余额 | 侧边栏顶部 / 设置页(可配) | 总余额 / 赠送 / 充值,自动刷新 + 手动刷新;可选三段进度条(蓝/橙/灰),当日段只统计官方渠道费用(不含 Coding Plan / 自定义 Provider) |
|
|
33
34
|
| 自定义 Provider 余额 | 侧边栏 / 设置页(可配) | 可配置 HTTP 查询任意 Provider 余额(LiteLLM 等);中/英名称、币种、extract 规则(点路径 / 数字常量 / add / subtract / divide,divide 适配 NewApi 等 quota 端点,见下方[示例](#自定义-provider-余额配置示例newapi-模板));与 Coding Plan 同区可折叠配置 |
|
|
@@ -263,22 +264,22 @@
|
|
|
263
264
|
dsh plugin --profile web add dsh-cost-meter
|
|
264
265
|
```
|
|
265
266
|
|
|
266
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.7.
|
|
267
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.7.25`**,建议先下载审阅再运行):
|
|
267
268
|
|
|
268
269
|
```powershell
|
|
269
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.7.
|
|
270
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.7.25/install.ps1 | iex
|
|
270
271
|
```
|
|
271
272
|
|
|
272
273
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
273
274
|
|
|
274
275
|
```sh
|
|
275
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.7.
|
|
276
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.7.25
|
|
276
277
|
```
|
|
277
278
|
|
|
278
279
|
没有 git 时可用 GitHub tag 打包直链:
|
|
279
280
|
|
|
280
281
|
```sh
|
|
281
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.7.
|
|
282
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.7.25.tar.gz
|
|
282
283
|
```
|
|
283
284
|
|
|
284
285
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|