dsh-deepseek-balance-widget 2.3.6 → 2.3.7
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 +26 -13
- package/README_EN.md +23 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,24 +12,25 @@
|
|
|
12
12
|
- 弹窗顶部显示当前平台标题:点「**更换**」在已添加的平台间切换,点「**×**」可移除该平台
|
|
13
13
|
- 弹窗右上角「**+ 添加**」:加入 MiMo
|
|
14
14
|
- 详情字段:余额、累计消费、今日消费、今日 Token、本月消耗(本月消费 / Tokens)
|
|
15
|
-
- 「**AI 帮我配置**」:复制提示语发给智能体,AI
|
|
15
|
+
- 「**AI 帮我配置**」:复制提示语发给智能体,AI 会一步步指导你抓取凭证并完成配置
|
|
16
16
|
- 弹窗底部显示版本号,有新版时一键自动更新
|
|
17
|
+
- 支持中 / EN 界面切换
|
|
17
18
|
|
|
18
19
|
## 安装
|
|
19
20
|
|
|
20
21
|
需要:已安装 dsh(可用 `dsh web`)。
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
|
-
dsh plugin --profile web add dsh-deepseek-balance-widget@
|
|
24
|
+
dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
从 npm 拉取安装,dsh 自动注册到 `dsh.profile.bundles`,完成后**重启 `dsh web`** 即可。
|
|
27
28
|
|
|
28
|
-
>
|
|
29
|
+
> **务必写死版本号 `@2.3.6`**(当前最新稳定版)。不要用 `@latest`——它会被本地 pnpm/npm 缓存或镜像源解析成旧版本,导致装到老版(实测在某些电脑上 `@latest` 会装成 2.3.3)。如果未来发布了更高版本,把这里的版本号换成最新的即可。
|
|
29
30
|
|
|
30
31
|
也可以直接对 AI 说:
|
|
31
32
|
|
|
32
|
-
> 帮我用 npm 安装 dsh-deepseek-balance-widget
|
|
33
|
+
> 帮我用 npm 安装 dsh-deepseek-balance-widget 插件,执行 `dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6`。
|
|
33
34
|
|
|
34
35
|
## 配置
|
|
35
36
|
|
|
@@ -41,11 +42,11 @@ dsh plugin --profile web add dsh-deepseek-balance-widget@latest
|
|
|
41
42
|
|
|
42
43
|
AI 会接管全部:问 API Key / 引导获取平台 Cookie → 写入本机 → 提醒重启 `dsh web`。
|
|
43
44
|
|
|
44
|
-
| 平台
|
|
45
|
-
|
|
|
46
|
-
| DeepSeek
|
|
45
|
+
| 平台 | 凭据 | 备注 |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| DeepSeek | `DEEPSEEK_API_KEY` | 必填,余额 |
|
|
47
48
|
| DeepSeek 用量 | `DEEPSEEK_PLATFORM_TOKEN` | 可选,统计累计消费 / 本月 / 今日 |
|
|
48
|
-
| MiMo(小米)
|
|
49
|
+
| MiMo(小米) | 登录 Cookie | AI 引导获取 |
|
|
49
50
|
|
|
50
51
|
凭据保存在你本机的 `~/.dsh/ai-balances.json`,不随插件分发、不上传。
|
|
51
52
|
|
|
@@ -64,23 +65,23 @@ AI 会接管全部:问 API Key / 引导获取平台 Cookie → 写入本机
|
|
|
64
65
|
### 方式二:命令行强制更新(最稳妥,适合卡住或装不上的情况)
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
|
-
dsh plugin --profile web add dsh-deepseek-balance-widget@
|
|
68
|
+
dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
**写死版本号 `@2.3.6`** 可绕过本地缓存 / 镜像源不同步 / `latest` 解析成旧版的问题,一步到位。装完**彻底重启 `dsh web`**。
|
|
71
72
|
|
|
72
73
|
### 方式三:手动更新(命令行更新失败时兜底)
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
76
|
cd ~/.dsh/profiles/web
|
|
76
|
-
npm install dsh-deepseek-balance-widget@
|
|
77
|
+
npm install dsh-deepseek-balance-widget@2.3.6 # 若目录内有 pnpm-lock.yaml 则用 pnpm add
|
|
77
78
|
# 验证磁盘上确实变了
|
|
78
79
|
cat node_modules/dsh-deepseek-balance-widget/package.json | grep '"version"'
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
确认输出 `2.3.6` 后,**彻底重启 `dsh web`** 即可。
|
|
82
83
|
|
|
83
|
-
>
|
|
84
|
+
> 如果你的环境里弹窗/命令行的更新一直失败(提示版本没变),通常是 Agent 主机(如 WorkBuddy)通过 `NODE_OPTIONS` 注入了文件删除拦截导致 pnpm/npm 更新中断。此时在**普通终端**(不通过 Agent 运行)里执行上面的命令即可成功;或先执行 `set NODE_OPTIONS=`(PowerShell)再重试。
|
|
84
85
|
|
|
85
86
|
## 卸载
|
|
86
87
|
|
|
@@ -92,6 +93,18 @@ dsh plugin --profile web rm dsh-deepseek-balance-widget
|
|
|
92
93
|
|
|
93
94
|
> 帮我用 npm 卸载 dsh-deepseek-balance-widget 插件。
|
|
94
95
|
|
|
96
|
+
## 联系
|
|
97
|
+
|
|
98
|
+
有问题或建议,欢迎联系:
|
|
99
|
+
|
|
100
|
+
- 邮箱:crazy_l118@icloud.com
|
|
101
|
+
|
|
102
|
+
## 赞助
|
|
103
|
+
|
|
104
|
+
如果这个插件对你有帮助,可以给我的晚餐加一根火腿肠 🍗
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
95
108
|
## License
|
|
96
109
|
|
|
97
110
|
[MIT](LICENSE)
|
package/README_EN.md
CHANGED
|
@@ -12,24 +12,25 @@ A multi-provider AI balance widget for the dsh web sidebar. **DeepSeek** is buil
|
|
|
12
12
|
- Popover header shows the current provider: a "**Switch**" menu changes to another added provider, and "**×**" removes it
|
|
13
13
|
- "**+ Add**" button (top right): add **MiMo**
|
|
14
14
|
- Details: balance, cumulative spend, today spend, today tokens, monthly usage (monthly spend / tokens)
|
|
15
|
-
- "**AI 帮我配置**":
|
|
15
|
+
- "**AI 帮我配置**": copy a prompt, send it to your AI, and it walks you through fetching the credentials — no digging through cookies by hand
|
|
16
16
|
- Version shown in the popover footer; one-click auto-update when a new version is available
|
|
17
|
+
- UI language toggle: 中文 / EN
|
|
17
18
|
|
|
18
19
|
## Install
|
|
19
20
|
|
|
20
21
|
Requires: dsh installed (with `dsh web` working).
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
|
-
dsh plugin --profile web add dsh-deepseek-balance-widget@
|
|
24
|
+
dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
Installed from npm and auto-registered by dsh. **Restart `dsh web`** and the balance button appears in the sidebar.
|
|
27
28
|
|
|
28
|
-
>
|
|
29
|
+
> **Always pin the version `@2.3.6`** (the current latest stable). Do not use `@latest` — local pnpm/npm cache or a mirror registry can resolve it to an outdated release (observed: `@latest` installed 2.3.3 on another machine). When a newer version is released, bump the number here.
|
|
29
30
|
|
|
30
31
|
Or just tell your AI:
|
|
31
32
|
|
|
32
|
-
> Install the dsh-deepseek-balance-widget plugin for me via npm.
|
|
33
|
+
> Install the dsh-deepseek-balance-widget plugin for me via npm: run `dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6`.
|
|
33
34
|
|
|
34
35
|
## Configuration
|
|
35
36
|
|
|
@@ -42,7 +43,7 @@ To add MiMo, open the popover, click "+ Add", then "AI 帮我配置", and send t
|
|
|
42
43
|
The AI takes care of everything: asks for your API key / guides you through getting the platform cookie → writes the local config → reminds you to **restart `dsh web`**.
|
|
43
44
|
|
|
44
45
|
| Provider | Credential | Notes |
|
|
45
|
-
|
|
46
|
+
| --- | --- | --- |
|
|
46
47
|
| DeepSeek | `DEEPSEEK_API_KEY` | Required, balance |
|
|
47
48
|
| DeepSeek usage | `DEEPSEEK_PLATFORM_TOKEN` | Optional, cumulative / monthly / today stats |
|
|
48
49
|
| MiMo (Xiaomi) | Login cookie | Guided by your AI |
|
|
@@ -64,23 +65,23 @@ Upgrade to the latest stable release on npm regardless of which older version yo
|
|
|
64
65
|
### Method 2: Force update from the command line (most reliable if stuck)
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
|
-
dsh plugin --profile web add dsh-deepseek-balance-widget@
|
|
68
|
+
dsh plugin --profile web add dsh-deepseek-balance-widget@2.3.6
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
**Pinning `@2.3.6`** bypasses local cache / mirror desync / a stale `latest` resolution in one step. Then **fully restart `dsh web`**.
|
|
71
72
|
|
|
72
73
|
### Method 3: Manual update (fallback when the command-line update fails)
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
76
|
cd ~/.dsh/profiles/web
|
|
76
|
-
npm install dsh-deepseek-balance-widget@
|
|
77
|
+
npm install dsh-deepseek-balance-widget@2.3.6 # use `pnpm add` if a pnpm-lock.yaml exists in this dir
|
|
77
78
|
# verify the on-disk version actually changed
|
|
78
79
|
cat node_modules/dsh-deepseek-balance-widget/package.json | grep '"version"'
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
Once it prints
|
|
82
|
+
Once it prints `2.3.6`, **fully restart `dsh web`**.
|
|
82
83
|
|
|
83
|
-
>
|
|
84
|
+
> If the popover / command-line update keeps failing (version never changes), an agent host (e.g. WorkBuddy) is likely injecting a file-deletion guard via `NODE_OPTIONS`, which makes pnpm/npm abort during updates. Run the command in a **plain terminal** (not through the agent), or unset `NODE_OPTIONS` first (PowerShell: `set NODE_OPTIONS=`) and retry.
|
|
84
85
|
|
|
85
86
|
## Uninstall
|
|
86
87
|
|
|
@@ -92,6 +93,18 @@ Or just tell your AI:
|
|
|
92
93
|
|
|
93
94
|
> Uninstall the dsh-deepseek-balance-widget plugin for me via npm.
|
|
94
95
|
|
|
96
|
+
## Contact
|
|
97
|
+
|
|
98
|
+
Questions or suggestions? Feel free to reach out:
|
|
99
|
+
|
|
100
|
+
- Email: crazy_l118@icloud.com
|
|
101
|
+
|
|
102
|
+
## Sponsor
|
|
103
|
+
|
|
104
|
+
If this plugin helped you, consider buying me a ham sausage for dinner 🍗
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
95
108
|
## License
|
|
96
109
|
|
|
97
110
|
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-deepseek-balance-widget",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Multi-provider AI balance widget for the dsh web sidebar: a live, auto-refreshing balance pill plus a detail popover listing DeepSeek and any added providers (MiMo etc.). Keys are stored per-machine in ~/.dsh/ai-balances.json and resolved from the local credential seam, never hardcoded.",
|
|
6
6
|
"keywords": [
|