dsh-cost-meter 1.9.70 → 1.9.72

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.
@@ -1,60 +1,60 @@
1
- # 官方余额的凭据来源
2
-
3
- DSH 的账号登录模式使用推理令牌,它与开放平台 API Key 是不同凭据:把推理令牌当作 `Authorization: Bearer` 发给 `/user/balance` 会返回 401。旧版插件只读取模型设置指定的凭据名,在该名称被宿主进程环境覆盖时无法选用凭据库里的开放平台 Key([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201))。
4
-
5
- ## 已登录的官方账号
6
-
7
- 登录官方账号后,无需另行保存 API Key。未选择其他余额账号、未配置余额专用 Key 或模型 Key 时,插件通过宿主 `deepseekAccount` 服务读取与「设置 → 账号」同源的钱包,包含充值钱包与赠送钱包,再沿用插件自身的多币种挑选规则。凭据由宿主账号服务持有并负责鉴权,插件不接触 token,也不直接请求 `platform.deepseek.com`。账号服务缺席或明确退出时,该来源不可用;已登录账号的查询失败会显示错误。
8
-
9
- 模型 Key 与登录账号可以属于不同账户。自动模式下,未选择其他余额账号、也未配置专用 Key 时,模型 Key 优先于登录账号钱包。
10
-
11
- 从 1.9.67 起,可在「设置 → 费用 → 概览 → 官方账户余额 → 余额来源」选择“自动(模型 Key 优先)”或“DSH 登录钱包”。默认仍为自动;选择登录钱包后,未配置专用 Key 且未手选其他余额账号时,只读取宿主登录钱包,忽略模型 Key。未登录或钱包读取失败时显示错误,不改查模型 Key。手选账号和专用余额 Key 始终优先。选择会保存到配置,重启后保留;切换时取消旧请求并重建余额对账基准。登录钱包可能与模型实际计费账户不同。
12
-
13
- ## 余额专用 API Key
14
-
15
- 从 1.7.46 起,也可以在「设置 → 费用 → 官方账户余额」的「余额专用 API Key」中填写开放平台 Key,点击「保存」,再点击「刷新余额」。密钥通过现有凭据接口写入 DSH 凭据库中的 `DEEPSEEK_BALANCE_API_KEY`,不写入插件配置、账本或安装目录,不回传到浏览器。输入框保存后清空,只显示是否配置及来源。也可以在启动 DSH 的环境中设置同名变量;来源顺序由宿主决定。已验证的 DSH 0.2.2-rc.1 和 0.2.2-rc.3 优先读取凭据文件,文件未配置该引用时再读取环境变量;旧宿主的来源顺序可能不同。
16
-
17
- Desktop 使用相同的费用设置页与宿主凭据接口。更新时使用 Desktop 自带 CLI 的 `--profile desktop`,然后完全退出并重新打开 Desktop;[桌面端安装步骤](install-troubleshooting.md#desktop-安装与更新)包含命令来源与重装禁用状态的处理。
18
-
19
- ## 查询规则
20
-
21
- 1. 手动选择了其他余额账号时,只使用所选账号的 Key 请求 `https://api.deepseek.com/user/balance`。Key 缺失或查询失败时直接显示错误。
22
- 2. 使用默认余额账号且配置了专用 Key 时,只使用该 Key 请求官方余额,与模型的 `baseURL`、`apiKeyEnv` 及账号登录状态无关。
23
- 3. 自动模式下,未配置专用 Key,但配置了模型 API Key 时,用模型 Key 查询余额。支持 DeepSeek 官方 HTTPS 根地址、版本路径以及 `/anthropic`、`/anthropic/v1`;实际余额请求始终发往 `/user/balance`。中转或代理地址不受支持,不发送请求,也不改查登录账号的钱包。
24
- 4. 未配置显式余额 Key 时,选择登录钱包会直接经宿主账号服务查询;自动模式则在没有模型 API Key 时使用账号钱包。两种情形都不依赖模型设置是否可读。账号服务缺席或明确退出时,该来源不可用;已登录但查询失败时显示账号侧错误,自动查询按刷新间隔重试。
25
- 5. 专用 Key 返回 401 时显示认证失败及配置方法,不改用其他账户重试。自动查询遵守刷新间隔,手动刷新可立即重试。
26
- 6. 保存或清除专用 Key 会作废旧余额、取消在途请求并重新建立对账基准;不修改模型凭据。清除后按上面的顺序重新选择来源。
27
-
28
- 当前余额凭据更换、清除,以及所用模型路由的 `apiKeyEnv` 或 `baseURL` 变化,会作废余额缓存、在途响应与对账基准。无关模型配置不影响手动选择的余额账号或专用 Key。账号退出、凭据失效及账号服务替换同样会清除旧状态。插件只读取宿主公开的配置描述与生命周期事件;重新挂载时,为所有余额来源重新建立对账基准。
29
-
30
- ## 已保存的 Key 返回 401
31
-
32
- “已配置,来源为 file”表示 DSH 凭据库里有这个值,不表示开放平台仍接受它。HTTP 401 表示当前请求的凭据未通过官方认证;仅凭状态码无法区分 Key 被撤销、保存内容不完整或凭据类型不对。重新保存相同内容不会改变服务端认证结果,最小化窗口也不会使无效 Key 恢复。
33
-
34
- 请在 DeepSeek 开放平台确认 Key 状态。旧 Key 已丢失、无法核对时,创建新 Key,保存到“余额专用 API Key”,然后点击“刷新余额”。输入框保存后清空是隐藏密钥的正常行为,不是凭据丢失。不要在 issue 中上传 Key、凭据文件或请求头。
35
-
36
- [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296) 的报告者 @7WhiteChocolate 确认换用新建 Key 后恢复。旧 Key 未保留,具体失效原因没有得到验证;本次没有把该问题归因于窗口恢复或插件更新,该次排查没有改变余额来源顺序。
37
-
38
- ## 验证
39
-
40
- 验证使用合成凭据和 HTTP 响应,覆盖真实 DSH 凭据 provider 的来源优先级、保存/清除、缓存取消、迟到响应、对账基准以及 Host/Client codec。专项回归还覆盖账号与模型 Key 的来源优先级、旧版设置接口与新版配置描述、模型路由切换、官方 Messages 地址、账号异常脱敏、刷新节流、对账基准持久化及客户端错误渲染。
41
-
42
- ## English
43
-
44
- DSH account login uses an inference token, which is not an Open Platform API key: sending it as `Authorization: Bearer` to `/user/balance` returns 401. Older plugin versions read only the credential name named by the model settings, so a host-provided environment variable of that name could shadow a stored Open Platform key ([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201)).
45
-
46
- **Signed-in official account.** No additional API key is needed. When no other balance account is selected and no dedicated or model Key is configured, the plugin reads the same wallet as **Settings → Account** (topped-up plus bonus) through the host `deepseekAccount` service, then applies its multi-currency selection. The host account service holds and uses the credential; the plugin never sees the token and never requests `platform.deepseek.com` directly. A missing account service or an explicit sign-out makes this source unavailable; a failed query for a signed-in account produces an error.
47
-
48
- The model Key and the signed-in account can belong to different accounts. In Auto mode, when no other balance account is selected and no dedicated key is configured, a model key takes priority over the signed-in account’s wallet.
49
-
50
- Since 1.9.67, **Settings → Cost → Overview → Account balance → Balance source** offers **Auto (model key first)** and **DSH account wallet**. Auto remains the default. The wallet choice bypasses model credentials and never falls back to them when the wallet is unavailable. Selected balance accounts and dedicated keys still take priority. The preference survives restart; changing it cancels pending requests and resets reconciliation. The signed-in wallet may belong to a different account from the model key.
51
-
52
- Alternatively, since 1.7.46, enter an Open Platform key in **Settings → Cost → Account balance → Balance API key**, save it, then refresh the balance. DSH stores it as `DEEPSEEK_BALANCE_API_KEY`; the plugin never stores it in its config or ledger, or returns it to the browser. The same environment variable is supported under the host's normal credential priority rules.
53
-
54
- In Auto mode, query priority is **manually selected balance account → dedicated Key → model Key → signed-in account**. A manually selected account or dedicated Key uses the fixed official HTTPS balance endpoint. A missing or invalid selected Key produces an error. Model settings support the official root, version paths, `/anthropic`, and `/anthropic/v1`. Balance requests use `https://api.deepseek.com/user/balance`. A relay or proxy `baseURL` produces an unsupported-endpoint error without sending the Key or querying the signed-in wallet. Account-query failures remain visible, and automatic retries follow the refresh interval. Saving or clearing the dedicated Key leaves model credentials intact. Account-login inference tokens cannot query the Open Platform balance endpoint directly.
55
-
56
- Changes to the active balance credential or its model route (`apiKeyEnv` or `baseURL`) invalidate cached and in-flight balances and clear reconciliation baselines. Unrelated model changes leave manually selected accounts and dedicated Keys unchanged. Account sign-out, expiry, and account-service replacement also clear old state. The plugin reads public configuration descriptions and lifecycle events. Every balance source establishes a new reconciliation baseline when the plugin mounts again.
57
-
58
- When no model API key is resolved, an unavailable model settings service does not block the signed-in account wallet. Manual refresh retries an unavailable route; a resolved model Key still requires a verified official endpoint.
59
-
60
- **A stored key returns HTTP 401.** “Configured, source: file” only confirms that DSH has a stored value. HTTP 401 means that the official API rejected the credential; the status alone cannot distinguish a revoked key, an incomplete value or the wrong credential type. Check the key in the DeepSeek Open Platform. If the old value is unavailable, create a new key, save it as the dedicated balance key and refresh. Clearing the input after saving hides the secret; it does not delete the stored credential. Never post keys, credential files or request headers in an issue. In [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296), @7WhiteChocolate confirmed that a new key restored the balance. The reason the old key stopped working was not established.
1
+ # 官方余额的凭据来源
2
+
3
+ DSH 的账号登录模式使用推理令牌,它与开放平台 API Key 是不同凭据:把推理令牌当作 `Authorization: Bearer` 发给 `/user/balance` 会返回 401。旧版插件只读取模型设置指定的凭据名,在该名称被宿主进程环境覆盖时无法选用凭据库里的开放平台 Key([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201))。
4
+
5
+ ## 已登录的官方账号
6
+
7
+ 登录官方账号后,无需另行保存 API Key。未选择其他余额账号、未配置余额专用 Key 或模型 Key 时,插件通过宿主 `deepseekAccount` 服务读取与「设置 → 账号」同源的钱包,包含充值钱包与赠送钱包,再沿用插件自身的多币种挑选规则。凭据由宿主账号服务持有并负责鉴权,插件不接触 token,也不直接请求 `platform.deepseek.com`。账号服务缺席或明确退出时,该来源不可用;已登录账号的查询失败会显示错误。
8
+
9
+ 模型 Key 与登录账号可以属于不同账户。自动模式下,未选择其他余额账号、也未配置专用 Key 时,模型 Key 优先于登录账号钱包。
10
+
11
+ 从 1.9.67 起,可在「设置 → 费用 → 概览 → 官方账户余额 → 余额来源」选择“自动(模型 Key 优先)”或“DSH 登录钱包”。默认仍为自动;选择登录钱包后,未配置专用 Key 且未手选其他余额账号时,只读取宿主登录钱包,忽略模型 Key。未登录或钱包读取失败时显示错误,不改查模型 Key。手选账号和专用余额 Key 始终优先。选择会保存到配置,重启后保留;切换时取消旧请求并重建余额对账基准。登录钱包可能与模型实际计费账户不同。
12
+
13
+ ## 余额专用 API Key
14
+
15
+ 从 1.7.46 起,也可以在「设置 → 费用 → 官方账户余额」的「余额专用 API Key」中填写开放平台 Key,点击「保存」,再点击「刷新余额」。密钥通过现有凭据接口写入 DSH 凭据库中的 `DEEPSEEK_BALANCE_API_KEY`,不写入插件配置、账本或安装目录,不回传到浏览器。输入框保存后清空,只显示是否配置及来源。也可以在启动 DSH 的环境中设置同名变量;来源顺序由宿主决定。已验证的 DSH 0.2.2-rc.1 和 0.2.2-rc.3 优先读取凭据文件,文件未配置该引用时再读取环境变量;旧宿主的来源顺序可能不同。
16
+
17
+ Desktop 使用相同的费用设置页与宿主凭据接口。更新时使用 Desktop 自带 CLI 的 `--profile desktop`,然后完全退出并重新打开 Desktop;[桌面端安装步骤](install-troubleshooting.md#desktop-安装与更新)包含命令来源与重装禁用状态的处理。
18
+
19
+ ## 查询规则
20
+
21
+ 1. 手动选择了其他余额账号时,只使用所选账号的 Key 请求 `https://api.deepseek.com/user/balance`。Key 缺失或查询失败时直接显示错误。
22
+ 2. 使用默认余额账号且配置了专用 Key 时,只使用该 Key 请求官方余额,与模型的 `baseURL`、`apiKeyEnv` 及账号登录状态无关。
23
+ 3. 自动模式下,未配置专用 Key,但配置了模型 API Key 时,用模型 Key 查询余额。支持 DeepSeek 官方 HTTPS 根地址、版本路径以及 `/anthropic`、`/anthropic/v1`;实际余额请求始终发往 `/user/balance`。中转或代理地址不受支持,不发送请求,也不改查登录账号的钱包。
24
+ 4. 未配置显式余额 Key 时,选择登录钱包会直接经宿主账号服务查询;自动模式则在没有模型 API Key 时使用账号钱包。两种情形都不依赖模型设置是否可读。账号服务缺席或明确退出时,该来源不可用;已登录但查询失败时显示账号侧错误,自动查询按刷新间隔重试。
25
+ 5. 专用 Key 返回 401 时显示认证失败及配置方法,不改用其他账户重试。自动查询遵守刷新间隔,手动刷新可立即重试。
26
+ 6. 保存或清除专用 Key 会作废旧余额、取消在途请求并重新建立对账基准;不修改模型凭据。清除后按上面的顺序重新选择来源。
27
+
28
+ 当前余额凭据更换、清除,以及所用模型路由的 `apiKeyEnv` 或 `baseURL` 变化,会作废余额缓存、在途响应与对账基准。无关模型配置不影响手动选择的余额账号或专用 Key。账号退出、凭据失效及账号服务替换同样会清除旧状态。插件只读取宿主公开的配置描述与生命周期事件;重新挂载时,为所有余额来源重新建立对账基准。
29
+
30
+ ## 已保存的 Key 返回 401
31
+
32
+ “已配置,来源为 file”表示 DSH 凭据库里有这个值,不表示开放平台仍接受它。HTTP 401 表示当前请求的凭据未通过官方认证;仅凭状态码无法区分 Key 被撤销、保存内容不完整或凭据类型不对。重新保存相同内容不会改变服务端认证结果,最小化窗口也不会使无效 Key 恢复。
33
+
34
+ 请在 DeepSeek 开放平台确认 Key 状态。旧 Key 已丢失、无法核对时,创建新 Key,保存到“余额专用 API Key”,然后点击“刷新余额”。输入框保存后清空是隐藏密钥的正常行为,不是凭据丢失。不要在 issue 中上传 Key、凭据文件或请求头。
35
+
36
+ [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296) 的报告者 @7WhiteChocolate 确认换用新建 Key 后恢复。旧 Key 未保留,具体失效原因没有得到验证;本次没有把该问题归因于窗口恢复或插件更新,该次排查没有改变余额来源顺序。
37
+
38
+ ## 验证
39
+
40
+ 验证使用合成凭据和 HTTP 响应,覆盖真实 DSH 凭据 provider 的来源优先级、保存/清除、缓存取消、迟到响应、对账基准以及 Host/Client codec。专项回归还覆盖账号与模型 Key 的来源优先级、旧版设置接口与新版配置描述、模型路由切换、官方 Messages 地址、账号异常脱敏、刷新节流、对账基准持久化及客户端错误渲染。
41
+
42
+ ## English
43
+
44
+ DSH account login uses an inference token, which is not an Open Platform API key: sending it as `Authorization: Bearer` to `/user/balance` returns 401. Older plugin versions read only the credential name named by the model settings, so a host-provided environment variable of that name could shadow a stored Open Platform key ([#201](https://github.com/Han-1413141/dsh-cost-meter/issues/201)).
45
+
46
+ **Signed-in official account.** No additional API key is needed. When no other balance account is selected and no dedicated or model Key is configured, the plugin reads the same wallet as **Settings → Account** (topped-up plus bonus) through the host `deepseekAccount` service, then applies its multi-currency selection. The host account service holds and uses the credential; the plugin never sees the token and never requests `platform.deepseek.com` directly. A missing account service or an explicit sign-out makes this source unavailable; a failed query for a signed-in account produces an error.
47
+
48
+ The model Key and the signed-in account can belong to different accounts. In Auto mode, when no other balance account is selected and no dedicated key is configured, a model key takes priority over the signed-in account’s wallet.
49
+
50
+ Since 1.9.67, **Settings → Cost → Overview → Account balance → Balance source** offers **Auto (model key first)** and **DSH account wallet**. Auto remains the default. The wallet choice bypasses model credentials and never falls back to them when the wallet is unavailable. Selected balance accounts and dedicated keys still take priority. The preference survives restart; changing it cancels pending requests and resets reconciliation. The signed-in wallet may belong to a different account from the model key.
51
+
52
+ Alternatively, since 1.7.46, enter an Open Platform key in **Settings → Cost → Account balance → Balance API key**, save it, then refresh the balance. DSH stores it as `DEEPSEEK_BALANCE_API_KEY`; the plugin never stores it in its config or ledger, or returns it to the browser. The same environment variable is supported under the host's normal credential priority rules.
53
+
54
+ In Auto mode, query priority is **manually selected balance account → dedicated Key → model Key → signed-in account**. A manually selected account or dedicated Key uses the fixed official HTTPS balance endpoint. A missing or invalid selected Key produces an error. Model settings support the official root, version paths, `/anthropic`, and `/anthropic/v1`. Balance requests use `https://api.deepseek.com/user/balance`. A relay or proxy `baseURL` produces an unsupported-endpoint error without sending the Key or querying the signed-in wallet. Account-query failures remain visible, and automatic retries follow the refresh interval. Saving or clearing the dedicated Key leaves model credentials intact. Account-login inference tokens cannot query the Open Platform balance endpoint directly.
55
+
56
+ Changes to the active balance credential or its model route (`apiKeyEnv` or `baseURL`) invalidate cached and in-flight balances and clear reconciliation baselines. Unrelated model changes leave manually selected accounts and dedicated Keys unchanged. Account sign-out, expiry, and account-service replacement also clear old state. The plugin reads public configuration descriptions and lifecycle events. Every balance source establishes a new reconciliation baseline when the plugin mounts again.
57
+
58
+ When no model API key is resolved, an unavailable model settings service does not block the signed-in account wallet. Manual refresh retries an unavailable route; a resolved model Key still requires a verified official endpoint.
59
+
60
+ **A stored key returns HTTP 401.** “Configured, source: file” only confirms that DSH has a stored value. HTTP 401 means that the official API rejected the credential; the status alone cannot distinguish a revoked key, an incomplete value or the wrong credential type. Check the key in the DeepSeek Open Platform. If the old value is unavailable, create a new key, save it as the dedicated balance key and refresh. Clearing the input after saving hides the secret; it does not delete the stored credential. Never post keys, credential files or request headers in an issue. In [#502](https://github.com/Han-1413141/dsh-cost-meter/issues/502#issuecomment-6877106296), @7WhiteChocolate confirmed that a new key restored the balance. The reason the old key stopped working was not established.
@@ -4,13 +4,13 @@
4
4
 
5
5
  在“费用 → 显示 → 侧栏 → 侧栏布局”主动选择“图标”。原有布局、简洁模式和查询偏好不会自动迁移。图标行沿用上游费用区块,在设置入口上方占用原有区域;不定位或重排设置按钮及其他插件。
6
6
 
7
- 每个已启用的余额、预算、Coding Plan、Go、Codex、网关、模型或本地节省组件保留一个图标入口。官方余额、自定义余额有独立图形;全部 16 个套餐来源使用可区分的简写标识(不是官方品牌徽标),网关使用来源名称标识,未知自定义来源保留通用兜底和完整名称提示。点击图标展开原有组件,继续使用完整的账户列表、充值链接、刷新、错误与重试操作;再次点击、“收起”或 Escape 关闭。今日用量复用原币种、精度和费用/Token/双项设置;有 Claude 用量时,今日图标的圆环表示 Claude 在今日费用中的占比。保存的组件顺序继续生效,数字紧跟对应图标右侧,整组按顺序排列而不单独吸附侧栏最右;图标较多可横向滚动。开启“今日消费与余额同行”时,点击今日或配对余额图标会在明细中同时展开原有两个组件,继续使用上游同行布局。
7
+ 每个已启用的余额、预算、Coding Plan、Go、Codex、网关、模型或本地节省组件保留一个图标入口。官方余额使用 DeepSeek Logo,Codex 使用 OpenAI 品牌标识,Go 使用 OpenCode Logo;有 Claude 用量时今日入口使用 Claude Logo。13 个常见套餐来源使用对应的单色品牌 Logo:Claude、Z.ai/GLM、MiniMax、Kimi、OpenRouter、SiliconFlow、CommandCode、Cline、火山引擎、Qwen、小米 MiMo、百度智能云、WorkBuddy。未确认素材的 OpenDesign、SCNet、Factory 保留简写;自定义余额保留中性图形,网关保留来源名称标识,不按用户标签冒认品牌。全部 16 个套餐来源仍保留入口和完整名称提示。Logo 随可选分块内嵌,继承主题前景色,无外部图片请求;素材来源、固定版本和 MIT 许可见 [THIRD_PARTY_NOTICES.md](../THIRD_PARTY_NOTICES.md)。点击图标展开原有组件,继续使用完整的账户列表、充值链接、刷新、错误与重试操作;再次点击、“收起”或 Escape 关闭。今日用量复用原币种、精度和费用/Token/双项设置;有 Claude 用量时,今日图标的圆环表示 Claude 在今日费用中的占比。图标模式中,今日用量图标与数字作为金额组固定在行末,金额后不再排列其他图标;其他图标之间保持已保存的相对顺序,其他布局的排序不变。数字仍紧跟自身图标,不靠额外留白吸附侧栏最右;图标较多可横向滚动。开启“今日消费与余额同行”时,点击今日或配对余额图标会在明细中同时展开原有两个组件,继续使用上游同行布局。
8
8
 
9
9
  峰谷圆环不是整个计价阶段的归一化进度:它是固定的 8 小时感知窗口。距下一次切换超过 8 小时时保持满环,提示“距切换超过 8 小时”,不显示动态倒计时;剩余不超过 8 小时才按“剩余时间 / 8 小时”缩短。实际阶段和切换点复用渠道、周末、节假日和自定义时段规则,不修改计价。展开的原有峰谷组件保留其完整信息与原样式设置。
10
10
 
11
11
  窄栏、1023px 及以下视口、粗指针触屏和强制 `data-dsh-pocket-layout="mobile"` 暂使用原有卡片;可随时切回其他布局。可选图标分块加载中或失败时也保留原有组件,失败可重试。样式随组件卸载移除,未新增账户请求或轮询器。
12
12
 
13
- Choose **Cost → Display → Sidebar → Sidebar layout → Icons** explicitly. Existing layout preferences are not migrated. The existing full-width cost footer owns placement; this mode adds no host/sidebar class selectors. Every enabled sidebar component keeps an icon entry; click it to disclose its original component and actions, including all account rows, links, refresh, errors and retries. Collapse, the same icon or Escape closes details. Currency, decimal places, cost/token choices and saved component order remain effective. Values sit immediately after their icon, not in a separate right-edge bucket. When Today and balance on one line is enabled, opening either paired icon discloses both original cards in the upstream same-line container. The optional Claude share ring uses the existing cost conversion helper.
13
+ Choose **Cost → Display → Sidebar → Sidebar layout → Icons** explicitly. Existing layout preferences are not migrated. The existing full-width cost footer owns placement; this mode adds no host/sidebar class selectors. Every enabled sidebar component keeps an icon entry; click it to disclose its original component and actions, including all account rows, links, refresh, errors and retries. Collapse, the same icon or Escape closes details. Currency, decimal places and cost/token choices remain effective. In Icons, the Today icon/value group is always last, so no icons follow the amount; all other icons retain their saved relative order, and other layouts keep their original ordering. Values sit immediately after their own icon, without blank space pinning them to the sidebar edge. When Today and balance on one line is enabled, opening either paired icon discloses both original cards in the upstream same-line container. The optional Claude share ring uses the existing cost conversion helper. Common providers use bundled monochrome brand logos (13 plan sources plus DeepSeek/OpenAI/OpenCode); OpenAI identifies the Codex provider. OpenDesign, SCNet and Factory retain initials; custom balances/gateways keep neutral/name fallbacks rather than inferring a brand from user labels. Geometry follows the theme foreground color and adds no remote image requests; source/version/MIT attribution is in [THIRD_PARTY_NOTICES.md](../THIRD_PARTY_NOTICES.md).
14
14
 
15
15
  The peak ring uses a fixed eight-hour countdown horizon, not whole-period progress. Above eight hours it stays full with a threshold message; inside the window it shrinks as remaining time divided by eight hours. Provider calendars and switching times remain upstream-owned. The expanded original peak component keeps its saved presentation and full information.
16
16
 
@@ -92,3 +92,5 @@ In Settings → Cost → Display → Sidebar → Balance (or Custom balance), en
92
92
  1.9.49 起,在“设置 → 费用 → 显示 → 侧栏 → 调整组件 → 套餐进度条”选择“套餐额度样式 → 开口圆环”,可将多个额度窗口并排显示。默认保留横向进度条;所有套餐共用样式选择,已用/剩余方向继续由原选项控制。鼠标悬停查看完整额度和重置时间,点击或按回车刷新。“隐藏进度条,仅显示紧凑文本”开启时优先显示文本,收起侧栏仍使用原有数字布局。
93
93
 
94
94
  In **Settings → Cost → Display → Sidebar → Plan quota style**, select **Open rings**. The choice applies to Coding Plan cards; used/remaining direction, reset tooltips and refresh remain available. Compact text takes precedence, and collapsed sidebars retain their numeric layout.
95
+
96
+ Go 额度入口支持点击展开详情,展示滚动 5 小时、本周、本月的用量与重置时间。输入区入口的刷新按钮放在详情中,展开本身不发起查询;再次点击入口或按 Escape 收起。桌面悬停提示继续保留在侧栏。
@@ -100,3 +100,11 @@ node test/codex-subscription-published.mjs
100
100
  处理 github-actions[bot] 在 [#504](https://github.com/Han-1413141/dsh-cost-meter/issues/504) 报告的五个接入函数变化。新版拆分首字节与响应体超时,调整摘要日志、错误响应清理,以及原生请求的代理选项和预填充请求头处理。
101
101
 
102
102
  SHA-512 校验、静态契约检查和实际发布包回归通过:原生及代理计费、四种协议、摘要、重试、缓存、父子会话、API/Plan、历史回放、重启、取消、预填充及本地拒绝请求,另验证原版 CLI 自动接入。测试仅使用合成数据和本机服务,外部模型请求为 0,上游源文件保持原样。本版无需修改计费适配器,基线和 CI 增加 0.1.214。
103
+
104
+ ### 2026-11-17:Codex Subscription 3.2.19 与 Connect 0.2.0-alpha.15
105
+
106
+ 处理 github-actions[bot] 的 [#520](https://github.com/Han-1413141/dsh-cost-meter/issues/520)、[#521](https://github.com/Han-1413141/dsh-cost-meter/issues/521)。两个官方 npm 包的 SHA-512 与元数据一致,静态契约匹配;实际发布包的额度解析、单周和双窗口、账号切换、刷新、失败处理及只读 HTTP/RPC 检查通过。Connect 的记录类型判断函数由打包器重新编号,测试按发布包中的原始声明读取,不改写函数。费用插件运行时代码无需调整。基线与 CI 保留旧版本并加入上述版本,外部账户及模型请求为 0。
107
+
108
+ ### 2026-11-17:billion-context 0.1.216
109
+
110
+ 处理 github-actions[bot] 在 [#524](https://github.com/Han-1413141/dsh-cost-meter/issues/524) 报告的版本变化。官方发布包 SHA-512 校验通过,接入函数指纹未变。实际发布包的原生与代理计费、四种协议、压缩、重试、缓存、父子会话、API/Plan 分类、回放、重启、取消及原版 CLI 自动接入检查通过。检查使用合成数据和本机服务,外部模型请求为 0。现有 v1.9.71 运行时代码已兼容;本次更新兼容基线并将 0.1.216 加入 CI。
@@ -1,36 +1,36 @@
1
- # 历史价表存储与卡顿修复
2
-
3
- 原始报告:[@XHPAN,#297](https://github.com/Han-1413141/dsh-cost-meter/issues/297)。报告提供了长期运行账本的体积、CPU profile、事件循环延迟、调用链及临时精简价表前后的对照。
4
-
5
- 历史价格改为无损差分。价表变化时只保存修改的字段,每条差分链最多 24 层,之后保存完整快照。所有价格版本、发生时间、汇率、重算前后金额仍保留;不按天删除版本,不重算旧费用。若每次整个价表都变化,差分不会节省很多空间;存储仍随真实价格变化增长。
6
-
7
- 内存中的历史价表不可变,账本的三方合并共享这些价表,只复制需要修改的账单、配置和时间记录。同一进程的价表经过验证后复用;其他进程只增加用量时也复用不变的价表。自己的原子写入会更新文件版本标记,下次空闲同步不再重读、解析和合并它。普通写入遇到锁时保留待提交记录,由定时器稍后重试;退出时仍等待最后一次提交。
8
-
9
- 首次读取旧格式仍需要解析和验证历史价表,这是一次性工作。升级后自动安排转换,先原样备份至 `ledger.json.pricing-history-v1.bak`,再原子替换账本。后续写入不会覆盖这份备份。不要同时运行新旧插件写同一个账本:旧插件不能读取差分格式。要回退时,先退出所有 DSH,再恢复备份;备份之后新增的调用不会在该旧备份里。
10
-
11
- 需要提前处理大账本时,退出所有 DSH,在新版插件目录执行:
12
-
13
- ```sh
14
- node lib/compact-pricing-history-cli.js --ledger /path/to/ledger.json
15
- node lib/compact-pricing-history-cli.js --ledger /path/to/ledger.json --apply
16
- ```
17
-
18
- 第一条只预览大小,第二条转换并备份。命令不改配置、调用次数或已记录的费用,不读取会话正文,也不发送网络请求。
19
-
20
- 回归使用 152 个实际不同的合成价表,逐一验证原单价、时间点、重算原金额、完整快照间隔和差分还原,同时覆盖并发价格修改、用量更新、原样备份、损坏差分与锁重试。性能数字只代表本地合成账本,不能替代报告者设备上的事件循环复测。
21
-
22
- ## v1.9.65 加载优化
23
-
24
- 根据 [@lshan99q 的 #501](https://github.com/Han-1413141/dsh-cost-meter/issues/501),差分解码现在共用已清洗的不可变价表分支,小差分不再为比较长度而序列化整份价表。每次加载使用独立缓存,未改动的分支只清洗一次;可变的当前配置不进入该缓存。全部版本、时点和精确历史费率仍保留。数量随实际价格变化增长,尚未实施版本数量上限或惰性解码。
25
-
26
- 使用 448 个不同价格版本的本地合成账本,v1.9.64 与此版解码分别为 918 ms 和 91 ms,堆内存增量分别为 77.0 MiB 和 41.3 MiB,并逐一验证历史费率。以上为同一机器同一进程依次测量,不是报告者账本的结果。长期使用 1.8.x 的用户应升级至 1.9.65 或更新版本,并保留自动生成的旧账本备份。
27
-
28
- ## English
29
-
30
- Historical catalogs use lossless deltas with a full checkpoint after at most 24 delta levels. Every version, timestamp, exchange rate and original/recalculated amount remains available. No daily pruning or automatic repricing is performed. Storage still grows with real price changes; completely different catalogs may require full snapshots.
31
-
32
- Immutable catalogs are shared across ledger snapshots and reused after validation. Idle refresh skips our own writes; ordinary lock contention leaves pending calls for a timer retry. Shutdown retains the synchronous final-commit contract.
33
-
34
- Legacy catalogs are parsed once at startup, then automatically converted after a byte-exact `.pricing-history-v1.bak` backup. The commands above also support offline preview/conversion. Stop all DSH instances first. Older plugins cannot read delta catalogs: stop all writers and restore the backup before downgrading. Calls recorded after that backup are absent from it.
35
-
36
- Thanks to @XHPAN for the detailed report, profiles, call-chain analysis and before/after measurements in [#297](https://github.com/Han-1413141/dsh-cost-meter/issues/297). Synthetic regression measurements do not claim to reproduce the reporter's device latency.
1
+ # 历史价表存储与卡顿修复
2
+
3
+ 原始报告:[@XHPAN,#297](https://github.com/Han-1413141/dsh-cost-meter/issues/297)。报告提供了长期运行账本的体积、CPU profile、事件循环延迟、调用链及临时精简价表前后的对照。
4
+
5
+ 历史价格改为无损差分。价表变化时只保存修改的字段,每条差分链最多 24 层,之后保存完整快照。所有价格版本、发生时间、汇率、重算前后金额仍保留;不按天删除版本,不重算旧费用。若每次整个价表都变化,差分不会节省很多空间;存储仍随真实价格变化增长。
6
+
7
+ 内存中的历史价表不可变,账本的三方合并共享这些价表,只复制需要修改的账单、配置和时间记录。同一进程的价表经过验证后复用;其他进程只增加用量时也复用不变的价表。自己的原子写入会更新文件版本标记,下次空闲同步不再重读、解析和合并它。普通写入遇到锁时保留待提交记录,由定时器稍后重试;退出时仍等待最后一次提交。
8
+
9
+ 首次读取旧格式仍需要解析和验证历史价表,这是一次性工作。升级后自动安排转换,先原样备份至 `ledger.json.pricing-history-v1.bak`,再原子替换账本。后续写入不会覆盖这份备份。不要同时运行新旧插件写同一个账本:旧插件不能读取差分格式。要回退时,先退出所有 DSH,再恢复备份;备份之后新增的调用不会在该旧备份里。
10
+
11
+ 需要提前处理大账本时,退出所有 DSH,在新版插件目录执行:
12
+
13
+ ```sh
14
+ node lib/compact-pricing-history-cli.js --ledger /path/to/ledger.json
15
+ node lib/compact-pricing-history-cli.js --ledger /path/to/ledger.json --apply
16
+ ```
17
+
18
+ 第一条只预览大小,第二条转换并备份。命令不改配置、调用次数或已记录的费用,不读取会话正文,也不发送网络请求。
19
+
20
+ 回归使用 152 个实际不同的合成价表,逐一验证原单价、时间点、重算原金额、完整快照间隔和差分还原,同时覆盖并发价格修改、用量更新、原样备份、损坏差分与锁重试。性能数字只代表本地合成账本,不能替代报告者设备上的事件循环复测。
21
+
22
+ ## v1.9.65 加载优化
23
+
24
+ 根据 [@lshan99q 的 #501](https://github.com/Han-1413141/dsh-cost-meter/issues/501),差分解码现在共用已清洗的不可变价表分支,小差分不再为比较长度而序列化整份价表。每次加载使用独立缓存,未改动的分支只清洗一次;可变的当前配置不进入该缓存。全部版本、时点和精确历史费率仍保留。数量随实际价格变化增长,尚未实施版本数量上限或惰性解码。
25
+
26
+ 使用 448 个不同价格版本的本地合成账本,v1.9.64 与此版解码分别为 918 ms 和 91 ms,堆内存增量分别为 77.0 MiB 和 41.3 MiB,并逐一验证历史费率。以上为同一机器同一进程依次测量,不是报告者账本的结果。长期使用 1.8.x 的用户应升级至 1.9.65 或更新版本,并保留自动生成的旧账本备份。
27
+
28
+ ## English
29
+
30
+ Historical catalogs use lossless deltas with a full checkpoint after at most 24 delta levels. Every version, timestamp, exchange rate and original/recalculated amount remains available. No daily pruning or automatic repricing is performed. Storage still grows with real price changes; completely different catalogs may require full snapshots.
31
+
32
+ Immutable catalogs are shared across ledger snapshots and reused after validation. Idle refresh skips our own writes; ordinary lock contention leaves pending calls for a timer retry. Shutdown retains the synchronous final-commit contract.
33
+
34
+ Legacy catalogs are parsed once at startup, then automatically converted after a byte-exact `.pricing-history-v1.bak` backup. The commands above also support offline preview/conversion. Stop all DSH instances first. Older plugins cannot read delta catalogs: stop all writers and restore the backup before downgrading. Calls recorded after that backup are absent from it.
35
+
36
+ Thanks to @XHPAN for the detailed report, profiles, call-chain analysis and before/after measurements in [#297](https://github.com/Han-1413141/dsh-cost-meter/issues/297). Synthetic regression measurements do not claim to reproduce the reporter's device latency.
@@ -1,31 +1,31 @@
1
- # v1.9.65
2
-
3
- ## 中文
4
-
5
- - 输入区套餐进度条新增“显示套餐余额”开关,默认开启。关闭后保留进度条,余额可在悬浮提示中查看,预览和保存状态同步。
6
- - 修复没有模型 API Key 时,模型设置读取失败阻断官方账号钱包查询的问题;手动刷新可重新读取失败的模型路由。
7
- - 历史价格差分共用已清洗的不可变价表分支,减少重复遍历和序列化,保留全部价格版本与时间点。
8
- - 自定义余额 `sum` 支持 `where` 精确过滤,可按 Magpie provider 汇总 WorkBuddy 积分。
9
- - 核对 dsh-codex-subscription 3.2.16 发布包与既有接入函数,将兼容基线更新至 3.2.16。
10
-
11
- 输入区开关位置:**费用 → 显示 → 输入区 → 套餐进度条 → 显示套餐余额**。
12
-
13
- 历史价格优化使用 448 个不同价格版本的本地合成账本验证,同一进程依次测得 v1.9.64 解码 918 ms、此版 91 ms;堆内存增量分别为 77.0 MiB 和 41.3 MiB。逐一核对历史时间点的费率一致。这是合成数据测量,未使用报告者账本。版本数量仍随实际价格变化增长,不按天删除历史费率。
14
-
15
- 感谢 [@JhanSu](https://github.com/JhanSu) 在 [#498](https://github.com/Han-1413141/dsh-cost-meter/pull/498) 提供过滤功能、文档和测试,[@ferrisching](https://github.com/ferrisching) 在 [#500](https://github.com/Han-1413141/dsh-cost-meter/issues/500) 提供账号余额复现和分析,[@lshan99q](https://github.com/lshan99q) 在 [#501](https://github.com/Han-1413141/dsh-cost-meter/issues/501) 提供历史价格性能测量与优化建议。输入区金额开关来自用户提供的群聊反馈,未提供 GitHub 账号。
16
-
17
- ## English
18
-
19
- - Add a **Show plan balance** toggle to composer plan bars, enabled by default. Hiding the amount preserves progress bars and hover details, with matching preview and saved preferences.
20
- - Keep the signed-in account wallet available when no model API key exists and model settings cannot be read. Manual refresh retries unavailable model routes.
21
- - Reuse sanitized immutable branches when loading historical price deltas, reducing repeated traversal and serialization while preserving every version and activation time.
22
- - Support exact `where` filters in custom-balance sums, including Magpie WorkBuddy credits.
23
- - Check the published dsh-codex-subscription 3.2.16 package and existing integration functions; update the compatibility baseline to 3.2.16.
24
-
25
- ## 升级 / Upgrade
26
-
27
- ```sh
28
- dsh plugin --profile web add dsh-cost-meter@latest
29
- ```
30
-
31
- 更新后重启 `dsh web`。Desktop 用户参见 [安装与更新](install-troubleshooting.md#desktop-安装与更新)。
1
+ # v1.9.65
2
+
3
+ ## 中文
4
+
5
+ - 输入区套餐进度条新增“显示套餐余额”开关,默认开启。关闭后保留进度条,余额可在悬浮提示中查看,预览和保存状态同步。
6
+ - 修复没有模型 API Key 时,模型设置读取失败阻断官方账号钱包查询的问题;手动刷新可重新读取失败的模型路由。
7
+ - 历史价格差分共用已清洗的不可变价表分支,减少重复遍历和序列化,保留全部价格版本与时间点。
8
+ - 自定义余额 `sum` 支持 `where` 精确过滤,可按 Magpie provider 汇总 WorkBuddy 积分。
9
+ - 核对 dsh-codex-subscription 3.2.16 发布包与既有接入函数,将兼容基线更新至 3.2.16。
10
+
11
+ 输入区开关位置:**费用 → 显示 → 输入区 → 套餐进度条 → 显示套餐余额**。
12
+
13
+ 历史价格优化使用 448 个不同价格版本的本地合成账本验证,同一进程依次测得 v1.9.64 解码 918 ms、此版 91 ms;堆内存增量分别为 77.0 MiB 和 41.3 MiB。逐一核对历史时间点的费率一致。这是合成数据测量,未使用报告者账本。版本数量仍随实际价格变化增长,不按天删除历史费率。
14
+
15
+ 感谢 [@JhanSu](https://github.com/JhanSu) 在 [#498](https://github.com/Han-1413141/dsh-cost-meter/pull/498) 提供过滤功能、文档和测试,[@ferrisching](https://github.com/ferrisching) 在 [#500](https://github.com/Han-1413141/dsh-cost-meter/issues/500) 提供账号余额复现和分析,[@lshan99q](https://github.com/lshan99q) 在 [#501](https://github.com/Han-1413141/dsh-cost-meter/issues/501) 提供历史价格性能测量与优化建议。输入区金额开关来自用户提供的群聊反馈,未提供 GitHub 账号。
16
+
17
+ ## English
18
+
19
+ - Add a **Show plan balance** toggle to composer plan bars, enabled by default. Hiding the amount preserves progress bars and hover details, with matching preview and saved preferences.
20
+ - Keep the signed-in account wallet available when no model API key exists and model settings cannot be read. Manual refresh retries unavailable model routes.
21
+ - Reuse sanitized immutable branches when loading historical price deltas, reducing repeated traversal and serialization while preserving every version and activation time.
22
+ - Support exact `where` filters in custom-balance sums, including Magpie WorkBuddy credits.
23
+ - Check the published dsh-codex-subscription 3.2.16 package and existing integration functions; update the compatibility baseline to 3.2.16.
24
+
25
+ ## 升级 / Upgrade
26
+
27
+ ```sh
28
+ dsh plugin --profile web add dsh-cost-meter@latest
29
+ ```
30
+
31
+ 更新后重启 `dsh web`。Desktop 用户参见 [安装与更新](install-troubleshooting.md#desktop-安装与更新)。
@@ -0,0 +1,39 @@
1
+ # v1.9.71
2
+
3
+ ## 中文
4
+
5
+ - 本地推理和手动“本地零消耗”按已知零单价计费:费用保持 0,Token 正常统计,明细不再显示缺价问号;真正缺少价格的模型仍显示提示。
6
+ - 修复 MiniMax 剩余 1% 被当作 100%、导致已用 99% 显示为 0% 的问题,保留小数百分比。
7
+ - 修复“今日消费与余额同行”在纯文字模式下的垂直对齐。
8
+ - Go 额度支持点击展开 5h、周、月窗口及重置时间,详情内提供刷新按钮,支持触屏和键盘操作。
9
+ - 图标模式加入 DeepSeek、Claude、OpenAI/Codex、OpenCode 和 13 个常见套餐来源的品牌 Logo,离线内嵌并跟随主题前景色;金额组排在图标之后,其他图标保留已保存的相对顺序。
10
+ - 验证 dsh-codex-subscription 3.2.19 和 dsh-codex-connect 0.2.0-alpha.15,更新兼容基线与 CI。
11
+
12
+ 发布后更正(2026-11-17):[#522 的报告者已确认](https://github.com/Han-1413141/dsh-cost-meter/issues/522#issuecomment-6947573099),Go chip 在真实手指点击下正常打开,消息行用量图标属于 DSH 宿主;原报告已撤回并关闭。本版 Go 详情属于交互改进,不再列为已确认故障的修复。
13
+
14
+ 感谢以下贡献者:
15
+
16
+ - [@chanyuenpang](https://github.com/chanyuenpang) 在 [#517](https://github.com/Han-1413141/dsh-cost-meter/pull/517) 提供品牌 Logo 和图标布局代码。
17
+ - [@T0TT](https://github.com/T0TT) 在 [#518](https://github.com/Han-1413141/dsh-cost-meter/issues/518) 报告同行文字对齐问题并提供 CSS 建议。
18
+ - [@MCXCC303](https://github.com/MCXCC303) 在 [#519](https://github.com/Han-1413141/dsh-cost-meter/issues/519) 报告 MiniMax 已用 99% 显示为 0% 的问题。
19
+ - [@seeker-Chh](https://github.com/seeker-Chh) 在 [#522](https://github.com/Han-1413141/dsh-cost-meter/issues/522) 提供 Android 点击排查信息,并[更正问题归属、撤回原报告](https://github.com/Han-1413141/dsh-cost-meter/issues/522#issuecomment-6947573099)。
20
+ - [@github-actions[bot]](https://github.com/apps/github-actions) 通过 [#520](https://github.com/Han-1413141/dsh-cost-meter/issues/520) 和 [#521](https://github.com/Han-1413141/dsh-cost-meter/issues/521) 报告上游插件版本变化。
21
+
22
+ ## English
23
+
24
+ - Treat local inference and manual local-zero assignments as known zero prices: keep token counts and zero cost without a missing-price question mark. Models without a quote still show the warning.
25
+ - Fix MiniMax's 1% remaining value being read as 100%, which incorrectly displayed 99% usage as 0%; preserve fractional percentages.
26
+ - Align text vertically when today's cost and balance share a row.
27
+ - Make Go quota details expandable by click, touch or keyboard, with 5h, weekly and monthly windows, reset times and a refresh button.
28
+ - Bundle theme-aware provider logos offline. Keep the value group after all icons while preserving the other icons' saved relative order.
29
+ - Verify dsh-codex-subscription 3.2.19 and dsh-codex-connect 0.2.0-alpha.15, and update compatibility baselines and CI.
30
+
31
+ Post-release correction (2026-11-17): the reporter [withdrew and closed #522](https://github.com/Han-1413141/dsh-cost-meter/issues/522#issuecomment-6947573099). Real taps open the Go chip normally, and the message-row usage icon belongs to the DSH host. The Go details change is an interaction improvement, not a confirmed bug fix.
32
+
33
+ ## 升级 / Upgrade
34
+
35
+ ```sh
36
+ dsh plugin --profile web add dsh-cost-meter@latest
37
+ ```
38
+
39
+ 更新后重启 DSH。Desktop 用户参见 [安装与更新](https://github.com/Han-1413141/dsh-cost-meter/blob/v1.9.71/docs/install-troubleshooting.md#desktop-安装与更新)。
@@ -0,0 +1,29 @@
1
+ # v1.9.72
2
+
3
+ ## 中文
4
+
5
+ - 修复官方账户渠道 `deepseek-account` 及 `llm-deepseek-account` 的价格匹配:精确模式直接使用官方模型目录,自动模式不再受其他渠道的同名价格干扰。
6
+ - 同步修复实际记账、客户端价格显示与消息下方本轮费用,保留官方峰谷计价、人民币计价、渠道自有价格和手动覆盖。
7
+ - 未知模型仍显示缺价提示,本地零消耗继续保持零费用和正常 Token 统计。已保存的账单不会自动改写。
8
+ - 验证 billion-context 0.1.216,更新兼容基线与 CI。
9
+ - 根据报告者的后续更正,将 #522 标为已撤回并关闭;v1.9.71 的 Go 点击详情按交互改进记录。
10
+
11
+ 感谢 [@pb-pang](https://github.com/pb-pang) 在 [#526](https://github.com/Han-1413141/dsh-cost-meter/issues/526) 提供官方账户渠道、模型、升级前后账本和环境信息。
12
+
13
+ ## English
14
+
15
+ - Restore official price lookup for `deepseek-account` and `llm-deepseek-account`. Exact mode now uses the official model catalog; auto mode no longer treats another provider's quote for the same model as an ambiguity.
16
+ - Apply the fix to ledger billing, client price displays and per-turn costs while preserving official peak/off-peak schedules, CNY pricing, provider-specific quotes and manual overrides.
17
+ - Keep unknown models unpriced and local inference at known zero prices with token counts retained. Saved bills are not rewritten automatically.
18
+ - Verify billion-context 0.1.216 and update the compatibility baseline and CI.
19
+ - Record the withdrawal and closure of #522. The Go details change in v1.9.71 is an interaction improvement, not a confirmed bug fix.
20
+
21
+ Thanks to [@pb-pang](https://github.com/pb-pang) for the provider/model details, before-and-after ledger records and environment information in [#526](https://github.com/Han-1413141/dsh-cost-meter/issues/526).
22
+
23
+ ## 升级 / Upgrade
24
+
25
+ ```sh
26
+ dsh plugin --profile web add dsh-cost-meter@latest
27
+ ```
28
+
29
+ 更新后重启 DSH。Desktop 用户参见 [安装与更新](https://github.com/Han-1413141/dsh-cost-meter/blob/v1.9.72/docs/install-troubleshooting.md#desktop-安装与更新)。