dsh-sidebar-usage 1.0.4 → 1.0.6
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/lib/custom.js +2 -1
- package/lib/index.js +5 -3
- package/package.json +1 -1
package/lib/custom.js
CHANGED
|
@@ -266,7 +266,8 @@ export function normalizeCustomProviders(raw) {
|
|
|
266
266
|
totalPath: pickedTotal,
|
|
267
267
|
usedPath: pickedUsed,
|
|
268
268
|
expiresPath: pickedExpires,
|
|
269
|
-
availablePath
|
|
269
|
+
// 预设给的 availablePath 也要能生效(否则 newapi-account 的 data.status 检查会丢)
|
|
270
|
+
availablePath: text(item.availablePath) || (defaults.availablePath ?? ''),
|
|
270
271
|
// 两组原始值,编辑表单切换类型时用
|
|
271
272
|
accountType,
|
|
272
273
|
rawPath: path,
|
package/lib/index.js
CHANGED
|
@@ -133,14 +133,16 @@ function buildConfig(z) {
|
|
|
133
133
|
// 容错:`kind` 写错不该让整条插件配置校验失败(那会把看板整个弄没)。
|
|
134
134
|
// 认不出的值在 custom.js 里已经回落成 balance,这里只要放行不认识的字符串。
|
|
135
135
|
kind: z.string(),
|
|
136
|
-
|
|
136
|
+
// 容错:预设名写错(或宿主还没认出新预设)不该让整条插件配置失效,
|
|
137
|
+
// 认不出的名字在 custom.js 里会回落成 json。
|
|
138
|
+
preset: z.string(),
|
|
137
139
|
path: z.string(),
|
|
138
140
|
usagePath: z.string(),
|
|
139
141
|
auth: z.union(CUSTOM_AUTHS.map((id) => z.const(id))),
|
|
140
142
|
apiKeyRef: z.string(),
|
|
141
143
|
currency: z.string(),
|
|
142
|
-
scale: z.string(),
|
|
143
|
-
quota: z.string(),
|
|
144
|
+
scale: z.union([z.string(), z.number()]),
|
|
145
|
+
quota: z.union([z.string(), z.number()]),
|
|
144
146
|
totalPath: z.string(),
|
|
145
147
|
usedPath: z.string(),
|
|
146
148
|
availablePath: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-sidebar-usage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Sidebar usage HUD for DeepSeek Harness: provider balance / subscription quota, cumulative tokens & calls, drag-to-resize card, hover-out drawer that collects bottom-bar entries.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|