dsh-usage-state 0.3.0 → 0.3.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.en.md +19 -3
- package/README.md +19 -3
- package/package.json +2 -5
package/README.en.md
CHANGED
|
@@ -22,7 +22,7 @@ hover any segment: Source DeepSeek · Mode API balance · Granted 0 ·
|
|
|
22
22
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
25
|
-
**Requirements**: DSH `0.1.5-rc.2`
|
|
25
|
+
**Requirements**: DSH `0.1.5-rc.2` through `0.2.x`, Node ≥ 20, installed into the `web` profile. The package **ships the prebuilt `lib/`**, so installation has no build step.
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# 1) install (npm package)
|
|
@@ -46,6 +46,8 @@ For development, a local path works too (host-side changes still need a DSH rest
|
|
|
46
46
|
dsh plugin --profile web add /path/to/dsh-usage-state
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
It is also listed in [dsh-market](https://github.com/dsh-market/dsh-market): search for `usage state` (or `takboo`) and install it in one click — the plugin is on the [awesome-dsh-plugin](https://awesome-dsh-plugin.com) curated list under Usage & Billing.
|
|
50
|
+
|
|
49
51
|
Nothing showing up after installing? See the troubleshooting table at the end of [`docs/adapters.md`](docs/adapters.md).
|
|
50
52
|
|
|
51
53
|
## Quick start
|
|
@@ -58,6 +60,20 @@ If a source needs an endpoint or a key (a self-hosted Sub2API, or a provider wit
|
|
|
58
60
|
|
|
59
61
|
A very long provider name never pushes the controls around: the card header stays on one line and only the grey provider id is truncated (hover it for the full text).
|
|
60
62
|
|
|
63
|
+
## Screenshots
|
|
64
|
+
|
|
65
|
+
The reading directly below the composer's stats row (shown here with OpenCode Zen Go's three windows; hover any segment for source, mode and the absolute reset time):
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
Settings: one row per provider; **Auto** detects the data source and its primary mode:
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
Expanding **Advanced** lets you override the source and endpoint, name a credential, or paste a key (written to the DSH credential store):
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
61
77
|
## Supported sources
|
|
62
78
|
|
|
63
79
|
| Source | API mode | Coding-plan mode | Credential |
|
|
@@ -82,9 +98,9 @@ A very long provider name never pushes the controls around: the card header stay
|
|
|
82
98
|
|
|
83
99
|
## Compatibility
|
|
84
100
|
|
|
85
|
-
- Verified against DSH `0.1.5-rc.2`, Node ≥ 20
|
|
101
|
+
- Verified against DSH `0.1.5-rc.2` and `0.2.0-rc.2`, Node ≥ 20. The DSH requirement is declared as `>=0.1.5-rc.1 <0.3.0-0` through `engines.dsh` — the whole 0.1 line from 0.1.5 up, plus the 0.2 line (this is what dsh-market's compatibility badge and install gate read).
|
|
86
102
|
- Published to npm as [`dsh-usage-state`](https://www.npmjs.com/package/dsh-usage-state); GitHub installs work too.
|
|
87
|
-
- Version `0.3.
|
|
103
|
+
- Version `0.3.2`: 0.2-line compatibility review (no code change — only `engines.dsh` was widened); DeepSeek, z.ai and OpenCode Zen Go are verified against live accounts; see the limitations below.
|
|
88
104
|
|
|
89
105
|
## Limitations
|
|
90
106
|
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
## 安装
|
|
26
26
|
|
|
27
|
-
**前置条件**:DSH `0.1.5-rc.2`
|
|
27
|
+
**前置条件**:DSH `0.1.5-rc.2` ~ `0.2.x`、Node ≥ 20,装进 `web` profile。包内**自带预构建的 `lib/`**,安装时没有构建步骤。
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# 1) 安装(npm 包)
|
|
@@ -48,6 +48,8 @@ dsh plugin --profile web add github:takboo/dsh-usage-state
|
|
|
48
48
|
dsh plugin --profile web add /path/to/dsh-usage-state
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
也可以在 [dsh-market](https://github.com/dsh-market/dsh-market) 里搜索 `usage state`(或 `takboo`)一键安装——本插件已收录在精选列表 [awesome-dsh-plugin](https://awesome-dsh-plugin.com) 的「用量与计费」分类。
|
|
52
|
+
|
|
51
53
|
装好后界面没有出现?见 [`docs/adapters.md`](docs/adapters.md) 末尾的排查表。
|
|
52
54
|
|
|
53
55
|
## 快速开始
|
|
@@ -60,6 +62,20 @@ dsh plugin --profile web add /path/to/dsh-usage-state
|
|
|
60
62
|
|
|
61
63
|
供应商名过长时,卡片头部只截断灰色的 provider id(悬停显示全文),右侧的 `↑ ↓ 自动 / Coding Plan / 隐藏` 不会换行。
|
|
62
64
|
|
|
65
|
+
## 截图
|
|
66
|
+
|
|
67
|
+
输入框统计行正下方的账户读数(图示为 OpenCode Zen Go 的三个窗口,悬停任意一段可看数据源、模式与绝对重置时刻):
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
设置页:每个 provider 一行,默认「自动」会识别数据源与主模式:
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
展开「高级」可覆盖数据源与端点、指定凭据名,或写入密钥(写入 DSH 凭据库):
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
63
79
|
## 支持的数据源
|
|
64
80
|
|
|
65
81
|
| 数据源 | API 模式 | Coding Plan 模式 | 凭据 |
|
|
@@ -106,9 +122,9 @@ dsh plugin --profile web add /path/to/dsh-usage-state
|
|
|
106
122
|
|
|
107
123
|
## 兼容性
|
|
108
124
|
|
|
109
|
-
- 实测环境:DSH `0.1.5-rc.2`,Node ≥ 20
|
|
125
|
+
- 实测环境:DSH `0.1.5-rc.2` 与 `0.2.0-rc.2`,Node ≥ 20。DSH 版本要求通过 `engines.dsh` 声明为 `>=0.1.5-rc.1 <0.3.0-0`,即 **0.1.5 起的整条 0.1 线与 0.2 线**(dsh-market 的兼容徽标与"可安装"判定读的就是它)。
|
|
110
126
|
- 同名发布在 npm([`dsh-usage-state`](https://www.npmjs.com/package/dsh-usage-state)),也可从 GitHub 直接安装。
|
|
111
|
-
- 版本 `0.3.0
|
|
127
|
+
- 版本 `0.3.2`:DSH 0.2 发布线的兼容复核(无代码改动,只放宽 `engines.dsh`);DeepSeek、z.ai 与 OpenCode Zen Go 已在真机验证,其余见下。
|
|
112
128
|
|
|
113
129
|
## 已知限制
|
|
114
130
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-usage-state",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH plugin: show account balance (API mode) or coding-plan quota (5h/7d/30d) for the model in use",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20",
|
|
9
|
-
"dsh": ">=0.1.5-rc.1 <0.
|
|
9
|
+
"dsh": ">=0.1.5-rc.1 <0.3.0-0"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "node --import ./tests/support/client-render-hook.mjs --test",
|
|
@@ -69,9 +69,6 @@
|
|
|
69
69
|
"LICENSE",
|
|
70
70
|
"docs/adapters.md"
|
|
71
71
|
],
|
|
72
|
-
"peerDependencies": {
|
|
73
|
-
"react": "^18.2.0"
|
|
74
|
-
},
|
|
75
72
|
"keywords": [
|
|
76
73
|
"deepseek",
|
|
77
74
|
"dsh",
|