dsh-bottom-info-bar 1.22.0 → 1.23.0
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/docs/INSTALL.md +13 -1
- package/lib/client.js +7 -2
- package/lib/constants.js +8 -5
- package/lib/index.js +610 -1
- package/lib/locales.js +130 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Plugin information is further grouped by billing mode — read only the block th
|
|
|
61
61
|
|
|
62
62
|

|
|
63
63
|
|
|
64
|
-
API keys go in DSH under **Settings → Models**; subscriptions (Codex, OpenCode, Xiaomi Token Plan, Command Code, MiniMax) read the local sign-in
|
|
64
|
+
API keys go in DSH under **Settings → Models**; subscriptions (Codex, OpenCode, Xiaomi Token Plan, Command Code, MiniMax, Zhipu GLM, Kimi For Coding, Alibaba Token Plan for both China and international sites) read the local sign-in or their own credential: MiniMax needs a Subscription Key, and Kimi For Coding reads `KIMI_API_KEY` (its DSH credential name; `KIMI_CODING_API_KEY` / `MOONSHOT_API_KEY` are also accepted). Alibaba Token Plan (China and international sites) cannot read quota with the inference plan key — set an Alibaba Cloud AccessKey (`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`, a RAM user is enough) in DSH's credentials or as same-named environment variables. Anything off the list gets a not-supported hint instead of borrowed numbers.
|
|
65
65
|
|
|
66
66
|
## Spend and updates
|
|
67
67
|
|
package/README.zh-CN.md
CHANGED
|
@@ -61,7 +61,7 @@ https://github.com/songoao25/dsh-bottom-info-bar
|
|
|
61
61
|
|
|
62
62
|

|
|
63
63
|
|
|
64
|
-
密钥填在 DSH 的**设置 → 模型**;订阅类(Codex、OpenCode、小米 Token Plan、Command Code、MiniMax
|
|
64
|
+
密钥填在 DSH 的**设置 → 模型**;订阅类(Codex、OpenCode、小米 Token Plan、Command Code、MiniMax、智谱、Kimi For Coding、阿里 Token Plan 中国站/国际站)读本机登录或各自的凭据:MiniMax 用 Subscription Key,Kimi For Coding 读 `KIMI_API_KEY`(DSH 里的凭据名;也兼容 `KIMI_CODING_API_KEY` / `MOONSHOT_API_KEY`)。阿里 Token Plan(中国站/国际站)用推理套餐 Key 读不到额度,要另配阿里云 AccessKey——`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`(RAM 用户即可),填在 DSH 凭据或同名环境变量里。列表里没有的服务商只会显示未适配提示,绝不借用别家的数据。
|
|
65
65
|
|
|
66
66
|
## 花费与更新
|
|
67
67
|
|
package/docs/INSTALL.md
CHANGED
|
@@ -93,10 +93,22 @@ dsh --profile web --dump-config | grep -A2 dsh-bottom-info-bar
|
|
|
93
93
|
|
|
94
94
|
## 配置订阅额度(可选,v1.1.0)
|
|
95
95
|
|
|
96
|
-
信息栏按当前服务商自动选择三种口径之一(互斥,无需手动切换):**余额制**(DeepSeek 等)显示官方接口的真实余额,**订阅制**(Codex、OpenCode、小米 Token Plan、Command Code、MiniMax
|
|
96
|
+
信息栏按当前服务商自动选择三种口径之一(互斥,无需手动切换):**余额制**(DeepSeek 等)显示官方接口的真实余额,**订阅制**(Codex、OpenCode、小米 Token Plan、Command Code、MiniMax、智谱、阿里 Token Plan、Kimi For Coding)显示各额度窗口剩余额度与重置倒计时,**云账单制**(Together、Fireworks 等)显示官方账单的本月真实花费。订阅额度数据源:
|
|
97
97
|
|
|
98
98
|
- **Codex / ChatGPT**:信息栏**只读** `~/.codex/auth.json` 中的登录令牌,解析真实套餐与到期信息;token 仅在本机内存中使用,不落盘、不记录、不续期、不写回。令牌的**绑定 / 续期**由独立插件 [**dsh-chatgpt-sub**](https://github.com/songoao25/dsh-chatgpt-sub)(独立仓库)负责——安装并绑定后,本信息栏即可显示订阅信息;令牌缺失时信息栏显示「未绑定」引导,相关字段缺失时只保留服务商和模型。
|
|
99
99
|
- **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"引导,不报错。
|
|
100
|
+
- **阿里 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%。
|
|
101
|
+
- **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 小时与周窗口。这个端点没有官方公开文档,可能随上游变化;读不到时保留上一份额度。
|
|
102
|
+
|
|
103
|
+
最小配置示例(示例值换成自己的凭据,别提交到仓库):
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-access-key-id>"
|
|
107
|
+
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-access-key-secret>"
|
|
108
|
+
export KIMI_API_KEY="sk-..."
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
这两类都不需要额外插件,也不需要网页 Cookie;凭据只用于只读查询额度,不参与推理请求。
|
|
100
112
|
|
|
101
113
|
## 更新版本
|
|
102
114
|
|