@jiyr0119/dsh-service-console 0.11.0 → 0.12.0

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.md CHANGED
@@ -38,7 +38,14 @@ Native package (recommended):
38
38
  dsh plugin --profile web add -w @jiyr0119/dsh-service-console@latest
39
39
  ```
40
40
 
41
- Then refresh the DSH web UI — a `Services` entry appears in the conversation header and opens the console as a **right-Sidebar tab** (dock, float, resize, and per-session layout are the sidebar's).
41
+ Then refresh the DSH web UI. The console is a **right-Sidebar tab**; open it from:
42
+
43
+ - the **Start card** in the right Sidebar (`Service Console`),
44
+ - the **`⌘⇧S`** shortcut (macOS; `Ctrl+Shift+S` on Windows Web; rebindable in DSH's shortcut settings),
45
+ - the **composer pill** while this chat has attributed services,
46
+ - or the **`service_list` chat card** when the model lists services.
47
+
48
+ The conversation header no longer carries a permanent entry: it shares that row with the shipped plugin capsules and the console is already one tab away.
42
49
 
43
50
  > Note: a plugin being listed in dsh-market/awesome does not mean its UI auto-appears — this package ships both Host routes and a browser bundle, so after `dsh plugin add` the panel is present. Works on macOS / Linux; Windows is not supported yet.
44
51
 
package/README.zh.md CHANGED
@@ -40,7 +40,14 @@
40
40
  dsh plugin --profile web add -w @jiyr0119/dsh-service-console@latest
41
41
  ```
42
42
 
43
- 安装后刷新 DSH Web UI——会话头部出现 `服务` 入口,点击把控制台作为**右侧栏 tab** 打开(停靠、浮动、拖宽、按会话记忆布局都由侧栏拥有)。
43
+ 安装后刷新 DSH Web UI。控制台是一个**右侧栏 tab**,从以下位置打开:
44
+
45
+ - 右侧栏 **Start 页的卡片**(`Service Console`);
46
+ - **`⌘⇧S`**(macOS;Windows Web 为 `Ctrl+Shift+S`,可在 DSH 快捷键设置里改键);
47
+ - 本会话有归属服务时的 **composer 常驻 pill**;
48
+ - 模型列出服务时的 **`service_list` 聊天卡片**。
49
+
50
+ 会话头部不再保留常驻入口:那一行与官方插件的胶囊共用,而控制台本来就只隔一个 tab。
44
51
 
45
52
  > 注意:插件被 dsh-market/awesome 收录 ≠ 浏览器自动出现 UI。本包同时提供 Host 路由与浏览器 bundle,`dsh plugin add` 后面板即可用。支持 macOS / Linux;Windows 暂不支持。
46
53
 
@@ -22,3 +22,4 @@
22
22
  - 冷会话(从未在本进程里恢复过)没有可读的 projection,归因退化为启发式(`workspace-inferred` / `other-local` / `unknown`),不会伪造「本次对话」。
23
23
  - 本插件的「重启」需要台账里有该服务的启动命令;没有记录时返回 `RESTART_UNSAFE`(只读提示,不猜测命令)。
24
24
  - 扫描依赖 `lsof` 的权限:无权限时返回 `PERMISSION_DENIED`,不会把失败伪装成「没有服务」。
25
+ - 快捷键默认只绑定 macOS 与 Windows Web(`⌘⇧S` / `Ctrl+Shift+S`):Web + Linux 只允许少数组合键,默认不绑定,可在 DSH 快捷键设置里自行指定。
@@ -195,4 +195,5 @@ rc.5 内置 `zh, en, ja, es, fr, de, ru, pt`;现在只有 zh/en,其余回落
195
195
  | A12 可取消扫描 + `timeoutMs` | ✅ 已完成(另加 3 条机器可读命令 + 缓存) | 0.10.0 |
196
196
  | A13 8 语言词典 | ✅ 已完成 | 0.11.0 |
197
197
  | A4 客户端 `tool.call.toolview` 卡片 | ✅ 已完成(宿主呈现层 + 纯投影 + 回退) | 0.9.0 |
198
+ | A10 快捷键命令 | ✅ 已完成(默认 `⌘⇧S` / `Ctrl+Shift+S`,头部常驻入口随之移除) | 0.12.0 |
198
199
  | A2/A6/P0 全部 | ✅ 已完成 | 0.8.0 |
@@ -2,11 +2,14 @@
2
2
 
3
3
  安装:`dsh plugin --profile <profile> add -w @jiyr0119/dsh-service-console@latest`,然后刷新界面。
4
4
 
5
- ## 三种入口
5
+ ## 四个入口
6
6
 
7
- 1. **会话头部「服务」按钮** → 在**右侧栏**打开控制台标签页。停靠/浮动、拖宽、全屏、按会话记忆布局都由 DSH 侧栏提供。
8
- 2. **输入框上方的常驻 pill**(例如 `2 个会话服务` 后面跟 `:5173 :3000`)→ 只有当前会话确实起了服务时才出现,点一下打开控制台。
9
- 3. **对话里的 `service_list` 卡片** → 模型调用只读工具后,服务清单以可折叠卡片呈现,行内可直接打开 URL、停止/重启、或打开控制台。
7
+ 1. **右侧栏 Start 页的卡片**(`Service Console`)→ 在**右侧栏**打开控制台标签页。停靠/浮动、拖宽、全屏、按会话记忆布局都由 DSH 侧栏提供。
8
+ 2. **快捷键 `⌘⇧S`**(macOS)/ `Ctrl+Shift+S`(Windows Web)→ 一键打开;侧栏折叠时会自动展开,可在 DSH 快捷键设置里改键。
9
+ 3. **输入框上方的常驻 pill**(例如 `2 个会话服务` 后面跟 `:5173 :3000`)→ 只有当前会话确实起了服务时才出现,点一下打开控制台。
10
+ 4. **对话里的 `service_list` 卡片** → 模型调用只读工具后,服务清单以可折叠卡片呈现,行内可直接打开 URL、停止/重启、或打开控制台。
11
+
12
+ > 0.12.0 起**移除了会话头部的常驻「服务」按钮**:那一行与官方插件的胶囊共用,而上述入口已经覆盖打开需求。
10
13
 
11
14
  ## 阅读列表
12
15
 
@@ -18,6 +18,7 @@ const ZH_DICT = {
18
18
  "status.lastScan": "最近扫描",
19
19
  "status.error": "扫描失败",
20
20
  "status.loading": "加载中…",
21
+ "shortcut.noSession": "请先打开一个会话再使用服务控制台",
21
22
  "status.rpcError": "本地接口无响应",
22
23
  "svc.noSvc": "未发现服务",
23
24
  "card.summary": "{count}/{total} 项服务",
@@ -107,6 +108,7 @@ const EN_DICT = {
107
108
  "status.lastScan": "Last scan",
108
109
  "status.error": "Scan failed",
109
110
  "status.loading": "Loading…",
111
+ "shortcut.noSession": "Open a session first",
110
112
  "status.rpcError": "Local API did not respond",
111
113
  "svc.noSvc": "no services found",
112
114
  "card.summary": "{count}/{total} services",
@@ -11,6 +11,7 @@ const DE_DICT = {
11
11
  "status.lastScan": "Letzter Scan",
12
12
  "status.error": "Scan fehlgeschlagen",
13
13
  "status.loading": "Lädt…",
14
+ "shortcut.noSession": "Zuerst einen Chat öffnen",
14
15
  "status.rpcError": "Lokale API antwortet nicht",
15
16
  "svc.noSvc": "keine Dienste gefunden",
16
17
  "card.summary": "{count}/{total} Dienste",
@@ -11,6 +11,7 @@ const ES_DICT = {
11
11
  "status.lastScan": "Última exploración",
12
12
  "status.error": "La exploración falló",
13
13
  "status.loading": "Cargando…",
14
+ "shortcut.noSession": "Abre una sesión primero",
14
15
  "status.rpcError": "La API local no responde",
15
16
  "svc.noSvc": "no se encontraron servicios",
16
17
  "card.summary": "{count}/{total} servicios",
@@ -11,6 +11,7 @@ const FR_DICT = {
11
11
  "status.lastScan": "Dernière analyse",
12
12
  "status.error": "Échec de l’analyse",
13
13
  "status.loading": "Chargement…",
14
+ "shortcut.noSession": "Ouvrez d’abord une conversation",
14
15
  "status.rpcError": "L’API locale ne répond pas",
15
16
  "svc.noSvc": "aucun service trouvé",
16
17
  "card.summary": "{count}/{total} services",
@@ -11,6 +11,7 @@ const JA_DICT = {
11
11
  "status.lastScan": "最終スキャン",
12
12
  "status.error": "スキャンに失敗しました",
13
13
  "status.loading": "読み込み中…",
14
+ "shortcut.noSession": "先にセッションを開いてください",
14
15
  "status.rpcError": "ローカル API が応答しません",
15
16
  "svc.noSvc": "サービスが見つかりません",
16
17
  "card.summary": "{count}/{total} 件のサービス",
@@ -11,6 +11,7 @@ const PT_DICT = {
11
11
  "status.lastScan": "Última varredura",
12
12
  "status.error": "A varredura falhou",
13
13
  "status.loading": "Carregando…",
14
+ "shortcut.noSession": "Abra um chat primeiro",
14
15
  "status.rpcError": "A API local não respondeu",
15
16
  "svc.noSvc": "nenhum serviço encontrado",
16
17
  "card.summary": "{count}/{total} serviços",
@@ -11,6 +11,7 @@ const RU_DICT = {
11
11
  "status.lastScan": "Последнее сканирование",
12
12
  "status.error": "Сканирование не удалось",
13
13
  "status.loading": "Загрузка…",
14
+ "shortcut.noSession": "Сначала откройте чат",
14
15
  "status.rpcError": "Локальный API не отвечает",
15
16
  "svc.noSvc": "сервисы не найдены",
16
17
  "card.summary": "Сервисов: {count}/{total}",
package/lib/client.js CHANGED
@@ -39,61 +39,61 @@ window.__ModuleLoader__.load({
39
39
  document.head.appendChild(tag);
40
40
  }
41
41
  var service_console_module_css_default = {
42
- "filterClear": "PuSt5a_filterClear",
43
- "rowDot": "PuSt5a_rowDot",
44
- "rowName": "PuSt5a_rowName",
45
- "detailGrid": "PuSt5a_detailGrid",
46
- "noteErr": "PuSt5a_noteErr",
47
- "row": "PuSt5a_row",
48
- "spacer": "PuSt5a_spacer",
49
- "evidenceBlock": "PuSt5a_evidenceBlock",
50
- "setRow": "PuSt5a_setRow",
42
+ "starRow": "PuSt5a_starRow",
51
43
  "note": "PuSt5a_note",
52
- "prevBtn": "PuSt5a_prevBtn",
53
- "toolbar": "PuSt5a_toolbar",
54
- "detailHead": "PuSt5a_detailHead",
44
+ "starLink": "PuSt5a_starLink",
45
+ "dockPillPorts": "PuSt5a_dockPillPorts",
55
46
  "console": "PuSt5a_console",
56
- "setFooter": "PuSt5a_setFooter",
57
- "rowMain": "PuSt5a_rowMain",
58
- "starInfo": "PuSt5a_starInfo",
59
- "evidenceItem": "PuSt5a_evidenceItem",
60
47
  "errText": "PuSt5a_errText",
61
- "evidenceArrow": "PuSt5a_evidenceArrow",
62
- "starLink": "PuSt5a_starLink",
63
- "icoBtn": "PuSt5a_icoBtn",
64
- "spin": "PuSt5a_spin",
65
- "headerBtn": "PuSt5a_headerBtn",
66
- "confirmTxt": "PuSt5a_confirmTxt",
48
+ "sc-spin": "PuSt5a_sc-spin",
49
+ "rowBtn": "PuSt5a_rowBtn",
67
50
  "setSection": "PuSt5a_setSection",
68
- "setLabel": "PuSt5a_setLabel",
69
- "filter": "PuSt5a_filter",
70
- "noteWarn": "PuSt5a_noteWarn",
51
+ "setInput": "PuSt5a_setInput",
52
+ "prevBtn": "PuSt5a_prevBtn",
53
+ "setFooter": "PuSt5a_setFooter",
54
+ "setRow": "PuSt5a_setRow",
55
+ "rowMain": "PuSt5a_rowMain",
71
56
  "rowSub": "PuSt5a_rowSub",
72
- "rowBtn": "PuSt5a_rowBtn",
57
+ "starLabel": "PuSt5a_starLabel",
73
58
  "scroll": "PuSt5a_scroll",
74
- "hintLine": "PuSt5a_hintLine",
75
- "okText": "PuSt5a_okText",
76
- "empty": "PuSt5a_empty",
77
- "filterRow": "PuSt5a_filterRow",
78
- "sc-spin": "PuSt5a_sc-spin",
79
- "detailAccent": "PuSt5a_detailAccent",
59
+ "confirmTxt": "PuSt5a_confirmTxt",
60
+ "filterClear": "PuSt5a_filterClear",
61
+ "rowDot": "PuSt5a_rowDot",
62
+ "setInfo": "PuSt5a_setInfo",
80
63
  "setCap": "PuSt5a_setCap",
81
- "setPage": "PuSt5a_setPage",
82
- "setSelect": "PuSt5a_setSelect",
83
64
  "setNote": "PuSt5a_setNote",
65
+ "detailGrid": "PuSt5a_detailGrid",
66
+ "detailBox": "PuSt5a_detailBox",
67
+ "spin": "PuSt5a_spin",
68
+ "filterRow": "PuSt5a_filterRow",
69
+ "empty": "PuSt5a_empty",
70
+ "dockPill": "PuSt5a_dockPill",
71
+ "toolbar": "PuSt5a_toolbar",
84
72
  "hintWarn": "PuSt5a_hintWarn",
73
+ "evidenceBlock": "PuSt5a_evidenceBlock",
74
+ "evidenceArrow": "PuSt5a_evidenceArrow",
75
+ "setSelect": "PuSt5a_setSelect",
76
+ "confirmRow": "PuSt5a_confirmRow",
85
77
  "starSection": "PuSt5a_starSection",
86
- "starRow": "PuSt5a_starRow",
87
- "starLabel": "PuSt5a_starLabel",
78
+ "starInfo": "PuSt5a_starInfo",
79
+ "detailHead": "PuSt5a_detailHead",
80
+ "detailAccent": "PuSt5a_detailAccent",
81
+ "detailLabel": "PuSt5a_detailLabel",
82
+ "rowName": "PuSt5a_rowName",
88
83
  "rowMeta": "PuSt5a_rowMeta",
89
- "dockPillPorts": "PuSt5a_dockPillPorts",
90
- "setInfo": "PuSt5a_setInfo",
84
+ "evidenceItem": "PuSt5a_evidenceItem",
91
85
  "rowAct": "PuSt5a_rowAct",
92
- "confirmRow": "PuSt5a_confirmRow",
93
- "detailLabel": "PuSt5a_detailLabel",
94
- "detailBox": "PuSt5a_detailBox",
95
- "setInput": "PuSt5a_setInput",
96
- "dockPill": "PuSt5a_dockPill"
86
+ "filter": "PuSt5a_filter",
87
+ "icoBtn": "PuSt5a_icoBtn",
88
+ "row": "PuSt5a_row",
89
+ "noteErr": "PuSt5a_noteErr",
90
+ "headerBtn": "PuSt5a_headerBtn",
91
+ "spacer": "PuSt5a_spacer",
92
+ "noteWarn": "PuSt5a_noteWarn",
93
+ "okText": "PuSt5a_okText",
94
+ "setPage": "PuSt5a_setPage",
95
+ "setLabel": "PuSt5a_setLabel",
96
+ "hintLine": "PuSt5a_hintLine"
97
97
  };
98
98
  // src/client/api.ts
99
99
  /**
@@ -303,7 +303,8 @@ window.__ModuleLoader__.load({
303
303
  * 结构(M1 迁移后):
304
304
  * - `ServiceConsoleTab`:tab 内容体(工具条 + 服务列表 + 详情 + Toast)。
305
305
  * 面板的边框/拖拽/停靠/焦点/关闭由右侧栏拥有,这里只画内容。
306
- * - `ServiceConsoleEntry`:header 入口按钮,点击由侧栏打开 tab。
306
+ * - 入口:**不再**在会话头部注册常驻按钮;打开方式见 `index.tsx`
307
+ * (右侧栏 Start 卡片、composer pill、聊天卡片、⌘⇧S 快捷键)。
307
308
  * - `ServiceConsoleSettings` / `ServiceConsoleIcon`:全局设置页与其导航图标。
308
309
  *
309
310
  * i18n:组件从 slot 注册项的 `locale:` 拿到框架合成的 `t`(按 namespace 类型化),
@@ -339,37 +340,6 @@ window.__ModuleLoader__.load({
339
340
  forceKill: false,
340
341
  scanTimeoutMs: 8e3
341
342
  };
342
- function ServiceConsoleEntry({ t, openConsole }) {
343
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
344
- type: "button",
345
- className: service_console_module_css_default.headerBtn,
346
- "data-dsh-sc": "entry",
347
- onClick: openConsole,
348
- title: t("entry.tip"),
349
- "aria-label": t("entry.tip"),
350
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("entry.label") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
351
- viewBox: "0 0 16 16",
352
- width: 13,
353
- height: 13,
354
- "aria-hidden": "true",
355
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
356
- x: 2,
357
- y: 3,
358
- width: 12,
359
- height: 10,
360
- rx: 1.5,
361
- fill: "none",
362
- stroke: "currentColor",
363
- strokeWidth: 1.3
364
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
365
- d: "M5 7h6M5 10h4",
366
- stroke: "currentColor",
367
- strokeWidth: 1.2,
368
- strokeLinecap: "round"
369
- })]
370
- })]
371
- });
372
- }
373
343
  function ServiceConsoleIcon({ size }) {
374
344
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
375
345
  viewBox: "0 0 16 16",
@@ -1089,25 +1059,25 @@ window.__ModuleLoader__.load({
1089
1059
  document.head.appendChild(tag);
1090
1060
  }
1091
1061
  var service_list_card_module_css_default = {
1092
- "accessory": "_3hjC-q_accessory",
1093
- "dot": "_3hjC-q_dot",
1094
- "openConsole": "_3hjC-q_openConsole",
1095
- "action": "_3hjC-q_action",
1096
- "summary": "_3hjC-q_summary",
1097
- "empty": "_3hjC-q_empty",
1098
- "confirmRow": "_3hjC-q_confirmRow",
1099
- "card": "_3hjC-q_card",
1100
- "confirmTxt": "_3hjC-q_confirmTxt",
1101
- "text": "_3hjC-q_text",
1102
- "row": "_3hjC-q_row",
1103
- "name": "_3hjC-q_name",
1104
1062
  "more": "_3hjC-q_more",
1105
- "okText": "_3hjC-q_okText",
1063
+ "text": "_3hjC-q_text",
1064
+ "action": "_3hjC-q_action",
1106
1065
  "meta": "_3hjC-q_meta",
1066
+ "dot": "_3hjC-q_dot",
1067
+ "link": "_3hjC-q_link",
1068
+ "okText": "_3hjC-q_okText",
1107
1069
  "spacer": "_3hjC-q_spacer",
1108
1070
  "rowMain": "_3hjC-q_rowMain",
1109
- "link": "_3hjC-q_link",
1110
- "error": "_3hjC-q_error"
1071
+ "confirmTxt": "_3hjC-q_confirmTxt",
1072
+ "error": "_3hjC-q_error",
1073
+ "name": "_3hjC-q_name",
1074
+ "confirmRow": "_3hjC-q_confirmRow",
1075
+ "accessory": "_3hjC-q_accessory",
1076
+ "card": "_3hjC-q_card",
1077
+ "openConsole": "_3hjC-q_openConsole",
1078
+ "summary": "_3hjC-q_summary",
1079
+ "empty": "_3hjC-q_empty",
1080
+ "row": "_3hjC-q_row"
1111
1081
  };
1112
1082
  // src/client/ServiceListCard.tsx
1113
1083
  /**
@@ -1564,6 +1534,7 @@ window.__ModuleLoader__.load({
1564
1534
  "status.lastScan": "最近扫描",
1565
1535
  "status.error": "扫描失败",
1566
1536
  "status.loading": "加载中…",
1537
+ "shortcut.noSession": "请先打开一个会话再使用服务控制台",
1567
1538
  "status.rpcError": "本地接口无响应",
1568
1539
  "svc.noSvc": "未发现服务",
1569
1540
  "card.summary": "{count}/{total} 项服务",
@@ -1653,6 +1624,7 @@ window.__ModuleLoader__.load({
1653
1624
  "status.lastScan": "Last scan",
1654
1625
  "status.error": "Scan failed",
1655
1626
  "status.loading": "Loading…",
1627
+ "shortcut.noSession": "Open a session first",
1656
1628
  "status.rpcError": "Local API did not respond",
1657
1629
  "svc.noSvc": "no services found",
1658
1630
  "card.summary": "{count}/{total} services",
@@ -1743,6 +1715,7 @@ window.__ModuleLoader__.load({
1743
1715
  "status.lastScan": "最終スキャン",
1744
1716
  "status.error": "スキャンに失敗しました",
1745
1717
  "status.loading": "読み込み中…",
1718
+ "shortcut.noSession": "先にセッションを開いてください",
1746
1719
  "status.rpcError": "ローカル API が応答しません",
1747
1720
  "svc.noSvc": "サービスが見つかりません",
1748
1721
  "card.summary": "{count}/{total} 件のサービス",
@@ -1833,6 +1806,7 @@ window.__ModuleLoader__.load({
1833
1806
  "status.lastScan": "Última exploración",
1834
1807
  "status.error": "La exploración falló",
1835
1808
  "status.loading": "Cargando…",
1809
+ "shortcut.noSession": "Abre una sesión primero",
1836
1810
  "status.rpcError": "La API local no responde",
1837
1811
  "svc.noSvc": "no se encontraron servicios",
1838
1812
  "card.summary": "{count}/{total} servicios",
@@ -1923,6 +1897,7 @@ window.__ModuleLoader__.load({
1923
1897
  "status.lastScan": "Dernière analyse",
1924
1898
  "status.error": "Échec de l’analyse",
1925
1899
  "status.loading": "Chargement…",
1900
+ "shortcut.noSession": "Ouvrez d’abord une conversation",
1926
1901
  "status.rpcError": "L’API locale ne répond pas",
1927
1902
  "svc.noSvc": "aucun service trouvé",
1928
1903
  "card.summary": "{count}/{total} services",
@@ -2013,6 +1988,7 @@ window.__ModuleLoader__.load({
2013
1988
  "status.lastScan": "Letzter Scan",
2014
1989
  "status.error": "Scan fehlgeschlagen",
2015
1990
  "status.loading": "Lädt…",
1991
+ "shortcut.noSession": "Zuerst einen Chat öffnen",
2016
1992
  "status.rpcError": "Lokale API antwortet nicht",
2017
1993
  "svc.noSvc": "keine Dienste gefunden",
2018
1994
  "card.summary": "{count}/{total} Dienste",
@@ -2103,6 +2079,7 @@ window.__ModuleLoader__.load({
2103
2079
  "status.lastScan": "Последнее сканирование",
2104
2080
  "status.error": "Сканирование не удалось",
2105
2081
  "status.loading": "Загрузка…",
2082
+ "shortcut.noSession": "Сначала откройте чат",
2106
2083
  "status.rpcError": "Локальный API не отвечает",
2107
2084
  "svc.noSvc": "сервисы не найдены",
2108
2085
  "card.summary": "Сервисов: {count}/{total}",
@@ -2193,6 +2170,7 @@ window.__ModuleLoader__.load({
2193
2170
  "status.lastScan": "Última varredura",
2194
2171
  "status.error": "A varredura falhou",
2195
2172
  "status.loading": "Carregando…",
2173
+ "shortcut.noSession": "Abra um chat primeiro",
2196
2174
  "status.rpcError": "A API local não respondeu",
2197
2175
  "svc.noSvc": "nenhum serviço encontrado",
2198
2176
  "card.summary": "{count}/{total} serviços",
@@ -2445,20 +2423,66 @@ window.__ModuleLoader__.load({
2445
2423
  key: TAB_ID,
2446
2424
  locale: NS
2447
2425
  }, ServiceConsoleTitle))), "service-console: tab title");
2448
- ctx.effect(() => registerSafely("header entry", () => ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
2449
- name: "conversation.session.header.utilities",
2450
- id: "dsh-service-console",
2451
- order: 25,
2452
- locale: NS,
2453
- label: () => labelFn("plugin.name"),
2454
- inject: () => ({ openConsole: () => {
2426
+ ctx.inject(["shortcuts"], (sub) => {
2427
+ const shortcuts = sub.get("shortcuts");
2428
+ if (shortcuts === void 0) return;
2429
+ const registerShortcut = () => {
2455
2430
  try {
2456
- ctx.sidebarRight.openTab(TAB_KIND);
2431
+ return shortcuts.register({
2432
+ id: "service-console.open",
2433
+ label: () => labelFn("plugin.name"),
2434
+ aliases: ["service console", "services"],
2435
+ defaults: {
2436
+ "web:macos": {
2437
+ code: "KeyS",
2438
+ modifiers: ["meta", "shift"]
2439
+ },
2440
+ "web:windows": {
2441
+ code: "KeyS",
2442
+ modifiers: ["control", "shift"]
2443
+ },
2444
+ "desktop:macos": {
2445
+ code: "KeyS",
2446
+ modifiers: ["meta", "shift"]
2447
+ },
2448
+ "desktop:windows": {
2449
+ code: "KeyS",
2450
+ modifiers: ["control", "shift"]
2451
+ },
2452
+ "desktop:linux": {
2453
+ code: "KeyS",
2454
+ modifiers: ["control", "shift"]
2455
+ }
2456
+ },
2457
+ regions: ["page"],
2458
+ modals: [],
2459
+ resolve: ({ target }) => {
2460
+ console.log("[sc] shortcut resolve, mounted=" + String(ctx.sidebarRight.mounted.getSnapshot()));
2461
+ if (ctx.sidebarRight.mounted.getSnapshot() === void 0) return {
2462
+ status: "blocked",
2463
+ reason: labelFn("shortcut.noSession")
2464
+ };
2465
+ const sidebarTarget = ctx.sidebarRight.commandTarget(target);
2466
+ return {
2467
+ status: "handled",
2468
+ run: () => {
2469
+ try {
2470
+ if (sidebarTarget === void 0) ctx.sidebarRight.openTab(TAB_KIND);
2471
+ else ctx.sidebarRight.openTabFromTarget(TAB_KIND, sidebarTarget);
2472
+ } catch (error) {
2473
+ console.warn("[dsh-service-console] shortcut open failed:", String(error));
2474
+ }
2475
+ }
2476
+ };
2477
+ }
2478
+ });
2457
2479
  } catch (error) {
2458
- console.warn("[dsh-service-console] openTab failed:", String(error));
2480
+ console.warn("[dsh-service-console] shortcut registration failed:", String(error?.message ?? error));
2481
+ return () => {};
2459
2482
  }
2460
- } })
2461
- }, ServiceConsoleEntry))), "service-console: header entry");
2483
+ };
2484
+ sub.effect(registerShortcut, "service-console: shortcut");
2485
+ });
2462
2486
  ctx.effect(() => registerSafely("settings section", () => ctx.slots.inject("settings.section", () => ctx.slots.register({
2463
2487
  name: "settings.section",
2464
2488
  id: "dsh-service-console",
@@ -4,7 +4,8 @@
4
4
  * 结构(M1 迁移后):
5
5
  * - `ServiceConsoleTab`:tab 内容体(工具条 + 服务列表 + 详情 + Toast)。
6
6
  * 面板的边框/拖拽/停靠/焦点/关闭由右侧栏拥有,这里只画内容。
7
- * - `ServiceConsoleEntry`:header 入口按钮,点击由侧栏打开 tab。
7
+ * - 入口:**不再**在会话头部注册常驻按钮;打开方式见 `index.tsx`
8
+ * (右侧栏 Start 卡片、composer pill、聊天卡片、⌘⇧S 快捷键)。
8
9
  * - `ServiceConsoleSettings` / `ServiceConsoleIcon`:全局设置页与其导航图标。
9
10
  *
10
11
  * i18n:组件从 slot 注册项的 `locale:` 拿到框架合成的 `t`(按 namespace 类型化),
@@ -29,10 +30,6 @@ interface ConfigData {
29
30
  /** 宿主扫描预算(毫秒):客户端可见超时与之一致 */
30
31
  scanTimeoutMs: number;
31
32
  }
32
- export declare function ServiceConsoleEntry({ t, openConsole }: {
33
- t: ConsoleT;
34
- openConsole: () => void;
35
- }): React.ReactElement;
36
33
  export interface SettingsSectionIconProps {
37
34
  /** 请求的正方形边长(px)。 */
38
35
  size: number;
@@ -17,6 +17,7 @@ export declare const ZH_DICT: {
17
17
  'status.lastScan': string;
18
18
  'status.error': string;
19
19
  'status.loading': string;
20
+ 'shortcut.noSession': string;
20
21
  'status.rpcError': string;
21
22
  'svc.noSvc': string;
22
23
  'card.summary': string;
@@ -108,6 +109,7 @@ export declare const EN_DICT: {
108
109
  'status.lastScan': string;
109
110
  'status.error': string;
110
111
  'status.loading': string;
112
+ 'shortcut.noSession': string;
111
113
  'status.rpcError': string;
112
114
  'svc.noSvc': string;
113
115
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const DE_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const ES_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const FR_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const JA_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const PT_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
@@ -10,6 +10,7 @@ export declare const RU_DICT: {
10
10
  'status.lastScan': string;
11
11
  'status.error': string;
12
12
  'status.loading': string;
13
+ 'shortcut.noSession': string;
13
14
  'status.rpcError': string;
14
15
  'svc.noSvc': string;
15
16
  'card.summary': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiyr0119/dsh-service-console",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "DeepSeek Harness 本地开发服务控制台(原生插件):发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -60,6 +60,7 @@
60
60
  "client": {
61
61
  "inject": [
62
62
  "@deepseek-ai/dsh-client-locale",
63
+ "@deepseek-ai/dsh-client-shortcuts",
63
64
  "@deepseek-ai/dsh-client-ui-conversation",
64
65
  "@deepseek-ai/dsh-client-ui-layout",
65
66
  "@deepseek-ai/dsh-client-ui-renderer",
@@ -80,6 +81,7 @@
80
81
  "devDependencies": {
81
82
  "@deepseek-ai/cordis": "~4.1.0",
82
83
  "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.5",
84
+ "@deepseek-ai/dsh-client-shortcuts": "0.2.2-rc.5",
83
85
  "@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.5",
84
86
  "@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-rc.5",
85
87
  "@deepseek-ai/dsh-client-ui-dockkit": "0.2.2-rc.5",