dsh-balance-widget 0.4.4 → 0.4.5
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.en.md +11 -9
- package/README.md +10 -9
- package/docs/screenshot-corner.png +0 -0
- package/docs/screenshot-popover.png +0 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[](https://nodejs.org)
|
|
10
10
|
[]()
|
|
11
11
|
|
|
12
|
-
A balance & cost widget for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) Web GUI: a
|
|
12
|
+
A balance & cost widget for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) Web GUI: a persistent sidebar footer card shows the account balance and a remaining-ratio bar; clicking opens a four-tier cost breakdown (last prompt / this session / today-this-project / today-all).
|
|
13
13
|
|
|
14
14
|
## Preview
|
|
15
15
|
|
|
16
|
-
|
|
|
16
|
+
| Sidebar card | Four-tier cost popover |
|
|
17
17
|
| --- | --- |
|
|
18
|
-
|  |  |
|
|
19
19
|
|
|
20
20
|
## How it differs from similar plugins
|
|
21
21
|
|
|
@@ -54,14 +54,16 @@ A balance & cost widget for the [DeepSeek Harness](https://github.com/deepseek-a
|
|
|
54
54
|
```
|
|
55
55
|
host half (lib/index.js)
|
|
56
56
|
ctx.webServer.register:
|
|
57
|
-
GET /api/dsh-balance/balance
|
|
58
|
-
GET /api/dsh-balance/
|
|
59
|
-
GET /api/dsh-balance/today-cost
|
|
57
|
+
GET /api/dsh-balance/balance → official /user/balance (loopback-only guard)
|
|
58
|
+
GET /api/dsh-balance/active-cost → last prompt + session total (most recent session)
|
|
59
|
+
GET /api/dsh-balance/today-cost → today's costs (dual: current workspace + all)
|
|
60
|
+
Zero @deepseek-ai/* imports; loads from any profile layout.
|
|
61
|
+
Also registers a deepseek_billing tool for model-driven queries.
|
|
60
62
|
|
|
61
63
|
client half (lib/client.js)
|
|
62
|
-
ctx.slots.inject("
|
|
63
|
-
→
|
|
64
|
-
→ click
|
|
64
|
+
ctx.slots.inject("sidebar.footer.action")
|
|
65
|
+
→ persistent sidebar footer card (balance + ratio bar + today)
|
|
66
|
+
→ click opens four-tier cost popover + ⓘ term explanations
|
|
65
67
|
```
|
|
66
68
|
|
|
67
69
|
## Installation
|
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[](https://nodejs.org)
|
|
10
10
|
[]()
|
|
11
11
|
|
|
12
|
-
DeepSeek Harness (DSH) Web GUI
|
|
12
|
+
DeepSeek Harness (DSH) Web GUI 的余额与成本小部件:侧边栏底部常驻卡片显示账户余额与剩余比例条,点击弹出四层级成本明细(最近提问 / 本会话 / 今日·本项目 / 今日·全部)。
|
|
13
13
|
|
|
14
14
|
## 效果预览
|
|
15
15
|
|
|
16
|
-
|
|
|
16
|
+
| 侧边栏卡片(左下角常驻) | 点击弹出四层级成本 |
|
|
17
17
|
| --- | --- |
|
|
18
|
-
|  |  |
|
|
19
19
|
|
|
20
20
|
## 与同类插件的区别
|
|
21
21
|
|
|
@@ -49,15 +49,16 @@ DeepSeek Harness (DSH) Web GUI 的余额与成本小部件:在会话头部右
|
|
|
49
49
|
```
|
|
50
50
|
host 半区 (lib/index.js)
|
|
51
51
|
ctx.webServer.register:
|
|
52
|
-
GET /api/dsh-balance/balance
|
|
53
|
-
GET /api/dsh-balance/
|
|
54
|
-
GET /api/dsh-balance/today-cost
|
|
52
|
+
GET /api/dsh-balance/balance → 官方 /user/balance(loopback-only 守卫)
|
|
53
|
+
GET /api/dsh-balance/active-cost → 最近活跃会话的最近提问 + 会话总计
|
|
54
|
+
GET /api/dsh-balance/today-cost → 今日成本(双值:当前工作区 + 全部)
|
|
55
55
|
依赖:零外部 @deepseek-ai/* import,任何 profile 布局均可解析
|
|
56
|
+
另有 deepseek_billing 工具供模型直接查询余额/成本
|
|
56
57
|
|
|
57
58
|
client 半区 (lib/client.js)
|
|
58
|
-
ctx.slots.inject("
|
|
59
|
-
→
|
|
60
|
-
→
|
|
59
|
+
ctx.slots.inject("sidebar.footer.action")
|
|
60
|
+
→ 侧边栏底部常驻卡片(余额 + 比例条 + 今日)
|
|
61
|
+
→ 点击弹出四层级成本明细 + ⓘ 名词解释
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
## 安装
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-balance-widget",
|
|
3
3
|
"description": "Balance & cost widget for the dsh web GUI: a sidebar footer card shows the DeepSeek account balance, a remaining-ratio bar and today's costs; clicking opens a popover with four-tier cost breakdown (last prompt / this session / today-this-project / today-all), term explanations, and a one-click top-up link. Zero external dependencies — works on Node 24.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|