dsh-bottom-info-bar 1.24.4 → 1.24.6

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
@@ -23,7 +23,7 @@ A DeepSeek Harness plugin that adds an account information row under the compose
23
23
 
24
24
  The bar follows the active session and picks one of three readings per provider (mutually exclusive, nothing to switch by hand): **balance** shows the real balance from the provider's own API, **subscription quota** shows each quota window's remaining allowance with its reset countdown (an exhausted window stays visible at 0% instead of disappearing, flagged low), and **cloud billing** shows this month's real spend from the official billing API. On top of that come four spend tallies — this session, today, last 30 days, all time — plus extras such as time and custom text. All four come from the plugin's own ledger, which **starts counting when the plugin first runs**: calls made before that (or before you cleared the ledger) are not included, and hovering the spend writes out the exact start of the count. For the authoritative figure for a whole session, use the provider's own balance or bill. In balance mode, hovering the balance expands it into topped-up and granted balances, so gifted credit is never conflated with the money you paid in.
25
25
 
26
- On **DSH 0.2.1-rc.1 with the native activity/usage buttons**, the native line sits on top and the plugin's account information on the line below. Clicking any plugin field still switches between **Full** and **Compact** with the same height/fade animation: Full shows the native line, Compact collapses it. The native buttons keep their own click behavior and open Harness's details dialogs. Each of the two native buttons can be hidden separately from the plugin's settings page. The context ring keeps its existing details and plugin settings.
26
+ On **DSH 0.2.2 with the native activity/usage buttons**, the native line sits on top and the plugin's account information on the line below. Clicking any plugin field still switches between **Full** and **Compact** with the same height/fade animation: Full shows the native line, Compact collapses it. The native buttons keep their own click behavior and open Harness's details dialogs. Each of the two native buttons can be hidden separately from the plugin's settings page. The context ring keeps its existing details and plugin settings.
27
27
 
28
28
  On **older hosts**, clicking the bar still switches between **Full** and **Compact**: Full keeps the legacy statistics row, Compact collapses it. Plugin fields remain identical in both modes. Compatibility is detected from the host's live extension entries, rather than a version string.
29
29
 
@@ -53,11 +53,11 @@ The context usage ring keeps the native hover tooltip and opens a statistics pan
53
53
 
54
54
  ## Settings
55
55
 
56
- Plugin settings live under **Plugins → bottom-info-bar** and save as you change them. **Plugin information** and **notices** keep their field switches and colors. On modern hosts, **native information** offers one switch per native button (session stats / usage) so either entry can be hidden; the obsolete per-field statistics-row controls are omitted from the page, search results and enabled counts. Their saved values are retained for older hosts. Older hosts still show the native field controls. Resetting plugin fields or colors does not change Harness's native button preferences.
56
+ Plugin settings live under **Plugins → bottom-info-bar** and save as you change them. The page is built on the same card system DSH 0.2.2 uses elsewhere: every section is one card with a title and a one-line summary, separated by whitespace instead of dividers. **Information to show** holds every field switch and color, grouped into native information and plugin information — both collapsible, with search across all rows. Notices render on the bar as soft pills and no longer have switches. **Quota credentials** stays collapsed by default, **billing data** covers export and clear, and **version & updates** holds the update mode with rollback. Resetting fields or colors does not change Harness's native button preferences.
57
57
 
58
- ![Plugin information grouped by billing mode](assets/settings-plugin.webp)
58
+ ![Information to show: every field switch and color, grouped and collapsible](assets/settings-plugin.webp)
59
59
 
60
- Plugin information is further grouped by billing mode — read only the block that matches your provider; each block's heading says which items carry data for it. Time zones, custom text, quota percentage direction and billing data are separate sections:
60
+ Plugin information is further grouped by billing mode — read only the block that matches your provider; each block's heading says which items carry data for it. Time and date, subscription window percentage direction, quota credentials and billing data are separate cards:
61
61
 
62
62
  ![Time and date: time zones only](assets/settings-time.webp)
63
63
 
@@ -73,6 +73,22 @@ Every model response records one entry (usage × unit price, locked the moment t
73
73
 
74
74
  Remove the plugin on the DSH plugin page (or `dsh plugin --profile web remove dsh-bottom-info-bar`) and restart DSH: the native stats row comes back by itself and no plugin files are left behind. The ledger is kept on purpose — export or clear it from **Billing data** before removing the plugin if you want a clean slate. To go back a version instead, the update section offers **roll back to the previous version** while a newer build is waiting for a restart, and after a failed update. Details: [docs/INSTALL.md](docs/INSTALL.md).
75
75
 
76
+ ## FAQ
77
+
78
+ **The bar shows "not configured" or "Refresh failed" — is it broken?**
79
+
80
+ No. When it can't read data, the bar keeps the last good snapshot and never shows a fake 0%. First make sure you **restarted DSH** after installing (a page refresh is not enough). Hover the affected field to see the reason; touch hosts (DSH Go) have no hover, so check the plugin settings page instead. Per-provider credential setup is in [docs/INSTALL.md](docs/INSTALL.md).
81
+
82
+ **I configured an AccessKey for Alibaba Token Plan as documented, but it still says "Refresh failed".**
83
+
84
+ Usually the authorization is incomplete — `AliyunTokenPlanReadOnlyAccess` alone is not enough. Have the primary account do the following for that RAM user:
85
+
86
+ 1. In the RAM console, grant **both** system policies `AliyunTokenPlanReadOnlyAccess` and `AliyunBSSReadOnlyAccess`;
87
+ 2. In the Bailian console's **Account Management**, assign the RAM user admin or Subscription Package permission — granting only the system policies and skipping this assignment still leaves quota unreadable (the bar reports Refresh failed);
88
+ 3. Personal-plan monthly percentages use the console path, which also needs a custom policy granting `modelstudio:GenerateCLIAccessToken`.
89
+
90
+ Also, inference plan keys (`sk-sp-…`) can only run inference and cannot read quota — you must use an Alibaba Cloud AccessKey (`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`), entered under **Quota credentials** in the plugin settings (collapsed by default), or in DSH credentials / same-named environment variables. The bar's hover only gives a generic "reauthorize" hint; the full authorization checklist above also appears in the settings **Quota credentials** card, with step-by-step details in [docs/INSTALL.md](docs/INSTALL.md).
91
+
76
92
  ## Languages
77
93
 
78
94
  The plugin includes English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, Portuguese, French, German, Italian, Russian, Hindi and Indonesian. It follows DSH’s language by default. Choose **Language** on this plugin’s settings page to use a different language independently; the choice is saved in this browser. Regional variants such as Spanish (Mexico) and Portuguese (Brazil) use the corresponding built-in language. Unsupported languages fall back to English.
package/README.zh-CN.md CHANGED
@@ -23,7 +23,7 @@ DeepSeek Harness 插件:把输入框下方那行统计栏换成一行信息栏
23
23
 
24
24
  信息栏跟随当前会话,按服务商自动选择三种口径之一(互斥,不用手动切):**余额制**显示官方接口的真实余额,**订阅制**显示各额度窗口剩余额度与重置倒计时(额度用尽时窗口仍显示 0%,不会从信息栏消失,并标红提示「低」),**云账单制**显示官方账单接口的本月真实花费。之外还有本会话/今天/近 30 天/累计四档花费,以及时间、自定义文字等通用项。这四档都来自插件自己的账本,**从插件开始运行那一刻起记账**:装上之前(或清除账单之后)已经发生的调用不在其中,把鼠标停在花费上会写明统计起点;要整场会话的权威数字,请以服务商的余额或账单为准。余额制下把鼠标停在余额上,会展开「充值余额 / 赠金余额」两行明细,赠送的那部分不再是糊涂账。
25
25
 
26
- **DSH 0.2.1-rc.1 提供新版原生统计按钮时**,原生那一行在上、插件账户信息在下。点击插件信息行的任意字段仍可切换**完整/简洁**,保留原来的高度收合与淡出动画:完整显示原生行,简洁把它收起。原生两个按钮保留自己的点击行为,点开是 Harness 的明细弹窗;也可以在插件设置页分别隐藏这两个原生按钮。上下文圆环继续保留现有明细和插件设置。
26
+ **DSH 0.2.2 起提供新版原生统计按钮**:原生那一行在上、插件账户信息在下。点击插件信息行的任意字段仍可切换**完整/简洁**,保留原来的高度收合与淡出动画:完整显示原生行,简洁把它收起。原生两个按钮保留自己的点击行为,点开是 Harness 的明细弹窗;也可以在插件设置页分别隐藏这两个原生按钮。上下文圆环继续保留现有明细和插件设置。
27
27
 
28
28
  **旧宿主**仍保留点击信息栏切换**完整/简洁**:完整显示旧统计行,简洁收起它;插件字段在两种模式下一致。兼容方式通过实际扩展入口判断,不依赖版本号猜测。
29
29
 
@@ -53,11 +53,11 @@ https://github.com/songoao25/dsh-bottom-info-bar
53
53
 
54
54
  ## 设置
55
55
 
56
- 插件设置都在**插件 → bottom-info-bar**,改完自动保存。**插件信息**和**提醒信息**保留各自的开关与配色。新版的**原生信息**为两个原生按钮各提供一个开关(会话统计 / 用量统计),可以分别隐藏;旧统计行的逐字段控件不再显示,也不计入搜索结果和启用数量,旧设置仍保留供旧宿主使用。旧宿主继续显示原生字段控件。重置插件字段或颜色不会改动 Harness 原生按钮的偏好。
56
+ 插件设置都在**插件 → bottom-info-bar**,改完自动保存。整页沿用 DSH 0.2.2 的卡片体系:每个区块一张卡,带标题和一句话摘要,卡与卡之间用留白分隔,没有分隔线。**要显示的信息**收纳所有显示开关与配色,按原生信息 / 插件信息分组、各自可折叠,并支持整页搜索;提醒信息直接以软底胶囊显示在信息栏上,不再有开关。**额度凭据**默认折叠,**账单数据**负责导出与清除,**版本与更新**提供更新方式与回滚。重置显示项或颜色不会改动 Harness 原生按钮的偏好。
57
57
 
58
- ![插件信息:按计费方式分块](assets/settings-plugin.zh-CN.webp)
58
+ ![要显示的信息:全部显示开关与配色,分组可折叠](assets/settings-plugin.zh-CN.webp)
59
59
 
60
- 「插件信息」里再按计费方式分块——你用哪种服务,就只看哪一块,哪几项有数据的说明写在块标题旁。时区、自定义文字、订阅窗口方向、账单数据是独立设置区:
60
+ 「插件信息」里再按计费方式分块——你用哪种服务,就只看哪一块,哪几项有数据的说明写在块标题旁。时间与日期、订阅窗口百分比方向、额度凭据、账单数据是独立的卡片:
61
61
 
62
62
  ![时间与日期:只设时区](assets/settings-time.zh-CN.webp)
63
63
 
@@ -73,6 +73,22 @@ API 密钥填在 DSH 的**设置 → 模型**;订阅类(Codex、OpenCode、
73
73
 
74
74
  在 DSH 插件页移除(或 `dsh plugin --profile web remove dsh-bottom-info-bar`)后**重启 DSH**:原生统计栏会自动恢复,插件代码不留残留。账本是有意保留的——想彻底清零,先在设置页「账单数据」里导出或清除,再卸载。只想退回上一版的话,在有新版本等待重启时、以及更新失败后,设置页的更新区会给出**回滚到上一版**。细节见 [docs/INSTALL.md](docs/INSTALL.md)。
75
75
 
76
+ ## 常见问题
77
+
78
+ **信息栏显示「未配置」或「刷新失败」,是坏了吗?**
79
+
80
+ 不是。读不到数据时信息栏会保留上一份成功快照,绝不显示假的 0%。先确认装好后**重启过 DSH**(只刷新页面不够)。把鼠标停在出问题的字段上能看到原因;触屏宿主(DSH Go)没有悬停,改看插件设置页。各服务商的凭据配置见 [docs/INSTALL.md](docs/INSTALL.md)。
81
+
82
+ **阿里 Token Plan 照文档配了 AccessKey,还是「刷新失败」?**
83
+
84
+ 多半是授权没配全——只授 `AliyunTokenPlanReadOnlyAccess` 不够。请由主账号为该 RAM 用户完成:
85
+
86
+ 1. 在 RAM 控制台**同时**授予系统策略 `AliyunTokenPlanReadOnlyAccess` 与 `AliyunBSSReadOnlyAccess`;
87
+ 2. 到百炼控制台「账号管理」给该 RAM 用户分配管理员或订阅套餐权限——只授系统策略、漏掉这步分配,额度照样读不到(信息栏就会报刷新失败);
88
+ 3. 个人版的月度百分比走控制台链路,还需一个自定义策略授予 `modelstudio:GenerateCLIAccessToken`。
89
+
90
+ 另外,推理套餐 Key(`sk-sp-…`)只能推理、读不到额度,必须改用阿里云 AccessKey(`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`),填在插件设置页「额度凭据」(默认折叠),或 DSH 凭据 / 同名环境变量。信息栏悬停只给笼统的「重新授权」提示,上面这份完整授权清单在设置页「额度凭据」卡片里也能看到;逐步说明见 [docs/INSTALL.md](docs/INSTALL.md)。
91
+
76
92
  ## 语言
77
93
 
78
94
  插件内置简体中文、繁体中文、英语、日语、韩语、西班牙语、葡萄牙语、法语、德语、意大利语、俄语、印地语和印度尼西亚语。默认跟随 DSH 的语言;也可以在本插件设置页的**语言**中单独选择,选择会保存在当前浏览器。墨西哥西班牙语、巴西葡萄牙语等地区变体使用对应的内置语言;不支持的语言显示英语。
package/docs/INSTALL.md CHANGED
@@ -99,7 +99,7 @@ dsh --profile web --dump-config | grep -A2 dsh-bottom-info-bar
99
99
 
100
100
  - **Codex / ChatGPT**:信息栏**只读** `~/.codex/auth.json` 中的登录令牌,解析真实套餐与到期信息;token 仅在本机内存中使用,不落盘、不记录、不续期、不写回。令牌的**绑定 / 续期**由独立插件 [**dsh-chatgpt-sub**](https://github.com/songoao25/dsh-chatgpt-sub)(独立仓库)负责——安装并绑定后,本信息栏即可显示订阅信息;令牌缺失时信息栏显示「未绑定」引导,相关字段缺失时只保留服务商和模型。
101
101
  - **OpenCode Go**:在 **设置 → 模型** 配置 `OPENCODE_GO_API_KEY`(或先用 opencode CLI 登录其订阅,写入平台共享目录 `opencode/auth.json` 的 `opencode-go` 条目:macOS/Linux 为 `~/.local/share/opencode/auth.json`,Windows 为 `%LOCALAPPDATA%\opencode\auth.json`)。未配置时信息栏显示"未配置 OpenCode Go"引导,不报错。
102
- - **阿里 Token Plan(百炼,中国站 / 国际站)**:额度接口不认推理套餐 Key(`sk-sp-…` 只能推理),要另配阿里云 AccessKey——`ALIBABA_CLOUD_ACCESS_KEY_ID` 与 `ALIBABA_CLOUD_ACCESS_KEY_SECRET`(RAM 用户即可),配置给 DSH 凭据或设为同名环境变量(插件先读 DSH 凭据,再读环境变量)。最小权限:系统策略 `AliyunTokenPlanReadOnlyAccess` 覆盖官方 OpenAPI `GetSubscriptionStats`;官方 CLI 同款的控制台链路还要给该 RAM 用户一个自定义策略,授予 `modelstudio:GenerateCLIAccessToken`。两条链路都只读、不读浏览器 Cookie;未配置、权限不足或未订阅时信息栏给明确提示并保留上一份额度,不显示 0%。
102
+ - **阿里 Token Plan(百炼,中国站 / 国际站)**:额度接口不认推理套餐 Key(`sk-sp-…` 只能推理),要另配阿里云 AccessKey——`ALIBABA_CLOUD_ACCESS_KEY_ID` 与 `ALIBABA_CLOUD_ACCESS_KEY_SECRET`(RAM 用户即可),配置给 DSH 凭据或设为同名环境变量(插件先读 DSH 凭据,再读环境变量)。授权(由主账号为该 RAM 用户完成):在 RAM 控制台同时授予系统策略 `AliyunTokenPlanReadOnlyAccess`(覆盖官方 OpenAPI `GetSubscriptionStats`)与 `AliyunBSSReadOnlyAccess`,再到百炼控制台「账号管理」给该 RAM 用户分配管理员或订阅套餐权限——只授系统策略、漏掉这步分配,额度照样读不到(信息栏会报刷新失败)。个人版月度百分比走官方 CLI 同款的控制台链路,还需一个自定义策略授予 `modelstudio:GenerateCLIAccessToken`。两条链路都只读、不读浏览器 Cookie;未配置、权限不足或未订阅时信息栏给明确提示并保留上一份额度,不显示 0%。
103
103
  - **Kimi For Coding**:配订阅专属 API Key `KIMI_API_KEY`(DSH 里 kimi-coding 的凭据名;回退 `KIMI_CODING_API_KEY` / `MOONSHOT_API_KEY`),配置给 DSH 凭据或设为同名环境变量;信息栏用 Bearer 调 `GET https://api.kimi.com/coding/v1/usages`,国内站不通时自动试国际站 `https://api.kimi.ai/coding/v1/usages`,显示 5 小时与周窗口。这个端点没有官方公开文档,可能随上游变化;读不到时保留上一份额度。
104
104
 
105
105
  不习惯在设置页填的话,也可以用同名环境变量(示例值换成自己的凭据,别提交到仓库):