dsh-desktop-statusbar 3.0.3 → 3.0.4

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/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Desktop-Statusleiste",
4
+ "description": "Ersetzt die Statistikzeile unter der DSH-Desktop-Konversation durch eine konfigurierbare Statusleiste: 9 optionale, sortierbare Felder plus der Kontextring am Anfang der Leiste, offizielle Spitzen-/Nebenzeiten-Kostenschätzungen, eigene Modellpreise und Kontoguthaben."
5
+ }
6
+ }
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/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Barra de estado de escritorio",
4
+ "description": "Sustituye la línea de estadísticas bajo la conversación del escritorio de DSH por una barra de estado configurable: 9 campos opcionales reordenables más el anillo de contexto al inicio de la barra, estimaciones oficiales de coste en horas punta y valle, precios personalizados de modelos y saldo de la cuenta."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Barre d'état de bureau",
4
+ "description": "Remplace la ligne de statistiques sous la conversation du bureau DSH par une barre d'état configurable : 9 champs facultatifs réorganisables, plus l'anneau de contexte en tête de barre, estimation officielle des coûts heures pleines / creuses, prix de modèles personnalisés et solde du compte."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "デスクトップステータスバー",
4
+ "description": "DSH デスクトップ版の会話エリア下部の統計行を、設定可能なステータスバーに置き換えます:並べ替え可能な 9 個の任意フィールドとバー先頭のコンテキストリング、公式のピーク/オフピーク料金による費用推定、カスタムモデル価格、アカウント残高に対応。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Barra de Estado do Ambiente de Trabalho",
4
+ "description": "Substitui a linha de estatísticas por baixo da conversa do ambiente de trabalho do DSH por uma barra de estado configurável: 9 campos opcionais reordenáveis, mais o anel de contexto no início da barra, estimativas oficiais de custo de ponta/fora de ponta, preços de modelos personalizados e saldo da conta."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Строка состояния рабочего стола",
4
+ "description": "Заменяет строку статистики под диалогом DSH на рабочем столе на настраиваемую строку состояния: 9 необязательных полей с изменяемым порядком плюс кольцо контекста в начале строки, оценка стоимости по официальным пиковым/непиковым тарифам, свои цены моделей и баланс аккаунта."
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.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
- }
1
+ {
2
+ "name": "dsh-desktop-statusbar",
3
+ "version": "3.0.4",
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/shot.cjs CHANGED
@@ -93,6 +93,7 @@ function loadPlugin(locale, config, presets) {
93
93
  removeItem: (k) => { store.delete(k); }
94
94
  },
95
95
  innerWidth: 1200, innerHeight: 900,
96
+ __DSH_STATUSBAR_TEST__: true,
96
97
  setInterval: () => 0, clearInterval: () => {}, setTimeout: () => 0, clearTimeout: () => {},
97
98
  addEventListener: () => {}, removeEventListener: () => {},
98
99
  fetch: () => Promise.resolve({ json: () => Promise.resolve({}) })
@@ -227,13 +228,13 @@ function settingsShot(locale) {
227
228
  function pricingShot(locale) {
228
229
  /* SettingsSection 里 useState 的顺序(组件加了 hook 就要回来重数一遍):
229
230
  0 drag / 1 newModel / 2 hostModel / 3 editing / 4 draft /
230
- 5 catalogNotice / 6 platformModelOpen / 7 catalogDrag / 8 currencyOpen /
231
- 9 platformEditing / 10 platformDraft / 11 platformNotice / 12 newPlatform /
232
- 13 platformErrors。
231
+ 5 catalogNotice / 6 platformModelOpen / 7 currencyOpen /
232
+ 8 platformEditing / 9 platformDraft / 10 platformNotice / 11 newPlatform /
233
+ 12 platformPopUp / 13 platformMenuSpec。
233
234
  开发模式状态来自模块级快照;重复添加 / 倍率校验失败的提示由 catalogNotice 管理;
234
- 9-13 是「第三方平台」区块(平台编辑 / 草稿 / 校验提示 / 新平台名输入 / 字段级错误)。
235
- pricingShot 的 presets 固定为 editing=3、draft=4、currencyOpen=8。
236
- 旧的 presets[7] 会命中 catalogDrag,币种下拉将无法按截图预设收起。
235
+ 8-13 是「第三方平台」区块(平台编辑 / 草稿 / 校验提示 / 新平台名输入 / 编辑气泡方向 / 模型下拉定位)。
236
+ pricingShot 的 presets 固定为 editing=3、draft=4、currencyOpen=7。
237
+ 币种下拉必须收在 presets[7](currencyOpen),否则展开会压住右边那列输入框。
237
238
  历史上的坑:hook 顺序变化时截图 presets 未同步,会造成编辑区不展开或草稿注入错误状态。
238
239
  教训:**下标是脆的**,加 hook 必须回来重数,并用 `node tools/shot.cjs` 实际生成一次确认。 */
239
240
  const presets = [];
@@ -254,7 +255,7 @@ function pricingShot(locale) {
254
255
  peak: { input: '2', cacheRead: '0.04', cacheWrite: '0', output: '8' },
255
256
  offPeak: { input: '1', cacheRead: '0.02', cacheWrite: '0', output: '4' }
256
257
  };
257
- presets[8] = false; /* 币种下拉收起:展开会压住右边那列输入框 */
258
+ presets[7] = false; /* 币种下拉收起:展开会压住右边那列输入框 */
258
259
  const loaded = loadPlugin(locale, locale === 'en' ? SETTINGS_USD : SETTINGS_CONFIG, presets);
259
260
  const t = translator(loaded.shot, locale);
260
261
  const tree = loaded.shot.SettingsSection({
@@ -378,9 +379,13 @@ function shoot(locale, scene) {
378
379
  console.log('→ ' + path.relative(ROOT, file) + ' ' + Math.round(size / 1024) + ' KB');
379
380
  }
380
381
 
381
- const onlyLocale = process.argv[2];
382
- const onlyScene = process.argv[3];
383
- const locales = onlyLocale === undefined ? ['zh', 'en'] : [onlyLocale];
384
- const scenes = onlyScene === undefined ? ['status', 'settings', 'pricing'] : [onlyScene];
385
- locales.forEach((locale) => scenes.forEach((scene) => shoot(locale, scene)));
386
- console.log('截图完成');
382
+ if (require.main === module) {
383
+ const onlyLocale = process.argv[2];
384
+ const onlyScene = process.argv[3];
385
+ const locales = onlyLocale === undefined ? ['zh', 'en'] : [onlyLocale];
386
+ const scenes = onlyScene === undefined ? ['status', 'settings', 'pricing'] : [onlyScene];
387
+ locales.forEach((locale) => scenes.forEach((scene) => shoot(locale, scene)));
388
+ console.log('截图完成');
389
+ }
390
+
391
+ module.exports = { loadPlugin: loadPlugin, translator: translator };