dsh-deepseek-balance-widget 1.2.0 → 1.2.2
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 +4 -22
- package/README_EN.md +4 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
## 功能
|
|
10
10
|
|
|
11
|
+

|
|
12
|
+
|
|
11
13
|
- 侧边栏常驻按钮:`余额`、`今日消费`、`今日Token` 三个数值,30 秒自动刷新
|
|
12
14
|
- 点击弹出详情卡片:
|
|
13
15
|
- 余额(`$`,来自 `api.deepseek.com/user/balance`)
|
|
@@ -43,36 +45,16 @@
|
|
|
43
45
|
|
|
44
46
|
## 安装
|
|
45
47
|
|
|
46
|
-
插件已发布到 npm,包名 **`dsh-deepseek-balance-widget
|
|
48
|
+
插件已发布到 npm,包名 **`dsh-deepseek-balance-widget`**。一条命令安装:
|
|
47
49
|
|
|
48
50
|
```bash
|
|
49
51
|
dsh plugin --profile web add dsh-deepseek-balance-widget
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
安装成功后 dsh 会**自动把该包注册进 `dsh.profile.bundles
|
|
54
|
+
安装成功后 dsh 会**自动把该包注册进 `dsh.profile.bundles`**,**无需手动改任何配置文件**。本包**没有构建脚本**,pnpm 不会拦截(无需在 `pnpm-workspace.yaml` 的 `allowBuilds` 里批准)。
|
|
53
55
|
|
|
54
56
|
完成后**重启 `dsh web`**,侧边栏出现余额按钮即可。
|
|
55
57
|
|
|
56
|
-
> 旧版 dsh(不含自动注册机制)或绕过 `dsh plugin` 直接 `pnpm/npm install` 时,才需要手动在 `~/.dsh/profiles/web/package.json` 的 `dsh.profile.bundles` 末尾加入 `"dsh-deepseek-balance-widget"`。
|
|
57
|
-
|
|
58
|
-
### 🤖 让 AI 帮你装
|
|
59
|
-
|
|
60
|
-
2026年了,你有 Agent,让它自己装。打开 DeepSeek Harness,把下面这句丢给它:
|
|
61
|
-
|
|
62
|
-
> 帮我安装 dsh-deepseek-balance-widget 插件:npm 包名 dsh-deepseek-balance-widget
|
|
63
|
-
|
|
64
|
-
AI 会自动执行 `dsh plugin --profile web add dsh-deepseek-balance-widget`(从 npm 安装,无需 git)→ 验证 bundles 注册 → 提醒你重启。
|
|
65
|
-
|
|
66
|
-
### 备选:GitHub 直装
|
|
67
|
-
|
|
68
|
-
如果暂时连不上 npm registry,也可以从 GitHub 安装:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
dsh plugin --profile web add github:crazy-L118/dsh-deepseek-balance-widget
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
(此方式需要电脑装了 git。)
|
|
75
|
-
|
|
76
58
|
## 配置凭据(关键一步)
|
|
77
59
|
|
|
78
60
|
编辑 `~/.dsh/.credentials.yaml`:
|
package/README_EN.md
CHANGED
|
@@ -8,6 +8,8 @@ A small plugin that shows your DeepSeek balance in the DeepSeek Harness (dsh) we
|
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
+

|
|
12
|
+
|
|
11
13
|
- Persistent sidebar widget: `余额` (balance), `今日消费` (today spend), `今日Token` (today tokens), auto-refresh every 30 s
|
|
12
14
|
- Click for a detail card:
|
|
13
15
|
- Balance (`$`, from `api.deepseek.com/user/balance`)
|
|
@@ -43,36 +45,16 @@ Browser (dsh web frontend) ──GET /deepseek-balance──▶ dsh host (your
|
|
|
43
45
|
|
|
44
46
|
## Install
|
|
45
47
|
|
|
46
|
-
The plugin is published to npm as **`dsh-deepseek-balance-widget`**. Install with a single command
|
|
48
|
+
The plugin is published to npm as **`dsh-deepseek-balance-widget`**. Install with a single command:
|
|
47
49
|
|
|
48
50
|
```bash
|
|
49
51
|
dsh plugin --profile web add dsh-deepseek-balance-widget
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
After a successful `dsh plugin` install, dsh **automatically registers the package in `dsh.profile.bundles
|
|
54
|
+
After a successful `dsh plugin` install, dsh **automatically registers the package in `dsh.profile.bundles`**, so **no manual config editing is needed**. This package has **no build script**, so pnpm does not block it (no `allowBuilds` approval needed).
|
|
53
55
|
|
|
54
56
|
Then **restart `dsh web`** — the balance button appears in the sidebar.
|
|
55
57
|
|
|
56
|
-
> Only for older dsh versions (without the auto-registration mechanism) or when bypassing `dsh plugin` with raw `pnpm/npm install`: manually append `"dsh-deepseek-balance-widget"` to the `dsh.profile.bundles` array in `~/.dsh/profiles/web/package.json`.
|
|
57
|
-
|
|
58
|
-
### 🤖 Let the AI install it
|
|
59
|
-
|
|
60
|
-
You have an Agent — let it install itself. Open DeepSeek Harness and drop this sentence in:
|
|
61
|
-
|
|
62
|
-
> Install the dsh-deepseek-balance-widget plugin for me (npm package: dsh-deepseek-balance-widget)
|
|
63
|
-
|
|
64
|
-
The agent will run `dsh plugin --profile web add dsh-deepseek-balance-widget` (from npm, no git needed), verify the bundle registration, then tell you to restart.
|
|
65
|
-
|
|
66
|
-
### Alternative: GitHub install
|
|
67
|
-
|
|
68
|
-
If the npm registry is unreachable, install straight from GitHub instead:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
dsh plugin --profile web add github:crazy-L118/dsh-deepseek-balance-widget
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
(Note: this requires git on the machine.)
|
|
75
|
-
|
|
76
58
|
## Configure credentials (important)
|
|
77
59
|
|
|
78
60
|
Edit `~/.dsh/.credentials.yaml`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-deepseek-balance-widget",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DeepSeek API balance widget for the dsh web sidebar: a live, auto-refreshing balance pill (balance / today spend / today tokens) with a detail popover (cumulative spend, monthly usage, request count). Every user sees only their own balance — keys are resolved per-machine from the local credential seam, never hardcoded.",
|
|
6
6
|
"keywords": [
|