@lemoncat7/dsh-partner 2.8.3 → 2.8.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.
Files changed (165) hide show
  1. package/README.md +27 -406
  2. package/docs/bark-notifications.md +27 -0
  3. package/docs/concern-workflow.md +39 -0
  4. package/docs/releases/1.12.0.md +16 -0
  5. package/docs/releases/1.14.2.md +8 -0
  6. package/docs/releases/1.15.0.md +15 -0
  7. package/docs/releases/1.16.0.md +15 -0
  8. package/docs/releases/1.16.1.md +12 -0
  9. package/docs/releases/1.16.2.md +12 -0
  10. package/docs/releases/2.0.0.md +19 -0
  11. package/docs/releases/2.1.0.md +8 -0
  12. package/docs/releases/2.2.0.md +8 -0
  13. package/docs/releases/2.3.0.md +8 -0
  14. package/docs/releases/2.4.0.md +8 -0
  15. package/docs/releases/2.5.0.md +8 -0
  16. package/docs/releases/2.8.0.md +6 -0
  17. package/docs/releases/2.8.4.md +35 -0
  18. package/docs/releases/README.md +14 -0
  19. package/lib/agent-runtime.d.ts +1 -0
  20. package/lib/agent-runtime.d.ts.map +1 -1
  21. package/lib/agent-runtime.js +14 -5
  22. package/lib/agent-runtime.js.map +1 -1
  23. package/lib/api/features/push-api.d.ts +4 -0
  24. package/lib/api/features/push-api.d.ts.map +1 -0
  25. package/lib/api/features/push-api.js +47 -0
  26. package/lib/api/features/push-api.js.map +1 -0
  27. package/lib/api.d.ts +2 -0
  28. package/lib/api.d.ts.map +1 -1
  29. package/lib/api.js +5 -1
  30. package/lib/api.js.map +1 -1
  31. package/lib/autonomy.d.ts.map +1 -1
  32. package/lib/autonomy.js +5 -4
  33. package/lib/autonomy.js.map +1 -1
  34. package/lib/client-api.d.ts +1 -0
  35. package/lib/client-api.d.ts.map +1 -1
  36. package/lib/client-api.js.map +1 -1
  37. package/lib/client.d.ts.map +1 -1
  38. package/lib/client.js +1157 -638
  39. package/lib/client.js.map +4 -4
  40. package/lib/collaboration/composition.d.ts.map +1 -1
  41. package/lib/collaboration/composition.js +1 -0
  42. package/lib/collaboration/composition.js.map +1 -1
  43. package/lib/collaboration/ssh-task-access.d.ts +33 -0
  44. package/lib/collaboration/ssh-task-access.d.ts.map +1 -0
  45. package/lib/collaboration/ssh-task-access.js +26 -0
  46. package/lib/collaboration/ssh-task-access.js.map +1 -0
  47. package/lib/companions/removal.d.ts.map +1 -1
  48. package/lib/companions/removal.js +4 -0
  49. package/lib/companions/removal.js.map +1 -1
  50. package/lib/concern-domain.d.ts +2 -0
  51. package/lib/concern-domain.d.ts.map +1 -1
  52. package/lib/concern-domain.js.map +1 -1
  53. package/lib/concern-execution-notes.d.ts +2 -0
  54. package/lib/concern-execution-notes.d.ts.map +1 -1
  55. package/lib/concern-execution-notes.js +9 -2
  56. package/lib/concern-execution-notes.js.map +1 -1
  57. package/lib/concern-execution-receipt.d.ts.map +1 -1
  58. package/lib/concern-execution-receipt.js +3 -2
  59. package/lib/concern-execution-receipt.js.map +1 -1
  60. package/lib/concern-execution.d.ts.map +1 -1
  61. package/lib/concern-execution.js +1 -0
  62. package/lib/concern-execution.js.map +1 -1
  63. package/lib/concern-knowledge-source.d.ts +23 -0
  64. package/lib/concern-knowledge-source.d.ts.map +1 -0
  65. package/lib/concern-knowledge-source.js +30 -0
  66. package/lib/concern-knowledge-source.js.map +1 -0
  67. package/lib/concern-note-source.d.ts +2 -1
  68. package/lib/concern-note-source.d.ts.map +1 -1
  69. package/lib/concern-note-source.js +6 -2
  70. package/lib/concern-note-source.js.map +1 -1
  71. package/lib/concern-store.d.ts.map +1 -1
  72. package/lib/concern-store.js +5 -0
  73. package/lib/concern-store.js.map +1 -1
  74. package/lib/domain.d.ts +2 -0
  75. package/lib/domain.d.ts.map +1 -1
  76. package/lib/domain.js.map +1 -1
  77. package/lib/index.d.ts.map +1 -1
  78. package/lib/index.js +18 -1
  79. package/lib/index.js.map +1 -1
  80. package/lib/notifications/bark-adapter.d.ts +9 -0
  81. package/lib/notifications/bark-adapter.d.ts.map +1 -0
  82. package/lib/notifications/bark-adapter.js +69 -0
  83. package/lib/notifications/bark-adapter.js.map +1 -0
  84. package/lib/notifications/push-config.d.ts +10 -0
  85. package/lib/notifications/push-config.d.ts.map +1 -0
  86. package/lib/notifications/push-config.js +79 -0
  87. package/lib/notifications/push-config.js.map +1 -0
  88. package/lib/notifications/push-credentials.d.ts +9 -0
  89. package/lib/notifications/push-credentials.d.ts.map +1 -0
  90. package/lib/notifications/push-credentials.js +16 -0
  91. package/lib/notifications/push-credentials.js.map +1 -0
  92. package/lib/notifications/push-domain.d.ts +66 -0
  93. package/lib/notifications/push-domain.d.ts.map +1 -0
  94. package/lib/notifications/push-domain.js +6 -0
  95. package/lib/notifications/push-domain.js.map +1 -0
  96. package/lib/notifications/push-observer.d.ts +19 -0
  97. package/lib/notifications/push-observer.d.ts.map +1 -0
  98. package/lib/notifications/push-observer.js +96 -0
  99. package/lib/notifications/push-observer.js.map +1 -0
  100. package/lib/notifications/push-service.d.ts +33 -0
  101. package/lib/notifications/push-service.d.ts.map +1 -0
  102. package/lib/notifications/push-service.js +228 -0
  103. package/lib/notifications/push-service.js.map +1 -0
  104. package/lib/notifications/push-state.d.ts +3 -0
  105. package/lib/notifications/push-state.d.ts.map +1 -0
  106. package/lib/notifications/push-state.js +23 -0
  107. package/lib/notifications/push-state.js.map +1 -0
  108. package/lib/observation-budget.d.ts +3 -2
  109. package/lib/observation-budget.d.ts.map +1 -1
  110. package/lib/observation-budget.js +5 -3
  111. package/lib/observation-budget.js.map +1 -1
  112. package/lib/observation-loop.d.ts +1 -0
  113. package/lib/observation-loop.d.ts.map +1 -1
  114. package/lib/observation-loop.js +129 -21
  115. package/lib/observation-loop.js.map +1 -1
  116. package/lib/observation-model-retry.d.ts +20 -0
  117. package/lib/observation-model-retry.d.ts.map +1 -0
  118. package/lib/observation-model-retry.js +48 -0
  119. package/lib/observation-model-retry.js.map +1 -0
  120. package/lib/observation-progress.d.ts +1 -0
  121. package/lib/observation-progress.d.ts.map +1 -1
  122. package/lib/observation-progress.js +24 -4
  123. package/lib/observation-progress.js.map +1 -1
  124. package/lib/observation-workflow.d.ts +40 -0
  125. package/lib/observation-workflow.d.ts.map +1 -0
  126. package/lib/observation-workflow.js +154 -0
  127. package/lib/observation-workflow.js.map +1 -0
  128. package/lib/recording-snapshot.d.ts.map +1 -1
  129. package/lib/recording-snapshot.js +12 -2
  130. package/lib/recording-snapshot.js.map +1 -1
  131. package/lib/storage/migrate-layout.d.ts.map +1 -1
  132. package/lib/storage/migrate-layout.js +2 -0
  133. package/lib/storage/migrate-layout.js.map +1 -1
  134. package/lib/storage/split-state.js +2 -2
  135. package/lib/storage/split-state.js.map +1 -1
  136. package/lib/store.d.ts.map +1 -1
  137. package/lib/store.js +2 -0
  138. package/lib/store.js.map +1 -1
  139. package/lib/ui/capability-editor.d.ts.map +1 -1
  140. package/lib/ui/capability-editor.js +3 -5
  141. package/lib/ui/capability-editor.js.map +1 -1
  142. package/lib/ui/channels-panel.d.ts.map +1 -1
  143. package/lib/ui/channels-panel.js +7 -1
  144. package/lib/ui/channels-panel.js.map +1 -1
  145. package/lib/ui/push-channels.d.ts +11 -0
  146. package/lib/ui/push-channels.d.ts.map +1 -0
  147. package/lib/ui/push-channels.js +28 -0
  148. package/lib/ui/push-channels.js.map +1 -0
  149. package/lib/ui/push-draft.d.ts +30 -0
  150. package/lib/ui/push-draft.d.ts.map +1 -0
  151. package/lib/ui/push-draft.js +13 -0
  152. package/lib/ui/push-draft.js.map +1 -0
  153. package/lib/ui/push-editor.d.ts +10 -0
  154. package/lib/ui/push-editor.d.ts.map +1 -0
  155. package/lib/ui/push-editor.js +99 -0
  156. package/lib/ui/push-editor.js.map +1 -0
  157. package/lib/ui/runtime-settings.d.ts +18 -0
  158. package/lib/ui/runtime-settings.d.ts.map +1 -0
  159. package/lib/ui/runtime-settings.js +25 -0
  160. package/lib/ui/runtime-settings.js.map +1 -0
  161. package/lib/ui/workspace-components.d.ts +7 -1
  162. package/lib/ui/workspace-components.d.ts.map +1 -1
  163. package/lib/ui/workspace-components.js +8 -4
  164. package/lib/ui/workspace-components.js.map +1 -1
  165. package/package.json +4 -1
package/lib/client.js CHANGED
@@ -35,7 +35,7 @@ __export(client_exports, {
35
35
  inject: () => inject
36
36
  });
37
37
  module.exports = __toCommonJS(client_exports);
38
- var import_react55 = require("react");
38
+ var import_react58 = require("react");
39
39
 
40
40
  // src/workspace-ownership.ts
41
41
  var WORKSPACE_ACTIVATE_EVENT = "@lemoncat7/dsh-plugin-ui/workspace-activate";
@@ -54,7 +54,7 @@ function observePluginWorkspace(pluginId, close) {
54
54
  }
55
55
 
56
56
  // src/client.tsx
57
- var import_dsh_client_ui_primitives25 = require("@deepseek-ai/dsh-client-ui-primitives");
57
+ var import_dsh_client_ui_primitives26 = require("@deepseek-ai/dsh-client-ui-primitives");
58
58
 
59
59
  // node_modules/qrcode.react/lib/esm/index.js
60
60
  var import_react = __toESM(require("react"), 1);
@@ -1943,8 +1943,6 @@ body[data-ds-dark-theme] .dsh-partner-workspace {
1943
1943
  .dsh-partner-section p { max-width: 640px; margin: 0; color: var(--partner-text-secondary); font-size: var(--partner-font-body); line-height: 1.65; }
1944
1944
  .dsh-partner-fields { display: grid; gap: 14px; }
1945
1945
  .dsh-partner-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
1946
- .dsh-partner-runtime-fields { display: grid; grid-template-columns: minmax(190px, 1.15fr) minmax(160px, .85fr) minmax(190px, 1.15fr); gap: 14px; }
1947
- .dsh-partner-runtime-fields > .dsh-partner-field { margin-bottom: 18px; }
1948
1946
  .dsh-partner-field { display: grid; min-width: 0; gap: 8px; margin-bottom: 16px; }
1949
1947
  .dsh-partner-field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
1950
1948
  .dsh-partner-field strong { font-size: var(--partner-font-body); font-weight: 610; }
@@ -2719,7 +2717,6 @@ body[data-ds-dark-theme] .dsh-partner-workspace {
2719
2717
  }
2720
2718
  @media (max-width: 760px) {
2721
2719
  .dsh-partner-access-list { grid-template-columns: 1fr; }
2722
- .dsh-partner-runtime-fields { grid-template-columns: 1fr; }
2723
2720
  .dsh-partner-topbar { align-items: stretch; flex-direction: column; gap: 7px; padding: 7px 9px; }
2724
2721
  .dsh-partner-mobile-workspace-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
2725
2722
  .dsh-partner-mobile-workspace-nav button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; color: var(--partner-text-tertiary); background: transparent; font: 580 var(--partner-font-caption)/1 var(--partner-font-family); cursor: pointer; }
@@ -2829,6 +2826,36 @@ body[data-ds-dark-theme] .dsh-partner-workspace {
2829
2826
  .dsh-partner-concern-execution > header { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
2830
2827
  .dsh-partner-concern-execution > header > span { display: grid; gap: 4px; min-width: 0; }
2831
2828
  .dsh-partner-concern-execution .dsh-partner-switch { flex-shrink: 0; }
2829
+ .dsh-partner-push-form .dsh-partner-push-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
2830
+ .dsh-partner-push-form .dsh-partner-push-heading > label { display:flex; align-items:center; gap:8px; }
2831
+ .dsh-partner-push-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
2832
+ .dsh-partner-push-form .dsh-partner-channel-field { display:grid; min-width:0; gap:6px; }
2833
+ .dsh-partner-push-form .dsh-partner-channel-field :is(input,select) { width:100%; min-width:0; box-sizing:border-box; }
2834
+ .dsh-partner-push-form p,.dsh-partner-push-form small { margin:0; line-height:1.5; color:var(--partner-text-secondary); overflow-wrap:anywhere; }
2835
+ .dsh-partner-push-form p[role=alert] { color:var(--ds-color-danger, #c64444); }
2836
+ .dsh-partner-workspace .dsh-partner-push-form > p:not([role=alert]) { background:transparent; padding:0; color:var(--partner-text-secondary); }
2837
+ .dsh-partner-workspace .dsh-partner-push-form > p[role=status] { color:var(--partner-success); }
2838
+ .dsh-partner-workspace .dsh-partner-bark-dialog { width:min(760px,100%); }
2839
+ .dsh-partner-push-targets { display:grid; gap:10px; }
2840
+ .dsh-partner-push-target { display:grid; grid-template-columns:24px minmax(100px,.8fr) minmax(150px,1.2fr) auto; gap:10px; align-items:end; padding-bottom:12px; border-bottom:1px solid var(--partner-separator); }
2841
+ .dsh-partner-push-enable { align-self:center; }
2842
+ .dsh-partner-push-target-actions { display:flex; gap:6px; }
2843
+ /* Keep native/theme checkmarks invisible; the shared partner-check indicator
2844
+ is the only painted control, while the input retains keyboard semantics. */
2845
+ .dsh-partner-workspace .dsh-partner-push-form .dsh-partner-check { position:relative; }
2846
+ .dsh-partner-workspace .dsh-partner-push-form .dsh-partner-check > input[type=checkbox] { position:absolute!important; width:1px!important; height:1px!important; min-height:1px!important; padding:0!important; margin:0!important; opacity:0!important; clip-path:inset(50%)!important; pointer-events:none; }
2847
+ .dsh-partner-push-form .dsh-partner-check > i { flex:0 0 20px; box-sizing:border-box; }
2848
+ .dsh-partner-push-form .dsh-partner-check:has(input:disabled) { opacity:.5; cursor:not-allowed; }
2849
+ .dsh-partner-push-form details > .dsh-partner-push-fields { margin-block:12px; }
2850
+ .dsh-partner-push-records { display:grid; gap:12px; border-top:1px solid var(--partner-separator); padding-top:12px; }
2851
+ .dsh-partner-push-records > div:not(:first-child) { display:flex; align-items:center; justify-content:space-between; gap:12px; }
2852
+ .dsh-partner-push-records > div > span { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
2853
+ @media(max-width:640px) {
2854
+ .dsh-partner-push-fields { grid-template-columns:minmax(0,1fr); }
2855
+ .dsh-partner-push-target { grid-template-columns:24px minmax(0,1fr); }
2856
+ .dsh-partner-push-target > .dsh-partner-channel-field,.dsh-partner-push-target-actions { grid-column:2; }
2857
+ .dsh-partner-push-enable { grid-row:1; }
2858
+ }
2832
2859
  `;
2833
2860
 
2834
2861
  // src/ui/workspace-ui.css
@@ -3344,7 +3371,7 @@ function WorkspaceBlock({ title, detail, actions, children, className = "" }) {
3344
3371
  children
3345
3372
  ] });
3346
3373
  }
3347
- function WorkspaceDialog({ eyebrow = "CREATE & CONFIGURE", title, detail, close, children, width = "regular", className = "" }) {
3374
+ function WorkspaceDialog({ eyebrow = "CREATE & CONFIGURE", title, detail, close, children, width = "regular", className = "", confirmation = false }) {
3348
3375
  const titleId = (0, import_react2.useId)();
3349
3376
  const detailId = (0, import_react2.useId)();
3350
3377
  const layerRef = (0, import_react2.useRef)(null);
@@ -3355,7 +3382,7 @@ function WorkspaceDialog({ eyebrow = "CREATE & CONFIGURE", title, detail, close,
3355
3382
  layer?.showModal();
3356
3383
  const frame = requestAnimationFrame(() => {
3357
3384
  const panel = panelRef.current;
3358
- const target = panel?.querySelector("[autofocus]") ?? panel?.querySelector("input, textarea, select, button");
3385
+ const target = panel?.querySelector("[data-dialog-initial-focus], [autofocus]") ?? panel?.querySelector("input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled])");
3359
3386
  target?.focus({ preventScroll: true });
3360
3387
  });
3361
3388
  return () => {
@@ -3384,13 +3411,13 @@ function WorkspaceDialog({ eyebrow = "CREATE & CONFIGURE", title, detail, close,
3384
3411
  first?.focus();
3385
3412
  }
3386
3413
  };
3387
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dialog", { ref: layerRef, className: "dsh-partner-workspace-dialog-layer", "aria-modal": "true", "aria-labelledby": titleId, "aria-describedby": detailId, onCancel: (event) => {
3414
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dialog", { ref: layerRef, className: "dsh-partner-workspace-dialog-layer", role: confirmation ? "alertdialog" : void 0, "aria-modal": "true", "aria-labelledby": titleId, "aria-describedby": detailId, onCancel: (event) => {
3388
3415
  event.preventDefault();
3389
3416
  event.stopPropagation();
3390
3417
  close();
3391
3418
  }, onPointerDown: (event) => {
3392
3419
  if (event.target === event.currentTarget) close();
3393
- }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { ref: panelRef, className: `dsh-partner-workspace-dialog is-${width} ${className}`, onKeyDown: keyDown, children: [
3420
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { ref: panelRef, className: `dsh-partner-workspace-dialog is-${width}${confirmation ? " is-confirmation" : ""} ${className}`, onKeyDown: keyDown, children: [
3394
3421
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { children: [
3395
3422
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
3396
3423
  eyebrow && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: eyebrow }),
@@ -3402,6 +3429,12 @@ function WorkspaceDialog({ eyebrow = "CREATE & CONFIGURE", title, detail, close,
3402
3429
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dsh-partner-workspace-dialog-body", children })
3403
3430
  ] }) });
3404
3431
  }
3432
+ function DiscardChangesDialog({ keepEditing, discard }) {
3433
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WorkspaceDialog, { confirmation: true, eyebrow: "", title: "\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F", detail: "\u5173\u95ED\u540E\u8FD9\u4E9B\u4FEE\u6539\u4E0D\u4F1A\u4FDD\u5B58\u3002\u4F60\u4E5F\u53EF\u4EE5\u7EE7\u7EED\u7F16\u8F91\u3002", close: keepEditing, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dsh-partner-form-actions", children: [
3434
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", "data-dialog-initial-focus": true, onClick: keepEditing, children: "\u7EE7\u7EED\u7F16\u8F91" }),
3435
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "is-danger", onClick: discard, children: "\u653E\u5F03\u4FEE\u6539" })
3436
+ ] }) });
3437
+ }
3405
3438
  function WorkspaceNotice({ children, kind = "error" }) {
3406
3439
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: `dsh-partner-workspace-notice is-${kind}`, role: kind === "error" ? "alert" : "status", children: [
3407
3440
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {}),
@@ -15896,8 +15929,8 @@ function companionName(companions, id) {
15896
15929
  }
15897
15930
 
15898
15931
  // src/ui/capability-editor.tsx
15899
- var import_react45 = require("react");
15900
- var import_dsh_client_ui_primitives20 = require("@deepseek-ai/dsh-client-ui-primitives");
15932
+ var import_react46 = require("react");
15933
+ var import_dsh_client_ui_primitives21 = require("@deepseek-ai/dsh-client-ui-primitives");
15901
15934
 
15902
15935
  // src/capabilities.ts
15903
15936
  var COMPANION_CAPABILITIES = ["knowledge", "skills", "mcp", "ssh", "git", "companions", "schedules", "access", "administration"];
@@ -16116,35 +16149,121 @@ function CapabilityResources({ companionId, capabilities, disabled, children })
16116
16149
  ] });
16117
16150
  }
16118
16151
 
16152
+ // src/ui/runtime-settings.tsx
16153
+ var import_react45 = require("react");
16154
+ var import_dsh_client_ui_primitives20 = require("@deepseek-ai/dsh-client-ui-primitives");
16155
+ var import_jsx_runtime42 = require("react/jsx-runtime");
16156
+ function RuntimeSettings({ value, catalog, presets, saving, error, saved, change }) {
16157
+ const [open, setOpen] = (0, import_react45.useState)(false);
16158
+ const [query, setQuery] = (0, import_react45.useState)("");
16159
+ const providerId = value.provider || catalog?.defaultSelection.provider || "";
16160
+ const provider = catalog?.providers.find((item) => item.id === providerId);
16161
+ const models = provider?.models ?? [];
16162
+ const presetName = presets.find((item) => item.id === value.presetId)?.name || value.presetId || "\u8DDF\u968F DSH \u9ED8\u8BA4";
16163
+ const modelId = value.model || catalog?.defaultSelection.model || "";
16164
+ const modelName = models.find((item) => item.id === modelId)?.name || modelId || "\u8DDF\u968F DSH \u9ED8\u8BA4";
16165
+ const providerName = provider?.name || providerId;
16166
+ const missingModel = Boolean(value.model) && !models.some((item) => item.id === value.model);
16167
+ const normalized = query.trim().toLocaleLowerCase();
16168
+ const filtered = models.filter((item) => `${item.name} ${item.id}`.toLocaleLowerCase().includes(normalized));
16169
+ const close = () => {
16170
+ if (!saving) setOpen(false);
16171
+ };
16172
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
16173
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("section", { className: "dsh-partner-runtime-summary", "aria-label": "\u8FD0\u884C\u914D\u7F6E", children: [
16174
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { children: [
16175
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { children: "Agent Preset" }),
16176
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { title: presetName, children: presetName })
16177
+ ] }),
16178
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { children: [
16179
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("small", { children: [
16180
+ "\u6A21\u578B",
16181
+ providerName ? ` \xB7 ${providerName}` : ""
16182
+ ] }),
16183
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { title: `${providerName} / ${modelName}`, children: modelName })
16184
+ ] }),
16185
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("button", { type: "button", disabled: saving, "aria-haspopup": "dialog", onClick: () => {
16186
+ setQuery("");
16187
+ setOpen(true);
16188
+ }, "aria-label": "\u8C03\u6574\u8FD0\u884C\u914D\u7F6E", children: "\u8C03\u6574" })
16189
+ ] }),
16190
+ open && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(WorkspaceDialog, { eyebrow: "", title: "\u8FD0\u884C\u914D\u7F6E", detail: "\u9009\u62E9\u81EA\u52A8\u4FDD\u5B58\uFF1B\u4F5C\u4E3A\u4F1A\u8BDD\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u4E0D\u8986\u76D6\u5DF2\u6709\u4F1A\u8BDD\u7684\u9009\u62E9\u3002", close, className: "dsh-partner-runtime-dialog", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-runtime-editor", children: [
16191
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-runtime-options", children: [
16192
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FormField, { label: "Agent Preset", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("select", { "aria-label": "Agent Preset", disabled: saving, value: value.presetId, onChange: (event) => change({ presetId: event.target.value }), children: [
16193
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "", children: "\u8DDF\u968F DSH \u9ED8\u8BA4" }),
16194
+ value.presetId && !presets.some((item) => !item.broken && item.id === value.presetId) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: value.presetId, children: [
16195
+ "\u5F53\u524D\u914D\u7F6E \xB7 ",
16196
+ value.presetId
16197
+ ] }),
16198
+ presets.filter((item) => !item.broken).map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: item.id, children: item.name }, item.id))
16199
+ ] }) }),
16200
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FormField, { label: "\u6A21\u578B\u63D0\u4F9B\u65B9", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("select", { "aria-label": "\u6A21\u578B\u63D0\u4F9B\u65B9", disabled: saving || !catalog, value: value.provider, onChange: (event) => {
16201
+ setQuery("");
16202
+ change({ provider: event.target.value, model: "" });
16203
+ }, children: [
16204
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: "", children: [
16205
+ "\u8DDF\u968F DSH \u9ED8\u8BA4",
16206
+ catalog?.defaultSelection.provider ? ` \xB7 ${catalog.defaultSelection.provider}` : ""
16207
+ ] }),
16208
+ value.provider && !catalog?.providers.some((item) => item.id === value.provider) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: value.provider, children: [
16209
+ "\u5F53\u524D\u914D\u7F6E \xB7 ",
16210
+ value.provider
16211
+ ] }),
16212
+ catalog?.providers.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: item.id, children: item.name || item.id }, item.id))
16213
+ ] }) })
16214
+ ] }),
16215
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "dsh-partner-runtime-search", children: [
16216
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "\u9009\u62E9\u6A21\u578B" }),
16217
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("input", { type: "search", value: query, onChange: (event) => setQuery(event.target.value), placeholder: "\u641C\u7D22\u6A21\u578B\u540D\u79F0\u6216 ID" })
16218
+ ] }),
16219
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-runtime-models", role: "group", "aria-label": "\u53EF\u7528\u6A21\u578B", "aria-busy": saving, children: [
16220
+ [{ id: "", name: "\u8DDF\u968F DSH \u9ED8\u8BA4\u6A21\u578B", detail: catalog?.defaultSelection.model || "\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E" }, ...missingModel ? [{ id: value.model, name: value.model, detail: "\u5F53\u524D\u914D\u7F6E \xB7 \u4E0D\u5728\u6A21\u578B\u76EE\u5F55\u4E2D" }] : [], ...filtered.map((item) => ({ ...item, detail: item.id }))].map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("button", { type: "button", disabled: saving, "aria-pressed": item.id === value.model, onClick: () => {
16221
+ if (item.id !== value.model) change({ model: item.id });
16222
+ }, children: [
16223
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { children: [
16224
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { children: item.name || item.id }),
16225
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { children: item.detail })
16226
+ ] }),
16227
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("i", { "aria-hidden": "true", children: item.id === value.model && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_dsh_client_ui_primitives20.IconCheckOutlineRegular, { size: 16 }) })
16228
+ ] }, item.id)),
16229
+ !catalog && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "status", children: "\u6A21\u578B\u76EE\u5F55\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u5F00\u6216\u5237\u65B0\u9875\u9762\u3002" }),
16230
+ catalog && !filtered.length && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { role: "status", children: query ? "\u6CA1\u6709\u5339\u914D\u7684\u6A21\u578B\uFF0C\u8BD5\u8BD5\u5176\u4ED6\u5173\u952E\u8BCD\u3002" : "\u5F53\u524D\u63D0\u4F9B\u65B9\u6CA1\u6709\u53EF\u9009\u6A21\u578B\u3002" })
16231
+ ] }),
16232
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("footer", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { role: "status", children: saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : error ? "\u4FDD\u5B58\u672A\u6210\u529F" : saved ? "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u751F\u6548" : "\u9009\u62E9\u81EA\u52A8\u4FDD\u5B58" }) }),
16233
+ error && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error })
16234
+ ] }) })
16235
+ ] });
16236
+ }
16237
+
16119
16238
  // src/ui/companion-draft.ts
16120
16239
  function companionDraft(companion) {
16121
16240
  return { name: companion.name, role: companion.role, description: companion.description, instructions: companion.instructions, presetId: companion.presetId ?? "", provider: companion.provider ?? "", model: companion.model ?? "", capabilities: [...companion.capabilities] };
16122
16241
  }
16123
16242
 
16124
16243
  // src/ui/capability-editor.tsx
16125
- var import_jsx_runtime42 = require("react/jsx-runtime");
16244
+ var import_jsx_runtime43 = require("react/jsx-runtime");
16126
16245
  function CapabilityEditor({ companion, presets, onChanged }) {
16127
- const [form, setForm] = (0, import_react45.useState)(() => companionDraft(companion));
16128
- const [persistedCapabilities, setPersistedCapabilities] = (0, import_react45.useState)(companion.capabilities);
16129
- const [modelCatalog, setModelCatalog] = (0, import_react45.useState)();
16130
- const [saving, setSaving] = (0, import_react45.useState)(false);
16131
- const [saved, setSaved] = (0, import_react45.useState)(false);
16132
- const [error, setError] = (0, import_react45.useState)();
16133
- const savingRef = (0, import_react45.useRef)(false);
16134
- const mounted = (0, import_react45.useRef)(true);
16135
- (0, import_react45.useEffect)(() => {
16246
+ const [form, setForm] = (0, import_react46.useState)(() => companionDraft(companion));
16247
+ const [persistedCapabilities, setPersistedCapabilities] = (0, import_react46.useState)(companion.capabilities);
16248
+ const [modelCatalog, setModelCatalog] = (0, import_react46.useState)();
16249
+ const [saving, setSaving] = (0, import_react46.useState)(false);
16250
+ const [saved, setSaved] = (0, import_react46.useState)(false);
16251
+ const [error, setError] = (0, import_react46.useState)();
16252
+ const savingRef = (0, import_react46.useRef)(false);
16253
+ const mounted = (0, import_react46.useRef)(true);
16254
+ (0, import_react46.useEffect)(() => {
16136
16255
  mounted.current = true;
16137
16256
  return () => {
16138
16257
  mounted.current = false;
16139
16258
  };
16140
16259
  }, []);
16141
- (0, import_react45.useEffect)(() => {
16260
+ (0, import_react46.useEffect)(() => {
16142
16261
  if (!savingRef.current) {
16143
16262
  setForm(companionDraft(companion));
16144
16263
  setPersistedCapabilities(companion.capabilities);
16145
16264
  }
16146
16265
  }, [companion.id, companion.updatedAt]);
16147
- (0, import_react45.useEffect)(() => {
16266
+ (0, import_react46.useEffect)(() => {
16148
16267
  void api("/models").then((value) => {
16149
16268
  if (mounted.current) setModelCatalog(value);
16150
16269
  }).catch((reason) => {
@@ -16201,73 +16320,47 @@ function CapabilityEditor({ companion, presets, onChanged }) {
16201
16320
  { id: "administration", title: CAPABILITY_LABELS.administration, detail: "\u4FEE\u6539\u5176\u4ED6\u4F19\u4F34\u7684\u8EAB\u4EFD\u3001\u80FD\u529B\u4E0E Preset\u3001\u534F\u4F5C\u3001Skill \u548C\u77E5\u8BC6\u5E93\u6302\u8F7D\u3002\u4E0D\u5171\u4EAB\u4F1A\u8BDD\u3001\u8BB0\u5FC6\u6216\u51ED\u636E\uFF1B\u4E0D\u80FD\u81EA\u6539\u6216\u8F6C\u6388\u672C\u6743\u9650\u3002" }
16202
16321
  ] }
16203
16322
  ];
16204
- const selectedProvider = form.provider || modelCatalog?.defaultSelection.provider || "";
16205
- const modelOptions = modelCatalog?.providers.find((item) => item.id === selectedProvider)?.models ?? [];
16206
- const currentModelMissing = Boolean(form.model) && !modelOptions.some((item) => item.id === form.model);
16207
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-form is-capabilities", children: [
16208
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SectionHeading, { eyebrow: "COMPOSITION", title: "\u80FD\u529B\u7EC4\u5408", detail: "\u4F19\u4F34\u58F0\u660E\u610F\u56FE\u8303\u56F4\uFF1B\u771F\u6B63\u53EF\u8C03\u7528\u7684\u5DE5\u5177\u4ECD\u6765\u81EA\u6240\u9009 Agent Preset\uFF0C\u5E76\u7EE7\u7EED\u6267\u884C\u5404\u63D2\u4EF6\u6743\u9650\u3002" }),
16209
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-capability-save-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: [
16323
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-form is-capabilities", children: [
16324
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SectionHeading, { eyebrow: "COMPOSITION", title: "\u80FD\u529B\u7EC4\u5408", detail: "\u4F19\u4F34\u58F0\u660E\u610F\u56FE\u8303\u56F4\uFF1B\u771F\u6B63\u53EF\u8C03\u7528\u7684\u5DE5\u5177\u4ECD\u6765\u81EA\u6240\u9009 Agent Preset\uFF0C\u5E76\u7EE7\u7EED\u6267\u884C\u5404\u63D2\u4EF6\u6743\u9650\u3002" }),
16325
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-capability-save-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: [
16210
16326
  saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : saved ? "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u751F\u6548" : "\u4FEE\u6539\u81EA\u52A8\u4FDD\u5B58\uFF0C\u65E0\u9700\u5E94\u7528\u7EC4\u5408\u3002",
16211
- error && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error })
16212
- ] }),
16213
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-runtime-fields", children: [
16214
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FormField, { label: "Agent Preset", hint: "\u5DE5\u5177\u3001Skill \u4E0E\u7CFB\u7EDF\u63D0\u793A", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("select", { disabled: saving, value: form.presetId, onChange: (event) => edit({ ...form, presetId: event.target.value }), children: [
16215
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "", children: "\u8DDF\u968F DSH \u9ED8\u8BA4 Preset" }),
16216
- presets.filter((item) => !item.broken).map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: item.id, children: item.name }, item.id))
16217
- ] }) }),
16218
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FormField, { label: "\u6A21\u578B\u63D0\u4F9B\u65B9", hint: "\u6765\u81EA\u5F53\u524D\u5BA2\u6237\u7AEF", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("select", { disabled: saving, value: form.provider, onChange: (event) => edit({ ...form, provider: event.target.value, model: "" }), children: [
16219
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: "", children: [
16220
- "\u8DDF\u968F DSH \u9ED8\u8BA4 \xB7 ",
16221
- modelCatalog?.defaultSelection.provider || "\u6B63\u5728\u8BFB\u53D6"
16222
- ] }),
16223
- modelCatalog?.providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: provider.id, children: provider.name || provider.id }, provider.id))
16224
- ] }) }),
16225
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FormField, { label: "\u6A21\u578B", hint: "\u968F\u63D0\u4F9B\u65B9\u8054\u52A8", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("select", { disabled: saving, value: form.model, onChange: (event) => edit({ ...form, model: event.target.value }), children: [
16226
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: "", children: [
16227
- "\u8DDF\u968F DSH \u9ED8\u8BA4 \xB7 ",
16228
- modelCatalog?.defaultSelection.model || "\u6B63\u5728\u8BFB\u53D6"
16229
- ] }),
16230
- currentModelMissing && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("option", { value: form.model, children: [
16231
- "\u5F53\u524D\u914D\u7F6E \xB7 ",
16232
- form.model
16233
- ] }),
16234
- modelOptions.map((model) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: model.id, children: model.name || model.id }, model.id))
16235
- ] }) })
16327
+ error && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error })
16236
16328
  ] }),
16237
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "dsh-partner-inline-note", children: "\u8EAB\u4EFD\u4E0E\u80FD\u529B\u5728\u4E0B\u4E00\u8F6E\u6267\u884C\u524D\u66F4\u65B0\uFF1BPreset \u4E0E\u6A21\u578B\u4F5C\u4E3A\u4F1A\u8BDD\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u4E0D\u8986\u76D6\u5DF2\u6709\u4F1A\u8BDD\u7684\u9009\u62E9\u3002" }),
16238
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CapabilityResources, { companionId: companion.id, capabilities: persistedCapabilities, disabled: saving, children: (manage) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "dsh-partner-capability-groups", children: groups.map((group) => {
16329
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RuntimeSettings, { value: form, catalog: modelCatalog, presets, saving, saved, error, change: (patch) => edit({ ...form, ...patch }) }),
16330
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "dsh-partner-inline-note", children: "\u8EAB\u4EFD\u4E0E\u80FD\u529B\u5728\u4E0B\u4E00\u8F6E\u6267\u884C\u524D\u66F4\u65B0\uFF1BPreset \u4E0E\u6A21\u578B\u4F5C\u4E3A\u4F1A\u8BDD\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u4E0D\u8986\u76D6\u5DF2\u6709\u4F1A\u8BDD\u7684\u9009\u62E9\u3002" }),
16331
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CapabilityResources, { companionId: companion.id, capabilities: persistedCapabilities, disabled: saving, children: (manage) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "dsh-partner-capability-groups", children: groups.map((group) => {
16239
16332
  const enabled = group.choices.filter((choice) => form.capabilities.includes(choice.id)).length;
16240
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("section", { className: "dsh-partner-capability-group", "aria-labelledby": `partner-capability-${group.id}`, children: [
16241
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("header", { children: [
16242
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { children: [
16243
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { children: group.eyebrow }),
16244
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { id: `partner-capability-${group.id}`, children: group.title }),
16245
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: group.detail })
16333
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { className: "dsh-partner-capability-group", "aria-labelledby": `partner-capability-${group.id}`, children: [
16334
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { children: [
16335
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { children: [
16336
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("small", { children: group.eyebrow }),
16337
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { id: `partner-capability-${group.id}`, children: group.title }),
16338
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: group.detail })
16246
16339
  ] }),
16247
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("em", { children: [
16340
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("em", { children: [
16248
16341
  enabled,
16249
16342
  " / ",
16250
16343
  group.choices.length,
16251
16344
  " \u5DF2\u542F\u7528"
16252
16345
  ] })
16253
16346
  ] }),
16254
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-capabilities", children: [
16347
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-capabilities", children: [
16255
16348
  group.choices.map((choice) => {
16256
16349
  const active2 = form.capabilities.includes(choice.id);
16257
- const control = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("button", { type: "button", disabled: saving, className: active2 ? "is-active" : "", "aria-pressed": active2, onClick: () => toggle(choice.id), children: [
16258
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: active2 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_dsh_client_ui_primitives20.IconCheckOutlineRegular, { size: 14 }) }),
16259
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { children: choice.title }),
16260
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { children: choice.detail })
16350
+ const control = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("button", { type: "button", disabled: saving, className: active2 ? "is-active" : "", "aria-pressed": active2, onClick: () => toggle(choice.id), children: [
16351
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: active2 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_dsh_client_ui_primitives21.IconCheckOutlineRegular, { size: 14 }) }),
16352
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: choice.title }),
16353
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("small", { children: choice.detail })
16261
16354
  ] });
16262
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-capability-card", children: [
16355
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-capability-card", children: [
16263
16356
  control,
16264
16357
  (choice.id === "skills" || choice.id === "mcp") && manage(choice.id)
16265
16358
  ] }, choice.id);
16266
16359
  }),
16267
- group.id === "coordination" && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-capability-card is-access", children: [
16268
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "dsh-partner-capability-card-copy", children: [
16269
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("strong", { children: "\u53EF\u8BBF\u95EE\u4F19\u4F34" }),
16270
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("small", { children: "\u9009\u62E9\u80FD\u4E86\u89E3\u5176\u80FD\u529B\u5E76\u59D4\u6D3E\u4EFB\u52A1\u7684\u4F19\u4F34\u3002" })
16360
+ group.id === "coordination" && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-capability-card is-access", children: [
16361
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-capability-card-copy", children: [
16362
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "\u53EF\u8BBF\u95EE\u4F19\u4F34" }),
16363
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("small", { children: "\u9009\u62E9\u80FD\u4E86\u89E3\u5176\u80FD\u529B\u5E76\u59D4\u6D3E\u4EFB\u52A1\u7684\u4F19\u4F34\u3002" })
16271
16364
  ] }),
16272
16365
  manage("access")
16273
16366
  ] })
@@ -16278,26 +16371,26 @@ function CapabilityEditor({ companion, presets, onChanged }) {
16278
16371
  }
16279
16372
 
16280
16373
  // src/ui/identity-editor.tsx
16281
- var import_react46 = require("react");
16282
- var import_dsh_client_ui_primitives21 = require("@deepseek-ai/dsh-client-ui-primitives");
16283
- var import_jsx_runtime43 = require("react/jsx-runtime");
16374
+ var import_react47 = require("react");
16375
+ var import_dsh_client_ui_primitives22 = require("@deepseek-ai/dsh-client-ui-primitives");
16376
+ var import_jsx_runtime44 = require("react/jsx-runtime");
16284
16377
  function IdentityEditor(props) {
16285
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IdentityEditorForm, { ...props }, props.companion.id);
16378
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IdentityEditorForm, { ...props }, props.companion.id);
16286
16379
  }
16287
16380
  function IdentityEditorForm({ companion, onChanged }) {
16288
- const [form, setForm] = (0, import_react46.useState)(() => companionDraft(companion));
16289
- const [operation, setOperation] = (0, import_react46.useState)();
16290
- const [saved, setSaved] = (0, import_react46.useState)(false);
16291
- const [error, setError] = (0, import_react46.useState)();
16292
- const locked = (0, import_react46.useRef)(false);
16293
- const alive = (0, import_react46.useRef)(true);
16294
- (0, import_react46.useEffect)(() => {
16381
+ const [form, setForm] = (0, import_react47.useState)(() => companionDraft(companion));
16382
+ const [operation, setOperation] = (0, import_react47.useState)();
16383
+ const [saved, setSaved] = (0, import_react47.useState)(false);
16384
+ const [error, setError] = (0, import_react47.useState)();
16385
+ const locked = (0, import_react47.useRef)(false);
16386
+ const alive = (0, import_react47.useRef)(true);
16387
+ (0, import_react47.useEffect)(() => {
16295
16388
  alive.current = true;
16296
16389
  return () => {
16297
16390
  alive.current = false;
16298
16391
  };
16299
16392
  }, []);
16300
- (0, import_react46.useEffect)(() => {
16393
+ (0, import_react47.useEffect)(() => {
16301
16394
  setForm(companionDraft(companion));
16302
16395
  setSaved(false);
16303
16396
  }, [companion.updatedAt]);
@@ -16321,40 +16414,40 @@ function IdentityEditorForm({ companion, onChanged }) {
16321
16414
  if (alive.current) setOperation(void 0);
16322
16415
  }
16323
16416
  };
16324
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("form", { id: "dsh-partner-identity-editor", className: "dsh-partner-form is-identity", "aria-busy": operation !== void 0, onSubmit: (event) => {
16417
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("form", { id: "dsh-partner-identity-editor", className: "dsh-partner-form is-identity", "aria-busy": operation !== void 0, onSubmit: (event) => {
16325
16418
  void submit(event);
16326
16419
  }, children: [
16327
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SectionHeading, { eyebrow: "IDENTITY", title: "\u5DE5\u4F5C\u8EAB\u4EFD", detail: "\u5B83\u4E0D\u662F\u4E00\u6B21\u5BF9\u8BDD\u7684\u63D0\u793A\u8BCD\uFF0C\u800C\u662F\u8FD9\u4E2A\u4F19\u4F34\u5728\u684C\u9762\u548C\u5FAE\u4FE1\u4E2D\u7684\u957F\u671F\u884C\u4E3A\u57FA\u7EBF\u3002" }),
16328
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { className: "dsh-partner-identity-card", "aria-label": "\u8EAB\u4EFD\u914D\u7F6E", children: [
16329
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-fields two", children: [
16330
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FormField, { label: "\u540D\u5B57", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("input", { disabled: busy, required: true, maxLength: 60, value: form.name, onChange: (event) => setForm({ ...form, name: event.target.value }) }) }),
16331
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FormField, { label: "\u89D2\u8272", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("input", { disabled: busy, required: true, maxLength: 120, value: form.role, onChange: (event) => setForm({ ...form, role: event.target.value }) }) })
16420
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SectionHeading, { eyebrow: "IDENTITY", title: "\u5DE5\u4F5C\u8EAB\u4EFD", detail: "\u5B83\u4E0D\u662F\u4E00\u6B21\u5BF9\u8BDD\u7684\u63D0\u793A\u8BCD\uFF0C\u800C\u662F\u8FD9\u4E2A\u4F19\u4F34\u5728\u684C\u9762\u548C\u5FAE\u4FE1\u4E2D\u7684\u957F\u671F\u884C\u4E3A\u57FA\u7EBF\u3002" }),
16421
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("section", { className: "dsh-partner-identity-card", "aria-label": "\u8EAB\u4EFD\u914D\u7F6E", children: [
16422
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "dsh-partner-fields two", children: [
16423
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FormField, { label: "\u540D\u5B57", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("input", { disabled: busy, required: true, maxLength: 60, value: form.name, onChange: (event) => setForm({ ...form, name: event.target.value }) }) }),
16424
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FormField, { label: "\u89D2\u8272", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("input", { disabled: busy, required: true, maxLength: 120, value: form.role, onChange: (event) => setForm({ ...form, role: event.target.value }) }) })
16332
16425
  ] }),
16333
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FormField, { label: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D", hint: "\u7528\u4E8E\u540D\u518C\u8BC6\u522B\uFF0C\u4E0D\u4F1A\u66FF\u4EE3\u5B8C\u6574\u884C\u4E3A\u51C6\u5219\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("textarea", { disabled: busy, rows: 2, maxLength: 500, value: form.description, onChange: (event) => setForm({ ...form, description: event.target.value }) }) }),
16334
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FormField, { label: "\u957F\u671F\u884C\u4E3A\u51C6\u5219", hint: "\u5EFA\u8BAE\u5199\u804C\u8D23\u3001\u8868\u8FBE\u65B9\u5F0F\u4E0E\u8FB9\u754C\uFF1B\u6E20\u9053\u3001\u5DE5\u5177\u548C\u6388\u6743\u7531\u7CFB\u7EDF\u5355\u72EC\u63A7\u5236\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("textarea", { disabled: busy, rows: 9, maxLength: 12e3, value: form.instructions, onChange: (event) => setForm({ ...form, instructions: event.target.value }) }) }),
16335
- error && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16336
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16337
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { role: "status", children: saved && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
16338
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_dsh_client_ui_primitives21.IconCheckOutlineRegular, { size: 14 }),
16426
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FormField, { label: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D", hint: "\u7528\u4E8E\u540D\u518C\u8BC6\u522B\uFF0C\u4E0D\u4F1A\u66FF\u4EE3\u5B8C\u6574\u884C\u4E3A\u51C6\u5219\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("textarea", { disabled: busy, rows: 2, maxLength: 500, value: form.description, onChange: (event) => setForm({ ...form, description: event.target.value }) }) }),
16427
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FormField, { label: "\u957F\u671F\u884C\u4E3A\u51C6\u5219", hint: "\u5EFA\u8BAE\u5199\u804C\u8D23\u3001\u8868\u8FBE\u65B9\u5F0F\u4E0E\u8FB9\u754C\uFF1B\u6E20\u9053\u3001\u5DE5\u5177\u548C\u6388\u6743\u7531\u7CFB\u7EDF\u5355\u72EC\u63A7\u5236\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("textarea", { disabled: busy, rows: 9, maxLength: 12e3, value: form.instructions, onChange: (event) => setForm({ ...form, instructions: event.target.value }) }) }),
16428
+ error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16429
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16430
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { role: "status", children: saved && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
16431
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_dsh_client_ui_primitives22.IconCheckOutlineRegular, { size: 14 }),
16339
16432
  "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u5C06\u4F7F\u7528\u65B0\u8EAB\u4EFD"
16340
16433
  ] }) }),
16341
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { disabled: busy, children: operation === "save" ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8EAB\u4EFD" })
16434
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { disabled: busy, children: operation === "save" ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8EAB\u4EFD" })
16342
16435
  ] })
16343
16436
  ] })
16344
16437
  ] });
16345
16438
  }
16346
16439
 
16347
16440
  // src/ui/companion-deletion.tsx
16348
- var import_react47 = require("react");
16349
- var import_dsh_client_ui_primitives22 = require("@deepseek-ai/dsh-client-ui-primitives");
16350
- var import_jsx_runtime44 = require("react/jsx-runtime");
16441
+ var import_react48 = require("react");
16442
+ var import_dsh_client_ui_primitives23 = require("@deepseek-ai/dsh-client-ui-primitives");
16443
+ var import_jsx_runtime45 = require("react/jsx-runtime");
16351
16444
  function CompanionDeletion({ companion, count, channelCount, onRemoved }) {
16352
- const [open, setOpen] = (0, import_react47.useState)(false);
16353
- const [busy, setBusy] = (0, import_react47.useState)(false);
16354
- const [removed, setRemoved] = (0, import_react47.useState)(false);
16355
- const [error, setError] = (0, import_react47.useState)("");
16356
- const locked = (0, import_react47.useRef)(false), alive = (0, import_react47.useRef)(true);
16357
- (0, import_react47.useEffect)(() => {
16445
+ const [open, setOpen] = (0, import_react48.useState)(false);
16446
+ const [busy, setBusy] = (0, import_react48.useState)(false);
16447
+ const [removed, setRemoved] = (0, import_react48.useState)(false);
16448
+ const [error, setError] = (0, import_react48.useState)("");
16449
+ const locked = (0, import_react48.useRef)(false), alive = (0, import_react48.useRef)(true);
16450
+ (0, import_react48.useEffect)(() => {
16358
16451
  alive.current = true;
16359
16452
  return () => {
16360
16453
  alive.current = false;
@@ -16382,25 +16475,25 @@ function CompanionDeletion({ companion, count, channelCount, onRemoved }) {
16382
16475
  if (alive.current) setBusy(false);
16383
16476
  }
16384
16477
  };
16385
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "dsh-partner-overview-delete", children: [
16386
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("button", { type: "button", className: "is-danger", disabled: busy || removed || count <= 1, title: count <= 1 ? "\u81F3\u5C11\u4FDD\u7559\u4E00\u4E2A\u4F19\u4F34" : void 0, onClick: () => {
16478
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "dsh-partner-overview-delete", children: [
16479
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("button", { type: "button", className: "is-danger", disabled: busy || removed || count <= 1, title: count <= 1 ? "\u81F3\u5C11\u4FDD\u7559\u4E00\u4E2A\u4F19\u4F34" : void 0, onClick: () => {
16387
16480
  setError("");
16388
16481
  setOpen(true);
16389
16482
  }, children: [
16390
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_dsh_client_ui_primitives22.IconTrashOutlineRegular, { size: 16 }),
16483
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_dsh_client_ui_primitives23.IconTrashOutlineRegular, { size: 16 }),
16391
16484
  "\u5220\u9664\u4F19\u4F34"
16392
16485
  ] }),
16393
- !open && error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16394
- open && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(WorkspaceDialog, { title: `\u5220\u9664\u300C${companion.name}\u300D\uFF1F`, detail: "\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\uFF0C\u53EA\u5220\u9664\u5F53\u524D\u786E\u8BA4\u7684\u4F19\u4F34\u3002", close: () => {
16486
+ !open && error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16487
+ open && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(WorkspaceDialog, { title: `\u5220\u9664\u300C${companion.name}\u300D\uFF1F`, detail: "\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\uFF0C\u53EA\u5220\u9664\u5F53\u524D\u786E\u8BA4\u7684\u4F19\u4F34\u3002", close: () => {
16395
16488
  if (!locked.current) setOpen(false);
16396
16489
  }, children: [
16397
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { children: "\u5C06\u6E05\u7406\u8EAB\u4EFD\u3001\u8BB0\u5FC6\u3001\u6301\u7EED\u5173\u6CE8\u3001\u80FD\u529B\u7ED1\u5B9A\u3001\u5B9A\u65F6\u4EFB\u52A1\u53CA\u4E13\u5C5E\u76EE\u5F55\u4E2D\u7684\u5168\u90E8\u6587\u4EF6\u3002" }),
16398
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { children: channelCount ? `\u5DF2\u7ED1\u5B9A ${channelCount} \u4E2A\u6E20\u9053\u3002\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u505C\u6B62\u5E76\u5220\u9664\u8FD9\u4E9B\u6E20\u9053\u3001\u767B\u5F55\u51ED\u636E\u548C\u8054\u7CFB\u4EBA\u6388\u6743\uFF0C\u65E0\u9700\u5148\u624B\u52A8\u89E3\u7ED1\u3002` : "\u8BE5\u4F19\u4F34\u6CA1\u6709\u7ED1\u5B9A\u6E20\u9053\u3002" }),
16399
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { children: "DSH \u539F\u4F1A\u8BDD\u65E5\u5FD7\u7531\u5BBF\u4E3B\u7BA1\u7406\uFF0C\u4E0D\u5728\u6B64\u6B21\u5220\u9664\u8303\u56F4\u3002\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1\u53CA\u5171\u4EAB\u6216\u5F02\u5E38\u76EE\u5F55\u4ECD\u4F1A\u62E6\u622A\u5220\u9664\u3002" }),
16400
- error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16401
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16402
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { type: "button", disabled: busy, onClick: () => setOpen(false), children: "\u53D6\u6D88" }),
16403
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: () => {
16490
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u5C06\u6E05\u7406\u8EAB\u4EFD\u3001\u8BB0\u5FC6\u3001\u6301\u7EED\u5173\u6CE8\u3001\u80FD\u529B\u7ED1\u5B9A\u3001\u5B9A\u65F6\u4EFB\u52A1\u53CA\u4E13\u5C5E\u76EE\u5F55\u4E2D\u7684\u5168\u90E8\u6587\u4EF6\u3002" }),
16491
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: channelCount ? `\u5DF2\u7ED1\u5B9A ${channelCount} \u4E2A\u6E20\u9053\u3002\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u505C\u6B62\u5E76\u5220\u9664\u8FD9\u4E9B\u6E20\u9053\u3001\u767B\u5F55\u51ED\u636E\u548C\u8054\u7CFB\u4EBA\u6388\u6743\uFF0C\u65E0\u9700\u5148\u624B\u52A8\u89E3\u7ED1\u3002` : "\u8BE5\u4F19\u4F34\u6CA1\u6709\u7ED1\u5B9A\u6E20\u9053\u3002" }),
16492
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "DSH \u539F\u4F1A\u8BDD\u65E5\u5FD7\u7531\u5BBF\u4E3B\u7BA1\u7406\uFF0C\u4E0D\u5728\u6B64\u6B21\u5220\u9664\u8303\u56F4\u3002\u6B63\u5728\u6267\u884C\u7684\u4EFB\u52A1\u53CA\u5171\u4EAB\u6216\u5F02\u5E38\u76EE\u5F55\u4ECD\u4F1A\u62E6\u622A\u5220\u9664\u3002" }),
16493
+ error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
16494
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16495
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("button", { type: "button", disabled: busy, onClick: () => setOpen(false), children: "\u53D6\u6D88" }),
16496
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: () => {
16404
16497
  void remove();
16405
16498
  }, children: busy ? "\u6B63\u5728\u5220\u9664\u2026" : "\u786E\u8BA4\u5220\u9664" })
16406
16499
  ] })
@@ -16409,25 +16502,25 @@ function CompanionDeletion({ companion, count, channelCount, onRemoved }) {
16409
16502
  }
16410
16503
 
16411
16504
  // src/ui/channels-panel.tsx
16412
- var import_react49 = require("react");
16505
+ var import_react52 = require("react");
16413
16506
 
16414
16507
  // src/ui/notification-settings.tsx
16415
- var import_react48 = require("react");
16416
- var import_jsx_runtime45 = require("react/jsx-runtime");
16508
+ var import_react49 = require("react");
16509
+ var import_jsx_runtime46 = require("react/jsx-runtime");
16417
16510
  function NotificationSettings({ companion, snapshot, onChanged }) {
16418
16511
  const channels = snapshot.channels.filter((c) => c.companionId === companion.id);
16419
16512
  const pairings = snapshot.pairings.filter((p) => channels.some((c) => c.id === p.channelId));
16420
- const [mode, setMode] = (0, import_react48.useState)(companion.notificationDelivery?.mode ?? "recent");
16421
- const [targets, setTargets] = (0, import_react48.useState)(companion.notificationDelivery?.targets ?? []);
16422
- const [selectedChannels, setSelectedChannels] = (0, import_react48.useState)(targets.map((t) => t.channelId));
16423
- const [busy, setBusy] = (0, import_react48.useState)(false), [feedback, setFeedback] = (0, import_react48.useState)(""), [failed, setFailed] = (0, import_react48.useState)(false);
16424
- const saveRef = (0, import_react48.useRef)(null);
16425
- (0, import_react48.useEffect)(() => {
16513
+ const [mode, setMode] = (0, import_react49.useState)(companion.notificationDelivery?.mode ?? "recent");
16514
+ const [targets, setTargets] = (0, import_react49.useState)(companion.notificationDelivery?.targets ?? []);
16515
+ const [selectedChannels, setSelectedChannels] = (0, import_react49.useState)(targets.map((t) => t.channelId));
16516
+ const [busy, setBusy] = (0, import_react49.useState)(false), [feedback, setFeedback] = (0, import_react49.useState)(""), [failed, setFailed] = (0, import_react49.useState)(false);
16517
+ const saveRef = (0, import_react49.useRef)(null);
16518
+ (0, import_react49.useEffect)(() => {
16426
16519
  if (!busy && feedback && document.activeElement === document.body) saveRef.current?.focus();
16427
16520
  }, [busy, feedback]);
16428
16521
  const unavailable = targets.filter((t) => !pairings.some((p) => p.channelId === t.channelId && p.userId === t.userId && p.status === "approved") || !channels.some((c) => c.id === t.channelId && c.enabled));
16429
- const emptyChannel = selectedChannels.some((id) => !targets.some((t) => t.channelId === id));
16430
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-channel-form dsh-partner-delivery-form", "aria-busy": busy, onSubmit: (e) => {
16522
+ const emptyChannel2 = selectedChannels.some((id) => !targets.some((t) => t.channelId === id));
16523
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-channel-form dsh-partner-delivery-form", "aria-busy": busy, onSubmit: (e) => {
16431
16524
  e.preventDefault();
16432
16525
  if (busy) return;
16433
16526
  setBusy(true);
@@ -16442,41 +16535,41 @@ function NotificationSettings({ companion, snapshot, onChanged }) {
16442
16535
  setFeedback(errorMessage(error));
16443
16536
  }).finally(() => setBusy(false));
16444
16537
  }, children: [
16445
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { className: "dsh-partner-channel-field", children: [
16446
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: "\u901A\u77E5\u53D1\u9001\u5230" }),
16447
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("select", { disabled: busy, value: mode, onChange: (e) => setMode(e.target.value), children: [
16448
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: "recent", children: "\u6700\u8FD1\u8054\u7CFB\u7684\u6E20\u9053\u4E0E\u7528\u6237" }),
16449
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: "selected", children: "\u6307\u5B9A\u6E20\u9053\u4E0E\u63A5\u6536\u4EBA" })
16538
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "dsh-partner-channel-field", children: [
16539
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: "\u901A\u77E5\u53D1\u9001\u5230" }),
16540
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("select", { disabled: busy, value: mode, onChange: (e) => setMode(e.target.value), children: [
16541
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "recent", children: "\u6700\u8FD1\u8054\u7CFB\u7684\u6E20\u9053\u4E0E\u7528\u6237" }),
16542
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "selected", children: "\u6307\u5B9A\u6E20\u9053\u4E0E\u63A5\u6536\u4EBA" })
16450
16543
  ] })
16451
16544
  ] }),
16452
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u4EC5\u5F71\u54CD\u4E3B\u52A8\u901A\u77E5\u4E0E\u7ED3\u679C\u4EA4\u4ED8\u3002\u5BF9\u8BDD\u56DE\u590D\u4ECD\u53D1\u9001\u5230\u6D88\u606F\u6765\u6E90\u6E20\u9053\u3002" }),
16453
- !companion.notificationDelivery && pairings.some((p) => p.deliveryTarget) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { role: "status", children: "\u5F53\u524D\u4ECD\u4F7F\u7528\u65E7\u7684\u8054\u7CFB\u4EBA\u6295\u9012\u89C4\u5219\uFF0C\u4FDD\u5B58\u540E\u7EDF\u4E00\u4F7F\u7528\u8FD9\u91CC\u7684\u901A\u77E5\u8BBE\u7F6E\u3002" }),
16454
- mode === "selected" && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "dsh-partner-notification-choices", children: [
16455
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u53EF\u9009\u62E9\u591A\u4E2A\u6E20\u9053\uFF1B\u6BCF\u4E2A\u6E20\u9053\u81F3\u5C11\u9009\u62E9\u4E00\u4F4D\u5DF2\u6388\u6743\u63A5\u6536\u4EBA\u3002\u4FDD\u5B58\u540E\u5BF9\u65B0\u901A\u77E5\u751F\u6548\uFF0C\u5F85\u91CD\u8BD5\u901A\u77E5\u4FDD\u7559\u539F\u63A5\u6536\u4EBA\u3002" }),
16456
- !channels.length && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u8BF7\u5148\u6DFB\u52A0\u6E20\u9053\u5E76\u6388\u6743\u8054\u7CFB\u4EBA\u3002" }),
16457
- channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("fieldset", { disabled: busy, className: "dsh-partner-notification-channel", children: [
16458
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("legend", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { children: [
16459
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("input", { type: "checkbox", checked: selectedChannels.includes(channel.id), onChange: (e) => {
16545
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u4EC5\u5F71\u54CD\u4E3B\u52A8\u901A\u77E5\u4E0E\u7ED3\u679C\u4EA4\u4ED8\u3002\u5BF9\u8BDD\u56DE\u590D\u4ECD\u53D1\u9001\u5230\u6D88\u606F\u6765\u6E90\u6E20\u9053\u3002" }),
16546
+ !companion.notificationDelivery && pairings.some((p) => p.deliveryTarget) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: "status", children: "\u5F53\u524D\u4ECD\u4F7F\u7528\u65E7\u7684\u8054\u7CFB\u4EBA\u6295\u9012\u89C4\u5219\uFF0C\u4FDD\u5B58\u540E\u7EDF\u4E00\u4F7F\u7528\u8FD9\u91CC\u7684\u901A\u77E5\u8BBE\u7F6E\u3002" }),
16547
+ mode === "selected" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-notification-choices", children: [
16548
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u53EF\u9009\u62E9\u591A\u4E2A\u6E20\u9053\uFF1B\u6BCF\u4E2A\u6E20\u9053\u81F3\u5C11\u9009\u62E9\u4E00\u4F4D\u5DF2\u6388\u6743\u63A5\u6536\u4EBA\u3002\u4FDD\u5B58\u540E\u5BF9\u65B0\u901A\u77E5\u751F\u6548\uFF0C\u5F85\u91CD\u8BD5\u901A\u77E5\u4FDD\u7559\u539F\u63A5\u6536\u4EBA\u3002" }),
16549
+ !channels.length && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u8BF7\u5148\u6DFB\u52A0\u6E20\u9053\u5E76\u6388\u6743\u8054\u7CFB\u4EBA\u3002" }),
16550
+ channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("fieldset", { disabled: busy, className: "dsh-partner-notification-channel", children: [
16551
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("legend", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { children: [
16552
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { type: "checkbox", checked: selectedChannels.includes(channel.id), onChange: (e) => {
16460
16553
  setSelectedChannels((ids) => e.target.checked ? [...ids, channel.id] : ids.filter((id) => id !== channel.id));
16461
16554
  if (!e.target.checked) setTargets((items) => items.filter((t) => t.channelId !== channel.id));
16462
16555
  } }),
16463
16556
  channel.name,
16464
16557
  !channel.enabled ? "\uFF08\u5DF2\u505C\u7528\uFF09" : ""
16465
16558
  ] }) }),
16466
- selectedChannels.includes(channel.id) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "dsh-partner-notification-users", children: [
16467
- !pairings.some((p) => p.channelId === channel.id && p.status === "approved") && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u6682\u65E0\u5DF2\u6388\u6743\u63A5\u6536\u4EBA\uFF0C\u8BF7\u5148\u5728\u6E20\u9053\u914D\u7F6E\u4E2D\u6279\u51C6\u8054\u7CFB\u4EBA\u3002" }),
16468
- pairings.filter((p) => p.channelId === channel.id && p.status === "approved").map((p) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { children: [
16469
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("input", { type: "checkbox", checked: targets.some((t) => t.channelId === p.channelId && t.userId === p.userId), onChange: (e) => setTargets((items) => e.target.checked ? [...items, { channelId: p.channelId, userId: p.userId }] : items.filter((t) => t.channelId !== p.channelId || t.userId !== p.userId)) }),
16470
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { children: [
16559
+ selectedChannels.includes(channel.id) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-notification-users", children: [
16560
+ !pairings.some((p) => p.channelId === channel.id && p.status === "approved") && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u6682\u65E0\u5DF2\u6388\u6743\u63A5\u6536\u4EBA\uFF0C\u8BF7\u5148\u5728\u6E20\u9053\u914D\u7F6E\u4E2D\u6279\u51C6\u8054\u7CFB\u4EBA\u3002" }),
16561
+ pairings.filter((p) => p.channelId === channel.id && p.status === "approved").map((p) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { children: [
16562
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { type: "checkbox", checked: targets.some((t) => t.channelId === p.channelId && t.userId === p.userId), onChange: (e) => setTargets((items) => e.target.checked ? [...items, { channelId: p.channelId, userId: p.userId }] : items.filter((t) => t.channelId !== p.channelId || t.userId !== p.userId)) }),
16563
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16471
16564
  p.displayName,
16472
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("small", { children: p.userId })
16565
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: p.userId })
16473
16566
  ] })
16474
16567
  ] }, p.id))
16475
16568
  ] })
16476
16569
  ] }, channel.id)),
16477
- unavailable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { role: "alert", children: [
16478
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "\u90E8\u5206\u5DF2\u9009\u63A5\u6536\u4EBA\u5DF2\u5931\u6548\u6216\u6E20\u9053\u5DF2\u505C\u7528\u3002\u8BF7\u79FB\u9664\u6216\u6062\u590D\u6388\u6743\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6539\u53D1\u5176\u4ED6\u4EBA\u3002" }),
16479
- unavailable.map((t) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("button", { type: "button", disabled: busy, onClick: () => {
16570
+ unavailable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { role: "alert", children: [
16571
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u90E8\u5206\u5DF2\u9009\u63A5\u6536\u4EBA\u5DF2\u5931\u6548\u6216\u6E20\u9053\u5DF2\u505C\u7528\u3002\u8BF7\u79FB\u9664\u6216\u6062\u590D\u6388\u6743\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6539\u53D1\u5176\u4ED6\u4EBA\u3002" }),
16572
+ unavailable.map((t) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("button", { type: "button", disabled: busy, onClick: () => {
16480
16573
  setTargets((items) => items.filter((x) => x.channelId !== t.channelId || x.userId !== t.userId));
16481
16574
  if (!targets.some((x) => x.channelId === t.channelId && x.userId !== t.userId)) setSelectedChannels((ids) => ids.filter((id) => id !== t.channelId));
16482
16575
  }, children: [
@@ -16485,27 +16578,356 @@ function NotificationSettings({ companion, snapshot, onChanged }) {
16485
16578
  ] }, JSON.stringify(t)))
16486
16579
  ] })
16487
16580
  ] }),
16488
- feedback && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { role: failed ? "alert" : "status", children: feedback }),
16489
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("footer", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("button", { ref: saveRef, className: "is-primary", disabled: busy || mode === "selected" && (!targets.length || unavailable.length > 0 || emptyChannel), children: busy ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58\u901A\u77E5\u8BBE\u7F6E" }) })
16581
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: failed ? "alert" : "status", children: feedback }),
16582
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("footer", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { ref: saveRef, className: "is-primary", disabled: busy || mode === "selected" && (!targets.length || unavailable.length > 0 || emptyChannel2), children: busy ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58\u901A\u77E5\u8BBE\u7F6E" }) })
16583
+ ] });
16584
+ }
16585
+
16586
+ // src/ui/push-channels.tsx
16587
+ var import_react51 = require("react");
16588
+
16589
+ // src/ui/push-editor.tsx
16590
+ var import_react50 = require("react");
16591
+
16592
+ // src/ui/push-draft.ts
16593
+ function pushDraft(channel) {
16594
+ return { ...channel, targets: channel.targets.map((target) => ({ ...target, key: "" })) };
16595
+ }
16596
+ function pushDraftSignature(form) {
16597
+ return JSON.stringify({
16598
+ name: form.name,
16599
+ baseUrl: form.baseUrl,
16600
+ enabled: form.enabled,
16601
+ notifyProblems: form.notifyProblems,
16602
+ content: form.content,
16603
+ group: form.group,
16604
+ sound: form.sound,
16605
+ openUrl: form.openUrl,
16606
+ targets: form.targets.map(({ id, name, enabled, key }) => ({ id, name, enabled, key }))
16607
+ });
16608
+ }
16609
+
16610
+ // src/ui/push-editor.tsx
16611
+ var import_jsx_runtime47 = require("react/jsx-runtime");
16612
+ var statusText = { pending: "\u7B49\u5F85\u53D1\u9001 / \u91CD\u8BD5", sending: "\u53D1\u9001\u4E2D", accepted: "\u670D\u52A1\u7AEF\u5DF2\u63A5\u53D7", failed: "\u53D1\u9001\u5931\u8D25", canceled: "\u5DF2\u53D6\u6D88" };
16613
+ function BarkEditor({ initial, onSaved, onChanged, onDelete, onBusy, onDirty }) {
16614
+ const [form, setForm] = (0, import_react50.useState)(() => pushDraft(initial));
16615
+ const [baseline, setBaseline] = (0, import_react50.useState)(() => pushDraftSignature(pushDraft(initial)));
16616
+ const [busy, setBusy] = (0, import_react50.useState)(false), [feedback, setFeedback] = (0, import_react50.useState)(""), [failed, setFailed] = (0, import_react50.useState)(false);
16617
+ const dirty = pushDraftSignature(form) !== baseline;
16618
+ const [records, setRecords] = (0, import_react50.useState)();
16619
+ const [confirmClear, setConfirmClear] = (0, import_react50.useState)(false);
16620
+ (0, import_react50.useLayoutEffect)(() => onDirty(dirty), [dirty, onDirty]);
16621
+ const recordsOpen = records !== void 0;
16622
+ (0, import_react50.useEffect)(() => {
16623
+ if (!recordsOpen || !initial.id || busy) return;
16624
+ let active2 = true, loading = false;
16625
+ const timer2 = window.setInterval(() => {
16626
+ if (loading || document.hidden) return;
16627
+ loading = true;
16628
+ void api(`/push-channels/${initial.id}/deliveries`).then((rows) => {
16629
+ if (active2) setRecords(rows);
16630
+ }).catch(() => {
16631
+ }).finally(() => {
16632
+ loading = false;
16633
+ });
16634
+ }, 5e3);
16635
+ return () => {
16636
+ active2 = false;
16637
+ clearInterval(timer2);
16638
+ };
16639
+ }, [recordsOpen, initial.id, busy]);
16640
+ const update = (patch) => {
16641
+ setForm((f) => ({ ...f, ...patch }));
16642
+ setFeedback("");
16643
+ };
16644
+ const target = (index2, patch) => update({ targets: form.targets.map((t, i) => i === index2 ? { ...t, ...patch } : t) });
16645
+ const run = async (action) => {
16646
+ if (busy) return;
16647
+ setBusy(true);
16648
+ onBusy(true);
16649
+ setFeedback("");
16650
+ setFailed(false);
16651
+ try {
16652
+ await action();
16653
+ } catch (e) {
16654
+ setFailed(true);
16655
+ setFeedback(errorMessage(e));
16656
+ } finally {
16657
+ setBusy(false);
16658
+ onBusy(false);
16659
+ }
16660
+ };
16661
+ const save = async () => {
16662
+ const saved = await api(initial.id ? `/push-channels/${initial.id}` : "/push-channels", { method: initial.id ? "PUT" : "POST", body: JSON.stringify(form) });
16663
+ const draft = pushDraft(saved);
16664
+ setForm(draft);
16665
+ setBaseline(pushDraftSignature(draft));
16666
+ onSaved(saved);
16667
+ try {
16668
+ await onChanged();
16669
+ } catch {
16670
+ setFailed(true);
16671
+ setFeedback("\u6E20\u9053\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\u3002\u8BF7\u5237\u65B0\u9875\u9762\uFF0C\u65E0\u9700\u91CD\u590D\u4FDD\u5B58\u3002");
16672
+ return;
16673
+ }
16674
+ setFeedback("\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u6B21\u5B8C\u6210\u4E8B\u4EF6\u8D77\u81EA\u52A8\u901A\u77E5\u3002");
16675
+ };
16676
+ const importAddress = (index2, value) => {
16677
+ if (!/^https?:\/\//i.test(value)) return false;
16678
+ try {
16679
+ const url = new URL(value.trim()), segments = url.pathname.split("/").filter(Boolean), key = segments.pop();
16680
+ if (!key || !/^[A-Za-z0-9_-]+$/.test(key) || ["push", "ping"].includes(key) || url.search || url.hash || url.username || url.password) throw Error();
16681
+ url.pathname = segments.length ? `/${segments.join("/")}` : "/";
16682
+ const baseUrl = url.toString().replace(/\/$/, "");
16683
+ if (form.targets.some((t, i) => i !== index2 && (t.configured || t.key)) && form.baseUrl && baseUrl !== form.baseUrl.replace(/\/$/, "")) {
16684
+ setFailed(true);
16685
+ setFeedback("\u6B64\u5730\u5740\u5C5E\u4E8E\u53E6\u4E00\u4E2A\u670D\u52A1\u5668\uFF0C\u8BF7\u53E6\u5EFA Bark \u6E20\u9053\u3002");
16686
+ return true;
16687
+ }
16688
+ update({ baseUrl, targets: form.targets.map((t, i) => i === index2 ? { ...t, key } : t) });
16689
+ return true;
16690
+ } catch {
16691
+ setFailed(true);
16692
+ setFeedback("\u8BF7\u7C98\u8D34\u201C\u670D\u52A1\u5668/\u8BBE\u5907Key\u201D\u5730\u5740\uFF0C\u4E0D\u5305\u542B\u901A\u77E5\u6807\u9898\u3001\u6B63\u6587\u6216\u67E5\u8BE2\u53C2\u6570\u3002");
16693
+ return true;
16694
+ }
16695
+ };
16696
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-channel-form dsh-partner-push-form", "aria-busy": busy, onSubmit: (e) => {
16697
+ e.preventDefault();
16698
+ void run(save);
16699
+ }, children: [
16700
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-heading", children: [
16701
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "dsh-partner-check", children: [
16702
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { type: "checkbox", checked: form.enabled, disabled: busy, onChange: (e) => update({ enabled: e.target.checked }) }),
16703
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("i", { "aria-hidden": "true" }),
16704
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u542F\u7528\u5B8C\u6210\u901A\u77E5" })
16705
+ ] }),
16706
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("small", { children: "\u5355\u5411\u63A8\u9001\uFF0C\u4E0D\u63A5\u6536\u56DE\u590D" })
16707
+ ] }),
16708
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-fields", children: [
16709
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u6E20\u9053\u540D\u79F0", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, maxLength: 80, value: form.name, onChange: (e) => update({ name: e.target.value }), placeholder: "\u4F8B\u5982\uFF1A\u6211\u7684 Bark" }) }),
16710
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u670D\u52A1\u5668\u5730\u5740", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, required: true, type: "url", value: form.baseUrl, onChange: (e) => update({ baseUrl: e.target.value }), placeholder: "https://api.day.app" }) })
16711
+ ] }),
16712
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: "\u652F\u6301\u81EA\u5EFA\u6216\u5185\u7F51\u5730\u5740\uFF0C\u4F46\u5FC5\u987B\u80FD\u4ECE DSH \u670D\u52A1\u7AEF\u8BBF\u95EE\u3002HTTP \u4F1A\u660E\u6587\u4F20\u8F93 Key\uFF0C\u5EFA\u8BAE\u4F7F\u7528 HTTPS\u3002" }),
16713
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-heading", children: [
16714
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("strong", { children: "\u53D1\u9001\u76EE\u6807" }),
16715
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy || form.targets.length >= 50, onClick: () => update({ targets: [...form.targets, { id: "", name: "", key: "", enabled: true, configured: false }] }), children: "\u6DFB\u52A0\u76EE\u6807" })
16716
+ ] }),
16717
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "dsh-partner-push-targets", children: form.targets.map((t, index2) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-target", children: [
16718
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "dsh-partner-push-enable dsh-partner-check", children: [
16719
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { type: "checkbox", disabled: busy, checked: t.enabled, onChange: (e) => target(index2, { enabled: e.target.checked }), "aria-label": `\u542F\u7528\u76EE\u6807 ${index2 + 1}` }),
16720
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("i", { "aria-hidden": "true" })
16721
+ ] }),
16722
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: `\u8BBE\u5907\u540D\u79F0 ${index2 + 1}`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, maxLength: 80, value: t.name, onChange: (e) => target(index2, { name: e.target.value }), placeholder: "\u6211\u7684 iPhone" }) }),
16723
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: `Device Key ${index2 + 1}`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, type: "password", autoComplete: "new-password", required: !t.configured, value: t.key, onChange: (e) => {
16724
+ if (!importAddress(index2, e.target.value)) target(index2, { key: e.target.value });
16725
+ }, onPaste: (e) => {
16726
+ const value = e.clipboardData.getData("text");
16727
+ if (/^https?:\/\//i.test(value)) {
16728
+ e.preventDefault();
16729
+ importAddress(index2, value);
16730
+ }
16731
+ }, placeholder: t.configured ? "\u5DF2\u4FDD\u5B58 \xB7 \u7559\u7A7A\u4E0D\u4FEE\u6539" : "\u8BBE\u5907 Key \u6216\u5B8C\u6574\u63A8\u9001\u5730\u5740" }) }),
16732
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-target-actions", children: [
16733
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy || dirty || !t.id, title: dirty ? "\u8BF7\u5148\u4FDD\u5B58\u914D\u7F6E\u518D\u6D4B\u8BD5" : "\u5411\u6B64\u8BBE\u5907\u53D1\u9001\u6D4B\u8BD5\u901A\u77E5", onClick: () => void run(async () => {
16734
+ const result = await api(`/push-channels/${initial.id}/test`, { method: "POST", body: JSON.stringify({ targetId: t.id }) });
16735
+ setFeedback(result.message);
16736
+ }), children: "\u6D4B\u8BD5" }),
16737
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy || form.targets.length === 1, "aria-label": `\u79FB\u9664\u76EE\u6807 ${index2 + 1}`, onClick: () => update({ targets: form.targets.filter((_, i) => i !== index2) }), children: "\u79FB\u9664" })
16738
+ ] })
16739
+ ] }, t.id || `new-${index2}`)) }),
16740
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("small", { children: "\u4FDD\u5B58\u540E\u53EF\u9010\u4E2A\u6D4B\u8BD5\u3002\u4FEE\u6539\u6216\u505C\u7528\u6E20\u9053\u4F1A\u53D6\u6D88\u65E7\u7684\u5F85\u53D1\u9001\u901A\u77E5\uFF0C\u907F\u514D\u6539\u53D1\u5230\u65B0\u8BBE\u5907\u3002" }),
16741
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("details", { children: [
16742
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("summary", { children: "\u9AD8\u7EA7\u9009\u9879" }),
16743
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-fields", children: [
16744
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u901A\u77E5\u5185\u5BB9", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("select", { disabled: busy, value: form.content, onChange: (e) => update({ content: e.target.value }), children: [
16745
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("option", { value: "summary", children: "\u6807\u9898\u548C\u7B80\u77ED\u6458\u8981" }),
16746
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("option", { value: "title", children: "\u4EC5\u6807\u9898\uFF0C\u9690\u85CF\u7ED3\u679C\u5185\u5BB9" })
16747
+ ] }) }),
16748
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u901A\u77E5\u5206\u7EC4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, maxLength: 80, value: form.group, onChange: (e) => update({ group: e.target.value }), placeholder: "DSH \u4F19\u4F34" }) }),
16749
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u63D0\u793A\u97F3\u540D\u79F0", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, maxLength: 80, value: form.sound, onChange: (e) => update({ sound: e.target.value }), placeholder: "\u7559\u7A7A\u4F7F\u7528\u8BBE\u5907\u9ED8\u8BA4\u58F0\u97F3" }) }),
16750
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "\u70B9\u51FB\u8DF3\u8F6C\u5730\u5740", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { disabled: busy, type: "url", value: form.openUrl, onChange: (e) => update({ openUrl: e.target.value }), placeholder: "\u624B\u673A\u53EF\u8BBF\u95EE\u7684 DSH \u5730\u5740\uFF08\u53EF\u9009\uFF09" }) })
16751
+ ] }),
16752
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "dsh-partner-check", children: [
16753
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { type: "checkbox", disabled: busy, checked: form.notifyProblems, onChange: (e) => update({ notifyProblems: e.target.checked }) }),
16754
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("i", { "aria-hidden": "true" }),
16755
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u540C\u65F6\u901A\u77E5\u6700\u7EC8\u5931\u8D25\u6216\u9700\u8981\u5904\u7406\u7684\u53D7\u963B\u7ED3\u679C" })
16756
+ ] })
16757
+ ] }),
16758
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { role: failed ? "alert" : "status", children: feedback }),
16759
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("footer", { children: [
16760
+ initial.id && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
16761
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, className: "is-danger", onClick: () => onDelete(initial), children: "\u5220\u9664\u6E20\u9053" }),
16762
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: () => void run(async () => setRecords(await api(`/push-channels/${initial.id}/deliveries`))), children: "\u53D1\u9001\u8BB0\u5F55" })
16763
+ ] }),
16764
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { className: "is-primary", disabled: busy || !dirty, children: busy ? "\u5904\u7406\u4E2D\u2026" : "\u4FDD\u5B58\u6E20\u9053" })
16765
+ ] }),
16766
+ records && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { className: "dsh-partner-push-records", children: [
16767
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-heading", children: [
16768
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("strong", { children: "\u6700\u8FD1\u53D1\u9001\u8BB0\u5F55 \xB7 \u81EA\u52A8\u66F4\u65B0" }),
16769
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", onClick: () => setRecords(void 0), children: "\u6536\u8D77" })
16770
+ ] }),
16771
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "dsh-partner-push-heading", children: [
16772
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("small", { children: "\u4EC5\u4FDD\u7559\u6700\u8FD1\u8BB0\u5F55\uFF1B\u91CD\u8BD5\u4E0D\u4F1A\u91CD\u53D1\u5DF2\u6210\u529F\u7684\u76EE\u6807\u3002" }),
16773
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmClear(true), children: "\u6E05\u7406\u5DF2\u7ED3\u675F\u8BB0\u5F55" })
16774
+ ] }),
16775
+ confirmClear && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { role: "group", "aria-label": "\u786E\u8BA4\u6E05\u7406\u53D1\u9001\u8BB0\u5F55", children: [
16776
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: "\u53EA\u6E05\u7406\u5DF2\u63A5\u53D7\u548C\u5DF2\u53D6\u6D88\u7684\u8BB0\u5F55\uFF0C\u5F85\u53D1\u9001\u548C\u5931\u8D25\u8BB0\u5F55\u4FDD\u7559\u3002" }),
16777
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmClear(false), children: "\u53D6\u6D88" }),
16778
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: () => void run(async () => {
16779
+ await api(`/push-channels/${initial.id}/deliveries`, { method: "DELETE" });
16780
+ setRecords(await api(`/push-channels/${initial.id}/deliveries`));
16781
+ setConfirmClear(false);
16782
+ await onChanged();
16783
+ }), children: "\u786E\u8BA4\u6E05\u7406" })
16784
+ ] }),
16785
+ !records.length && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: "\u6682\u65E0\u901A\u77E5\u3002\u4FDD\u5B58\u53EA\u5F71\u54CD\u4E4B\u540E\u7684\u65B0\u7ED3\u679C\uFF0C\u4E0D\u8865\u53D1\u5386\u53F2\u5BF9\u8BDD\u3002" }),
16786
+ records.map((row) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
16787
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
16788
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("strong", { children: row.title }),
16789
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("small", { children: [
16790
+ new Date(row.createdAt).toLocaleString(),
16791
+ " \xB7 ",
16792
+ form.targets.find((t) => t.id === row.targetId)?.name ?? "\u5DF2\u79FB\u9664\u76EE\u6807",
16793
+ " \xB7 ",
16794
+ statusText[row.status]
16795
+ ] }),
16796
+ row.lastError && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("small", { children: row.lastError })
16797
+ ] }),
16798
+ row.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: () => void run(async () => {
16799
+ await api(`/push-channels/${initial.id}/deliveries/${row.id}/retry`, { method: "POST" });
16800
+ setRecords(await api(`/push-channels/${initial.id}/deliveries`));
16801
+ await onChanged();
16802
+ }), children: "\u91CD\u8BD5" })
16803
+ ] }, row.id))
16804
+ ] })
16805
+ ] });
16806
+ }
16807
+ function Field({ label, children }) {
16808
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "dsh-partner-channel-field", children: [
16809
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: label }),
16810
+ children
16811
+ ] });
16812
+ }
16813
+
16814
+ // src/ui/push-channels.tsx
16815
+ var import_jsx_runtime48 = require("react/jsx-runtime");
16816
+ function PushChannels({ companion, snapshot, onChanged, adding, closeAdd }) {
16817
+ const [editing, setEditing] = (0, import_react51.useState)();
16818
+ const [removing, setRemoving] = (0, import_react51.useState)();
16819
+ const [busy, setBusy] = (0, import_react51.useState)(false), [error, setError] = (0, import_react51.useState)("");
16820
+ const [dirty, setDirty] = (0, import_react51.useState)(false), [discard, setDiscard] = (0, import_react51.useState)(false);
16821
+ const closeEditor = () => {
16822
+ closeAdd();
16823
+ setEditing(void 0);
16824
+ setDiscard(false);
16825
+ setDirty(false);
16826
+ };
16827
+ const channels = (snapshot.pushChannels ?? []).filter((c) => c.companionId === companion.id);
16828
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
16829
+ !channels.length && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "dsh-partner-channel-row", children: [
16830
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { children: [
16831
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("strong", { children: "Bark" }),
16832
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("small", { children: "iOS \u5355\u5411\u901A\u77E5 \xB7 \u65E0\u9700\u8054\u7CFB\u4EBA\u6388\u6743" })
16833
+ ] }),
16834
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { type: "button", onClick: () => setEditing(emptyChannel(companion.id)), children: "\u914D\u7F6E" })
16835
+ ] }),
16836
+ channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "dsh-partner-channel-row", children: [
16837
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { children: [
16838
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("strong", { children: channel.name }),
16839
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("small", { children: [
16840
+ "Bark \xB7 ",
16841
+ channel.targets.filter((t) => t.enabled).length,
16842
+ " \u4E2A\u542F\u7528\u76EE\u6807 \xB7 ",
16843
+ channel.enabled ? "\u81EA\u52A8\u63A8\u9001" : "\u5DF2\u505C\u7528",
16844
+ channel.pending ? ` \xB7 ${channel.pending} \u6761\u5F85\u53D1\u9001` : "",
16845
+ channel.failed ? ` \xB7 ${channel.failed} \u6761\u5931\u8D25` : ""
16846
+ ] })
16847
+ ] }),
16848
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { type: "button", "aria-label": `\u914D\u7F6E ${channel.name}`, onClick: () => setEditing(channel), children: "\u914D\u7F6E" })
16849
+ ] }, channel.id)),
16850
+ (adding || editing) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WorkspaceDialog, { className: "dsh-partner-bark-dialog", title: editing?.id ? `${editing.name} \xB7 Bark \u914D\u7F6E` : "\u6DFB\u52A0 Bark \u6E20\u9053", detail: "\u4FDD\u5B58\u542F\u7528\u540E\u81EA\u52A8\u63A8\u9001\u6700\u7EC8\u7ED3\u679C\uFF0C\u4E0D\u4F9D\u8D56\u8054\u7CFB\u4EBA\u6216\u201C\u901A\u77E5\u4E0E\u4EA4\u4ED8\u201D\u9009\u9879\u3002", close: () => {
16851
+ if (!busy) {
16852
+ if (dirty) setDiscard(true);
16853
+ else closeEditor();
16854
+ }
16855
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
16856
+ BarkEditor,
16857
+ {
16858
+ initial: editing ?? emptyChannel(companion.id),
16859
+ onBusy: setBusy,
16860
+ onDirty: setDirty,
16861
+ onChanged,
16862
+ onSaved: (saved) => {
16863
+ setEditing(saved);
16864
+ closeAdd();
16865
+ },
16866
+ onDelete: (channel) => {
16867
+ setRemoving(channel);
16868
+ setEditing(void 0);
16869
+ closeAdd();
16870
+ setError("");
16871
+ }
16872
+ }
16873
+ ) }),
16874
+ discard && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DiscardChangesDialog, { keepEditing: () => setDiscard(false), discard: closeEditor }),
16875
+ removing && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(WorkspaceDialog, { title: "\u5220\u9664 Bark \u6E20\u9053", detail: `\u5220\u9664\u201C${removing.name}\u201D\u53CA\u5176\u8BBE\u5907\u51ED\u636E\uFF0C\u5E76\u53D6\u6D88\u8BE5\u6E20\u9053\u5C1A\u672A\u53D1\u9001\u7684\u901A\u77E5\u3002\u5176\u4ED6\u6E20\u9053\u4E0D\u53D7\u5F71\u54CD\u3002`, close: () => {
16876
+ if (!busy) setRemoving(void 0);
16877
+ }, children: [
16878
+ error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { role: "alert", children: error }),
16879
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16880
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { disabled: busy, onClick: () => setRemoving(void 0), children: "\u53D6\u6D88" }),
16881
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { disabled: busy, className: "is-danger", onClick: () => {
16882
+ setBusy(true);
16883
+ void api(`/push-channels/${removing.id}`, { method: "DELETE" }).then(async () => {
16884
+ await onChanged();
16885
+ setRemoving(void 0);
16886
+ }).catch((e) => setError(errorMessage(e))).finally(() => setBusy(false));
16887
+ }, children: busy ? "\u5220\u9664\u4E2D\u2026" : "\u786E\u8BA4\u5220\u9664" })
16888
+ ] })
16889
+ ] })
16490
16890
  ] });
16491
16891
  }
16892
+ function emptyChannel(companionId) {
16893
+ return {
16894
+ id: "",
16895
+ companionId,
16896
+ name: "",
16897
+ platform: "bark",
16898
+ baseUrl: "",
16899
+ enabled: true,
16900
+ revision: 0,
16901
+ createdAt: 0,
16902
+ updatedAt: 0,
16903
+ targets: [{ id: "", name: "\u6211\u7684 iPhone", enabled: true, configured: false }],
16904
+ notifyProblems: false,
16905
+ content: "summary",
16906
+ group: "",
16907
+ sound: "",
16908
+ openUrl: "",
16909
+ pending: 0,
16910
+ failed: 0
16911
+ };
16912
+ }
16492
16913
 
16493
16914
  // src/ui/channels-panel.tsx
16494
- var import_jsx_runtime46 = require("react/jsx-runtime");
16915
+ var import_jsx_runtime49 = require("react/jsx-runtime");
16495
16916
  function ChannelsPanel({ companion, snapshot, onChanged, weixin }) {
16496
- const [platform, setPlatform] = (0, import_react49.useState)("matrix");
16497
- const [name, setName] = (0, import_react49.useState)("");
16498
- const [baseUrl, setBaseUrl] = (0, import_react49.useState)("");
16499
- const [targetId, setTargetId] = (0, import_react49.useState)("");
16500
- const [botToken, setToken] = (0, import_react49.useState)("");
16501
- const [authMode, setAuthMode] = (0, import_react49.useState)("password");
16502
- const [username, setUsername] = (0, import_react49.useState)(""), [password, setPassword] = (0, import_react49.useState)(""), [mfaToken, setMfaToken] = (0, import_react49.useState)("");
16503
- const [busy, setBusy] = (0, import_react49.useState)(false);
16504
- const [feedback, setFeedback] = (0, import_react49.useState)("");
16505
- const [deleting, setDeleting] = (0, import_react49.useState)();
16506
- const [adding, setAdding] = (0, import_react49.useState)(false);
16507
- const [fixedPlatform, setFixedPlatform] = (0, import_react49.useState)(false);
16508
- const [configuring, setConfiguring] = (0, import_react49.useState)();
16917
+ const [platform, setPlatform] = (0, import_react52.useState)("matrix");
16918
+ const [name, setName] = (0, import_react52.useState)("");
16919
+ const [baseUrl, setBaseUrl] = (0, import_react52.useState)("");
16920
+ const [targetId, setTargetId] = (0, import_react52.useState)("");
16921
+ const [botToken, setToken] = (0, import_react52.useState)("");
16922
+ const [authMode, setAuthMode] = (0, import_react52.useState)("password");
16923
+ const [username, setUsername] = (0, import_react52.useState)(""), [password, setPassword] = (0, import_react52.useState)(""), [mfaToken, setMfaToken] = (0, import_react52.useState)("");
16924
+ const [busy, setBusy] = (0, import_react52.useState)(false);
16925
+ const [feedback, setFeedback] = (0, import_react52.useState)("");
16926
+ const [deleting, setDeleting] = (0, import_react52.useState)();
16927
+ const [adding, setAdding] = (0, import_react52.useState)(false);
16928
+ const [addingPush, setAddingPush] = (0, import_react52.useState)(false);
16929
+ const [fixedPlatform, setFixedPlatform] = (0, import_react52.useState)(false);
16930
+ const [configuring, setConfiguring] = (0, import_react52.useState)();
16509
16931
  const closeAdd = () => {
16510
16932
  setAdding(false);
16511
16933
  setToken("");
@@ -16549,19 +16971,24 @@ function ChannelsPanel({ companion, snapshot, onChanged, weixin }) {
16549
16971
  }
16550
16972
  setFeedback(save ? "\u8D26\u53F7\u5DF2\u4FDD\u5B58\u3002\u8BF7\u542F\u7528\u6E20\u9053\uFF0C\u518D\u5411\u673A\u5668\u4EBA\u53D1\u9001\u79C1\u804A\u6D88\u606F\uFF0C\u6838\u5BF9\u914D\u5BF9\u7801\u5E76\u6279\u51C6\u8054\u7CFB\u4EBA\u3002" : "\u8D26\u53F7\u9A8C\u8BC1\u901A\u8FC7\uFF0C\u53EF\u4EE5\u4FDD\u5B58\u3002");
16551
16973
  });
16552
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { id: "dsh-partner-channels", className: "dsh-partner-form is-channel dsh-partner-channels", children: [
16553
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-toolbar", children: [
16554
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeading, { eyebrow: "CHANNELS", title: "\u6211\u7684\u6E20\u9053", detail: "\u67E5\u770B\u8FDE\u63A5\u72B6\u6001\uFF0C\u7BA1\u7406\u8054\u7CFB\u4EBA\u4E0E\u901A\u77E5\u6295\u9012\u3002" }),
16555
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", onClick: () => openAdd(), children: "\u6DFB\u52A0\u6E20\u9053" })
16974
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { id: "dsh-partner-channels", className: "dsh-partner-form is-channel dsh-partner-channels", children: [
16975
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-toolbar", children: [
16976
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SectionHeading, { eyebrow: "CHANNELS", title: "\u6211\u7684\u6E20\u9053", detail: "\u67E5\u770B\u8FDE\u63A5\u72B6\u6001\uFF0C\u7BA1\u7406\u8054\u7CFB\u4EBA\u4E0E\u901A\u77E5\u6295\u9012\u3002" }),
16977
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", onClick: () => openAdd(), children: "\u6DFB\u52A0\u6E20\u9053" })
16556
16978
  ] }),
16557
- !adding && feedback && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: "status", children: feedback }),
16558
- adding && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WorkspaceDialog, { title: fixedPlatform ? `${platform === "matrix" ? "Matrix" : "Mattermost"} \u914D\u7F6E` : "\u6DFB\u52A0\u6E20\u9053", detail: platform === "matrix" ? "\u4EC5\u672A\u52A0\u5BC6\u7684\u53CC\u4EBA\u4F1A\u8BDD\u53EF\u83B7\u53D6\u914D\u5BF9\u7801\u3002\u8BF7\u65B0\u5EFA\u672A\u5F00\u542F\u7AEF\u5230\u7AEF\u52A0\u5BC6\u7684\u4F1A\u8BDD\uFF0C\u9080\u8BF7\u673A\u5668\u4EBA\u540E\u53D1\u9001\u6587\u5B57\u6D88\u606F\u3002" : "\u5148\u767B\u5F55\uFF0C\u518D\u5411\u673A\u5668\u4EBA\u53D1\u79C1\u804A\u6D88\u606F\uFF0C\u6838\u5BF9\u914D\u5BF9\u7801\u540E\u6388\u6743\u3002", close: () => {
16979
+ !adding && feedback && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "status", children: feedback }),
16980
+ adding && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WorkspaceDialog, { title: fixedPlatform ? `${platform === "matrix" ? "Matrix" : "Mattermost"} \u914D\u7F6E` : "\u6DFB\u52A0\u6E20\u9053", detail: platform === "matrix" ? "\u4EC5\u672A\u52A0\u5BC6\u7684\u53CC\u4EBA\u4F1A\u8BDD\u53EF\u83B7\u53D6\u914D\u5BF9\u7801\u3002\u8BF7\u65B0\u5EFA\u672A\u5F00\u542F\u7AEF\u5230\u7AEF\u52A0\u5BC6\u7684\u4F1A\u8BDD\uFF0C\u9080\u8BF7\u673A\u5668\u4EBA\u540E\u53D1\u9001\u6587\u5B57\u6D88\u606F\u3002" : "\u5148\u767B\u5F55\uFF0C\u518D\u5411\u673A\u5668\u4EBA\u53D1\u79C1\u804A\u6D88\u606F\uFF0C\u6838\u5BF9\u914D\u5BF9\u7801\u540E\u6388\u6743\u3002", close: () => {
16559
16981
  if (!busy) closeAdd();
16560
- }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-channel-form", "aria-busy": busy, onSubmit: (event) => {
16982
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-channel-form", "aria-busy": busy, onSubmit: (event) => {
16561
16983
  event.preventDefault();
16562
16984
  void configure2(true);
16563
16985
  }, children: [
16564
- !fixedPlatform && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u5E73\u53F0", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("select", { autoFocus: true, disabled: busy, value: platform, onChange: (e) => {
16986
+ !fixedPlatform && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u5E73\u53F0", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("select", { autoFocus: true, disabled: busy, value: platform, onChange: (e) => {
16987
+ if (e.target.value === "bark") {
16988
+ closeAdd();
16989
+ setAddingPush(true);
16990
+ return;
16991
+ }
16565
16992
  setPlatform(e.target.value);
16566
16993
  setPassword("");
16567
16994
  setToken("");
@@ -16569,150 +16996,152 @@ function ChannelsPanel({ companion, snapshot, onChanged, weixin }) {
16569
16996
  setTargetId("");
16570
16997
  setFeedback("");
16571
16998
  }, children: [
16572
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "matrix", children: "Matrix" }),
16573
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "mattermost", children: "Mattermost" })
16999
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "matrix", children: "Matrix" }),
17000
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "mattermost", children: "Mattermost" }),
17001
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "bark", children: "Bark \xB7 \u5355\u5411\u901A\u77E5" })
16574
17002
  ] }) }),
16575
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u6E20\u9053\u540D\u79F0", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { autoFocus: fixedPlatform, disabled: busy, maxLength: 80, value: name, onChange: (e) => setName(e.target.value), placeholder: `\u4F8B\u5982\uFF1A\u6211\u7684 ${platform === "matrix" ? "Matrix" : "Mattermost"}` }) }),
16576
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u670D\u52A1\u5668\u5730\u5740", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, required: true, type: "url", value: baseUrl, onChange: (e) => setBaseUrl(e.target.value), placeholder: "https://chat.example.com" }) }),
16577
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("details", { children: [
16578
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("summary", { children: "\u9AD8\u7EA7\u914D\u7F6E\uFF08\u53EF\u9009\uFF09" }),
16579
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: platform === "matrix" ? "\u56FA\u5B9A\u623F\u95F4 ID" : "\u56FA\u5B9A DM \u4F1A\u8BDD ID", hint: "\u7559\u7A7A\u5219\u81EA\u52A8\u53D1\u73B0\u79C1\u804A\uFF0C\u901A\u8FC7\u914D\u5BF9\u6388\u6743\u3002\u586B\u5199\u540E\u4EC5\u76D1\u542C\u6307\u5B9A\u4F1A\u8BDD\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, value: targetId, onChange: (e) => setTargetId(e.target.value), placeholder: platform === "matrix" ? "!room:example.com" : "DM channel ID" }) })
17003
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u6E20\u9053\u540D\u79F0", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { autoFocus: fixedPlatform, disabled: busy, maxLength: 80, value: name, onChange: (e) => setName(e.target.value), placeholder: `\u4F8B\u5982\uFF1A\u6211\u7684 ${platform === "matrix" ? "Matrix" : "Mattermost"}` }) }),
17004
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u670D\u52A1\u5668\u5730\u5740", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, required: true, type: "url", value: baseUrl, onChange: (e) => setBaseUrl(e.target.value), placeholder: "https://chat.example.com" }) }),
17005
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("details", { children: [
17006
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("summary", { children: "\u9AD8\u7EA7\u914D\u7F6E\uFF08\u53EF\u9009\uFF09" }),
17007
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: platform === "matrix" ? "\u56FA\u5B9A\u623F\u95F4 ID" : "\u56FA\u5B9A DM \u4F1A\u8BDD ID", hint: "\u7559\u7A7A\u5219\u81EA\u52A8\u53D1\u73B0\u79C1\u804A\uFF0C\u901A\u8FC7\u914D\u5BF9\u6388\u6743\u3002\u586B\u5199\u540E\u4EC5\u76D1\u542C\u6307\u5B9A\u4F1A\u8BDD\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, value: targetId, onChange: (e) => setTargetId(e.target.value), placeholder: platform === "matrix" ? "!room:example.com" : "DM channel ID" }) })
16580
17008
  ] }),
16581
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u767B\u5F55\u65B9\u5F0F", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("select", { disabled: busy, value: authMode, onChange: (e) => {
17009
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u767B\u5F55\u65B9\u5F0F", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("select", { disabled: busy, value: authMode, onChange: (e) => {
16582
17010
  setAuthMode(e.target.value);
16583
17011
  setToken("");
16584
17012
  setPassword("");
16585
17013
  setMfaToken("");
16586
17014
  }, children: [
16587
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "password", children: "\u8D26\u53F7\u5BC6\u7801" }),
16588
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "token", children: "Access Token" })
17015
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "password", children: "\u8D26\u53F7\u5BC6\u7801" }),
17016
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "token", children: "Access Token" })
16589
17017
  ] }) }),
16590
- authMode === "password" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
16591
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u8D26\u53F7", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, required: true, autoComplete: "username", value: username, onChange: (e) => setUsername(e.target.value), placeholder: platform === "matrix" ? "@\u8D26\u53F7:\u670D\u52A1\u5668\u57DF\u540D" : "\u7528\u6237\u540D\u6216\u90AE\u7BB1" }) }),
16592
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u5BC6\u7801", hint: "\u4EC5\u7528\u4E8E\u6362\u53D6\u4EE4\u724C\uFF0C\u4E0D\u4FDD\u5B58\u5BC6\u7801\uFF1B\u8BF7\u4F18\u5148\u4F7F\u7528 HTTPS \u670D\u52A1\u5668\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, required: true, type: "password", autoComplete: "current-password", value: password, onChange: (e) => setPassword(e.target.value) }) }),
16593
- platform === "mattermost" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "\u53CC\u91CD\u9A8C\u8BC1\u9A8C\u8BC1\u7801\uFF08\u5982\u5DF2\u5F00\u542F\uFF09", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, autoComplete: "one-time-code", inputMode: "numeric", value: mfaToken, onChange: (e) => setMfaToken(e.target.value) }) })
16594
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FormField2, { label: "Access Token", hint: "\u4EC5\u4FDD\u5B58\u81F3 DSH \u51ED\u636E\u5E93\uFF1B\u5EFA\u8BAE HTTPS\uFF0CHTTP \u4F1A\u660E\u6587\u4F20\u8F93\u51ED\u636E\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("input", { disabled: busy, required: true, type: "password", autoComplete: "new-password", value: botToken, onChange: (e) => setToken(e.target.value) }) }),
16595
- feedback && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: "status", children: feedback }),
16596
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("footer", { children: [
16597
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", disabled: busy, onClick: closeAdd, children: "\u53D6\u6D88" }),
16598
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", disabled: busy || !(authMode === "password" ? username && password : botToken) || !baseUrl, onClick: () => void configure2(false), children: "\u6D4B\u8BD5\u8FDE\u63A5" }),
16599
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { className: "is-primary", disabled: busy, children: busy ? "\u5904\u7406\u4E2D\u2026" : "\u4FDD\u5B58\u6E20\u9053" })
17018
+ authMode === "password" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
17019
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u8D26\u53F7", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, required: true, autoComplete: "username", value: username, onChange: (e) => setUsername(e.target.value), placeholder: platform === "matrix" ? "@\u8D26\u53F7:\u670D\u52A1\u5668\u57DF\u540D" : "\u7528\u6237\u540D\u6216\u90AE\u7BB1" }) }),
17020
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u5BC6\u7801", hint: "\u4EC5\u7528\u4E8E\u6362\u53D6\u4EE4\u724C\uFF0C\u4E0D\u4FDD\u5B58\u5BC6\u7801\uFF1B\u8BF7\u4F18\u5148\u4F7F\u7528 HTTPS \u670D\u52A1\u5668\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, required: true, type: "password", autoComplete: "current-password", value: password, onChange: (e) => setPassword(e.target.value) }) }),
17021
+ platform === "mattermost" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "\u53CC\u91CD\u9A8C\u8BC1\u9A8C\u8BC1\u7801\uFF08\u5982\u5DF2\u5F00\u542F\uFF09", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, autoComplete: "one-time-code", inputMode: "numeric", value: mfaToken, onChange: (e) => setMfaToken(e.target.value) }) })
17022
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FormField2, { label: "Access Token", hint: "\u4EC5\u4FDD\u5B58\u81F3 DSH \u51ED\u636E\u5E93\uFF1B\u5EFA\u8BAE HTTPS\uFF0CHTTP \u4F1A\u660E\u6587\u4F20\u8F93\u51ED\u636E\u3002", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { disabled: busy, required: true, type: "password", autoComplete: "new-password", value: botToken, onChange: (e) => setToken(e.target.value) }) }),
17023
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "status", children: feedback }),
17024
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("footer", { children: [
17025
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", disabled: busy, onClick: closeAdd, children: "\u53D6\u6D88" }),
17026
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", disabled: busy || !(authMode === "password" ? username && password : botToken) || !baseUrl, onClick: () => void configure2(false), children: "\u6D4B\u8BD5\u8FDE\u63A5" }),
17027
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { className: "is-primary", disabled: busy, children: busy ? "\u5904\u7406\u4E2D\u2026" : "\u4FDD\u5B58\u6E20\u9053" })
16600
17028
  ] })
16601
17029
  ] }) }),
16602
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-list", children: [
16603
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-row", children: [
16604
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16605
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: "\u5FAE\u4FE1" }),
16606
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: channels.some((c) => !c.platform || c.platform === "weixin") ? "\u7BA1\u7406\u8FDE\u63A5\u4E0E\u79C1\u804A\u6388\u6743" : "\u5C1A\u672A\u8FDE\u63A5 \xB7 \u626B\u7801\u63A5\u5165" })
17030
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-list", children: [
17031
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PushChannels, { companion, snapshot, onChanged, adding: addingPush, closeAdd: () => setAddingPush(false) }),
17032
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-row", children: [
17033
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17034
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: "\u5FAE\u4FE1" }),
17035
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: channels.some((c) => !c.platform || c.platform === "weixin") ? "\u7BA1\u7406\u8FDE\u63A5\u4E0E\u79C1\u804A\u6388\u6743" : "\u5C1A\u672A\u8FDE\u63A5 \xB7 \u626B\u7801\u63A5\u5165" })
16607
17036
  ] }),
16608
- channels.find((c) => !c.platform || c.platform === "weixin") && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChannelStatus, { channel: channels.find((c) => !c.platform || c.platform === "weixin") }),
16609
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", "aria-label": "\u914D\u7F6E\u5FAE\u4FE1", onClick: () => setConfiguring("weixin"), children: "\u914D\u7F6E" }),
16610
- configuring === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WorkspaceDialog, { title: "\u5FAE\u4FE1\u914D\u7F6E", detail: "\u7BA1\u7406\u626B\u7801\u767B\u5F55\u3001\u8FDE\u63A5\u4E0E\u8054\u7CFB\u4EBA\u6388\u6743\u3002", close: () => setConfiguring(void 0), children: weixin })
17037
+ channels.find((c) => !c.platform || c.platform === "weixin") && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChannelStatus, { channel: channels.find((c) => !c.platform || c.platform === "weixin") }),
17038
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", "aria-label": "\u914D\u7F6E\u5FAE\u4FE1", onClick: () => setConfiguring("weixin"), children: "\u914D\u7F6E" }),
17039
+ configuring === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WorkspaceDialog, { title: "\u5FAE\u4FE1\u914D\u7F6E", detail: "\u7BA1\u7406\u626B\u7801\u767B\u5F55\u3001\u8FDE\u63A5\u4E0E\u8054\u7CFB\u4EBA\u6388\u6743\u3002", close: () => setConfiguring(void 0), children: weixin })
16611
17040
  ] }),
16612
- ["matrix", "mattermost"].filter((platform2) => !channels.some((c) => c.platform === platform2)).map((platform2) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-row", children: [
16613
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16614
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: platform2 === "matrix" ? "Matrix" : "Mattermost" }),
16615
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: "\u5C1A\u672A\u8FDE\u63A5" })
17041
+ ["matrix", "mattermost"].filter((platform2) => !channels.some((c) => c.platform === platform2)).map((platform2) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-row", children: [
17042
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17043
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: platform2 === "matrix" ? "Matrix" : "Mattermost" }),
17044
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: "\u5C1A\u672A\u8FDE\u63A5" })
16616
17045
  ] }),
16617
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", "aria-label": `\u914D\u7F6E ${platform2}`, onClick: () => openAdd(platform2), children: "\u914D\u7F6E" })
17046
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", "aria-label": `\u914D\u7F6E ${platform2}`, onClick: () => openAdd(platform2), children: "\u914D\u7F6E" })
16618
17047
  ] }, platform2)),
16619
- channels.filter((c) => c.platform && c.platform !== "weixin").map((channel) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-row has-notice-slot", children: [
16620
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16621
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: channel.name }),
16622
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("small", { children: [
17048
+ channels.filter((c) => c.platform && c.platform !== "weixin").map((channel) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-row has-notice-slot", children: [
17049
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17050
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: channel.name }),
17051
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("small", { children: [
16623
17052
  channel.platform,
16624
17053
  " \xB7 ",
16625
17054
  pairings.filter((p) => p.channelId === channel.id && p.status === "pending").length,
16626
17055
  " \u4E2A\u5F85\u6388\u6743"
16627
17056
  ] })
16628
17057
  ] }),
16629
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChannelStatus, { channel }),
16630
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", "aria-label": `\u914D\u7F6E ${channel.name}`, onClick: () => {
17058
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChannelStatus, { channel }),
17059
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", "aria-label": `\u914D\u7F6E ${channel.name}`, onClick: () => {
16631
17060
  setFeedback("");
16632
17061
  setConfiguring(channel.id);
16633
17062
  }, children: "\u914D\u7F6E" }),
16634
- configuring === channel.id && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WorkspaceDialog, { title: `${channel.name} \xB7 \u914D\u7F6E`, detail: "\u7BA1\u7406\u8FDE\u63A5\u72B6\u6001\u53CA\u8054\u7CFB\u4EBA\u8BBF\u95EE\u6743\u9650\u3002", close: () => {
17063
+ configuring === channel.id && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WorkspaceDialog, { title: `${channel.name} \xB7 \u914D\u7F6E`, detail: "\u7BA1\u7406\u8FDE\u63A5\u72B6\u6001\u53CA\u8054\u7CFB\u4EBA\u8BBF\u95EE\u6743\u9650\u3002", close: () => {
16635
17064
  if (!busy) {
16636
17065
  setConfiguring(void 0);
16637
17066
  setDeleting(void 0);
16638
17067
  }
16639
- }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-detail dsh-partner-channel-manage", children: [
16640
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-connection", children: [
16641
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16642
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: "\u767B\u5F55\u8D26\u53F7" }),
16643
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: channel.accountId }),
16644
- channel.direct?.targetId && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: channel.direct.targetId })
17068
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-detail dsh-partner-channel-manage", children: [
17069
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-connection", children: [
17070
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17071
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: "\u767B\u5F55\u8D26\u53F7" }),
17072
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: channel.accountId }),
17073
+ channel.direct?.targetId && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: channel.direct.targetId })
16645
17074
  ] }),
16646
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChannelStatus, { channel })
17075
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ChannelStatus, { channel })
16647
17076
  ] }),
16648
- channel.platform === "matrix" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u4EC5\u652F\u6301\u672A\u52A0\u5BC6\u7684\u53CC\u4EBA\u4F1A\u8BDD\u3002\u52A0\u5BC6\u4F1A\u8BDD\u65E0\u6CD5\u8BFB\u53D6\u6D88\u606F\u6216\u53D1\u9001\u914D\u5BF9\u7801\uFF1B\u8BF7\u65B0\u5EFA\u672A\u5F00\u542F\u7AEF\u5230\u7AEF\u52A0\u5BC6\u7684\u4F1A\u8BDD\uFF0C\u9080\u8BF7\u673A\u5668\u4EBA\u540E\u53D1\u9001\u6587\u5B57\u6D88\u606F\u3002\u68C0\u6D4B\u5230\u52A0\u5BC6\u4F1A\u8BDD\u65F6\u4F1A\u5728\u6B64\u63D0\u793A\uFF0C\u4E0D\u5F71\u54CD\u5176\u4ED6\u672A\u52A0\u5BC6\u4F1A\u8BDD\u3002" }),
16649
- !channel.direct?.targetId && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: "\u5411\u673A\u5668\u4EBA\u53D1\u79C1\u804A\u6D88\u606F\uFF0C\u5728\u4E0B\u65B9\u6838\u5BF9\u914D\u5BF9\u7801\u540E\u6279\u51C6\u3002\u8BF7\u6C42\u4F1A\u81EA\u52A8\u66F4\u65B0\u3002" }),
16650
- channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: "alert", children: channel.lastError }),
16651
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-form-actions", children: [
16652
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
17077
+ channel.platform === "matrix" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: "\u4EC5\u652F\u6301\u672A\u52A0\u5BC6\u7684\u53CC\u4EBA\u4F1A\u8BDD\u3002\u52A0\u5BC6\u4F1A\u8BDD\u65E0\u6CD5\u8BFB\u53D6\u6D88\u606F\u6216\u53D1\u9001\u914D\u5BF9\u7801\uFF1B\u8BF7\u65B0\u5EFA\u672A\u5F00\u542F\u7AEF\u5230\u7AEF\u52A0\u5BC6\u7684\u4F1A\u8BDD\uFF0C\u9080\u8BF7\u673A\u5668\u4EBA\u540E\u53D1\u9001\u6587\u5B57\u6D88\u606F\u3002\u68C0\u6D4B\u5230\u52A0\u5BC6\u4F1A\u8BDD\u65F6\u4F1A\u5728\u6B64\u63D0\u793A\uFF0C\u4E0D\u5F71\u54CD\u5176\u4ED6\u672A\u52A0\u5BC6\u4F1A\u8BDD\u3002" }),
17078
+ !channel.direct?.targetId && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: "\u5411\u673A\u5668\u4EBA\u53D1\u79C1\u804A\u6D88\u606F\uFF0C\u5728\u4E0B\u65B9\u6838\u5BF9\u914D\u5BF9\u7801\u540E\u6279\u51C6\u3002\u8BF7\u6C42\u4F1A\u81EA\u52A8\u66F4\u65B0\u3002" }),
17079
+ channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "alert", children: channel.lastError }),
17080
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-form-actions", children: [
17081
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
16653
17082
  await api(`/channels/${channel.id}/enabled`, { method: "POST", body: JSON.stringify({ enabled: !channel.enabled }) });
16654
17083
  await onChanged();
16655
17084
  }), children: channel.enabled ? "\u505C\u7528" : "\u542F\u7528" }),
16656
- channel.enabled && channel.runtimeStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
17085
+ channel.enabled && channel.runtimeStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
16657
17086
  await api(`/channels/${channel.id}/enabled`, { method: "POST", body: JSON.stringify({ enabled: true }) });
16658
17087
  await onChanged();
16659
17088
  }), children: "\u91CD\u8FDE" }),
16660
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { disabled: busy, onClick: () => deleting === channel.id ? void run(async () => {
17089
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy, onClick: () => deleting === channel.id ? void run(async () => {
16661
17090
  await api(`/channels/${channel.id}`, { method: "DELETE" });
16662
17091
  setDeleting(void 0);
16663
17092
  await onChanged();
16664
17093
  }) : setDeleting(channel.id), children: deleting === channel.id ? "\u786E\u8BA4\u5220\u9664\u914D\u7F6E\u4E0E\u51ED\u636E" : "\u5220\u9664\u6E20\u9053" }),
16665
- deleting === channel.id && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { onClick: () => setDeleting(void 0), children: "\u53D6\u6D88" })
17094
+ deleting === channel.id && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { onClick: () => setDeleting(void 0), children: "\u53D6\u6D88" })
16666
17095
  ] }),
16667
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("section", { className: "dsh-partner-channel-access", children: [
16668
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { children: "\u8054\u7CFB\u4EBA\u6388\u6743" }),
16669
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { role: "status", children: [
17096
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: "dsh-partner-channel-access", children: [
17097
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { children: "\u8054\u7CFB\u4EBA\u6388\u6743" }),
17098
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { role: "status", children: [
16670
17099
  pairings.filter((p) => p.channelId === channel.id && p.status === "pending").length,
16671
17100
  " \u4E2A\u7B49\u5F85\u6279\u51C6 \xB7 \u81EA\u52A8\u5237\u65B0"
16672
17101
  ] }),
16673
- pairings.filter((p) => p.channelId === channel.id).map((p) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-person", children: [
16674
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
16675
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: p.displayName }),
16676
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: p.status === "approved" ? "\u5DF2\u6388\u6743" : p.status === "pending" ? "\u7B49\u5F85\u6279\u51C6" : "\u5DF2\u963B\u6B62" }),
16677
- p.status === "pending" && p.pairingCode && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
17102
+ pairings.filter((p) => p.channelId === channel.id).map((p) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-person", children: [
17103
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
17104
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: p.displayName }),
17105
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: p.status === "approved" ? "\u5DF2\u6388\u6743" : p.status === "pending" ? "\u7B49\u5F85\u6279\u51C6" : "\u5DF2\u963B\u6B62" }),
17106
+ p.status === "pending" && p.pairingCode && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
16678
17107
  "\u914D\u5BF9\u7801 ",
16679
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("code", { children: p.pairingCode })
17108
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("code", { children: p.pairingCode })
16680
17109
  ] })
16681
17110
  ] }),
16682
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
17111
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy, onClick: () => void run(async () => {
16683
17112
  await api(`/pairings/${p.id}/status`, { method: "POST", body: JSON.stringify({ status: p.status === "approved" ? "blocked" : "approved" }) });
16684
17113
  await onChanged();
16685
17114
  }), children: p.status === "approved" ? "\u64A4\u9500\u6388\u6743" : "\u6279\u51C6\u8054\u7CFB\u4EBA" })
16686
17115
  ] }, p.id))
16687
17116
  ] }),
16688
- feedback && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { role: "status", children: feedback })
17117
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "status", children: feedback })
16689
17118
  ] }) }),
16690
- channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-inline-notice", role: "status", "aria-atomic": "true", children: [
16691
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: channel.runtimeStatus === "running" ? "\u4F1A\u8BDD\u63D0\u793A" : "\u8FDE\u63A5\u63D0\u793A" }),
16692
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: channel.lastError })
17119
+ channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-inline-notice", role: "status", "aria-atomic": "true", children: [
17120
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: channel.runtimeStatus === "running" ? "\u4F1A\u8BDD\u63D0\u793A" : "\u8FDE\u63A5\u63D0\u793A" }),
17121
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: channel.lastError })
16693
17122
  ] })
16694
17123
  ] }, channel.id))
16695
17124
  ] }),
16696
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("section", { className: "dsh-partner-channel-notifications", "aria-label": "\u901A\u77E5\u8BBE\u7F6E", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "dsh-partner-channel-row", children: [
16697
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
16698
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("strong", { children: "\u901A\u77E5\u4E0E\u4EA4\u4ED8" }),
16699
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: companion.notificationDelivery?.mode === "selected" ? `\u5DF2\u6307\u5B9A ${companion.notificationDelivery.targets.length} \u4F4D\u63A5\u6536\u4EBA` : "\u9ED8\u8BA4\u8DDF\u968F\u6700\u8FD1\u6E20\u9053\u4E0E\u7528\u6237" })
17125
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("section", { className: "dsh-partner-channel-notifications", "aria-label": "\u901A\u77E5\u8BBE\u7F6E", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "dsh-partner-channel-row", children: [
17126
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17127
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: "\u901A\u77E5\u4E0E\u4EA4\u4ED8" }),
17128
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: companion.notificationDelivery?.mode === "selected" ? `\u5DF2\u6307\u5B9A ${companion.notificationDelivery.targets.length} \u4F4D\u63A5\u6536\u4EBA` : "\u9ED8\u8BA4\u8DDF\u968F\u6700\u8FD1\u6E20\u9053\u4E0E\u7528\u6237" })
16700
17129
  ] }),
16701
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", onClick: () => setConfiguring("delivery"), children: "\u914D\u7F6E" })
17130
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", onClick: () => setConfiguring("delivery"), children: "\u914D\u7F6E" })
16702
17131
  ] }) }),
16703
- configuring === "delivery" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WorkspaceDialog, { title: "\u901A\u77E5\u4E0E\u4EA4\u4ED8", detail: "\u9009\u62E9\u901A\u77E5\u6E20\u9053\uFF0C\u518D\u9009\u62E9\u5404\u6E20\u9053\u7684\u63A5\u6536\u4EBA\uFF1B\u652F\u6301\u540C\u65F6\u6295\u9012\u3002", close: () => setConfiguring(void 0), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(NotificationSettings, { companion, snapshot, onChanged }) })
17132
+ configuring === "delivery" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WorkspaceDialog, { title: "\u901A\u77E5\u4E0E\u4EA4\u4ED8", detail: "\u9009\u62E9\u901A\u77E5\u6E20\u9053\uFF0C\u518D\u9009\u62E9\u5404\u6E20\u9053\u7684\u63A5\u6536\u4EBA\uFF1B\u652F\u6301\u540C\u65F6\u6295\u9012\u3002", close: () => setConfiguring(void 0), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NotificationSettings, { companion, snapshot, onChanged }) })
16704
17133
  ] });
16705
17134
  }
16706
17135
  function FormField2({ label, hint, children }) {
16707
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "dsh-partner-channel-field", children: [
16708
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: label }),
17136
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "dsh-partner-channel-field", children: [
17137
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: label }),
16709
17138
  children,
16710
- hint && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("small", { children: hint })
17139
+ hint && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: hint })
16711
17140
  ] });
16712
17141
  }
16713
17142
 
16714
17143
  // src/ui/use-channel-status.ts
16715
- var import_react50 = require("react");
17144
+ var import_react53 = require("react");
16716
17145
  var listeners2 = /* @__PURE__ */ new Set();
16717
17146
  var timer;
16718
17147
  var active;
@@ -16737,7 +17166,7 @@ async function poll() {
16737
17166
  }
16738
17167
  }
16739
17168
  function useChannelStatus(setSnapshot) {
16740
- (0, import_react50.useEffect)(() => {
17169
+ (0, import_react53.useEffect)(() => {
16741
17170
  const update = (value) => setSnapshot((previous3) => previous3 ? { ...previous3, ...value } : previous3);
16742
17171
  listeners2.add(update);
16743
17172
  lastValue = "";
@@ -16771,7 +17200,7 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16771
17200
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-delivery-form { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; margin: 0; padding: 0; }
16772
17201
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-delivery-form > p:not([role="alert"]) { color: var(--partner-text-secondary); background: transparent; padding: 0; }
16773
17202
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-delivery-form > p { grid-column: 1 / -1; margin: 0; }
16774
- .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog:has(.dsh-partner-delivery-form) { width: min(560px, 100%); height: auto; align-self: center; max-height: calc(100% - 24px); border-radius: 16px !important; }
17203
+ .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog:has(.dsh-partner-delivery-form) { width: min(640px, 100%); height: auto; align-self: center; max-height: 100%; border-radius: var(--partner-radius-dialog, 24px) !important; }
16775
17204
  .dsh-partner-workspace #dsh-partner-identity-editor.dsh-partner-form,
16776
17205
  .dsh-partner-workspace #dsh-partner-channels.dsh-partner-form {
16777
17206
  background: transparent !important;
@@ -16793,14 +17222,14 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16793
17222
  box-sizing: border-box;
16794
17223
  min-width: 0;
16795
17224
  width: 100%;
16796
- min-height: 40px;
16797
- padding: 10px 12px !important;
17225
+ min-height: var(--partner-control-height, 38px);
17226
+ padding: 6px 11px !important;
16798
17227
  color: var(--partner-text) !important;
16799
17228
  background-color: var(--partner-control) !important;
16800
17229
  border: 1px solid var(--partner-border) !important;
16801
- border-radius: 10px !important;
17230
+ border-radius: var(--partner-radius-control, 12px) !important;
16802
17231
  box-shadow: inset 0 1px 0 var(--partner-glass-highlight) !important;
16803
- font: var(--partner-font-label)/1.5 var(--partner-font-family) !important;
17232
+ font: var(--partner-control-font-size, 13px)/1.4 var(--partner-font-family) !important;
16804
17233
  }
16805
17234
  .dsh-partner-workspace #dsh-partner-identity-editor .dsh-partner-field :is(input, textarea),
16806
17235
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-channel-field > input { background-image: none !important; }
@@ -16820,7 +17249,7 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16820
17249
  min-height: 40px;
16821
17250
  padding: 8px 14px !important;
16822
17251
  border: 1px solid var(--partner-border) !important;
16823
- border-radius: 10px !important;
17252
+ border-radius: var(--partner-radius-control, 12px) !important;
16824
17253
  color: var(--partner-text) !important;
16825
17254
  background: var(--partner-control) !important;
16826
17255
  box-shadow: none !important;
@@ -16853,17 +17282,33 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16853
17282
  background: var(--partner-solid-panel) !important;
16854
17283
  color: var(--partner-text) !important;
16855
17284
  border: 1px solid var(--partner-border) !important;
16856
- border-radius: 16px !important;
17285
+ border-radius: var(--partner-radius-dialog, 24px) !important;
16857
17286
  font-family: var(--partner-font-family) !important;
16858
17287
  box-shadow: 0 22px 58px color-mix(in srgb, #000 18%, transparent), 0 4px 14px color-mix(in srgb, #000 8%, transparent), inset 0 1px 0 var(--partner-card-highlight) !important;
16859
17288
  }
17289
+ /* The native top-layer wrapper is not the visible panel. Host dialog resets
17290
+ must not paint it as a full-screen form surface. */
17291
+ .dsh-partner-workspace #dsh-partner-channels dialog.dsh-partner-workspace-dialog-layer {
17292
+ background: var(--partner-interaction-veil, var(--partner-dialog-veil)) !important;
17293
+ border: 0 !important;
17294
+ border-radius: 0 !important;
17295
+ box-shadow: none !important;
17296
+ color: var(--partner-text) !important;
17297
+ font-family: var(--partner-font-family) !important;
17298
+ }
16860
17299
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog > header {
16861
- background: var(--partner-solid-raised) !important;
17300
+ background: transparent !important;
16862
17301
  color: var(--partner-text) !important;
16863
17302
  }
17303
+ .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog.is-confirmation button.is-danger {
17304
+ color: var(--partner-danger) !important;
17305
+ border-color: color-mix(in srgb, var(--partner-danger) 30%, var(--partner-border)) !important;
17306
+ background: color-mix(in srgb, var(--partner-danger) 8%, var(--partner-control)) !important;
17307
+ }
16864
17308
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog > header button {
16865
- width: 32px; min-height: 32px; padding: 0 !important;
16866
- background: transparent !important; border-color: transparent !important;
17309
+ width: 34px; min-width: 34px; min-height: 34px; padding: 0 !important;
17310
+ border-radius: 50% !important;
17311
+ background: var(--partner-interaction-well, var(--partner-hover)) !important; border-color: transparent !important;
16867
17312
  }
16868
17313
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-channel-form {
16869
17314
  background: transparent !important; box-shadow: none !important; border: 0 !important;
@@ -16873,7 +17318,7 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16873
17318
  @media (max-width: 640px) {
16874
17319
  .dsh-partner-workspace #dsh-partner-channels button,
16875
17320
  .dsh-partner-workspace #dsh-partner-identity-editor button { min-height: 44px; }
16876
- .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog { border-radius: 0 !important; border-width: 0 !important; }
17321
+ .dsh-partner-workspace #dsh-partner-channels .dsh-partner-workspace-dialog { border-radius: var(--partner-radius-dialog, 22px) !important; border-width: 1px !important; }
16877
17322
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-channel-toolbar { align-items: flex-start; flex-wrap: wrap; }
16878
17323
  }
16879
17324
 
@@ -16890,13 +17335,85 @@ var form_surface_default = `/* Deliberate, local boundary against host themes wi
16890
17335
  .dsh-partner-workspace #dsh-partner-channels .dsh-partner-channel-inline-notice p { margin: 4px 0 0; color: var(--partner-text-secondary); }
16891
17336
  `;
16892
17337
 
17338
+ // src/ui/interaction-theme.css
17339
+ var interaction_theme_default = "/* Knowledge 2.13.12 interaction contract. No global theme overrides or\n background animations; pendant/WebGL and business state are untouched. */\n.dsh-partner-workspace {\n --partner-radius-control: 12px;\n --partner-radius-dialog: 24px;\n --partner-radius-menu: 15px;\n --partner-dialog-inset: 20px;\n --partner-interaction-well: color-mix(in srgb, var(--partner-text) 3%, transparent);\n --partner-dialog-surface: color-mix(in srgb, var(--partner-text) 3%, var(--partner-solid-panel));\n --partner-interaction-rim: inset 0 1px 0 var(--partner-card-highlight);\n --partner-interaction-veil: rgb(12 18 24 / 14%);\n}\n.dsh-partner-workspace :where(button:not(.dsh-partner-feature-switch)) {\n border-radius: var(--partner-radius-control);\n transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms var(--partner-ease-out);\n}\n.dsh-partner-workspace :is(.dsh-partner-form-actions, .dsh-partner-feature-hero-actions, .dsh-partner-workspace-dialog footer) > button {\n box-shadow: var(--partner-interaction-rim), 0 2px 4px color-mix(in srgb, var(--partner-text) 4%, transparent);\n}\n.dsh-partner-workspace :is(.dsh-partner-form-actions, .dsh-partner-workspace-dialog footer) > button:active:not(:disabled) { transform: scale(.97); }\n.dsh-partner-workspace :is(button, input, select, textarea, summary, a):focus-visible { outline: 2px solid var(--partner-text-secondary); outline-offset: 2px; }\n.dsh-partner-workspace :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select) { border-radius: var(--partner-radius-control); transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }\n.dsh-partner-workspace :is(.dsh-partner-feature-form, .dsh-partner-task-form, .dsh-partner-schedule-form, .dsh-partner-form-actions) :is(button, input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select) { border-radius: var(--partner-radius-control); }\n.dsh-partner-workspace .dsh-partner-tabs { gap: 4px; padding: 4px; border: 0; border-radius: 14px; background: var(--partner-interaction-well); }\n.dsh-partner-workspace .dsh-partner-tabs button { border-radius: 10px; white-space: nowrap; }\n.dsh-partner-workspace .dsh-partner-tabs button::after { display: none; }\n.dsh-partner-workspace .dsh-partner-tabs button.is-active { color: var(--partner-text); background: var(--partner-raised); box-shadow: var(--partner-interaction-rim), 0 2px 5px color-mix(in srgb, var(--partner-text) 8%, transparent); }\n.dsh-partner-workspace .dsh-partner-capability-card-copy { border-radius: 13px; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }\n.dsh-partner-workspace .dsh-partner-capability-card:has([aria-pressed=true]) .dsh-partner-capability-card-copy { border-color: var(--partner-focus-ring); box-shadow: var(--partner-interaction-rim); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog-layer { align-items: center; padding: 20px; background: var(--partner-interaction-veil); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog {\n font: var(--partner-font-body)/1.5 var(--partner-font-family);\n width: min(640px, 100%); height: auto; max-height: min(800px, 100%); box-sizing: border-box;\n padding: 7px; border: 1px solid var(--partner-border); border-radius: var(--partner-radius-dialog);\n box-shadow: var(--partner-interaction-rim), 0 20px 64px rgb(0 0 0 / 20%);\n animation-duration: 220ms;\n}\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-wide { width: min(880px, 100%); height: auto; max-height: min(840px, 100%); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-capability-resources { width: min(1000px, 100%); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog > header { padding: 18px 18px 16px; border: 0; background: transparent; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog > header strong { font-size: 18px; line-height: 1.4; letter-spacing: normal; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog > header p { max-width: 52ch; line-height: 1.65; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog > header button { width: 34px; min-width: 34px; min-height: 34px; border-radius: 50%; background: var(--partner-interaction-well); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog-body { padding: var(--partner-dialog-inset); border: 1px solid var(--partner-separator); border-radius: 17px; background: var(--partner-dialog-surface); scroll-padding-block: 12px 90px; scrollbar-gutter: auto; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog-body > :is(form, .dsh-partner-task-detail) > footer:last-child {\n bottom: calc(-1 * var(--partner-dialog-inset)); margin: 4px calc(-1 * var(--partner-dialog-inset)) calc(-1 * var(--partner-dialog-inset));\n padding: 14px var(--partner-dialog-inset); gap: 10px; border-top: 1px solid var(--partner-separator); box-shadow: none;\n background: var(--partner-dialog-surface);\n}\n.dsh-partner-workspace .dsh-partner-workspace-dialog footer > button { min-height: 38px; border-radius: var(--partner-radius-control); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-confirmation { width: min(440px, 100%); }\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-confirmation .dsh-partner-form-actions { margin: 0; padding: 0; justify-content: flex-end; gap: 10px; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-confirmation .dsh-partner-form-actions button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--partner-border); color: var(--partner-text); background: var(--partner-control); font: 600 var(--partner-font-body)/1.4 var(--partner-font-family); cursor: pointer; }\n.dsh-partner-workspace .dsh-partner-workspace-dialog.is-confirmation .dsh-partner-form-actions button.is-danger { color: var(--partner-danger); border-color: color-mix(in srgb, var(--partner-danger) 30%, var(--partner-border)); background: color-mix(in srgb, var(--partner-danger) 8%, var(--partner-control)); }\n.dsh-partner-workspace :is(.dsh-partner-workspace-notice, .dsh-partner-inline-error, .dsh-partner-capability-save-status) { border-radius: 12px; }\n@media (max-width: 760px) {\n .dsh-partner-workspace { --partner-radius-dialog: 22px; --partner-dialog-inset: 16px; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog-layer { align-items: center; padding: 8px; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog,\n .dsh-partner-workspace .dsh-partner-workspace-dialog.is-wide { width: 100%; height: auto; max-height: 100%; padding: 6px; border-width: 1px; border-radius: var(--partner-radius-dialog); }\n .dsh-partner-workspace .dsh-partner-workspace-dialog > header { padding: 12px; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog footer { flex-wrap: wrap; gap: 8px; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog :is(footer, .dsh-partner-form-actions) > button { min-height: 44px; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog.is-confirmation { width: min(440px, 100%); }\n}\n@media (prefers-reduced-motion: reduce) {\n .dsh-partner-workspace :is(button, input, textarea, select, .dsh-partner-capability-card-copy) { transition: none; }\n .dsh-partner-workspace .dsh-partner-workspace-dialog { animation: none; }\n .dsh-partner-workspace :is(.dsh-partner-form-actions, .dsh-partner-workspace-dialog footer) > button:active:not(:disabled) { transform: none; }\n}\n";
17340
+
17341
+ // src/ui/control-surfaces.css
17342
+ var control_surfaces_default = `/* One control surface across feature pages and dialogs. Composite searches
17343
+ keep a single outer border; switches, ranges and file pickers are excluded. */
17344
+ .dsh-partner-workspace {
17345
+ --partner-control-height: 38px;
17346
+ --partner-control-font-size: 13px;
17347
+ --partner-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238a8f98' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
17348
+ }
17349
+ .dsh-partner-workspace :is(input:not([type]), input[type=text], input[type=search], input[type=url], input[type=password], input[type=email], input[type=number], input[type=datetime-local], input[type=time], select, textarea) {
17350
+ box-sizing: border-box; min-width: 0; max-width: 100%; border: 1px solid var(--partner-border);
17351
+ border-radius: var(--partner-radius-control); color: var(--partner-text); background-color: var(--partner-control);
17352
+ box-shadow: inset 0 1px 0 var(--partner-glass-highlight); font-size: var(--partner-control-font-size);
17353
+ }
17354
+ .dsh-partner-workspace :is(input:not([type]), input[type=text], input[type=search], input[type=url], input[type=password], input[type=email], input[type=number], input[type=datetime-local], input[type=time], select) { min-height: var(--partner-control-height); height: var(--partner-control-height); padding: 6px 11px; line-height: 1.4; }
17355
+ .dsh-partner-workspace textarea { padding: 10px 11px; line-height: 1.6; resize: vertical; }
17356
+ .dsh-partner-workspace select:not([multiple]) { appearance: none; padding-right: 34px; background-image: var(--partner-select-arrow); background-position: right 10px center; background-size: 16px; background-repeat: no-repeat; text-overflow: ellipsis; cursor: pointer; }
17357
+ .dsh-partner-workspace select option { color: var(--partner-text); background: var(--partner-solid-panel); }
17358
+ .dsh-partner-workspace :is(input:not([type]), input[type=text], input[type=search], input[type=url], input[type=password], input[type=email], input[type=number], select, textarea):focus-visible { outline: 2px solid var(--partner-focus-ring); outline-offset: 2px; box-shadow: inset 0 1px 0 var(--partner-glass-highlight); }
17359
+ .dsh-partner-workspace :is(input, textarea)::placeholder { color: var(--partner-text-tertiary); opacity: 1; }
17360
+ .dsh-partner-workspace :is(input, select, textarea):disabled { opacity: .55; cursor: not-allowed; }
17361
+ .dsh-partner-workspace .dsh-partner-field { min-width: 0; }
17362
+ .dsh-partner-workspace .dsh-partner-field > span { gap: 4px; }
17363
+ .dsh-partner-workspace .dsh-partner-board-search > input { padding-left: 34px; padding-right: 38px; }
17364
+ .dsh-partner-workspace :is(.dsh-partner-skill-search, .dsh-partner-skill-search.is-compact) { box-sizing: border-box; min-height: 40px; gap: 6px; padding: 4px 8px; border: 1px solid var(--partner-border); border-radius: var(--partner-radius-control); background: var(--partner-control); box-shadow: inset 0 1px 0 var(--partner-glass-highlight); }
17365
+ .dsh-partner-workspace .dsh-partner-skill-search input { min-height: 30px; height: 30px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }
17366
+ .dsh-partner-workspace .dsh-partner-skill-search:focus-within { outline: 2px solid var(--partner-focus-ring); outline-offset: 2px; }
17367
+ .dsh-partner-workspace .dsh-partner-skill-search-icon { width: 28px; height: 28px; background: transparent; box-shadow: none; }
17368
+ .dsh-partner-workspace .dsh-partner-memory-toolbar > label:not(.dsh-partner-memory-search) { flex: 0 1 190px; min-width: 0; }
17369
+ .dsh-partner-workspace .dsh-partner-memory-toolbar select { width: 100%; }
17370
+ .dsh-partner-workspace .dsh-partner-workspace-dialog-body > .dsh-partner-memory-settings > footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--partner-separator); }
17371
+ .dsh-partner-workspace .dsh-partner-memory-settings .dsh-partner-automation-fields.is-memory-model { grid-template-columns: repeat(2, minmax(0, 1fr)); }
17372
+ .dsh-partner-workspace .dsh-partner-memory-settings .is-memory-model > .dsh-partner-field:first-child { grid-column: 1 / -1; max-width: 220px; }
17373
+
17374
+ .dsh-partner-workspace .dsh-partner-runtime-summary { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--partner-border); border-radius: 14px; background: var(--partner-interaction-well); }
17375
+ .dsh-partner-workspace .dsh-partner-runtime-summary > span { display: grid; min-width: 0; gap: 3px; }
17376
+ .dsh-partner-workspace .dsh-partner-runtime-summary :is(small, strong) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
17377
+ .dsh-partner-workspace .dsh-partner-runtime-summary small { color: var(--partner-text-secondary); font-size: 12px; }
17378
+ .dsh-partner-workspace .dsh-partner-runtime-summary strong { font-size: 13px; font-weight: 600; }
17379
+ .dsh-partner-workspace :is(.dsh-partner-runtime-summary > button, .dsh-partner-runtime-editor footer > button) { min-height: var(--partner-control-height); padding: 6px 14px; border: 1px solid var(--partner-border); border-radius: var(--partner-radius-control); color: var(--partner-text); background: var(--partner-control); font: 600 13px/1.4 var(--partner-font-family); cursor: pointer; }
17380
+ .dsh-partner-workspace .dsh-partner-runtime-editor { display: grid; min-width: 0; gap: 14px; }
17381
+ .dsh-partner-workspace .dsh-partner-runtime-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
17382
+ .dsh-partner-workspace .dsh-partner-runtime-options .dsh-partner-field { margin: 0; }
17383
+ .dsh-partner-workspace .dsh-partner-runtime-search { display: grid; min-width: 0; gap: 7px; font-weight: 600; }
17384
+ .dsh-partner-workspace .dsh-partner-runtime-search input { width: 100%; }
17385
+ .dsh-partner-workspace .dsh-partner-runtime-models { display: grid; align-content: start; gap: 4px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--partner-border); border-radius: 12px; scrollbar-gutter: stable; }
17386
+ .dsh-partner-workspace .dsh-partner-runtime-models > button { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--partner-text); text-align: left; font: inherit; cursor: pointer; }
17387
+ .dsh-partner-workspace .dsh-partner-runtime-models > button > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
17388
+ .dsh-partner-workspace .dsh-partner-runtime-models small { color: var(--partner-text-secondary); font-size: 12px; }
17389
+ .dsh-partner-workspace .dsh-partner-runtime-models > button:is(:hover, [aria-pressed=true]) { background: var(--partner-selected); }
17390
+ .dsh-partner-workspace .dsh-partner-runtime-models > button:focus-visible { outline-offset: -2px; }
17391
+ .dsh-partner-workspace .dsh-partner-runtime-models i { display: grid; place-items: center; }
17392
+ .dsh-partner-workspace .dsh-partner-runtime-models > p { margin: 0; padding: 10px; color: var(--partner-text-secondary); }
17393
+ .dsh-partner-workspace .dsh-partner-runtime-editor footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
17394
+ .dsh-partner-workspace .dsh-partner-runtime-editor footer > span { color: var(--partner-text-secondary); font-size: 12px; }
17395
+ @media (max-width: 760px) {
17396
+ .dsh-partner-workspace { --partner-control-height: 44px; --partner-control-font-size: 16px; }
17397
+ .dsh-partner-workspace .dsh-partner-skill-search input { min-height: 36px; height: 36px; }
17398
+ .dsh-partner-workspace .dsh-partner-memory-toolbar > label:not(.dsh-partner-memory-search) { flex: 1 1 130px; }
17399
+ }
17400
+ @media (max-width: 480px) {
17401
+ .dsh-partner-workspace .dsh-partner-runtime-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
17402
+ .dsh-partner-workspace .dsh-partner-runtime-summary > span { grid-column: 1; }
17403
+ .dsh-partner-workspace .dsh-partner-runtime-summary > button { grid-column: 2; grid-row: 1 / 3; }
17404
+ .dsh-partner-workspace .dsh-partner-runtime-options { grid-template-columns: minmax(0, 1fr); }
17405
+ .dsh-partner-workspace .dsh-partner-memory-settings .dsh-partner-automation-fields.is-memory-model { grid-template-columns: minmax(0, 1fr); }
17406
+ .dsh-partner-workspace .dsh-partner-memory-settings .is-memory-model > .dsh-partner-field:first-child { max-width: none; }
17407
+ }
17408
+ `;
17409
+
16893
17410
  // src/ui/companion-create.tsx
16894
- var import_react51 = require("react");
16895
- var import_dsh_client_ui_primitives23 = require("@deepseek-ai/dsh-client-ui-primitives");
16896
- var import_jsx_runtime47 = require("react/jsx-runtime");
17411
+ var import_react54 = require("react");
17412
+ var import_dsh_client_ui_primitives24 = require("@deepseek-ai/dsh-client-ui-primitives");
17413
+ var import_jsx_runtime50 = require("react/jsx-runtime");
16897
17414
  function CompanionCreateDialog({ close, create }) {
16898
- const [busy, setBusy] = (0, import_react51.useState)(false);
16899
- const [error, setError] = (0, import_react51.useState)();
17415
+ const [busy, setBusy] = (0, import_react54.useState)(false);
17416
+ const [error, setError] = (0, import_react54.useState)();
16900
17417
  const submit = async (event) => {
16901
17418
  event.preventDefault();
16902
17419
  const data = new FormData(event.currentTarget);
@@ -16915,30 +17432,30 @@ function CompanionCreateDialog({ close, create }) {
16915
17432
  setBusy(false);
16916
17433
  }
16917
17434
  };
16918
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u4F19\u4F34", detail: "\u5148\u5EFA\u7ACB\u6E05\u6670\u7684\u8EAB\u4EFD\u548C\u804C\u8D23\u3002\u6A21\u578B\u3001\u5DE5\u5177\u3001Skill \u4E0E\u534F\u4F5C\u6743\u9650\u4F1A\u5728\u521B\u5EFA\u540E\u5355\u72EC\u914D\u7F6E\u3002", close, width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-companion-create-form", "aria-busy": busy, onSubmit: (event) => {
17435
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u4F19\u4F34", detail: "\u5148\u5EFA\u7ACB\u6E05\u6670\u7684\u8EAB\u4EFD\u548C\u804C\u8D23\u3002\u6A21\u578B\u3001\u5DE5\u5177\u3001Skill \u4E0E\u534F\u4F5C\u6743\u9650\u4F1A\u5728\u521B\u5EFA\u540E\u5355\u72EC\u914D\u7F6E\u3002", close, width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-companion-create-form", "aria-busy": busy, onSubmit: (event) => {
16919
17436
  void submit(event);
16920
17437
  }, children: [
16921
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { children: [
16922
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u4F19\u4F34\u540D\u5B57" }),
16923
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { name: "name", required: true, maxLength: 60, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u5C0F\u9ED1" })
17438
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { children: [
17439
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "\u4F19\u4F34\u540D\u5B57" }),
17440
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", { name: "name", required: true, maxLength: 60, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u5C0F\u9ED1" })
16924
17441
  ] }),
16925
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { children: [
16926
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u4E3B\u8981\u89D2\u8272" }),
16927
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { name: "role", required: true, maxLength: 120, placeholder: "\u4F8B\u5982\uFF1A\u4EA7\u54C1\u4E0E\u5DE5\u7A0B\u534F\u4F5C\u4F19\u4F34" })
17442
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { children: [
17443
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "\u4E3B\u8981\u89D2\u8272" }),
17444
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", { name: "role", required: true, maxLength: 120, placeholder: "\u4F8B\u5982\uFF1A\u4EA7\u54C1\u4E0E\u5DE5\u7A0B\u534F\u4F5C\u4F19\u4F34" })
16928
17445
  ] }),
16929
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "is-wide", children: [
16930
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D" }),
16931
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { name: "description", maxLength: 500, placeholder: "\u5B83\u4E3B\u8981\u8D1F\u8D23\u4EC0\u4E48\uFF0C\u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u627E\u5B83" })
17446
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { className: "is-wide", children: [
17447
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D" }),
17448
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", { name: "description", maxLength: 500, placeholder: "\u5B83\u4E3B\u8981\u8D1F\u8D23\u4EC0\u4E48\uFF0C\u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u627E\u5B83" })
16932
17449
  ] }),
16933
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "is-wide", children: [
16934
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\u521D\u59CB\u884C\u4E3A\u51C6\u5219" }),
16935
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("textarea", { name: "instructions", maxLength: 12e3, rows: 7, placeholder: "\u5199\u6E05\u804C\u8D23\u3001\u8868\u8FBE\u65B9\u5F0F\u3001\u5DE5\u4F5C\u8FB9\u754C\u548C\u4EA4\u4ED8\u6807\u51C6\uFF1B\u4E5F\u53EF\u4EE5\u521B\u5EFA\u540E\u518D\u5B8C\u5584" })
17450
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("label", { className: "is-wide", children: [
17451
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "\u521D\u59CB\u884C\u4E3A\u51C6\u5219" }),
17452
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("textarea", { name: "instructions", maxLength: 12e3, rows: 7, placeholder: "\u5199\u6E05\u804C\u8D23\u3001\u8868\u8FBE\u65B9\u5F0F\u3001\u5DE5\u4F5C\u8FB9\u754C\u548C\u4EA4\u4ED8\u6807\u51C6\uFF1B\u4E5F\u53EF\u4EE5\u521B\u5EFA\u540E\u518D\u5B8C\u5584" })
16936
17453
  ] }),
16937
- error && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WorkspaceNotice, { children: error }),
16938
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("footer", { children: [
16939
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
16940
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
16941
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_dsh_client_ui_primitives23.IconPlusOutlineRegular, { size: 14 }),
17454
+ error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WorkspaceNotice, { children: error }),
17455
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("footer", { children: [
17456
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
17457
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
17458
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_dsh_client_ui_primitives24.IconPlusOutlineRegular, { size: 14 }),
16942
17459
  busy ? "\u6B63\u5728\u521B\u5EFA\u2026" : "\u521B\u5EFA\u4F19\u4F34"
16943
17460
  ] })
16944
17461
  ] })
@@ -16946,7 +17463,7 @@ function CompanionCreateDialog({ close, create }) {
16946
17463
  }
16947
17464
 
16948
17465
  // src/main-panel-compat.ts
16949
- var import_react52 = require("react");
17466
+ var import_react55 = require("react");
16950
17467
  function registerMainPanel(ctx, id, priority, render, onHidden = () => {
16951
17468
  }) {
16952
17469
  const layout = ctx.layout;
@@ -16957,7 +17474,7 @@ function registerMainPanel(ctx, id, priority, render, onHidden = () => {
16957
17474
  let disposed = false;
16958
17475
  let generation = 0;
16959
17476
  const Body = (props) => {
16960
- (0, import_react52.useEffect)(() => {
17477
+ (0, import_react55.useEffect)(() => {
16961
17478
  const current2 = ++generation;
16962
17479
  return () => {
16963
17480
  queueMicrotask(() => {
@@ -17083,7 +17600,7 @@ function decisionReason(reason) {
17083
17600
  }
17084
17601
 
17085
17602
  // src/decision/conversation.tsx
17086
- var import_jsx_runtime48 = require("react/jsx-runtime");
17603
+ var import_jsx_runtime51 = require("react/jsx-runtime");
17087
17604
  var decisionDefinition = {
17088
17605
  kind: "partner-decision",
17089
17606
  target: "chat",
@@ -17108,13 +17625,13 @@ var decisionDefinition = {
17108
17625
  }
17109
17626
  };
17110
17627
  function DecisionCard({ data }) {
17111
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "dsh-partner-decision-card", "aria-label": "\u81EA\u52A8\u51B3\u7B56", children: [
17112
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { role: "status", "aria-atomic": "true", children: [
17113
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("strong", { children: "\u81EA\u52A8\u51B3\u7B56" }),
17114
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: decisionReason(data.reason) }),
17115
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("small", { children: data.status === "running" ? "\u7B49\u5F85\u54CD\u5E94\u2026" : `${(data.durationMs / 1e3).toFixed(2)} \u79D2` })
17628
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("section", { className: "dsh-partner-decision-card", "aria-label": "\u81EA\u52A8\u51B3\u7B56", children: [
17629
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { role: "status", "aria-atomic": "true", children: [
17630
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: "\u81EA\u52A8\u51B3\u7B56" }),
17631
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: decisionReason(data.reason) }),
17632
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("small", { children: data.status === "running" ? "\u7B49\u5F85\u54CD\u5E94\u2026" : `${(data.durationMs / 1e3).toFixed(2)} \u79D2` })
17116
17633
  ] }),
17117
- data.suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { children: data.suggestions.map((item) => {
17634
+ data.suggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ul", { children: data.suggestions.map((item) => {
17118
17635
  const colon = item.indexOf("\uFF1A");
17119
17636
  let label = item;
17120
17637
  try {
@@ -17122,9 +17639,9 @@ function DecisionCard({ data }) {
17122
17639
  if (typeof value.name === "string") label = `${item.slice(0, colon)}\uFF1A${value.name}`;
17123
17640
  } catch {
17124
17641
  }
17125
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: label }, item);
17642
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("li", { children: label }, item);
17126
17643
  }) }),
17127
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("small", { children: "Skill \xB7 \u4F19\u4F34 \xB7 \u5DE5\u5177\uFF0C\u4EC5\u63D0\u4F9B\u5EFA\u8BAE\uFF0C\u4E0D\u4EE3\u8868\u5DF2\u6267\u884C\u3002" })
17644
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("small", { children: "Skill \xB7 \u4F19\u4F34 \xB7 \u5DE5\u5177\uFF0C\u4EC5\u63D0\u4F9B\u5EFA\u8BAE\uFF0C\u4E0D\u4EE3\u8868\u5DF2\u6267\u884C\u3002" })
17128
17645
  ] });
17129
17646
  }
17130
17647
  function registerDecisionCards(ctx) {
@@ -17146,15 +17663,15 @@ function registerDecisionCards(ctx) {
17146
17663
  runtime.inject(["conversationEvents"], (scope) => register(scope, true));
17147
17664
  runtime.slots.inject("conversation.chat.node", () => runtime.slots.register(
17148
17665
  { name: "conversation.chat.node", key: "partner-decision" },
17149
- (props) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DecisionCard, { data: props.node.data })
17666
+ (props) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DecisionCard, { data: props.node.data })
17150
17667
  ));
17151
17668
  }
17152
17669
 
17153
17670
  // src/ui/workspace-navigation.tsx
17154
- var import_dsh_client_ui_primitives24 = require("@deepseek-ai/dsh-client-ui-primitives");
17671
+ var import_dsh_client_ui_primitives25 = require("@deepseek-ai/dsh-client-ui-primitives");
17155
17672
 
17156
17673
  // src/ui/storage-settings.tsx
17157
- var import_react54 = require("react");
17674
+ var import_react57 = require("react");
17158
17675
 
17159
17676
  // src/ui/storage-recovery.ts
17160
17677
  var StorageStatusError = class extends Error {
@@ -17202,16 +17719,16 @@ async function waitForStorage(signal, onWait, options = {}) {
17202
17719
  }
17203
17720
 
17204
17721
  // src/ui/attachment-storage.tsx
17205
- var import_react53 = require("react");
17206
- var import_jsx_runtime49 = require("react/jsx-runtime");
17722
+ var import_react56 = require("react");
17723
+ var import_jsx_runtime52 = require("react/jsx-runtime");
17207
17724
  var size = (bytes) => `${(bytes / 1048576).toFixed(2)} MiB`;
17208
17725
  function AttachmentStoragePanel() {
17209
- const [view, setView] = (0, import_react53.useState)(), [limit, setLimit] = (0, import_react53.useState)("512");
17210
- const [owner, setOwner] = (0, import_react53.useState)(""), [days, setDays] = (0, import_react53.useState)("0"), [offset, setOffset] = (0, import_react53.useState)(0);
17211
- const [selected, setSelected] = (0, import_react53.useState)([]), [busy, setBusy] = (0, import_react53.useState)(false), [confirm, setConfirm] = (0, import_react53.useState)(false);
17212
- const [error, setError] = (0, import_react53.useState)(""), [notice, setNotice] = (0, import_react53.useState)(""), [revision, setRevision] = (0, import_react53.useState)(0);
17213
- const [expanded, setExpanded] = (0, import_react53.useState)(false);
17214
- (0, import_react53.useEffect)(() => {
17726
+ const [view, setView] = (0, import_react56.useState)(), [limit, setLimit] = (0, import_react56.useState)("512");
17727
+ const [owner, setOwner] = (0, import_react56.useState)(""), [days, setDays] = (0, import_react56.useState)("0"), [offset, setOffset] = (0, import_react56.useState)(0);
17728
+ const [selected, setSelected] = (0, import_react56.useState)([]), [busy, setBusy] = (0, import_react56.useState)(false), [confirm, setConfirm] = (0, import_react56.useState)(false);
17729
+ const [error, setError] = (0, import_react56.useState)(""), [notice, setNotice] = (0, import_react56.useState)(""), [revision, setRevision] = (0, import_react56.useState)(0);
17730
+ const [expanded, setExpanded] = (0, import_react56.useState)(false);
17731
+ (0, import_react56.useEffect)(() => {
17215
17732
  const controller = new AbortController();
17216
17733
  setBusy(true);
17217
17734
  setSelected([]);
@@ -17255,65 +17772,65 @@ function AttachmentStoragePanel() {
17255
17772
  setBusy(false);
17256
17773
  }
17257
17774
  };
17258
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(WorkspaceBlock, { title: "\u9644\u4EF6\u5B58\u50A8", className: "attachment-storage-block", children: [
17259
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { id: "partner-attachment-storage", className: "dsh-partner-attachment-storage", "aria-busy": busy, children: [
17260
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "attachment-storage-overview", children: [
17261
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "attachment-storage-usage", children: [
17262
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { children: view ? `${size(view.usedBytes)} / ${view.limitMiB} MiB` : "\u6B63\u5728\u8BFB\u53D6\u2026" }),
17263
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("small", { children: view ? `${view.count} \u4E2A\u526F\u672C \xB7 \u5168\u90E8\u4F19\u4F34\u5171\u4EAB` : "\u6B63\u5728\u7EDF\u8BA1\u9644\u4EF6\u5360\u7528" })
17775
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(WorkspaceBlock, { title: "\u9644\u4EF6\u5B58\u50A8", className: "attachment-storage-block", children: [
17776
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { id: "partner-attachment-storage", className: "dsh-partner-attachment-storage", "aria-busy": busy, children: [
17777
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "attachment-storage-overview", children: [
17778
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "attachment-storage-usage", children: [
17779
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: view ? `${size(view.usedBytes)} / ${view.limitMiB} MiB` : "\u6B63\u5728\u8BFB\u53D6\u2026" }),
17780
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: view ? `${view.count} \u4E2A\u526F\u672C \xB7 \u5168\u90E8\u4F19\u4F34\u5171\u4EAB` : "\u6B63\u5728\u7EDF\u8BA1\u9644\u4EF6\u5360\u7528" })
17264
17781
  ] }),
17265
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("form", { onSubmit: (e) => {
17782
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("form", { onSubmit: (e) => {
17266
17783
  e.preventDefault();
17267
17784
  void save();
17268
17785
  }, children: [
17269
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { children: [
17786
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { children: [
17270
17787
  "\u989D\u5EA6",
17271
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { "aria-label": "\u603B\u989D\u5EA6\uFF08MiB\uFF09", type: "number", min: "64", max: "1048576", step: "1", required: true, value: limit, disabled: busy, onChange: (e) => setLimit(e.target.value) }),
17272
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: "MiB" })
17788
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", { "aria-label": "\u603B\u989D\u5EA6\uFF08MiB\uFF09", type: "number", min: "64", max: "1048576", step: "1", required: true, value: limit, disabled: busy, onChange: (e) => setLimit(e.target.value) }),
17789
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "MiB" })
17273
17790
  ] }),
17274
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { "aria-label": "\u4FDD\u5B58\u989D\u5EA6", disabled: busy || !view || Number(limit) === view.limitMiB, children: "\u4FDD\u5B58" })
17791
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { "aria-label": "\u4FDD\u5B58\u989D\u5EA6", disabled: busy || !view || Number(limit) === view.limitMiB, children: "\u4FDD\u5B58" })
17275
17792
  ] }),
17276
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", "aria-expanded": expanded, "aria-controls": "attachment-storage-manager", onClick: () => setExpanded((v) => !v), children: expanded ? "\u6536\u8D77\u660E\u7EC6" : "\u7BA1\u7406\u526F\u672C" })
17793
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", "aria-expanded": expanded, "aria-controls": "attachment-storage-manager", onClick: () => setExpanded((v) => !v), children: expanded ? "\u6536\u8D77\u660E\u7EC6" : "\u7BA1\u7406\u526F\u672C" })
17277
17794
  ] }),
17278
- expanded && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { id: "attachment-storage-manager", children: [
17279
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "attachment-storage-filters", children: [
17280
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { children: [
17795
+ expanded && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { id: "attachment-storage-manager", children: [
17796
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "attachment-storage-filters", children: [
17797
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { children: [
17281
17798
  "\u4F19\u4F34",
17282
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("select", { value: owner, disabled: busy, onChange: (e) => {
17799
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("select", { value: owner, disabled: busy, onChange: (e) => {
17283
17800
  setOwner(e.target.value);
17284
17801
  setOffset(0);
17285
17802
  }, children: [
17286
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "", children: "\u5168\u90E8\u4F19\u4F34" }),
17287
- view?.owners.map((o) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: o.id, children: o.name }, o.id))
17803
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: "", children: "\u5168\u90E8\u4F19\u4F34" }),
17804
+ view?.owners.map((o) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: o.id, children: o.name }, o.id))
17288
17805
  ] })
17289
17806
  ] }),
17290
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { children: [
17807
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { children: [
17291
17808
  "\u521B\u5EFA\u65F6\u95F4",
17292
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("select", { value: days, disabled: busy, onChange: (e) => {
17809
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("select", { value: days, disabled: busy, onChange: (e) => {
17293
17810
  setDays(e.target.value);
17294
17811
  setOffset(0);
17295
17812
  }, children: [
17296
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "0", children: "\u5168\u90E8\u65F6\u95F4" }),
17297
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "7", children: "7 \u5929\u4EE5\u524D" }),
17298
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "30", children: "30 \u5929\u4EE5\u524D" }),
17299
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "90", children: "90 \u5929\u4EE5\u524D" })
17813
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: "0", children: "\u5168\u90E8\u65F6\u95F4" }),
17814
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: "7", children: "7 \u5929\u4EE5\u524D" }),
17815
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: "30", children: "30 \u5929\u4EE5\u524D" }),
17816
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("option", { value: "90", children: "90 \u5929\u4EE5\u524D" })
17300
17817
  ] })
17301
17818
  ] }),
17302
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy, onClick: () => setRevision((v) => v + 1), children: "\u5237\u65B0" })
17819
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { disabled: busy, onClick: () => setRevision((v) => v + 1), children: "\u5237\u65B0" })
17303
17820
  ] }),
17304
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "attachment-storage-selection", children: [
17305
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy || !view?.items.some((i) => !i.protectedReason), onClick: () => setSelected(selected.length ? [] : view.items.filter((i) => !i.protectedReason).map((i) => i.id)), children: selected.length ? "\u53D6\u6D88\u9009\u62E9" : "\u9009\u62E9\u672C\u9875" }),
17306
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("small", { children: [
17821
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "attachment-storage-selection", children: [
17822
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { disabled: busy || !view?.items.some((i) => !i.protectedReason), onClick: () => setSelected(selected.length ? [] : view.items.filter((i) => !i.protectedReason).map((i) => i.id)), children: selected.length ? "\u53D6\u6D88\u9009\u62E9" : "\u9009\u62E9\u672C\u9875" }),
17823
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("small", { children: [
17307
17824
  "\u53EF\u6E05\u7406 ",
17308
17825
  size(view?.eligibleBytes ?? 0),
17309
17826
  " \xB7 \u4F7F\u7528\u4E2D\u7684\u526F\u672C\u53D7\u4FDD\u62A4"
17310
17827
  ] })
17311
17828
  ] }),
17312
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "attachment-storage-list", children: view?.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "attachment-storage-row", children: [
17313
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { type: "checkbox", disabled: busy || !!item.protectedReason, checked: selected.includes(item.id), onChange: (e) => setSelected((ids) => e.target.checked ? [...ids, item.id] : ids.filter((id) => id !== item.id)) }),
17314
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17315
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", { title: item.name, children: item.name }),
17316
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("small", { children: [
17829
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "attachment-storage-list", children: view?.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { className: "attachment-storage-row", children: [
17830
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", { type: "checkbox", disabled: busy || !!item.protectedReason, checked: selected.includes(item.id), onChange: (e) => setSelected((ids) => e.target.checked ? [...ids, item.id] : ids.filter((id) => id !== item.id)) }),
17831
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17832
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { title: item.name, children: item.name }),
17833
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("small", { children: [
17317
17834
  item.companionName,
17318
17835
  " \xB7 ",
17319
17836
  size(item.size),
@@ -17324,60 +17841,60 @@ function AttachmentStoragePanel() {
17324
17841
  ] })
17325
17842
  ] })
17326
17843
  ] }, item.id)) }),
17327
- view && !view.items.length && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: "\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u526F\u672C\u3002" }),
17328
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "attachment-storage-filters", children: [
17329
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy || offset === 0, onClick: () => setOffset(Math.max(0, offset - 30)), children: "\u4E0A\u4E00\u9875" }),
17330
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { children: [
17844
+ view && !view.items.length && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u526F\u672C\u3002" }),
17845
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "attachment-storage-filters", children: [
17846
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { disabled: busy || offset === 0, onClick: () => setOffset(Math.max(0, offset - 30)), children: "\u4E0A\u4E00\u9875" }),
17847
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17331
17848
  "\u7B2C ",
17332
17849
  Math.floor(offset / 30) + 1,
17333
17850
  " \u9875 \xB7 \u5171 ",
17334
17851
  view?.filteredCount ?? 0,
17335
17852
  " \u9879"
17336
17853
  ] }),
17337
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { disabled: busy || !view || offset + 30 >= view.filteredCount, onClick: () => setOffset(offset + 30), children: "\u4E0B\u4E00\u9875" }),
17338
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("button", { disabled: busy || !selected.length, onClick: () => setConfirm(true), children: [
17854
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { disabled: busy || !view || offset + 30 >= view.filteredCount, onClick: () => setOffset(offset + 30), children: "\u4E0B\u4E00\u9875" }),
17855
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { disabled: busy || !selected.length, onClick: () => setConfirm(true), children: [
17339
17856
  "\u6E05\u7406\u6240\u9009\uFF08",
17340
17857
  selected.length,
17341
17858
  "\uFF09"
17342
17859
  ] })
17343
17860
  ] }),
17344
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("details", { className: "attachment-storage-help", children: [
17345
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("summary", { children: "\u5B58\u50A8\u4E0E\u6E05\u7406\u8BF4\u660E" }),
17346
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: "\u526F\u672C\u7EDF\u4E00\u5B58\u653E\uFF0C\u539F\u6587\u4EF6\u4E0D\u53D7\u5F71\u54CD\u3002\u4E0D\u4F1A\u81EA\u52A8\u6E05\u7406\uFF1B\u964D\u4F4E\u989D\u5EA6\u4E0D\u5220\u9664\u65E7\u526F\u672C\uFF0C\u8D85\u989D\u65F6\u505C\u6B62\u65B0\u589E\u3002\u5355\u6587\u4EF6\u4E0A\u9650 64 MiB\u3002" }),
17347
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { children: "\u53D1\u9001\u4E2D\u3001\u5931\u8D25\u5F85\u91CD\u8BD5\u3001\u6700\u8FD1 5 \u5206\u949F\u521B\u5EFA\u53CA\u672A\u5B8C\u6210\u4EFB\u52A1/\u9700\u6C42\u5F15\u7528\u7684\u526F\u672C\u4E0D\u80FD\u6E05\u7406\u3002\u6E05\u7406\u540E\u5BF9\u5E94\u5386\u53F2\u4E0B\u8F7D\u94FE\u63A5\u5931\u6548\u3002" }),
17348
- [...new Set(view?.owners.map((o) => o.directory) ?? [])].map((directory) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("code", { children: directory }, directory))
17861
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("details", { className: "attachment-storage-help", children: [
17862
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("summary", { children: "\u5B58\u50A8\u4E0E\u6E05\u7406\u8BF4\u660E" }),
17863
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u526F\u672C\u7EDF\u4E00\u5B58\u653E\uFF0C\u539F\u6587\u4EF6\u4E0D\u53D7\u5F71\u54CD\u3002\u4E0D\u4F1A\u81EA\u52A8\u6E05\u7406\uFF1B\u964D\u4F4E\u989D\u5EA6\u4E0D\u5220\u9664\u65E7\u526F\u672C\uFF0C\u8D85\u989D\u65F6\u505C\u6B62\u65B0\u589E\u3002\u5355\u6587\u4EF6\u4E0A\u9650 64 MiB\u3002" }),
17864
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u53D1\u9001\u4E2D\u3001\u5931\u8D25\u5F85\u91CD\u8BD5\u3001\u6700\u8FD1 5 \u5206\u949F\u521B\u5EFA\u53CA\u672A\u5B8C\u6210\u4EFB\u52A1/\u9700\u6C42\u5F15\u7528\u7684\u526F\u672C\u4E0D\u80FD\u6E05\u7406\u3002\u6E05\u7406\u540E\u5BF9\u5E94\u5386\u53F2\u4E0B\u8F7D\u94FE\u63A5\u5931\u6548\u3002" }),
17865
+ [...new Set(view?.owners.map((o) => o.directory) ?? [])].map((directory) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("code", { children: directory }, directory))
17349
17866
  ] })
17350
17867
  ] }),
17351
- error && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "alert", children: error }),
17352
- notice && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { role: "status", children: notice })
17868
+ error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { role: "alert", children: error }),
17869
+ notice && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { role: "status", children: notice })
17353
17870
  ] }),
17354
- confirm && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WorkspaceDialog, { eyebrow: "\u9644\u4EF6\u7BA1\u7406", title: "\u6E05\u7406\u4EA4\u4ED8\u526F\u672C", detail: `\u5DF2\u9009\u62E9 ${selected.length} \u4E2A\u526F\u672C\u3002\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`, close: () => {
17871
+ confirm && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WorkspaceDialog, { eyebrow: "\u9644\u4EF6\u7BA1\u7406", title: "\u6E05\u7406\u4EA4\u4ED8\u526F\u672C", detail: `\u5DF2\u9009\u62E9 ${selected.length} \u4E2A\u526F\u672C\u3002\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`, close: () => {
17355
17872
  if (!busy) setConfirm(false);
17356
- }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("form", { className: "dsh-partner-feature-form", onSubmit: (event) => {
17873
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("form", { className: "dsh-partner-feature-form", onSubmit: (event) => {
17357
17874
  event.preventDefault();
17358
17875
  if (!busy) void clean();
17359
17876
  }, children: [
17360
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "is-wide", children: "\u53EA\u5220\u9664\u4EA4\u4ED8\u526F\u672C\uFF0C\u539F\u59CB\u6587\u4EF6\u4FDD\u6301\u4E0D\u53D8\u3002\u5386\u53F2\u4F1A\u8BDD\u548C\u770B\u677F\u4E2D\u7684\u5BF9\u5E94\u9644\u4EF6\u4E0B\u8F7D\u94FE\u63A5\u5C06\u5931\u6548\u3002\u6267\u884C\u65F6\u4F1A\u518D\u6B21\u68C0\u67E5\u4FDD\u62A4\u72B6\u6001\u3002" }),
17361
- error && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "is-wide", role: "alert", children: error }),
17362
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("footer", { children: [
17363
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(false), children: "\u53D6\u6D88" }),
17364
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "submit", className: "is-primary", disabled: busy, children: busy ? "\u6E05\u7406\u4E2D\u2026" : "\u786E\u8BA4\u6E05\u7406" })
17877
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "is-wide", children: "\u53EA\u5220\u9664\u4EA4\u4ED8\u526F\u672C\uFF0C\u539F\u59CB\u6587\u4EF6\u4FDD\u6301\u4E0D\u53D8\u3002\u5386\u53F2\u4F1A\u8BDD\u548C\u770B\u677F\u4E2D\u7684\u5BF9\u5E94\u9644\u4EF6\u4E0B\u8F7D\u94FE\u63A5\u5C06\u5931\u6548\u3002\u6267\u884C\u65F6\u4F1A\u518D\u6B21\u68C0\u67E5\u4FDD\u62A4\u72B6\u6001\u3002" }),
17878
+ error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "is-wide", role: "alert", children: error }),
17879
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("footer", { children: [
17880
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(false), children: "\u53D6\u6D88" }),
17881
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "submit", className: "is-primary", disabled: busy, children: busy ? "\u6E05\u7406\u4E2D\u2026" : "\u786E\u8BA4\u6E05\u7406" })
17365
17882
  ] })
17366
17883
  ] }) })
17367
17884
  ] });
17368
17885
  }
17369
17886
 
17370
17887
  // src/ui/storage-settings.tsx
17371
- var import_jsx_runtime50 = require("react/jsx-runtime");
17888
+ var import_jsx_runtime53 = require("react/jsx-runtime");
17372
17889
  function GeneralSettingsPanel() {
17373
- const [version, setVersion] = (0, import_react54.useState)();
17374
- const [inspection, setInspection] = (0, import_react54.useState)();
17375
- const [busy, setBusy] = (0, import_react54.useState)(false), [confirm, setConfirm] = (0, import_react54.useState)(false);
17376
- const [error, setError] = (0, import_react54.useState)(""), [notice, setNotice] = (0, import_react54.useState)("");
17377
- const request = (0, import_react54.useRef)();
17378
- const mounted = (0, import_react54.useRef)(true);
17379
- const [reconnect, setReconnect] = (0, import_react54.useState)(false);
17380
- const [cleanupPending, setCleanupPending] = (0, import_react54.useState)(0);
17890
+ const [version, setVersion] = (0, import_react57.useState)();
17891
+ const [inspection, setInspection] = (0, import_react57.useState)();
17892
+ const [busy, setBusy] = (0, import_react57.useState)(false), [confirm, setConfirm] = (0, import_react57.useState)(false);
17893
+ const [error, setError] = (0, import_react57.useState)(""), [notice, setNotice] = (0, import_react57.useState)("");
17894
+ const request = (0, import_react57.useRef)();
17895
+ const mounted = (0, import_react57.useRef)(true);
17896
+ const [reconnect, setReconnect] = (0, import_react57.useState)(false);
17897
+ const [cleanupPending, setCleanupPending] = (0, import_react57.useState)(0);
17381
17898
  const cleanup = version === 1 && cleanupPending > 0;
17382
17899
  const recover = async (expected = pendingStorageRecovery()) => {
17383
17900
  request.current?.abort();
@@ -17408,7 +17925,7 @@ function GeneralSettingsPanel() {
17408
17925
  if (!controller.signal.aborted) setBusy(false);
17409
17926
  }
17410
17927
  };
17411
- (0, import_react54.useEffect)(() => {
17928
+ (0, import_react57.useEffect)(() => {
17412
17929
  mounted.current = true;
17413
17930
  void recover();
17414
17931
  return () => {
@@ -17445,17 +17962,17 @@ function GeneralSettingsPanel() {
17445
17962
  }
17446
17963
  if (mounted.current) await recover(expected);
17447
17964
  };
17448
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("section", { className: "dsh-partner-general-settings", "aria-busy": busy, children: [
17449
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h2", { children: "\u57FA\u672C\u8BBE\u7F6E" }),
17450
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AttachmentStoragePanel, {}),
17451
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(WorkspaceBlock, { className: "is-storage-migration", title: "\u5347\u7EA7\u8FC1\u79FB", detail: "\u624B\u52A8\u6574\u7406\u516C\u5171\u6570\u636E\u548C\u6BCF\u4F4D\u4F19\u4F34\u7684\u79C1\u6709\u76EE\u5F55\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6267\u884C\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", disabled: busy, onClick: () => void inspect(), children: busy ? "\u5904\u7406\u4E2D\u2026" : "\u68C0\u67E5\u8FC1\u79FB" }), children: [
17452
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { children: [
17965
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { className: "dsh-partner-general-settings", "aria-busy": busy, children: [
17966
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", { children: "\u57FA\u672C\u8BBE\u7F6E" }),
17967
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AttachmentStoragePanel, {}),
17968
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(WorkspaceBlock, { className: "is-storage-migration", title: "\u5347\u7EA7\u8FC1\u79FB", detail: "\u624B\u52A8\u6574\u7406\u516C\u5171\u6570\u636E\u548C\u6BCF\u4F4D\u4F19\u4F34\u7684\u79C1\u6709\u76EE\u5F55\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6267\u884C\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", disabled: busy, onClick: () => void inspect(), children: busy ? "\u5904\u7406\u4E2D\u2026" : "\u68C0\u67E5\u8FC1\u79FB" }), children: [
17969
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { children: [
17453
17970
  "\u6570\u636E\u5B58\u50A8\u7248\u672C\uFF1A",
17454
17971
  version === void 0 ? "\u6B63\u5728\u8BFB\u53D6\u2026" : `v${version}${version === 0 ? " \xB7 \u5F85\u8FC1\u79FB" : " \xB7 \u5DF2\u5347\u7EA7"}`
17455
17972
  ] }),
17456
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { children: "\u5347\u7EA7\u524D\u8BF7\u7ED3\u675F\u4F19\u4F34\u4F1A\u8BDD\u548C\u540E\u53F0\u6267\u884C\u3002\u5B8C\u6574\u5907\u4EFD\u5E76\u6821\u9A8C\u540E\u624D\u6E05\u7406\u5DF2\u8FC1\u79FB\u7684\u65E7\u8DEF\u5F84\uFF0C\u4E0D\u4FEE\u6539\u7528\u6237\u5DE5\u4F5C\u6587\u6863\uFF1B\u670D\u52A1\u91CD\u8F7D\u540E\u81EA\u52A8\u91CD\u65B0\u8FDE\u63A5\u3002" }),
17457
- inspection && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
17458
- inspection.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { children: [
17973
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "\u5347\u7EA7\u524D\u8BF7\u7ED3\u675F\u4F19\u4F34\u4F1A\u8BDD\u548C\u540E\u53F0\u6267\u884C\u3002\u5B8C\u6574\u5907\u4EFD\u5E76\u6821\u9A8C\u540E\u624D\u6E05\u7406\u5DF2\u8FC1\u79FB\u7684\u65E7\u8DEF\u5F84\uFF0C\u4E0D\u4FEE\u6539\u7528\u6237\u5DE5\u4F5C\u6587\u6863\uFF1B\u670D\u52A1\u91CD\u8F7D\u540E\u81EA\u52A8\u91CD\u65B0\u8FDE\u63A5\u3002" }),
17974
+ inspection && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
17975
+ inspection.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { children: [
17459
17976
  "v",
17460
17977
  step.from,
17461
17978
  " \u2192 v",
@@ -17463,79 +17980,79 @@ function GeneralSettingsPanel() {
17463
17980
  " \xB7 ",
17464
17981
  step.title
17465
17982
  ] }, step.id)),
17466
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("details", { children: [
17467
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("summary", { children: "\u67E5\u770B\u76EE\u5F55\u4E0E\u68C0\u67E5\u8BE6\u60C5" }),
17468
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "dsh-partner-migration-paths", children: inspection.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
17469
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("strong", { children: item.label }),
17470
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("code", { children: item.source }),
17471
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "\u8FC1\u79FB\u81F3" }),
17472
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("code", { children: item.target }),
17473
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("small", { children: item.exists ? `${item.files} \u4E2A\u6587\u4EF6 \xB7 ${(item.bytes / 1024 / 1024).toFixed(2)} MB` : "\u5F53\u524D\u65E0\u6587\u4EF6" })
17983
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("details", { children: [
17984
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("summary", { children: "\u67E5\u770B\u76EE\u5F55\u4E0E\u68C0\u67E5\u8BE6\u60C5" }),
17985
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "dsh-partner-migration-paths", children: inspection.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { children: [
17986
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("strong", { children: item.label }),
17987
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { children: item.source }),
17988
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: "\u8FC1\u79FB\u81F3" }),
17989
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { children: item.target }),
17990
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("small", { children: item.exists ? `${item.files} \u4E2A\u6587\u4EF6 \xB7 ${(item.bytes / 1024 / 1024).toFixed(2)} MB` : "\u5F53\u524D\u65E0\u6587\u4EF6" })
17474
17991
  ] }, i)) }),
17475
- inspection.notices.map((text4, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { children: text4 }, i))
17992
+ inspection.notices.map((text4, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: text4 }, i))
17476
17993
  ] }),
17477
- !!inspection.blockers.length && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { role: "alert", children: [
17478
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { children: "\u4EE5\u4E0B\u95EE\u9898\u9700\u8981\u5148\u5904\u7406\uFF1A" }),
17479
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { children: inspection.blockers.map((text4, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("li", { children: text4 }, i)) })
17994
+ !!inspection.blockers.length && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { role: "alert", children: [
17995
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "\u4EE5\u4E0B\u95EE\u9898\u9700\u8981\u5148\u5904\u7406\uFF1A" }),
17996
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { children: inspection.blockers.map((text4, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: text4 }, i)) })
17480
17997
  ] }),
17481
- inspection.migrationAvailable && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", className: "is-primary", disabled: busy, onClick: () => setConfirm(true), children: "\u5347\u7EA7\u8FC1\u79FB" })
17998
+ inspection.migrationAvailable && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", className: "is-primary", disabled: busy, onClick: () => setConfirm(true), children: "\u5347\u7EA7\u8FC1\u79FB" })
17482
17999
  ] }),
17483
- error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { role: "alert", children: error }),
17484
- notice && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { role: "status", children: notice }),
17485
- reconnect && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", disabled: busy, onClick: () => void recover(), children: "\u91CD\u65B0\u8FDE\u63A5" }),
17486
- cleanup && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(true), children: "\u91CD\u8BD5\u6E05\u7406\u65E7\u8DEF\u5F84" })
18000
+ error && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { role: "alert", children: error }),
18001
+ notice && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { role: "status", children: notice }),
18002
+ reconnect && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", disabled: busy, onClick: () => void recover(), children: "\u91CD\u65B0\u8FDE\u63A5" }),
18003
+ cleanup && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(true), children: "\u91CD\u8BD5\u6E05\u7406\u65E7\u8DEF\u5F84" })
17487
18004
  ] }),
17488
- confirm && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WorkspaceDialog, { title: cleanup ? "\u786E\u8BA4\u6E05\u7406\u65E7\u8DEF\u5F84" : "\u786E\u8BA4\u5347\u7EA7\u8FC1\u79FB", detail: cleanup ? "\u91CD\u65B0\u6838\u5BF9\u5B8C\u6574\u5907\u4EFD\uFF0C\u53EA\u6E05\u7406\u672A\u53D8\u5316\u7684\u65E7\u6587\u4EF6\uFF0C\u4E0D\u91CD\u65B0\u8FC1\u79FB\u6D3B\u52A8\u6570\u636E\u3002" : "\u516C\u5171\u6570\u636E\u4E0E\u6240\u6709\u4F19\u4F34\u79C1\u6709\u6570\u636E\u5C06\u4E00\u8D77\u8FC1\u79FB\uFF0C\u5168\u90E8\u6821\u9A8C\u540E\u624D\u5207\u6362\u76EE\u5F55\u7248\u672C\u3002", close: () => {
18005
+ confirm && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(WorkspaceDialog, { title: cleanup ? "\u786E\u8BA4\u6E05\u7406\u65E7\u8DEF\u5F84" : "\u786E\u8BA4\u5347\u7EA7\u8FC1\u79FB", detail: cleanup ? "\u91CD\u65B0\u6838\u5BF9\u5B8C\u6574\u5907\u4EFD\uFF0C\u53EA\u6E05\u7406\u672A\u53D8\u5316\u7684\u65E7\u6587\u4EF6\uFF0C\u4E0D\u91CD\u65B0\u8FC1\u79FB\u6D3B\u52A8\u6570\u636E\u3002" : "\u516C\u5171\u6570\u636E\u4E0E\u6240\u6709\u4F19\u4F34\u79C1\u6709\u6570\u636E\u5C06\u4E00\u8D77\u8FC1\u79FB\uFF0C\u5168\u90E8\u6821\u9A8C\u540E\u624D\u5207\u6362\u76EE\u5F55\u7248\u672C\u3002", close: () => {
17489
18006
  if (!busy) setConfirm(false);
17490
- }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("form", { className: "dsh-partner-feature-form", onSubmit: (event) => {
18007
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("form", { className: "dsh-partner-feature-form", onSubmit: (event) => {
17491
18008
  event.preventDefault();
17492
18009
  void migrate();
17493
18010
  }, children: [
17494
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "is-wide", children: "\u5148\u5B8C\u6574\u5907\u4EFD\uFF0C\u7248\u672C\u63D0\u4EA4\u540E\u6E05\u7406\u5DF2\u6838\u9A8C\u7684\u65E7\u8DEF\u5F84\uFF1B\u5386\u53F2\u8BB0\u5FC6\u5907\u4EFD\u4F1A\u539F\u6837\u5F52\u6863\u3002\u5907\u4EFD\u4E0D\u4F1A\u81EA\u52A8\u5220\u9664\u3002\u8FC1\u79FB\u671F\u95F4\u8BF7\u52FF\u7F16\u8F91\u6587\u4EF6\u3001\u4FEE\u6539\u63D2\u4EF6\u914D\u7F6E\u6216\u542F\u52A8\u5176\u4ED6\u5B9E\u4F8B\u3002" }),
17495
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "is-wide", children: "\u8D26\u53F7\u51ED\u636E\u548C\u5BBF\u4E3B\u4F1A\u8BDD\u4E0D\u642C\u52A8\u3002\u5347\u7EA7\u540E\u4E0D\u8981\u76F4\u63A5\u5B89\u88C5\u4E0D\u652F\u6301\u65B0\u7248\u5B58\u50A8\u7684\u65E7\u63D2\u4EF6\u3002" }),
17496
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("footer", { children: [
17497
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(false), children: "\u53D6\u6D88" }),
17498
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "submit", className: "is-primary", disabled: busy, children: busy ? "\u6B63\u5728\u5904\u7406\uFF0C\u8BF7\u52FF\u5173\u95ED\u2026" : cleanup ? "\u786E\u8BA4\u6E05\u7406\u5DF2\u5907\u4EFD\u7684\u65E7\u8DEF\u5F84" : "\u786E\u8BA4\u8FC1\u79FB\u76EE\u5F55\u548C\u6570\u636E" })
18011
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "is-wide", children: "\u5148\u5B8C\u6574\u5907\u4EFD\uFF0C\u7248\u672C\u63D0\u4EA4\u540E\u6E05\u7406\u5DF2\u6838\u9A8C\u7684\u65E7\u8DEF\u5F84\uFF1B\u5386\u53F2\u8BB0\u5FC6\u5907\u4EFD\u4F1A\u539F\u6837\u5F52\u6863\u3002\u5907\u4EFD\u4E0D\u4F1A\u81EA\u52A8\u5220\u9664\u3002\u8FC1\u79FB\u671F\u95F4\u8BF7\u52FF\u7F16\u8F91\u6587\u4EF6\u3001\u4FEE\u6539\u63D2\u4EF6\u914D\u7F6E\u6216\u542F\u52A8\u5176\u4ED6\u5B9E\u4F8B\u3002" }),
18012
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "is-wide", children: "\u8D26\u53F7\u51ED\u636E\u548C\u5BBF\u4E3B\u4F1A\u8BDD\u4E0D\u642C\u52A8\u3002\u5347\u7EA7\u540E\u4E0D\u8981\u76F4\u63A5\u5B89\u88C5\u4E0D\u652F\u6301\u65B0\u7248\u5B58\u50A8\u7684\u65E7\u63D2\u4EF6\u3002" }),
18013
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("footer", { children: [
18014
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirm(false), children: "\u53D6\u6D88" }),
18015
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "submit", className: "is-primary", disabled: busy, children: busy ? "\u6B63\u5728\u5904\u7406\uFF0C\u8BF7\u52FF\u5173\u95ED\u2026" : cleanup ? "\u786E\u8BA4\u6E05\u7406\u5DF2\u5907\u4EFD\u7684\u65E7\u8DEF\u5F84" : "\u786E\u8BA4\u8FC1\u79FB\u76EE\u5F55\u548C\u6570\u636E" })
17499
18016
  ] })
17500
18017
  ] }) })
17501
18018
  ] });
17502
18019
  }
17503
18020
 
17504
18021
  // src/ui/workspace-navigation.tsx
17505
- var import_jsx_runtime51 = require("react/jsx-runtime");
18022
+ var import_jsx_runtime54 = require("react/jsx-runtime");
17506
18023
  var workspaceGroups = [
17507
- { id: "features", label: "\u529F\u80FD", detail: "\u80FD\u529B\u3001\u534F\u4F5C\u4E0E\u8BA1\u5212", icon: import_dsh_client_ui_primitives24.IconBrowseOutlineRegular, pages: [
17508
- { id: "skills", label: "Skill \u5E02\u573A", icon: import_dsh_client_ui_primitives24.IconBrowseOutlineRegular },
17509
- { id: "mcp", label: "MCP \u670D\u52A1", icon: import_dsh_client_ui_primitives24.IconBrowseOutlineRegular },
17510
- { id: "board", label: "\u4EFB\u52A1\u770B\u677F", icon: import_dsh_client_ui_primitives24.IconListPenOutlineRegular },
17511
- { id: "schedules", label: "\u5B9A\u65F6\u4EFB\u52A1", icon: import_dsh_client_ui_primitives24.IconPlayOutlineRegular }
18024
+ { id: "features", label: "\u529F\u80FD", detail: "\u80FD\u529B\u3001\u534F\u4F5C\u4E0E\u8BA1\u5212", icon: import_dsh_client_ui_primitives25.IconBrowseOutlineRegular, pages: [
18025
+ { id: "skills", label: "Skill \u5E02\u573A", icon: import_dsh_client_ui_primitives25.IconBrowseOutlineRegular },
18026
+ { id: "mcp", label: "MCP \u670D\u52A1", icon: import_dsh_client_ui_primitives25.IconBrowseOutlineRegular },
18027
+ { id: "board", label: "\u4EFB\u52A1\u770B\u677F", icon: import_dsh_client_ui_primitives25.IconListPenOutlineRegular },
18028
+ { id: "schedules", label: "\u5B9A\u65F6\u4EFB\u52A1", icon: import_dsh_client_ui_primitives25.IconPlayOutlineRegular }
17512
18029
  ] },
17513
- { id: "settings", label: "\u8BBE\u7F6E", detail: "\u57FA\u672C\u8BBE\u7F6E\u4E0E\u5361\u7247\u5916\u89C2", icon: import_dsh_client_ui_primitives24.IconEditOutlineRegular, pages: [
17514
- { id: "general", label: "\u57FA\u672C\u8BBE\u7F6E", icon: import_dsh_client_ui_primitives24.IconEditOutlineRegular },
17515
- { id: "pendant", label: "\u5361\u7247\u8BBE\u7F6E", icon: import_dsh_client_ui_primitives24.IconEditOutlineRegular }
18030
+ { id: "settings", label: "\u8BBE\u7F6E", detail: "\u57FA\u672C\u8BBE\u7F6E\u4E0E\u5361\u7247\u5916\u89C2", icon: import_dsh_client_ui_primitives25.IconEditOutlineRegular, pages: [
18031
+ { id: "general", label: "\u57FA\u672C\u8BBE\u7F6E", icon: import_dsh_client_ui_primitives25.IconEditOutlineRegular },
18032
+ { id: "pendant", label: "\u5361\u7247\u8BBE\u7F6E", icon: import_dsh_client_ui_primitives25.IconEditOutlineRegular }
17516
18033
  ] }
17517
18034
  ];
17518
18035
  var workspaceGroup = (page) => workspaceGroups.find((group) => group.pages.some((item) => item.id === page));
17519
18036
  function WorkspaceGroupLinks({ view, open, compact = false }) {
17520
18037
  const active2 = workspaceGroup(view);
17521
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: workspaceGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("button", { type: "button", className: active2?.id === group.id ? "is-active" : "", "aria-current": active2?.id === group.id ? "page" : void 0, onClick: () => {
18038
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: workspaceGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("button", { type: "button", className: active2?.id === group.id ? "is-active" : "", "aria-current": active2?.id === group.id ? "page" : void 0, onClick: () => {
17522
18039
  if (active2?.id !== group.id) open(group.pages[0].id);
17523
18040
  }, children: [
17524
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(group.icon, { size: 16 }) }),
17525
- compact ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: group.label }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
17526
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("strong", { children: group.label }),
17527
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("small", { children: group.detail })
18041
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(group.icon, { size: 16 }) }),
18042
+ compact ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: group.label }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
18043
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: group.label }),
18044
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("small", { children: group.detail })
17528
18045
  ] })
17529
18046
  ] }, group.id)) });
17530
18047
  }
17531
18048
  function WorkspaceGroupTabs({ view, open }) {
17532
18049
  const group = workspaceGroup(view);
17533
18050
  if (!group) return null;
17534
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("nav", { className: "dsh-partner-tabs dsh-partner-group-tabs", "aria-label": `${group.label}\u6807\u7B7E\u9875`, children: group.pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabButton, { active: view === page.id, onClick: () => open(page.id), icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(page.icon, { size: 16 }), children: page.label }, page.id)) });
18051
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("nav", { className: "dsh-partner-tabs dsh-partner-group-tabs", "aria-label": `${group.label}\u6807\u7B7E\u9875`, children: group.pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TabButton, { active: view === page.id, onClick: () => open(page.id), icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(page.icon, { size: 16 }), children: page.label }, page.id)) });
17535
18052
  }
17536
18053
 
17537
18054
  // src/client.tsx
17538
- var import_jsx_runtime52 = require("react/jsx-runtime");
18055
+ var import_jsx_runtime55 = require("react/jsx-runtime");
17539
18056
  var PLUGIN_ID = "@lemoncat7/dsh-partner";
17540
18057
  var STYLE_ID = `${PLUGIN_ID}/client`;
17541
18058
  var cssText = `${client_default}
@@ -17548,32 +18065,34 @@ ${settings_panel_default}
17548
18065
  ${memory_ui_default}
17549
18066
  ${identity_editor_default}
17550
18067
  ${form_surface_default}
17551
- ${mcp_default}`;
18068
+ ${mcp_default}
18069
+ ${interaction_theme_default}
18070
+ ${control_surfaces_default}`;
17552
18071
  var WORKSPACE_PAGES = /* @__PURE__ */ new Set(["skills", "mcp", "board", "schedules", "pendant", "general"]);
17553
18072
  var inject = ["slots", "layout", "sessions", "uiWorkspace"];
17554
18073
  function apply(ctx) {
17555
18074
  registerDecisionCards(ctx);
17556
18075
  ctx.effect(installStyles, "dsh-partner: styles");
17557
- const controller = createPartnerController(ctx, PLUGIN_ID, (props, current2) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PartnerWorkspace, { ...props, controller: current2 }));
18076
+ const controller = createPartnerController(ctx, PLUGIN_ID, (props, current2) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PartnerWorkspace, { ...props, controller: current2 }));
17558
18077
  if (pendingStorageRecovery() !== void 0) controller.open(void 0, { page: "general" });
17559
- ctx.slots.inject("shell.overlay", () => ctx.slots.register({ name: "shell.overlay", id: "partner-pendant", order: 30 }, () => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PartnerPendant, { controller })));
18078
+ ctx.slots.inject("shell.overlay", () => ctx.slots.register({ name: "shell.overlay", id: "partner-pendant", order: 30 }, () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PartnerPendant, { controller })));
17560
18079
  ctx.effect(() => observePluginWorkspace(PLUGIN_ID, controller.close), "dsh-partner: exclusive workspace");
17561
18080
  ctx.effect(() => () => controller.close(), "dsh-partner: workspace lifecycle");
17562
18081
  ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
17563
18082
  name: "sidebar.footer.action",
17564
18083
  id: "partner",
17565
18084
  order: -120
17566
- }, (props) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PartnerSidebar, { ...props, controller, collapse: () => ctx.layout.toggleSidebar() })));
18085
+ }, (props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PartnerSidebar, { ...props, controller, collapse: () => ctx.layout.toggleSidebar() })));
17567
18086
  }
17568
18087
  function PartnerSidebar(props) {
17569
- const ref = (0, import_react55.useRef)(null);
18088
+ const ref = (0, import_react58.useRef)(null);
17570
18089
  useWorkspaceTopAnchor(ref);
17571
- const [open, setOpen] = (0, import_react55.useState)(true);
17572
- const [snapshot, setSnapshot] = (0, import_react55.useState)(cachedPartner);
18090
+ const [open, setOpen] = (0, import_react58.useState)(true);
18091
+ const [snapshot, setSnapshot] = (0, import_react58.useState)(cachedPartner);
17573
18092
  useChannelStatus(setSnapshot);
17574
- const [, update] = (0, import_react55.useState)(0);
17575
- (0, import_react55.useEffect)(() => props.controller.subscribe(() => update((value) => value + 1)), [props.controller]);
17576
- (0, import_react55.useEffect)(() => {
18093
+ const [, update] = (0, import_react58.useState)(0);
18094
+ (0, import_react58.useEffect)(() => props.controller.subscribe(() => update((value) => value + 1)), [props.controller]);
18095
+ (0, import_react58.useEffect)(() => {
17577
18096
  void loadPartner().then(setSnapshot).catch(() => {
17578
18097
  });
17579
18098
  }, [props.controller.isOpen()]);
@@ -17581,35 +18100,35 @@ function PartnerSidebar(props) {
17581
18100
  props.controller.open(id);
17582
18101
  if (props.wide && window.matchMedia("(max-width: 820px)").matches) props.collapse();
17583
18102
  };
17584
- if (!props.wide) return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("section", { ref, className: "dsh-partner-sidebar is-rail", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", className: `dsh-partner-rail${props.controller.isOpen() ? " is-active" : ""}`, title: "\u4F19\u4F34", onClick: () => props.controller.toggle(), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 18 }) }) });
17585
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { ref, className: "dsh-partner-sidebar", children: [
17586
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-sidebar-heading", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { type: "button", className: "dsh-partner-sidebar-title", "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [
17587
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { "data-open": open, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconChevronDownOutlineRegular, { size: 14 }) }),
18103
+ if (!props.wide) return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("section", { ref, className: "dsh-partner-sidebar is-rail", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", className: `dsh-partner-rail${props.controller.isOpen() ? " is-active" : ""}`, title: "\u4F19\u4F34", onClick: () => props.controller.toggle(), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 18 }) }) });
18104
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { ref, className: "dsh-partner-sidebar", children: [
18105
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-sidebar-heading", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", className: "dsh-partner-sidebar-title", "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [
18106
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { "data-open": open, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconChevronDownOutlineRegular, { size: 14 }) }),
17588
18107
  "\u4F19\u4F34"
17589
18108
  ] }) }),
17590
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `dsh-partner-sidebar-list${open ? " is-open" : ""}`, "aria-hidden": !open, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-sidebar-list-inner", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { type: "button", tabIndex: open ? 0 : -1, className: `dsh-partner-sidebar-row${props.controller.isOpen() ? " is-active" : ""}`, onClick: () => launch(), children: [
17591
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "dsh-partner-sidebar-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 16 }) }),
17592
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17593
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "\u4F19\u4F34\u9762\u677F" }),
17594
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: snapshot ? `${snapshot.companions.length} \u4F4D\u4F19\u4F34 \xB7 ${snapshot.channels.filter((item) => item.runtimeStatus === "running").length} \u4E2A\u6E20\u9053\u5728\u7EBF` : "\u8EAB\u4EFD\u3001\u80FD\u529B\u4E0E\u6E20\u9053" })
18109
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: `dsh-partner-sidebar-list${open ? " is-open" : ""}`, "aria-hidden": !open, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-sidebar-list-inner", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", tabIndex: open ? 0 : -1, className: `dsh-partner-sidebar-row${props.controller.isOpen() ? " is-active" : ""}`, onClick: () => launch(), children: [
18110
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "dsh-partner-sidebar-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 16 }) }),
18111
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18112
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: "\u4F19\u4F34\u9762\u677F" }),
18113
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: snapshot ? `${snapshot.companions.length} \u4F4D\u4F19\u4F34 \xB7 ${snapshot.channels.filter((item) => item.runtimeStatus === "running").length} \u4E2A\u6E20\u9053\u5728\u7EBF` : "\u8EAB\u4EFD\u3001\u80FD\u529B\u4E0E\u6E20\u9053" })
17595
18114
  ] }),
17596
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("i", { className: snapshot?.channels.some((item) => item.runtimeStatus === "running") ? "is-online" : "" })
18115
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("i", { className: snapshot?.channels.some((item) => item.runtimeStatus === "running") ? "is-online" : "" })
17597
18116
  ] }) }) })
17598
18117
  ] });
17599
18118
  }
17600
18119
  function PartnerWorkspace({ controller }) {
17601
- const [snapshot, setSnapshot] = (0, import_react55.useState)(cachedPartner);
18120
+ const [snapshot, setSnapshot] = (0, import_react58.useState)(cachedPartner);
17602
18121
  useChannelStatus(setSnapshot);
17603
- const [selectedId, setSelectedId] = (0, import_react55.useState)(() => controller.selected() ?? cachedPartner()?.companions[0]?.id);
17604
- const [view, setView] = (0, import_react55.useState)(controller.destination()?.page ?? "home");
17605
- const [requestedDestination, setRequestedDestination] = (0, import_react55.useState)(controller.destination());
17606
- const [error, setError] = (0, import_react55.useState)();
17607
- const [loading, setLoading] = (0, import_react55.useState)(() => !cachedPartner());
17608
- const [creatingCompanion, setCreatingCompanion] = (0, import_react55.useState)(false);
17609
- const [notice, setNotice] = (0, import_react55.useState)();
17610
- const selectionRef = (0, import_react55.useRef)({ selectedId, companions: snapshot?.companions });
18122
+ const [selectedId, setSelectedId] = (0, import_react58.useState)(() => controller.selected() ?? cachedPartner()?.companions[0]?.id);
18123
+ const [view, setView] = (0, import_react58.useState)(controller.destination()?.page ?? "home");
18124
+ const [requestedDestination, setRequestedDestination] = (0, import_react58.useState)(controller.destination());
18125
+ const [error, setError] = (0, import_react58.useState)();
18126
+ const [loading, setLoading] = (0, import_react58.useState)(() => !cachedPartner());
18127
+ const [creatingCompanion, setCreatingCompanion] = (0, import_react58.useState)(false);
18128
+ const [notice, setNotice] = (0, import_react58.useState)();
18129
+ const selectionRef = (0, import_react58.useRef)({ selectedId, companions: snapshot?.companions });
17611
18130
  selectionRef.current = { selectedId, companions: snapshot?.companions };
17612
- const refresh = (0, import_react55.useCallback)(async (throwOnError = false) => {
18131
+ const refresh = (0, import_react58.useCallback)(async (throwOnError = false) => {
17613
18132
  try {
17614
18133
  const next = await loadPartner();
17615
18134
  setSnapshot(next);
@@ -17622,10 +18141,10 @@ function PartnerWorkspace({ controller }) {
17622
18141
  setLoading(false);
17623
18142
  }
17624
18143
  }, []);
17625
- (0, import_react55.useEffect)(() => {
18144
+ (0, import_react58.useEffect)(() => {
17626
18145
  void refresh();
17627
18146
  }, [refresh]);
17628
- (0, import_react55.useEffect)(() => controller.subscribe(() => {
18147
+ (0, import_react58.useEffect)(() => controller.subscribe(() => {
17629
18148
  const next = controller.selected();
17630
18149
  if (next) setSelectedId(next);
17631
18150
  const destination = controller.destination();
@@ -17694,18 +18213,18 @@ function PartnerWorkspace({ controller }) {
17694
18213
  setSelectedId(id);
17695
18214
  setView("home");
17696
18215
  };
17697
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("main", { className: "dsh-partner-workspace", children: [
17698
- creatingCompanion && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CompanionCreateDialog, { close: () => setCreatingCompanion(false), create }),
17699
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { className: "dsh-partner-topbar", children: [
17700
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-topbar-brand", children: [
17701
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", "data-xiaohei-workspace-close": true, onClick: controller.close, "aria-label": "\u8FD4\u56DE\u4F1A\u8BDD", title: "\u8FD4\u56DE\u4F1A\u8BDD", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconChevronLeftOutlineRegular, { size: 15 }) }),
17702
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 18 }),
17703
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17704
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "\u4F19\u4F34" }),
17705
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u957F\u671F\u8EAB\u4EFD\u4E0E\u6D88\u606F\u6E20\u9053" })
18216
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("main", { className: "dsh-partner-workspace", children: [
18217
+ creatingCompanion && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CompanionCreateDialog, { close: () => setCreatingCompanion(false), create }),
18218
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { className: "dsh-partner-topbar", children: [
18219
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-topbar-brand", children: [
18220
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", "data-xiaohei-workspace-close": true, onClick: controller.close, "aria-label": "\u8FD4\u56DE\u4F1A\u8BDD", title: "\u8FD4\u56DE\u4F1A\u8BDD", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconChevronLeftOutlineRegular, { size: 15 }) }),
18221
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 18 }),
18222
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18223
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: "\u4F19\u4F34" }),
18224
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u957F\u671F\u8EAB\u4EFD\u4E0E\u6D88\u606F\u6E20\u9053" })
17706
18225
  ] })
17707
18226
  ] }),
17708
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
18227
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
17709
18228
  MobileWorkspaceControls,
17710
18229
  {
17711
18230
  companions: snapshot?.companions ?? [],
@@ -17717,90 +18236,90 @@ function PartnerWorkspace({ controller }) {
17717
18236
  }
17718
18237
  )
17719
18238
  ] }),
17720
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-grid", children: [
17721
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("aside", { className: "dsh-partner-roster", children: [
17722
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-roster-title", children: [
17723
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17724
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "COMPANIONS" }),
17725
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "\u4F19\u4F34\u540D\u518C" })
18239
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-grid", children: [
18240
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("aside", { className: "dsh-partner-roster", children: [
18241
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-roster-title", children: [
18242
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18243
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "COMPANIONS" }),
18244
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: "\u4F19\u4F34\u540D\u518C" })
17726
18245
  ] }),
17727
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", onClick: () => setCreatingCompanion(true), "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconPlusOutlineRegular, { size: 16 }) })
18246
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", onClick: () => setCreatingCompanion(true), "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconPlusOutlineRegular, { size: 16 }) })
17728
18247
  ] }),
17729
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-roster-list", children: snapshot?.companions.map((companion) => {
18248
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-roster-list", children: snapshot?.companions.map((companion) => {
17730
18249
  const channel = snapshot.channels.find((item) => item.companionId === companion.id);
17731
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { type: "button", className: !workspacePage && selectedId === companion.id ? "is-active" : "", onClick: () => openCompanion(companion.id), children: [
17732
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Avatar, { name: companion.name }),
17733
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17734
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: companion.name }),
17735
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: companion.role })
18250
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", className: !workspacePage && selectedId === companion.id ? "is-active" : "", onClick: () => openCompanion(companion.id), children: [
18251
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Avatar, { name: companion.name }),
18252
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18253
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: companion.name }),
18254
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: companion.role })
17736
18255
  ] }),
17737
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("i", { className: channel?.runtimeStatus === "running" ? "is-online" : "", title: channel ? channel.runtimeStatus : "\u672A\u8FDE\u63A5\u6E20\u9053" })
18256
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("i", { className: channel?.runtimeStatus === "running" ? "is-online" : "", title: channel ? channel.runtimeStatus : "\u672A\u8FDE\u63A5\u6E20\u9053" })
17738
18257
  ] }, companion.id);
17739
18258
  }) }),
17740
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("nav", { className: "dsh-partner-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WorkspaceGroupLinks, { view, open: setView }) }),
17741
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-roster-note", children: [
17742
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconLinkOutlineRegular, { size: 16 }),
17743
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17744
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "\u8EAB\u4EFD\u4E0E\u6E20\u9053\u5206\u79BB" }),
17745
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u6E20\u9053\u53EA\u8D1F\u8D23\u6536\u53D1\uFF0C\u6743\u9650\u4ECD\u7531 DSH \u5DE5\u5177\u51B3\u5B9A\u3002" })
18259
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("nav", { className: "dsh-partner-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WorkspaceGroupLinks, { view, open: setView }) }),
18260
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-roster-note", children: [
18261
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconLinkOutlineRegular, { size: 16 }),
18262
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18263
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: "\u8EAB\u4EFD\u4E0E\u6E20\u9053\u5206\u79BB" }),
18264
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u6E20\u9053\u53EA\u8D1F\u8D23\u6536\u53D1\uFF0C\u6743\u9650\u4ECD\u7531 DSH \u5DE5\u5177\u51B3\u5B9A\u3002" })
17746
18265
  ] })
17747
18266
  ] })
17748
18267
  ] }),
17749
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: `dsh-partner-stage${workspacePage ? " is-workspace-page" : ""}`, children: [
17750
- loading ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ContentState, { title: "\u6B63\u5728\u8BFB\u53D6\u4F19\u4F34\u2026" }) : workspacePage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
17751
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-group-heading", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { children: workspaceGroup(view)?.label }) }),
17752
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WorkspaceGroupTabs, { view, open: setView }),
17753
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-stage-scroll is-workspace-page", children: [
17754
- view === "skills" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SkillsPanel, {}),
17755
- view === "mcp" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(McpPanel, {}),
17756
- view === "board" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RequirementBoard, { initialTaskId: requestedDestination?.taskId, openRequest: requestedDestination }),
17757
- view === "schedules" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SchedulePanel, { companions: snapshot?.companions ?? [] }),
17758
- view === "pendant" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PendantSettingsPanel, {}),
17759
- view === "general" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(GeneralSettingsPanel, {})
18268
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: `dsh-partner-stage${workspacePage ? " is-workspace-page" : ""}`, children: [
18269
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ContentState, { title: "\u6B63\u5728\u8BFB\u53D6\u4F19\u4F34\u2026" }) : workspacePage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18270
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-group-heading", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h1", { children: workspaceGroup(view)?.label }) }),
18271
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WorkspaceGroupTabs, { view, open: setView }),
18272
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-stage-scroll is-workspace-page", children: [
18273
+ view === "skills" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SkillsPanel, {}),
18274
+ view === "mcp" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(McpPanel, {}),
18275
+ view === "board" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(RequirementBoard, { initialTaskId: requestedDestination?.taskId, openRequest: requestedDestination }),
18276
+ view === "schedules" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SchedulePanel, { companions: snapshot?.companions ?? [] }),
18277
+ view === "pendant" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PendantSettingsPanel, {}),
18278
+ view === "general" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GeneralSettingsPanel, {})
17760
18279
  ] })
17761
- ] }) : selected === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ContentState, { title: "\u521B\u5EFA\u7B2C\u4E00\u4E2A\u4F19\u4F34", detail: "\u4F19\u4F34\u4F1A\u4FDD\u5B58\u72EC\u7ACB\u8EAB\u4EFD\u3001\u80FD\u529B\u548C\u5FAE\u4FE1\u4F1A\u8BDD\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { onClick: () => setCreatingCompanion(true), children: "\u65B0\u5EFA\u4F19\u4F34" }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
17762
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-identity", children: [
17763
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Avatar, { name: selected.name }),
17764
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17765
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "ACTIVE COMPANION" }),
17766
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { children: selected.name }),
17767
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: selected.description || selected.role })
18280
+ ] }) : selected === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ContentState, { title: "\u521B\u5EFA\u7B2C\u4E00\u4E2A\u4F19\u4F34", detail: "\u4F19\u4F34\u4F1A\u4FDD\u5B58\u72EC\u7ACB\u8EAB\u4EFD\u3001\u80FD\u529B\u548C\u5FAE\u4FE1\u4F1A\u8BDD\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { onClick: () => setCreatingCompanion(true), children: "\u65B0\u5EFA\u4F19\u4F34" }) }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18281
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-identity", children: [
18282
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Avatar, { name: selected.name }),
18283
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18284
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "ACTIVE COMPANION" }),
18285
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h1", { children: selected.name }),
18286
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: selected.description || selected.role })
17768
18287
  ] }),
17769
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChannelStatus, { channel: snapshot?.channels.find((item) => item.companionId === selected.id) })
18288
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChannelStatus, { channel: snapshot?.channels.find((item) => item.companionId === selected.id) })
17770
18289
  ] }),
17771
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("nav", { className: "dsh-partner-tabs", "aria-label": "\u4F19\u4F34\u914D\u7F6E", children: [
17772
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "home", onClick: () => setView("home"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 16 }), children: "\u603B\u89C8" }),
17773
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "identity", onClick: () => setView("identity"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconEditOutlineRegular, { size: 16 }), children: "\u8EAB\u4EFD" }),
17774
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "capabilities", onClick: () => setView("capabilities"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 16 }), children: "\u80FD\u529B" }),
17775
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "weixin", onClick: () => setView("weixin"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconLinkOutlineRegular, { size: 16 }), children: "\u6E20\u9053" }),
17776
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "memory", onClick: () => setView("memory"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconDataOutlineRegular, { size: 16 }), children: "\u8BB0\u5FC6" }),
17777
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabButton, { active: view === "concerns", onClick: () => setView("concerns"), icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconBrowseOutlineRegular, { size: 16 }), children: "\u6301\u7EED\u5173\u6CE8" })
18290
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("nav", { className: "dsh-partner-tabs", "aria-label": "\u4F19\u4F34\u914D\u7F6E", children: [
18291
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "home", onClick: () => setView("home"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 16 }), children: "\u603B\u89C8" }),
18292
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "identity", onClick: () => setView("identity"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconEditOutlineRegular, { size: 16 }), children: "\u8EAB\u4EFD" }),
18293
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "capabilities", onClick: () => setView("capabilities"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 16 }), children: "\u80FD\u529B" }),
18294
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "weixin", onClick: () => setView("weixin"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconLinkOutlineRegular, { size: 16 }), children: "\u6E20\u9053" }),
18295
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "memory", onClick: () => setView("memory"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconDataOutlineRegular, { size: 16 }), children: "\u8BB0\u5FC6" }),
18296
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabButton, { active: view === "concerns", onClick: () => setView("concerns"), icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconBrowseOutlineRegular, { size: 16 }), children: "\u6301\u7EED\u5173\u6CE8" })
17778
18297
  ] }),
17779
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-stage-scroll", children: [
17780
- notice && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "dsh-partner-inline-notice", role: "status", children: notice }),
17781
- view === "home" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
17782
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CompanionDeletion, { companion: selected, count: snapshot?.companions.length ?? 1, channelCount: snapshot.channels.filter((channel) => channel.companionId === selected.id).length, onRemoved: companionRemoved }, selected.id),
17783
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(HomePanel, { companion: selected, snapshot, navigate: setView, openSession, startSession, renewSession })
18298
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-stage-scroll", children: [
18299
+ notice && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "dsh-partner-inline-notice", role: "status", children: notice }),
18300
+ view === "home" && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18301
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CompanionDeletion, { companion: selected, count: snapshot?.companions.length ?? 1, channelCount: snapshot.channels.filter((channel) => channel.companionId === selected.id).length, onRemoved: companionRemoved }, selected.id),
18302
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(HomePanel, { companion: selected, snapshot, navigate: setView, openSession, startSession, renewSession })
17784
18303
  ] }),
17785
- view === "identity" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(IdentityEditor, { companion: selected, onChanged: () => refresh(true) }),
17786
- view === "capabilities" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CapabilityEditor, { companion: selected, presets: snapshot?.presets ?? [], onChanged: () => refresh(true) }, selected.id),
17787
- view === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChannelsPanel, { companion: selected, snapshot, onChanged: refresh, weixin: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinPanel, { companion: selected, snapshot, onChanged: refresh }) }, selected.id),
17788
- view === "memory" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MemoryPanel, { companion: selected, snapshot, openSession, startSession, renewSession, onChanged: refresh }, selected.id),
17789
- view === "concerns" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ConcernPanel, { companion: selected, snapshot, onChanged: refresh }, selected.id)
18304
+ view === "identity" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(IdentityEditor, { companion: selected, onChanged: () => refresh(true) }),
18305
+ view === "capabilities" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CapabilityEditor, { companion: selected, presets: snapshot?.presets ?? [], onChanged: () => refresh(true) }, selected.id),
18306
+ view === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChannelsPanel, { companion: selected, snapshot, onChanged: refresh, weixin: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinPanel, { companion: selected, snapshot, onChanged: refresh }) }, selected.id),
18307
+ view === "memory" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MemoryPanel, { companion: selected, snapshot, openSession, startSession, renewSession, onChanged: refresh }, selected.id),
18308
+ view === "concerns" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ConcernPanel, { companion: selected, snapshot, onChanged: refresh }, selected.id)
17790
18309
  ] })
17791
18310
  ] }),
17792
- error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "dsh-partner-error", role: "alert", children: error })
18311
+ error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "dsh-partner-error", role: "alert", children: error })
17793
18312
  ] })
17794
18313
  ] })
17795
18314
  ] });
17796
18315
  }
17797
18316
  function MobileWorkspaceControls({ companions, selectedId, view, openCompanion, openPage, createCompanion }) {
17798
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-mobile-controls", children: [
17799
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-mobile-companion-row", children: [
17800
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CompanionPicker, { companions, selectedId, onChange: openCompanion }),
17801
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", className: "dsh-partner-mobile-create", onClick: createCompanion, "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconPlusOutlineRegular, { size: 17 }) })
18317
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-mobile-controls", children: [
18318
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-mobile-companion-row", children: [
18319
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CompanionPicker, { companions, selectedId, onChange: openCompanion }),
18320
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", className: "dsh-partner-mobile-create", onClick: createCompanion, "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconPlusOutlineRegular, { size: 17 }) })
17802
18321
  ] }),
17803
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("nav", { className: "dsh-partner-mobile-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A\u5FEB\u6377\u5165\u53E3", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WorkspaceGroupLinks, { view, open: openPage, compact: true }) })
18322
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("nav", { className: "dsh-partner-mobile-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A\u5FEB\u6377\u5165\u53E3", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WorkspaceGroupLinks, { view, open: openPage, compact: true }) })
17804
18323
  ] });
17805
18324
  }
17806
18325
  function HomePanel({ companion, snapshot, navigate, openSession, startSession, renewSession }) {
@@ -17811,91 +18330,91 @@ function HomePanel({ companion, snapshot, navigate, openSession, startSession, r
17811
18330
  const approved = channel ? snapshot.pairings.filter((item) => item.channelId === channel.id && item.status === "approved").length : 0;
17812
18331
  const capabilities = companion.capabilities.map((item) => CAPABILITY_LABELS[item]);
17813
18332
  const online = channel?.runtimeStatus === "running";
17814
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-home", children: [
17815
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { className: "dsh-partner-home-heading", children: [
17816
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17817
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u5DE5\u4F5C\u53F0" }),
17818
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { children: online ? `${companion.name} \u6B63\u5728\u6E20\u9053\u5F85\u547D` : `${companion.name} \u5DF2\u51C6\u5907\u5C31\u7EEA` })
18333
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-home", children: [
18334
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { className: "dsh-partner-home-heading", children: [
18335
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18336
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u5DE5\u4F5C\u53F0" }),
18337
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h2", { children: online ? `${companion.name} \u6B63\u5728\u6E20\u9053\u5F85\u547D` : `${companion.name} \u5DF2\u51C6\u5907\u5C31\u7EEA` })
17819
18338
  ] }),
17820
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: online ? "\u6D88\u606F\u3001\u6388\u6743\u4E0E\u4E0A\u4E0B\u6587\u8FB9\u754C\u90FD\u5728\u8FD9\u91CC\u6C47\u603B\u3002" : "\u4F19\u4F34\u8EAB\u4EFD\u3001\u4F1A\u8BDD\u4E0E\u80FD\u529B\u5DF2\u7ECF\u51C6\u5907\u5B8C\u6210\u3002" })
18339
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: online ? "\u6D88\u606F\u3001\u6388\u6743\u4E0E\u4E0A\u4E0B\u6587\u8FB9\u754C\u90FD\u5728\u8FD9\u91CC\u6C47\u603B\u3002" : "\u4F19\u4F34\u8EAB\u4EFD\u3001\u4F1A\u8BDD\u4E0E\u80FD\u529B\u5DF2\u7ECF\u51C6\u5907\u5B8C\u6210\u3002" })
17821
18340
  ] }),
17822
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: `dsh-partner-home-channel${online ? " is-online" : ""}`, children: [
17823
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-home-route", "aria-hidden": "true", children: [
17824
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Avatar, { name: companion.name }),
17825
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "dsh-partner-route-line", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("i", {}) }),
17826
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "dsh-partner-route-weixin", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinGlyph, { large: true }) })
18341
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: `dsh-partner-home-channel${online ? " is-online" : ""}`, children: [
18342
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-home-route", "aria-hidden": "true", children: [
18343
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Avatar, { name: companion.name }),
18344
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "dsh-partner-route-line", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("i", {}) }),
18345
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "dsh-partner-route-weixin", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinGlyph, { large: true }) })
17827
18346
  ] }),
17828
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-home-channel-copy", children: [
17829
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "dsh-partner-home-kicker", children: [
17830
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("i", {}),
18347
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-home-channel-copy", children: [
18348
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "dsh-partner-home-kicker", children: [
18349
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("i", {}),
17831
18350
  "\u6D88\u606F\u6E20\u9053 \xB7 ",
17832
18351
  channel?.platform === "matrix" ? "Matrix" : channel?.platform === "mattermost" ? "Mattermost" : "\u5FAE\u4FE1"
17833
18352
  ] }),
17834
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { children: !channel ? "\u7B49\u5F85\u626B\u7801\u8FDE\u63A5" : online ? "\u8FDE\u63A5\u6B63\u5E38\uFF0C\u6B63\u5728\u63A5\u6536\u6D88\u606F" : channel.runtimeStatus === "error" ? "\u6E20\u9053\u8FDE\u63A5\u9700\u8981\u5904\u7406" : "\u6E20\u9053\u5F53\u524D\u5DF2\u505C\u7528" }),
17835
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: !channel ? "\u8FDE\u63A5\u5FAE\u4FE1\u3001Matrix \u6216 Mattermost\uFF0C\u8054\u7CFB\u4EBA\u9996\u6B21\u53D1\u6D88\u606F\u9700\u6279\u51C6\u3002" : online ? "\u672C\u5730\u4E0E\u6240\u6709\u5DF2\u6388\u6743\u6E20\u9053\u5171\u7528\u4F19\u4F34\u4E3B\u5BF9\u8BDD\uFF0C\u56DE\u590D\u8FD4\u56DE\u6D88\u606F\u6765\u6E90\u3002" : channel.lastError || "\u6E20\u9053\u914D\u7F6E\u4ECD\u7136\u4FDD\u7559\uFF0C\u53EF\u4EE5\u968F\u65F6\u91CD\u65B0\u542F\u7528\u3002" }),
17836
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-home-channel-actions", children: [
17837
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", className: "is-primary", onClick: () => navigate("weixin"), children: !channel ? "\u8FDE\u63A5\u5FAE\u4FE1" : pending > 0 ? `\u5904\u7406 ${pending} \u4E2A\u8BF7\u6C42` : "\u7BA1\u7406\u6E20\u9053" }),
17838
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: !channel ? "\u9009\u62E9\u6E20\u9053\u5E76\u8FDE\u63A5\u8D26\u53F7" : `${approved} \u4F4D\u8054\u7CFB\u4EBA \xB7 \u5171\u7528\u4E3B\u5BF9\u8BDD` })
18353
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h3", { children: !channel ? "\u7B49\u5F85\u626B\u7801\u8FDE\u63A5" : online ? "\u8FDE\u63A5\u6B63\u5E38\uFF0C\u6B63\u5728\u63A5\u6536\u6D88\u606F" : channel.runtimeStatus === "error" ? "\u6E20\u9053\u8FDE\u63A5\u9700\u8981\u5904\u7406" : "\u6E20\u9053\u5F53\u524D\u5DF2\u505C\u7528" }),
18354
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: !channel ? "\u8FDE\u63A5\u5FAE\u4FE1\u3001Matrix \u6216 Mattermost\uFF0C\u8054\u7CFB\u4EBA\u9996\u6B21\u53D1\u6D88\u606F\u9700\u6279\u51C6\u3002" : online ? "\u672C\u5730\u4E0E\u6240\u6709\u5DF2\u6388\u6743\u6E20\u9053\u5171\u7528\u4F19\u4F34\u4E3B\u5BF9\u8BDD\uFF0C\u56DE\u590D\u8FD4\u56DE\u6D88\u606F\u6765\u6E90\u3002" : channel.lastError || "\u6E20\u9053\u914D\u7F6E\u4ECD\u7136\u4FDD\u7559\uFF0C\u53EF\u4EE5\u968F\u65F6\u91CD\u65B0\u542F\u7528\u3002" }),
18355
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-home-channel-actions", children: [
18356
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", className: "is-primary", onClick: () => navigate("weixin"), children: !channel ? "\u8FDE\u63A5\u5FAE\u4FE1" : pending > 0 ? `\u5904\u7406 ${pending} \u4E2A\u8BF7\u6C42` : "\u7BA1\u7406\u6E20\u9053" }),
18357
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: !channel ? "\u9009\u62E9\u6E20\u9053\u5E76\u8FDE\u63A5\u8D26\u53F7" : `${approved} \u4F4D\u8054\u7CFB\u4EBA \xB7 \u5171\u7528\u4E3B\u5BF9\u8BDD` })
17839
18358
  ] })
17840
18359
  ] })
17841
18360
  ] }),
17842
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-home-details", children: [
17843
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "dsh-partner-home-profile", children: [
17844
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { children: [
17845
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconUserOutlineRegular, { size: 16 }) }),
17846
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
17847
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u4F19\u4F34\u5E95\u7A3F" }),
17848
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: companion.role })
18361
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-home-details", children: [
18362
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "dsh-partner-home-profile", children: [
18363
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { children: [
18364
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconUserOutlineRegular, { size: 16 }) }),
18365
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
18366
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u4F19\u4F34\u5E95\u7A3F" }),
18367
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: companion.role })
17849
18368
  ] }),
17850
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", onClick: () => navigate("identity"), children: "\u7F16\u8F91" })
18369
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", onClick: () => navigate("identity"), children: "\u7F16\u8F91" })
17851
18370
  ] }),
17852
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("blockquote", { children: companion.instructions || companion.description || "\u5C1A\u672A\u8BBE\u7F6E\u957F\u671F\u884C\u4E3A\u51C6\u5219\u3002" })
18371
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("blockquote", { children: companion.instructions || companion.description || "\u5C1A\u672A\u8BBE\u7F6E\u957F\u671F\u884C\u4E3A\u51C6\u5219\u3002" })
17853
18372
  ] }),
17854
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "dsh-partner-home-runtime", children: [
17855
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { children: [
17856
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconAgentPresetOutlineRegular, { size: 16 }) }),
17857
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
17858
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u8FD0\u884C\u80FD\u529B" }),
17859
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: companion.presetId || "DSH \u9ED8\u8BA4 Preset" })
18373
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "dsh-partner-home-runtime", children: [
18374
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { children: [
18375
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconAgentPresetOutlineRegular, { size: 16 }) }),
18376
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
18377
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u8FD0\u884C\u80FD\u529B" }),
18378
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: companion.presetId || "DSH \u9ED8\u8BA4 Preset" })
17860
18379
  ] }),
17861
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", onClick: () => navigate("capabilities"), children: "\u8C03\u6574" })
18380
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", onClick: () => navigate("capabilities"), children: "\u8C03\u6574" })
17862
18381
  ] }),
17863
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-home-capability-list", children: capabilities.length ? capabilities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("em", { children: item }, item)) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u5C1A\u672A\u58F0\u660E\u80FD\u529B\u8303\u56F4" }) })
18382
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-home-capability-list", children: capabilities.length ? capabilities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("em", { children: item }, item)) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u5C1A\u672A\u58F0\u660E\u80FD\u529B\u8303\u56F4" }) })
17864
18383
  ] }),
17865
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "dsh-partner-home-continuity", children: [
17866
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("header", { children: [
17867
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconDataOutlineRegular, { size: 16 }) }),
17868
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
17869
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "\u4F19\u4F34\u5BF9\u8BDD" }),
17870
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: localSession?.archived ? "\u4F1A\u8BDD\u5DF2\u5F52\u6863" : "\u4F19\u4F34\u4F1A\u8BDD\u5DF2\u5EFA\u7ACB" })
18384
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "dsh-partner-home-continuity", children: [
18385
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { children: [
18386
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconDataOutlineRegular, { size: 16 }) }),
18387
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
18388
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "\u4F19\u4F34\u5BF9\u8BDD" }),
18389
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: localSession?.archived ? "\u4F1A\u8BDD\u5DF2\u5F52\u6863" : "\u4F19\u4F34\u4F1A\u8BDD\u5DF2\u5EFA\u7ACB" })
17871
18390
  ] }),
17872
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", onClick: () => localSession === void 0 ? void startSession(companion.id) : localSession.archived ? void renewSession(localSession.id) : void openSession(localSession.id, localSession.sessionId), children: localSession === void 0 ? "\u5F00\u59CB\u5BF9\u8BDD" : localSession.archived ? "\u5F00\u59CB\u65B0\u4F1A\u8BDD" : "\u6253\u5F00\u4F1A\u8BDD" })
18391
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", onClick: () => localSession === void 0 ? void startSession(companion.id) : localSession.archived ? void renewSession(localSession.id) : void openSession(localSession.id, localSession.sessionId), children: localSession === void 0 ? "\u5F00\u59CB\u5BF9\u8BDD" : localSession.archived ? "\u5F00\u59CB\u65B0\u4F1A\u8BDD" : "\u6253\u5F00\u4F1A\u8BDD" })
17873
18392
  ] }),
17874
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: localSession ? `\u6700\u8FD1\u6D3B\u52A8\u4E8E ${relativeTime(localSession.lastMessageAt)}\uFF1B\u672C\u5730\u4E0E\u6E20\u9053\u5728\u8FD9\u91CC\u63A5\u7740\u804A\u3002` : "\u4F19\u4F34\u4F1A\u8BDD\u6B63\u5728\u521D\u59CB\u5316\uFF0C\u7A0D\u540E\u5373\u53EF\u6253\u5F00\u3002" })
18393
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: localSession ? `\u6700\u8FD1\u6D3B\u52A8\u4E8E ${relativeTime(localSession.lastMessageAt)}\uFF1B\u672C\u5730\u4E0E\u6E20\u9053\u5728\u8FD9\u91CC\u63A5\u7740\u804A\u3002` : "\u4F19\u4F34\u4F1A\u8BDD\u6B63\u5728\u521D\u59CB\u5316\uFF0C\u7A0D\u540E\u5373\u53EF\u6253\u5F00\u3002" })
17875
18394
  ] })
17876
18395
  ] })
17877
18396
  ] });
17878
18397
  }
17879
18398
  function WeixinPanel({ companion, snapshot, onChanged }) {
17880
18399
  const channels = snapshot.channels.filter((item) => item.companionId === companion.id && (!item.platform || item.platform === "weixin"));
17881
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
17882
- channels.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "dsh-partner-inline-error", role: "alert", children: [
18400
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18401
+ channels.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "dsh-partner-inline-error", role: "alert", children: [
17883
18402
  "\u53D1\u73B0 ",
17884
18403
  channels.length,
17885
18404
  " \u4E2A\u5386\u53F2\u5FAE\u4FE1\u6E20\u9053\u3002\u8BF7\u5148\u505C\u7528\u4E0D\u4F7F\u7528\u7684\u6E20\u9053\uFF0C\u518D\u5BF9\u9700\u8981\u4FDD\u7559\u7684\u6E20\u9053\u91CD\u65B0\u626B\u7801\uFF1B\u8054\u7CFB\u4EBA\u6388\u6743\u4E0D\u4F1A\u8DE8\u673A\u5668\u4EBA\u8FC1\u79FB\u3002"
17886
18405
  ] }),
17887
- channels.length ? channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinChannelPanel, { companion, snapshot, onChanged, channel }, channel.id)) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinChannelPanel, { companion, snapshot, onChanged })
18406
+ channels.length ? channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinChannelPanel, { companion, snapshot, onChanged, channel }, channel.id)) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinChannelPanel, { companion, snapshot, onChanged })
17888
18407
  ] });
17889
18408
  }
17890
18409
  function WeixinChannelPanel({ companion, snapshot, onChanged, channel }) {
17891
- const [confirmDelete, setConfirmDelete] = (0, import_react55.useState)(false);
17892
- const [login, setLogin] = (0, import_react55.useState)();
17893
- const [busy, setBusy] = (0, import_react55.useState)(false);
17894
- const [error, setError] = (0, import_react55.useState)();
17895
- const loginGeneration = (0, import_react55.useRef)(0);
17896
- const changedRef = (0, import_react55.useRef)(onChanged);
18410
+ const [confirmDelete, setConfirmDelete] = (0, import_react58.useState)(false);
18411
+ const [login, setLogin] = (0, import_react58.useState)();
18412
+ const [busy, setBusy] = (0, import_react58.useState)(false);
18413
+ const [error, setError] = (0, import_react58.useState)();
18414
+ const loginGeneration = (0, import_react58.useRef)(0);
18415
+ const changedRef = (0, import_react58.useRef)(onChanged);
17897
18416
  changedRef.current = onChanged;
17898
- (0, import_react55.useEffect)(() => {
18417
+ (0, import_react58.useEffect)(() => {
17899
18418
  if (!login || login.phase === "confirmed" || login.phase === "expired" || login.phase === "error") return;
17900
18419
  let disposed = false;
17901
18420
  let timer2;
@@ -17976,115 +18495,115 @@ function WeixinChannelPanel({ companion, snapshot, onChanged, channel }) {
17976
18495
  setError(errorMessage(reason));
17977
18496
  }
17978
18497
  };
17979
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-form is-channel", children: [
17980
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SectionHeading, { eyebrow: "PRIMARY CHANNEL", title: "\u5FAE\u4FE1\u6E20\u9053", detail: "\u4F7F\u7528\u5FAE\u4FE1 iLink Bot \u626B\u7801\u63A5\u5165\u3002\u6BCF\u4E2A\u673A\u5668\u4EBA\u53EA\u7ED1\u5B9A\u4E00\u4E2A\u4F19\u4F34\uFF0C\u6BCF\u4F4D\u8054\u7CFB\u4EBA\u4FDD\u6301\u72EC\u7ACB DSH \u4F1A\u8BDD\u3002" }),
17981
- !channel && !login && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-weixin-connect", borderRadius: 15, distortionScale: -10, saturation: 1.06, children: [
17982
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinGlyph, { large: true }) }),
17983
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
17984
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("strong", { children: [
18498
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-form is-channel", children: [
18499
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SectionHeading, { eyebrow: "PRIMARY CHANNEL", title: "\u5FAE\u4FE1\u6E20\u9053", detail: "\u4F7F\u7528\u5FAE\u4FE1 iLink Bot \u626B\u7801\u63A5\u5165\u3002\u6BCF\u4E2A\u673A\u5668\u4EBA\u53EA\u7ED1\u5B9A\u4E00\u4E2A\u4F19\u4F34\uFF0C\u6BCF\u4F4D\u8054\u7CFB\u4EBA\u4FDD\u6301\u72EC\u7ACB DSH \u4F1A\u8BDD\u3002" }),
18500
+ !channel && !login && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-weixin-connect", borderRadius: 15, distortionScale: -10, saturation: 1.06, children: [
18501
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinGlyph, { large: true }) }),
18502
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18503
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("strong", { children: [
17985
18504
  "\u628A ",
17986
18505
  companion.name,
17987
18506
  " \u5E26\u5230\u5FAE\u4FE1"
17988
18507
  ] }),
17989
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u626B\u7801\u540E\uFF0C\u673A\u5668\u4EBA\u51ED\u636E\u76F4\u63A5\u4FDD\u5B58\u8FDB DSH \u51ED\u636E\u5E93\uFF0C\u4E0D\u4F1A\u663E\u793A\u5728\u6D4F\u89C8\u5668\u6216\u666E\u901A\u914D\u7F6E\u6587\u4EF6\u4E2D\u3002" }),
17990
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("ul", { children: [
17991
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: "\u79C1\u804A\u9996\u6B21\u8054\u7CFB\u5FC5\u987B\u5BA1\u6279" }),
17992
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: "\u8054\u7CFB\u4EBA\u4E4B\u95F4\u4E0A\u4E0B\u6587\u5B8C\u5168\u9694\u79BB" }),
17993
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: "\u5DE5\u5177\u6743\u9650\u4E0D\u4F1A\u56E0\u5FAE\u4FE1\u8EAB\u4EFD\u81EA\u52A8\u6269\u5927" })
18508
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: "\u626B\u7801\u540E\uFF0C\u673A\u5668\u4EBA\u51ED\u636E\u76F4\u63A5\u4FDD\u5B58\u8FDB DSH \u51ED\u636E\u5E93\uFF0C\u4E0D\u4F1A\u663E\u793A\u5728\u6D4F\u89C8\u5668\u6216\u666E\u901A\u914D\u7F6E\u6587\u4EF6\u4E2D\u3002" }),
18509
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("ul", { children: [
18510
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: "\u79C1\u804A\u9996\u6B21\u8054\u7CFB\u5FC5\u987B\u5BA1\u6279" }),
18511
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: "\u8054\u7CFB\u4EBA\u4E4B\u95F4\u4E0A\u4E0B\u6587\u5B8C\u5168\u9694\u79BB" }),
18512
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: "\u5DE5\u5177\u6743\u9650\u4E0D\u4F1A\u56E0\u5FAE\u4FE1\u8EAB\u4EFD\u81EA\u52A8\u6269\u5927" })
17994
18513
  ] })
17995
18514
  ] }),
17996
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", disabled: busy, onClick: () => {
18515
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", disabled: busy, onClick: () => {
17997
18516
  void begin();
17998
18517
  }, children: busy ? "\u6B63\u5728\u7533\u8BF7\u4E8C\u7EF4\u7801\u2026" : "\u626B\u7801\u8FDE\u63A5\u5FAE\u4FE1" })
17999
18518
  ] }),
18000
- login && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-qr", borderRadius: 16, distortionScale: -10, saturation: 1.06, children: [
18001
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-qr-code", children: login.qrContent && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QRCodeSVG, { value: login.qrContent, size: 176, level: "M" }) }),
18002
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
18003
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "WECHAT ILINK BOT" }),
18004
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: login.phase === "scanned" ? "\u5DF2\u626B\u7801\uFF0C\u8BF7\u5728\u5FAE\u4FE1\u786E\u8BA4" : login.phase === "expired" ? "\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F" : login.phase === "error" ? "\u8FDE\u63A5\u5931\u8D25" : "\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801" }),
18005
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: login.error || (login.phase === "scanned" ? "\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u542F\u52A8\u6E20\u9053\uFF0C\u4E0D\u9700\u8981\u590D\u5236 Token\u3002" : "\u4E8C\u7EF4\u7801\u7EA6 5 \u5206\u949F\u6709\u6548\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5B89\u5168\u5730\u4FDD\u6301\u6253\u5F00\u3002") }),
18006
- (login.phase === "expired" || login.phase === "error") && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { type: "button", onClick: () => {
18519
+ login && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-qr", borderRadius: 16, distortionScale: -10, saturation: 1.06, children: [
18520
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-qr-code", children: login.qrContent && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QRCodeSVG, { value: login.qrContent, size: 176, level: "M" }) }),
18521
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18522
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "WECHAT ILINK BOT" }),
18523
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: login.phase === "scanned" ? "\u5DF2\u626B\u7801\uFF0C\u8BF7\u5728\u5FAE\u4FE1\u786E\u8BA4" : login.phase === "expired" ? "\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F" : login.phase === "error" ? "\u8FDE\u63A5\u5931\u8D25" : "\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801" }),
18524
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: login.error || (login.phase === "scanned" ? "\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u542F\u52A8\u6E20\u9053\uFF0C\u4E0D\u9700\u8981\u590D\u5236 Token\u3002" : "\u4E8C\u7EF4\u7801\u7EA6 5 \u5206\u949F\u6709\u6548\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5B89\u5168\u5730\u4FDD\u6301\u6253\u5F00\u3002") }),
18525
+ (login.phase === "expired" || login.phase === "error") && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", onClick: () => {
18007
18526
  setLogin(void 0);
18008
18527
  void begin();
18009
18528
  }, children: [
18010
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconRefreshOutlineRegular, { size: 16 }),
18529
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconRefreshOutlineRegular, { size: 16 }),
18011
18530
  "\u91CD\u65B0\u751F\u6210"
18012
18531
  ] })
18013
18532
  ] })
18014
18533
  ] }),
18015
- channel && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
18016
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-channel-card", borderRadius: 14, distortionScale: -10, saturation: 1.06, children: [
18017
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WeixinGlyph, { large: true }) }),
18018
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
18019
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "WECHAT CHANNEL" }),
18020
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: channel.name }),
18021
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: channel.accountId })
18534
+ channel && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18535
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-channel-card", borderRadius: 14, distortionScale: -10, saturation: 1.06, children: [
18536
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(WeixinGlyph, { large: true }) }),
18537
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18538
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "WECHAT CHANNEL" }),
18539
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: channel.name }),
18540
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: channel.accountId })
18022
18541
  ] }),
18023
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChannelStatus, { channel }),
18024
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-weixin-actions", children: [
18025
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": channel.enabled, disabled: busy, role: "switch", "aria-checked": channel.enabled, "aria-label": channel.enabled ? "\u505C\u7528\u5FAE\u4FE1\u6E20\u9053" : "\u542F\u7528\u5FAE\u4FE1\u6E20\u9053", onClick: () => {
18542
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ChannelStatus, { channel }),
18543
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-weixin-actions", children: [
18544
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": channel.enabled, disabled: busy, role: "switch", "aria-checked": channel.enabled, "aria-label": channel.enabled ? "\u505C\u7528\u5FAE\u4FE1\u6E20\u9053" : "\u542F\u7528\u5FAE\u4FE1\u6E20\u9053", onClick: () => {
18026
18545
  void toggle();
18027
- }, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("i", {}) }),
18028
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("button", { type: "button", className: "dsh-partner-weixin-rescan", disabled: busy, title: "\u66F4\u65B0\u5F53\u524D\u673A\u5668\u4EBA\u7684\u767B\u5F55\u51ED\u636E\uFF0C\u4FDD\u7559\u8054\u7CFB\u4EBA\u6388\u6743", onClick: () => {
18546
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("i", {}) }),
18547
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", className: "dsh-partner-weixin-rescan", disabled: busy, title: "\u66F4\u65B0\u5F53\u524D\u673A\u5668\u4EBA\u7684\u767B\u5F55\u51ED\u636E\uFF0C\u4FDD\u7559\u8054\u7CFB\u4EBA\u6388\u6743", onClick: () => {
18029
18548
  void begin();
18030
18549
  }, children: [
18031
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconRefreshOutlineRegular, { size: 16 }),
18550
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconRefreshOutlineRegular, { size: 16 }),
18032
18551
  busy ? "\u8BF7\u7A0D\u5019\u2026" : "\u91CD\u65B0\u626B\u7801"
18033
18552
  ] })
18034
18553
  ] })
18035
18554
  ] }),
18036
- channel.enabled && channel.runtimeStatus === "starting" && !channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "dsh-partner-weixin-help", role: "status", children: "\u767B\u5F55\u51ED\u636E\u5DF2\u4FDD\u5B58\uFF0C\u6B63\u5728\u7B49\u5F85\u5FAE\u4FE1\u63A5\u6536\u901A\u9053\u9996\u6B21\u54CD\u5E94\u3002\u957F\u8F6E\u8BE2\u53EF\u80FD\u9700\u8981\u51E0\u5341\u79D2\uFF1B\u5411\u673A\u5668\u4EBA\u53D1\u9001\u4E00\u6761\u6D88\u606F\u53EF\u5E2E\u52A9\u786E\u8BA4\u6536\u53D1\u662F\u5426\u6B63\u5E38\uFF0C\u65E0\u9700\u91CD\u590D\u626B\u7801\u3002" }),
18037
- channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: channel.lastError }),
18038
- confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { role: "group", "aria-label": "\u786E\u8BA4\u5220\u9664\u5FAE\u4FE1\u6E20\u9053", children: [
18039
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "dsh-partner-inline-error", role: "alert", children: [
18555
+ channel.enabled && channel.runtimeStatus === "starting" && !channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "dsh-partner-weixin-help", role: "status", children: "\u767B\u5F55\u51ED\u636E\u5DF2\u4FDD\u5B58\uFF0C\u6B63\u5728\u7B49\u5F85\u5FAE\u4FE1\u63A5\u6536\u901A\u9053\u9996\u6B21\u54CD\u5E94\u3002\u957F\u8F6E\u8BE2\u53EF\u80FD\u9700\u8981\u51E0\u5341\u79D2\uFF1B\u5411\u673A\u5668\u4EBA\u53D1\u9001\u4E00\u6761\u6D88\u606F\u53EF\u5E2E\u52A9\u786E\u8BA4\u6536\u53D1\u662F\u5426\u6B63\u5E38\uFF0C\u65E0\u9700\u91CD\u590D\u626B\u7801\u3002" }),
18556
+ channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: channel.lastError }),
18557
+ confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { role: "group", "aria-label": "\u786E\u8BA4\u5220\u9664\u5FAE\u4FE1\u6E20\u9053", children: [
18558
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "dsh-partner-inline-error", role: "alert", children: [
18040
18559
  "\u786E\u8BA4\u5220\u9664 ",
18041
18560
  channel.accountId,
18042
18561
  "\uFF1F\u5C06\u79FB\u9664\u8BE5\u6E20\u9053\u51ED\u636E\u3001\u8054\u7CFB\u4EBA\u914D\u5BF9\u548C\u6E20\u9053\u4F1A\u8BDD\u5173\u8054\uFF0C\u4E0D\u4F1A\u8FC1\u79FB\u6388\u6743\uFF0C\u4E14\u4E0D\u53EF\u64A4\u9500\u3002"
18043
18562
  ] }),
18044
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-weixin-actions", children: [
18045
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmDelete(false), children: "\u53D6\u6D88" }),
18046
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", disabled: busy, onClick: () => {
18563
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-weixin-actions", children: [
18564
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmDelete(false), children: "\u53D6\u6D88" }),
18565
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", disabled: busy, onClick: () => {
18047
18566
  void remove();
18048
18567
  }, children: busy ? "\u6B63\u5728\u5220\u9664\u2026" : "\u786E\u8BA4\u5220\u9664" })
18049
18568
  ] })
18050
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-weixin-actions", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmDelete(true), children: "\u5220\u9664\u6B64\u6E20\u9053" }) }),
18051
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "dsh-partner-pairing-heading", children: [
18052
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
18053
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("small", { children: "ACCESS" }),
18054
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: "\u79C1\u804A\u914D\u5BF9" })
18569
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-weixin-actions", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { type: "button", disabled: busy, onClick: () => setConfirmDelete(true), children: "\u5220\u9664\u6B64\u6E20\u9053" }) }),
18570
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "dsh-partner-pairing-heading", children: [
18571
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { children: [
18572
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("small", { children: "ACCESS" }),
18573
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: "\u79C1\u804A\u914D\u5BF9" })
18055
18574
  ] }),
18056
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("em", { children: [
18575
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("em", { children: [
18057
18576
  pairings.filter((item) => item.status === "pending").length,
18058
18577
  " \u4E2A\u5F85\u5904\u7406"
18059
18578
  ] })
18060
18579
  ] }),
18061
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "dsh-partner-pairings", children: pairings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ContentState, { title: "\u7B49\u5F85\u9996\u6B21\u6D88\u606F", detail: "\u626B\u7801\u53EA\u5B8C\u6210\u673A\u5668\u4EBA\u767B\u5F55\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6388\u6743\u8054\u7CFB\u4EBA\u3002\u8BF7\u5148\u5728\u5FAE\u4FE1\u5411\u673A\u5668\u4EBA\u53D1\u9001\u4E00\u6761\u6D88\u606F\uFF0C\u518D\u56DE\u5230\u8FD9\u91CC\u70B9\u51FB\u300C\u6279\u51C6\u300D\uFF0C\u4E4B\u540E\u5373\u53EF\u5BF9\u8BDD\u3002", compact: true }) : pairings.map((pairing) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("article", { children: [
18062
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: `is-${pairing.status}`, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_dsh_client_ui_primitives25.IconUserOutlineRegular, { size: 16 }) }),
18063
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
18064
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { children: pairing.displayName }),
18065
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("small", { children: [
18580
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "dsh-partner-pairings", children: pairings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ContentState, { title: "\u7B49\u5F85\u9996\u6B21\u6D88\u606F", detail: "\u626B\u7801\u53EA\u5B8C\u6210\u673A\u5668\u4EBA\u767B\u5F55\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6388\u6743\u8054\u7CFB\u4EBA\u3002\u8BF7\u5148\u5728\u5FAE\u4FE1\u5411\u673A\u5668\u4EBA\u53D1\u9001\u4E00\u6761\u6D88\u606F\uFF0C\u518D\u56DE\u5230\u8FD9\u91CC\u70B9\u51FB\u300C\u6279\u51C6\u300D\uFF0C\u4E4B\u540E\u5373\u53EF\u5BF9\u8BDD\u3002", compact: true }) : pairings.map((pairing) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("article", { children: [
18581
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: `is-${pairing.status}`, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_dsh_client_ui_primitives26.IconUserOutlineRegular, { size: 16 }) }),
18582
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
18583
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("strong", { children: pairing.displayName }),
18584
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("small", { children: [
18066
18585
  pairing.status === "pending" ? "\u7B49\u5F85\u5BA1\u6279" : pairing.status === "approved" ? "\u5DF2\u6388\u6743\u72EC\u7ACB\u4F1A\u8BDD" : "\u5DF2\u963B\u6B62",
18067
18586
  " \xB7 ",
18068
18587
  new Date(pairing.updatedAt).toLocaleString()
18069
18588
  ] })
18070
18589
  ] }),
18071
- pairing.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
18072
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { onClick: () => {
18590
+ pairing.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
18591
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { onClick: () => {
18073
18592
  void actPairing(pairing.id, "blocked");
18074
18593
  }, children: "\u62D2\u7EDD" }),
18075
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "is-primary", onClick: () => {
18594
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { className: "is-primary", onClick: () => {
18076
18595
  void actPairing(pairing.id, "approved");
18077
18596
  }, children: "\u6279\u51C6" })
18078
18597
  ] }),
18079
- pairing.status === "approved" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { onClick: () => {
18598
+ pairing.status === "approved" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { onClick: () => {
18080
18599
  void actPairing(pairing.id, "blocked");
18081
18600
  }, children: "\u64A4\u9500" }),
18082
- pairing.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { onClick: () => {
18601
+ pairing.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("button", { onClick: () => {
18083
18602
  void actPairing(pairing.id, "approved");
18084
18603
  }, children: "\u91CD\u65B0\u6279\u51C6" })
18085
18604
  ] }, pairing.id)) })
18086
18605
  ] }),
18087
- error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "dsh-partner-inline-error", children: error })
18606
+ error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "dsh-partner-inline-error", children: error })
18088
18607
  ] });
18089
18608
  }
18090
18609
  function installStyles() {