dsh-desktop-statusbar 3.0.2 → 3.0.3
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/LICENSE +21 -21
- package/README.en.md +145 -145
- package/README.md +142 -142
- package/cordis.patch.yml +14 -14
- package/docs/official-models.json +468 -0
- package/docs/official-models.md +190 -0
- package/docs/vendor-intelligence-order.json +124 -0
- package/docs/vendor-intelligence-order.md +77 -0
- package/icon.svg +10 -10
- package/lib/balance-api.js +516 -499
- package/lib/client.js +11436 -9670
- package/lib/exchange-rate.js +199 -199
- package/lib/holiday.js +128 -128
- package/lib/index.js +1723 -376
- package/lib/release-age.js +509 -509
- package/lib/self-update.js +913 -870
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +72 -72
- package/tools/plugin-dir.cjs +0 -4
- package/tools/shot.cjs +9 -10
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "Desktop Status Bar",
|
|
4
|
-
"description": "Replaces the stats line under the DSH desktop conversation with a configurable status bar: 9 optional reorderable fields plus the context ring at the head of the bar, official peak/off-peak cost estimates, custom model prices and account balance."
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Desktop Status Bar",
|
|
4
|
+
"description": "Replaces the stats line under the DSH desktop conversation with a configurable status bar: 9 optional reorderable fields plus the context ring at the head of the bar, official peak/off-peak cost estimates, custom model prices and account balance."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "桌面状态栏",
|
|
4
|
-
"description": "把 DSH 桌面端对话区底部的统计行换成可配置状态栏:9 个可选字段可排序 + 栏首上下文圆环,按官方峰谷口径估算费用,支持自定义模型单价与账户余额。"
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "桌面状态栏",
|
|
4
|
+
"description": "把 DSH 桌面端对话区底部的统计行换成可配置状态栏:9 个可选字段可排序 + 栏首上下文圆环,按官方峰谷口径估算费用,支持自定义模型单价与账户余额。"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-desktop-statusbar",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "把 DSH 桌面端对话区底部的统计行换成可配置状态栏:9 个可选字段可排序 + 栏首上下文圆环,按官方峰谷口径估算费用,支持自定义模型单价与账户余额。",
|
|
6
|
-
"icon": "icon.svg",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"engines": {
|
|
9
|
-
"node": "^22.19.0 || >=24.0.0",
|
|
10
|
-
"dsh": ">=0.2.0-rc.2"
|
|
11
|
-
},
|
|
12
|
-
"author": "北浮森屿 (https://github.com/raphael-y7)",
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/raphael-y7/dsh-desktop-statusbar.git"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/raphael-y7/dsh-desktop-statusbar#readme",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://github.com/raphael-y7/dsh-desktop-statusbar/issues"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"dsh",
|
|
23
|
-
"dsh-plugin",
|
|
24
|
-
"deepseek-harness",
|
|
25
|
-
"statusbar",
|
|
26
|
-
"token-usage",
|
|
27
|
-
"cost"
|
|
28
|
-
],
|
|
29
|
-
"main": "./lib/index.js",
|
|
30
|
-
"exports": {
|
|
31
|
-
".": {
|
|
32
|
-
"default": "./lib/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./client": {
|
|
35
|
-
"default": "./lib/client.js"
|
|
36
|
-
},
|
|
37
|
-
"./locale/*.json": "./locale/*.json",
|
|
38
|
-
"./package.json": "./package.json"
|
|
39
|
-
},
|
|
40
|
-
"files": [
|
|
41
|
-
"lib",
|
|
42
|
-
"tools",
|
|
43
|
-
"docs",
|
|
44
|
-
"locale",
|
|
45
|
-
"cordis.patch.yml",
|
|
46
|
-
"icon.svg",
|
|
47
|
-
"README.md",
|
|
48
|
-
"README.en.md",
|
|
49
|
-
"LICENSE"
|
|
50
|
-
],
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"zod": "^4.4.0"
|
|
53
|
-
},
|
|
54
|
-
"dsh": {
|
|
55
|
-
"bundle": {
|
|
56
|
-
"patch": "./cordis.patch.yml"
|
|
57
|
-
},
|
|
58
|
-
"client": {
|
|
59
|
-
"inject": [
|
|
60
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-conversation",
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-slots",
|
|
63
|
-
"@deepseek-ai/dsh-client-locale"
|
|
64
|
-
],
|
|
65
|
-
"platform": "web"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"scripts": {
|
|
69
|
-
"test": "node tools/test.cjs",
|
|
70
|
-
"sync": "node tools/sync-to-plugin.cjs"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-desktop-statusbar",
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "把 DSH 桌面端对话区底部的统计行换成可配置状态栏:9 个可选字段可排序 + 栏首上下文圆环,按官方峰谷口径估算费用,支持自定义模型单价与账户余额。",
|
|
6
|
+
"icon": "icon.svg",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": "^22.19.0 || >=24.0.0",
|
|
10
|
+
"dsh": ">=0.2.0-rc.2"
|
|
11
|
+
},
|
|
12
|
+
"author": "北浮森屿 (https://github.com/raphael-y7)",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/raphael-y7/dsh-desktop-statusbar.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/raphael-y7/dsh-desktop-statusbar#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/raphael-y7/dsh-desktop-statusbar/issues"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"dsh",
|
|
23
|
+
"dsh-plugin",
|
|
24
|
+
"deepseek-harness",
|
|
25
|
+
"statusbar",
|
|
26
|
+
"token-usage",
|
|
27
|
+
"cost"
|
|
28
|
+
],
|
|
29
|
+
"main": "./lib/index.js",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"default": "./lib/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./client": {
|
|
35
|
+
"default": "./lib/client.js"
|
|
36
|
+
},
|
|
37
|
+
"./locale/*.json": "./locale/*.json",
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"lib",
|
|
42
|
+
"tools",
|
|
43
|
+
"docs",
|
|
44
|
+
"locale",
|
|
45
|
+
"cordis.patch.yml",
|
|
46
|
+
"icon.svg",
|
|
47
|
+
"README.md",
|
|
48
|
+
"README.en.md",
|
|
49
|
+
"LICENSE"
|
|
50
|
+
],
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"zod": "^4.4.0"
|
|
53
|
+
},
|
|
54
|
+
"dsh": {
|
|
55
|
+
"bundle": {
|
|
56
|
+
"patch": "./cordis.patch.yml"
|
|
57
|
+
},
|
|
58
|
+
"client": {
|
|
59
|
+
"inject": [
|
|
60
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
63
|
+
"@deepseek-ai/dsh-client-locale"
|
|
64
|
+
],
|
|
65
|
+
"platform": "web"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"test": "node tools/test.cjs",
|
|
70
|
+
"sync": "node tools/sync-to-plugin.cjs"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/tools/plugin-dir.cjs
CHANGED
package/tools/shot.cjs
CHANGED
|
@@ -227,15 +227,14 @@ function settingsShot(locale) {
|
|
|
227
227
|
function pricingShot(locale) {
|
|
228
228
|
/* SettingsSection 里 useState 的顺序(组件加了 hook 就要回来重数一遍):
|
|
229
229
|
0 drag / 1 newModel / 2 hostModel / 3 editing / 4 draft /
|
|
230
|
-
5
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
presets[4] 从 draft 变成 editing、presets[7] 从 currencyOpen 变成 holidayNote。
|
|
230
|
+
5 catalogNotice / 6 platformModelOpen / 7 catalogDrag / 8 currencyOpen /
|
|
231
|
+
9 platformEditing / 10 platformDraft / 11 platformNotice / 12 newPlatform /
|
|
232
|
+
13 platformErrors。
|
|
233
|
+
开发模式状态来自模块级快照;重复添加 / 倍率校验失败的提示由 catalogNotice 管理;
|
|
234
|
+
9-13 是「第三方平台」区块(平台编辑 / 草稿 / 校验提示 / 新平台名输入 / 字段级错误)。
|
|
235
|
+
pricingShot 的 presets 固定为 editing=3、draft=4、currencyOpen=8。
|
|
236
|
+
旧的 presets[7] 会命中 catalogDrag,币种下拉将无法按截图预设收起。
|
|
237
|
+
历史上的坑:hook 顺序变化时截图 presets 未同步,会造成编辑区不展开或草稿注入错误状态。
|
|
239
238
|
教训:**下标是脆的**,加 hook 必须回来重数,并用 `node tools/shot.cjs` 实际生成一次确认。 */
|
|
240
239
|
const presets = [];
|
|
241
240
|
presets[3] = 'deepseek-flash';
|
|
@@ -255,7 +254,7 @@ function pricingShot(locale) {
|
|
|
255
254
|
peak: { input: '2', cacheRead: '0.04', cacheWrite: '0', output: '8' },
|
|
256
255
|
offPeak: { input: '1', cacheRead: '0.02', cacheWrite: '0', output: '4' }
|
|
257
256
|
};
|
|
258
|
-
presets[
|
|
257
|
+
presets[8] = false; /* 币种下拉收起:展开会压住右边那列输入框 */
|
|
259
258
|
const loaded = loadPlugin(locale, locale === 'en' ? SETTINGS_USD : SETTINGS_CONFIG, presets);
|
|
260
259
|
const t = translator(loaded.shot, locale);
|
|
261
260
|
const tree = loaded.shot.SettingsSection({
|