@lemoncat7/dsh-partner 1.10.5 → 1.11.1

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 (155) hide show
  1. package/README.md +50 -1
  2. package/docs/THIRD_PARTY_LICENSES.md +36 -1
  3. package/docs/architecture.md +26 -1
  4. package/lib/api/features/attachments-api.d.ts +6 -0
  5. package/lib/api/features/attachments-api.d.ts.map +1 -0
  6. package/lib/api/features/attachments-api.js +20 -0
  7. package/lib/api/features/attachments-api.js.map +1 -0
  8. package/lib/api/features/workspace-api.js +2 -2
  9. package/lib/api/features/workspace-api.js.map +1 -1
  10. package/lib/api.d.ts +2 -0
  11. package/lib/api.d.ts.map +1 -1
  12. package/lib/api.js +3 -0
  13. package/lib/api.js.map +1 -1
  14. package/lib/attachments/service.d.ts +35 -0
  15. package/lib/attachments/service.d.ts.map +1 -0
  16. package/lib/attachments/service.js +122 -0
  17. package/lib/attachments/service.js.map +1 -0
  18. package/lib/attachments/tool.d.ts +8 -0
  19. package/lib/attachments/tool.d.ts.map +1 -0
  20. package/lib/attachments/tool.js +59 -0
  21. package/lib/attachments/tool.js.map +1 -0
  22. package/lib/channels/manager.d.ts +2 -0
  23. package/lib/channels/manager.d.ts.map +1 -1
  24. package/lib/channels/manager.js +12 -0
  25. package/lib/channels/manager.js.map +1 -1
  26. package/lib/channels/outbound-media.d.ts +1 -1
  27. package/lib/channels/outbound-media.d.ts.map +1 -1
  28. package/lib/channels/outbound-media.js +6 -10
  29. package/lib/channels/outbound-media.js.map +1 -1
  30. package/lib/client-api.d.ts +8 -0
  31. package/lib/client-api.d.ts.map +1 -1
  32. package/lib/client-api.js.map +1 -1
  33. package/lib/client.js +1126 -932
  34. package/lib/client.js.map +4 -4
  35. package/lib/collaboration/composition.d.ts +3 -1
  36. package/lib/collaboration/composition.d.ts.map +1 -1
  37. package/lib/collaboration/composition.js +9 -3
  38. package/lib/collaboration/composition.js.map +1 -1
  39. package/lib/collaboration/domain.d.ts +2 -0
  40. package/lib/collaboration/domain.d.ts.map +1 -1
  41. package/lib/collaboration/domain.js.map +1 -1
  42. package/lib/collaboration/service.d.ts +1 -0
  43. package/lib/collaboration/service.d.ts.map +1 -1
  44. package/lib/collaboration/service.js +15 -4
  45. package/lib/collaboration/service.js.map +1 -1
  46. package/lib/domain.d.ts +1 -0
  47. package/lib/domain.d.ts.map +1 -1
  48. package/lib/domain.js.map +1 -1
  49. package/lib/execution/agent-support.d.ts.map +1 -1
  50. package/lib/execution/agent-support.js +2 -1
  51. package/lib/execution/agent-support.js.map +1 -1
  52. package/lib/index.d.ts.map +1 -1
  53. package/lib/index.js +6 -1
  54. package/lib/index.js.map +1 -1
  55. package/lib/pendant/card-image.d.ts +13 -3
  56. package/lib/pendant/card-image.d.ts.map +1 -1
  57. package/lib/pendant/card-image.js +40 -14
  58. package/lib/pendant/card-image.js.map +1 -1
  59. package/lib/pendant/image-coating.d.ts +8 -0
  60. package/lib/pendant/image-coating.d.ts.map +1 -0
  61. package/lib/pendant/image-coating.js +39 -0
  62. package/lib/pendant/image-coating.js.map +1 -0
  63. package/lib/pendant/motion-glare.d.ts +33 -0
  64. package/lib/pendant/motion-glare.d.ts.map +1 -0
  65. package/lib/pendant/motion-glare.js +56 -0
  66. package/lib/pendant/motion-glare.js.map +1 -0
  67. package/lib/pendant/physics.d.ts +1 -0
  68. package/lib/pendant/physics.d.ts.map +1 -1
  69. package/lib/pendant/physics.js +24 -2
  70. package/lib/pendant/physics.js.map +1 -1
  71. package/lib/pendant/renderer.d.ts.map +1 -1
  72. package/lib/pendant/renderer.js +46 -13
  73. package/lib/pendant/renderer.js.map +1 -1
  74. package/lib/pendant/settings-panel.d.ts.map +1 -1
  75. package/lib/pendant/settings-panel.js +6 -4
  76. package/lib/pendant/settings-panel.js.map +1 -1
  77. package/lib/pendant/settings.d.ts +7 -0
  78. package/lib/pendant/settings.d.ts.map +1 -1
  79. package/lib/pendant/settings.js +10 -3
  80. package/lib/pendant/settings.js.map +1 -1
  81. package/lib/pendant/strap-preview.d.ts +3 -1
  82. package/lib/pendant/strap-preview.d.ts.map +1 -1
  83. package/lib/pendant/strap-preview.js +6 -3
  84. package/lib/pendant/strap-preview.js.map +1 -1
  85. package/lib/pendant/strap-texture.d.ts +5 -0
  86. package/lib/pendant/strap-texture.d.ts.map +1 -0
  87. package/lib/pendant/strap-texture.js +9 -0
  88. package/lib/pendant/strap-texture.js.map +1 -0
  89. package/lib/pendant/strap.d.ts.map +1 -1
  90. package/lib/pendant/strap.js +39 -2
  91. package/lib/pendant/strap.js.map +1 -1
  92. package/lib/pendant/surface.d.ts +7 -7
  93. package/lib/pendant/surface.d.ts.map +1 -1
  94. package/lib/pendant/surface.js +19 -9
  95. package/lib/pendant/surface.js.map +1 -1
  96. package/lib/pendant-renderer.js +201 -170
  97. package/lib/requirements/draft.d.ts +3 -0
  98. package/lib/requirements/draft.d.ts.map +1 -0
  99. package/lib/requirements/draft.js +7 -0
  100. package/lib/requirements/draft.js.map +1 -0
  101. package/lib/requirements/plan-schema.d.ts +93 -0
  102. package/lib/requirements/plan-schema.d.ts.map +1 -0
  103. package/lib/requirements/plan-schema.js +16 -0
  104. package/lib/requirements/plan-schema.js.map +1 -0
  105. package/lib/requirements/plan.d.ts +30 -0
  106. package/lib/requirements/plan.d.ts.map +1 -0
  107. package/lib/requirements/plan.js +134 -0
  108. package/lib/requirements/plan.js.map +1 -0
  109. package/lib/requirements/service.d.ts +2 -1
  110. package/lib/requirements/service.d.ts.map +1 -1
  111. package/lib/requirements/service.js +4 -6
  112. package/lib/requirements/service.js.map +1 -1
  113. package/lib/requirements/tool.d.ts +1 -1
  114. package/lib/requirements/tool.d.ts.map +1 -1
  115. package/lib/requirements/tool.js +24 -3
  116. package/lib/requirements/tool.js.map +1 -1
  117. package/lib/skills/task-planning.d.ts +2 -2
  118. package/lib/skills/task-planning.d.ts.map +1 -1
  119. package/lib/skills/task-planning.js +10 -1
  120. package/lib/skills/task-planning.js.map +1 -1
  121. package/lib/store.js +2 -0
  122. package/lib/store.js.map +1 -1
  123. package/lib/tasks/context.d.ts.map +1 -1
  124. package/lib/tasks/context.js +9 -1
  125. package/lib/tasks/context.js.map +1 -1
  126. package/lib/tasks/contract.d.ts +63 -0
  127. package/lib/tasks/contract.d.ts.map +1 -0
  128. package/lib/tasks/contract.js +55 -0
  129. package/lib/tasks/contract.js.map +1 -0
  130. package/lib/tasks/domain.d.ts +6 -0
  131. package/lib/tasks/domain.d.ts.map +1 -1
  132. package/lib/tasks/draft.d.ts +7 -0
  133. package/lib/tasks/draft.d.ts.map +1 -0
  134. package/lib/tasks/draft.js +54 -0
  135. package/lib/tasks/draft.js.map +1 -0
  136. package/lib/tasks/result.d.ts +2 -0
  137. package/lib/tasks/result.d.ts.map +1 -1
  138. package/lib/tasks/result.js +17 -3
  139. package/lib/tasks/result.js.map +1 -1
  140. package/lib/tasks/scheduling.d.ts +15 -0
  141. package/lib/tasks/scheduling.d.ts.map +1 -0
  142. package/lib/tasks/scheduling.js +46 -0
  143. package/lib/tasks/scheduling.js.map +1 -0
  144. package/lib/tasks/service.d.ts +46 -3
  145. package/lib/tasks/service.d.ts.map +1 -1
  146. package/lib/tasks/service.js +55 -58
  147. package/lib/tasks/service.js.map +1 -1
  148. package/lib/ui/requirement-tasks-panel.d.ts.map +1 -1
  149. package/lib/ui/requirement-tasks-panel.js +18 -9
  150. package/lib/ui/requirement-tasks-panel.js.map +1 -1
  151. package/lib/ui/task-contract-panel.d.ts +10 -0
  152. package/lib/ui/task-contract-panel.d.ts.map +1 -0
  153. package/lib/ui/task-contract-panel.js +16 -0
  154. package/lib/ui/task-contract-panel.js.map +1 -0
  155. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -1533,6 +1533,18 @@ body[data-ds-dark-theme] :is(.dsh-partner-sidebar, .dsh-partner-workspace, .dsh-
1533
1533
  .dsh-partner-task-description strong { font-size: var(--partner-font-body); font-weight: 620; }
1534
1534
  .dsh-partner-task-description p { margin: 0; color: var(--partner-text-secondary); font-size: var(--partner-font-body); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
1535
1535
  .dsh-partner-task-fields { display: grid; gap: 7px; }
1536
+ .dsh-partner-task-contract { display: grid; gap: 12px; min-width: 0; color: var(--partner-text); font: var(--partner-font-body)/1.6 var(--partner-font-family); }
1537
+ .dsh-partner-task-contract header, .dsh-partner-task-contract li, .dsh-partner-task-contract li > div { display: grid; gap: 6px; min-width: 0; }
1538
+ .dsh-partner-task-contract ol { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: criterion; }
1539
+ .dsh-partner-task-contract li { counter-increment: criterion; border-top: 1px solid var(--partner-border); padding-top: 10px; }
1540
+ .dsh-partner-task-contract li > p { margin: 0; overflow-wrap: anywhere; }
1541
+ .dsh-partner-task-contract li > p::before { content: counter(criterion) '. '; color: var(--partner-text-tertiary); }
1542
+ .dsh-partner-task-contract small { font-size: var(--partner-font-caption); color: var(--partner-text-secondary); overflow-wrap: anywhere; }
1543
+ .dsh-partner-task-contract code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--partner-font-caption); }
1544
+ .dsh-partner-task-contract .dsh-partner-task-fields label { grid-template-columns: minmax(0, 1fr); gap: 5px; }
1545
+ .dsh-partner-task-contract :is(select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--partner-border); border-radius: 10px; color: var(--partner-text); background: var(--partner-control); font: var(--partner-font-label)/1.5 var(--partner-font-family); }
1546
+ .dsh-partner-task-contract textarea { resize: vertical; }
1547
+ .dsh-partner-task-contract :is(select, textarea):focus-visible { outline: 2px solid var(--partner-focus-ring); outline-offset: 2px; }
1536
1548
  .dsh-partner-task-fields label { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--partner-text-tertiary); font-size: var(--partner-font-caption); }
1537
1549
  .dsh-partner-task-detail select { width: 100%; height: 34px; padding: 0 28px 0 9px; border: 1px solid var(--partner-border); border-radius: 8px; color: var(--partner-text-secondary); background-color: var(--partner-control); font: var(--partner-font-body)/1 var(--partner-font-family); }
1538
1550
  .dsh-partner-task-detail select:focus { border-color: var(--partner-focus-ring); background-color: var(--partner-raised); box-shadow: 0 0 0 3px color-mix(in srgb, var(--partner-focus-ring) 14%, transparent); }
@@ -2861,7 +2873,7 @@ var widget_default = `.dsh-partner-pendant { position: fixed; z-index: 12; top:
2861
2873
  .dsh-partner-pendant button { appearance: none; -webkit-appearance: none; margin: 0; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
2862
2874
  .dsh-partner-pendant button:focus-visible { outline: 2px solid var(--partner-focus-ring) !important; outline-offset: 2px !important; }
2863
2875
  .dsh-partner-pendant button:disabled { opacity: .45; cursor: default; }
2864
- .dsh-partner-pendant .dsh-partner-pendant-canvas { position: fixed; left: 0; top: 0; display: block; width: 164px; height: 164px; pointer-events: none; transition: none !important; }
2876
+ .dsh-partner-pendant .dsh-partner-pendant-canvas { position: fixed; left: 0; top: 0; display: block; width: 164px; height: 164px; pointer-events: none; transition: none !important; background: transparent !important; opacity: 1 !important; filter: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
2865
2877
  .dsh-partner-pendant .dsh-partner-pendant-strap { position: fixed; left: 0; top: 0; width: 100vw; height: 100dvh; overflow: hidden; pointer-events: none; }
2866
2878
  .dsh-partner-pendant-hit { position: absolute; top: 0; left: 0; width: 84px; height: 116px; transform: translate(130px, 210px) translate(-50%, -50%); padding: 0; border: 0; border-radius: 12px; background: var(--partner-solid-panel); pointer-events: auto; touch-action: none !important; user-select: none; -webkit-user-select: none; cursor: grab !important; }
2867
2879
  .dsh-partner-pendant-hit:active, .dsh-partner-pendant-anchor:active { cursor: grabbing !important; }
@@ -2944,11 +2956,22 @@ body[data-ds-dark-theme] .dsh-partner-pendant section#dsh-partner-pendant-inbox.
2944
2956
  // src/pendant/settings-panel.css
2945
2957
  var settings_panel_default = `.dsh-partner-pendant-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
2946
2958
  .dsh-partner-pendant-settings-fields { display: grid; min-width: 0; gap: 16px; }
2959
+ .dsh-partner-pendant-length { display: grid; gap: 8px; color: var(--partner-text); font: inherit; }
2960
+ .dsh-partner-pendant-length > span { display: flex; justify-content: space-between; }
2961
+ .dsh-partner-pendant-length small { color: var(--partner-text-secondary); font-size: 12px; }
2962
+ .dsh-partner-pendant-length input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; }
2963
+ .dsh-partner-pendant-length input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--partner-border); }
2964
+ .dsh-partner-pendant-length input::-moz-range-track { height: 4px; border-radius: 4px; background: var(--partner-border); }
2965
+ .dsh-partner-pendant-length input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border: 2px solid var(--partner-control); border-radius: 50%; background: var(--partner-text-secondary); }
2966
+ .dsh-partner-pendant-length input::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--partner-control); border-radius: 50%; background: var(--partner-text-secondary); }
2967
+ .dsh-partner-pendant-length input:focus-visible { outline: 2px solid var(--partner-accent); outline-offset: 3px; }
2947
2968
  .dsh-partner-pendant-fps-row { display: grid; gap: 8px; font-size: 13px; }
2948
- .dsh-partner-pendant-fps-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--partner-border); border-radius: 12px; background: var(--partner-control); }
2949
- .dsh-partner-pendant-fps-options > button { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; min-width: 0; min-height: 44px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--partner-text-secondary); }
2950
- .dsh-partner-pendant-settings .dsh-partner-pendant-fps-options > button[aria-pressed="true"] { border-color: var(--partner-border); background: var(--partner-selected); color: var(--partner-text); }
2951
- .dsh-partner-pendant-fps-options strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
2969
+ .dsh-partner-pendant-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--partner-border); border-radius: 12px; background: var(--partner-control); }
2970
+ .dsh-partner-pendant-options[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
2971
+ .dsh-partner-pendant-options > button { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; min-width: 0; min-height: 44px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--partner-text-secondary); }
2972
+ .dsh-partner-pendant-settings .dsh-partner-pendant-options > button[aria-pressed="true"] { border-color: var(--partner-border); background: var(--partner-selected); color: var(--partner-text); }
2973
+ .dsh-partner-pendant-options strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
2974
+ .dsh-partner-pendant-options small { font-size: 12px; color: var(--partner-text-secondary); }
2952
2975
  .dsh-partner-pendant-fps-row small { color: var(--partner-text-secondary); font-size: 12px; line-height: 1.5; }
2953
2976
  .dsh-partner-pendant-setting-hint { margin: 0; color: var(--partner-text-secondary); font-size: 13px; line-height: 1.6; }
2954
2977
  .dsh-partner-pendant-materials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@@ -2985,7 +3008,7 @@ var settings_panel_default = `.dsh-partner-pendant-settings-layout { display: gr
2985
3008
  .dsh-partner-pendant-preview-stage > svg { width: 100px; height: 130px; flex: none; }
2986
3009
  .dsh-partner-pendant-preview-card { position: relative; width: 128px; aspect-ratio: 8 / 11; border: 2px solid #80908e; border-radius: 12px; background: #253235; color: #e3eae5; }
2987
3010
  .dsh-partner-pendant-preview-card::before { position: absolute; z-index: 1; top: -11px; left: calc(50% - 8px); width: 16px; height: 14px; border: 3px solid #c3ced0; border-radius: 6px; background: #465752; content: ''; }
2988
- .dsh-partner-pendant-preview-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
3011
+ .dsh-partner-pendant-preview-card img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
2989
3012
  .dsh-partner-pendant-preview-card > span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 14px; }
2990
3013
  .dsh-partner-pendant-preview-card strong { font-size: 13px; }
2991
3014
  .dsh-partner-pendant-preview-card small { color: #b6cbc2; font-size: 11px; }
@@ -3099,10 +3122,19 @@ function errorMessage(value) {
3099
3122
 
3100
3123
  // src/pendant/settings.ts
3101
3124
  var PENDANT_SETTINGS_KEY = "dsh-partner:pendant-settings:v1";
3102
- var DEFAULT_PENDANT_SETTINGS = Object.freeze({ enabled: true, fps: 30, material: "woven", color: "#617e73", image: "" });
3125
+ var DEFAULT_PENDANT_SETTINGS = Object.freeze({ enabled: true, fps: 30, material: "woven", color: "#617e73", image: "", imageFit: "contain", strapLength: 100, strapImage: "", quality: 100 });
3103
3126
  var MAX_CARD_IMAGE_LENGTH = 7e5;
3104
3127
  function samePendantSettings(a, b) {
3105
- return a.enabled === b.enabled && a.fps === b.fps && a.material === b.material && a.color === b.color && a.image === b.image;
3128
+ return a.enabled === b.enabled && a.fps === b.fps && a.material === b.material && a.color === b.color && a.image === b.image && a.imageFit === b.imageFit && a.strapLength === b.strapLength && a.strapImage === b.strapImage && a.quality === b.quality;
3129
+ }
3130
+ function normalizeStrapLength(value) {
3131
+ return typeof value === "number" && Number.isFinite(value) ? Math.max(60, Math.min(160, Math.round(value))) : 100;
3132
+ }
3133
+ function normalizeCardQuality(value) {
3134
+ return value === "standard" ? 0 : typeof value === "number" && Number.isFinite(value) ? Math.max(0, Math.min(100, Math.round(value))) : 100;
3135
+ }
3136
+ function safeImage(value) {
3137
+ return typeof value === "string" && value.length <= MAX_CARD_IMAGE_LENGTH && /^data:image\/(jpeg|png|webp);base64,[a-z0-9+/]+={0,2}$/i.test(value) ? value : "";
3106
3138
  }
3107
3139
  function normalizePendantFps(value) {
3108
3140
  return value === 24 || value === 60 ? value : 30;
@@ -3112,9 +3144,13 @@ function normalizePendantSettings(value) {
3112
3144
  return {
3113
3145
  enabled: typeof input.enabled === "boolean" ? input.enabled : true,
3114
3146
  fps: normalizePendantFps(input.fps),
3147
+ strapLength: normalizeStrapLength(input.strapLength),
3148
+ strapImage: safeImage(input.strapImage),
3149
+ quality: normalizeCardQuality(input.quality),
3150
+ imageFit: input.imageFit === "cover" ? "cover" : "contain",
3115
3151
  material: input.material === "braided" || input.material === "leather" ? input.material : "woven",
3116
3152
  color: typeof input.color === "string" && /^#[0-9a-f]{6}$/i.test(input.color) ? input.color.toLowerCase() : DEFAULT_PENDANT_SETTINGS.color,
3117
- image: typeof input.image === "string" && input.image.length <= MAX_CARD_IMAGE_LENGTH && /^data:image\/jpeg;base64,[a-z0-9+/]+={0,2}$/i.test(input.image) ? input.image : ""
3153
+ image: safeImage(input.image)
3118
3154
  };
3119
3155
  }
3120
3156
 
@@ -3163,6 +3199,7 @@ function savePendantSettings(settings) {
3163
3199
  }
3164
3200
 
3165
3201
  // src/pendant/card-image.ts
3202
+ var CARD_IMAGE_BACKGROUND = "#253235";
3166
3203
  function loadCardImage(source) {
3167
3204
  return new Promise((resolve, reject) => {
3168
3205
  const image = new Image();
@@ -3177,26 +3214,30 @@ function loadCardImage(source) {
3177
3214
  image.src = source;
3178
3215
  });
3179
3216
  }
3180
- async function prepareCardImage(file) {
3217
+ async function prepareCardImage(file, maxDimension = 1536) {
3181
3218
  if (!["image/png", "image/jpeg", "image/webp"].includes(file.type)) throw new Error("\u8BF7\u9009\u62E9 PNG\u3001JPEG \u6216 WebP \u56FE\u7247\u3002");
3182
3219
  if (file.size > 5 * 1024 * 1024) throw new Error("\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5 MB\u3002");
3183
3220
  const url = URL.createObjectURL(file);
3184
3221
  try {
3185
3222
  const image = await loadCardImage(url);
3186
3223
  if (!image.naturalWidth || !image.naturalHeight || image.naturalWidth * image.naturalHeight > 25e6) throw new Error("\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u5927\uFF0C\u8BF7\u7F29\u5C0F\u81F3 2500 \u4E07\u50CF\u7D20\u4EE5\u5185\u3002");
3224
+ const scale = Math.min(1, maxDimension / Math.max(image.naturalWidth, image.naturalHeight));
3187
3225
  const canvas = document.createElement("canvas");
3188
- canvas.width = 512;
3189
- canvas.height = 704;
3226
+ canvas.width = Math.max(1, Math.round(image.naturalWidth * scale));
3227
+ canvas.height = Math.max(1, Math.round(image.naturalHeight * scale));
3190
3228
  const context = canvas.getContext("2d");
3191
3229
  if (!context) throw new Error("\u5F53\u524D\u6D4F\u89C8\u5668\u65E0\u6CD5\u5904\u7406\u56FE\u7247\u3002");
3192
- context.fillStyle = "#253235";
3193
- context.fillRect(0, 0, 512, 704);
3194
- const scale = Math.max(512 / image.naturalWidth, 704 / image.naturalHeight);
3195
- const width = image.naturalWidth * scale, height = image.naturalHeight * scale;
3196
- context.drawImage(image, (512 - width) / 2, (704 - height) / 2, width, height);
3197
- const result = canvas.toDataURL("image/jpeg", 0.9);
3198
- if (result.length > MAX_CARD_IMAGE_LENGTH) throw new Error("\u56FE\u7247\u538B\u7F29\u540E\u4ECD\u7136\u8FC7\u5927\uFF0C\u8BF7\u6362\u4E00\u5F20\u56FE\u7247\u3002");
3199
- return result;
3230
+ context.imageSmoothingQuality = "high";
3231
+ context.fillStyle = CARD_IMAGE_BACKGROUND;
3232
+ context.fillRect(0, 0, canvas.width, canvas.height);
3233
+ context.drawImage(image, 0, 0, canvas.width, canvas.height);
3234
+ const png = canvas.toDataURL("image/png");
3235
+ if (png.length <= MAX_CARD_IMAGE_LENGTH) return png;
3236
+ for (const quality of [0.94, 0.88, 0.8]) {
3237
+ const result = canvas.toDataURL("image/webp", quality);
3238
+ if (result.length <= MAX_CARD_IMAGE_LENGTH) return result;
3239
+ }
3240
+ throw new Error("\u56FE\u7247\u538B\u7F29\u540E\u4ECD\u7136\u8FC7\u5927\uFF0C\u8BF7\u7F29\u5C0F\u56FE\u7247\u6216\u4F7F\u7528\u66F4\u7B80\u6D01\u7684\u56FE\u6848\u3002");
3200
3241
  } finally {
3201
3242
  URL.revokeObjectURL(url);
3202
3243
  }
@@ -3283,12 +3324,27 @@ function strapGeometry(points, settings, scale) {
3283
3324
  return layers;
3284
3325
  }
3285
3326
 
3327
+ // src/pendant/strap-texture.ts
3328
+ var STRAP_TEXTURE_SEGMENTS = 48;
3329
+ function strapTextureTransform(a, b, width, index) {
3330
+ const dx = b.x - a.x, dy = b.y - a.y, distance = Math.hypot(dx, dy);
3331
+ const nx = distance > 1e-4 ? -dy / distance * width : width;
3332
+ const ny = distance > 1e-4 ? dx / distance * width : 0;
3333
+ return `matrix(${nx} ${ny} ${dx} ${dy} ${a.x - nx / 2 - dx * index} ${a.y - ny / 2 - dy * index})`;
3334
+ }
3335
+
3286
3336
  // src/pendant/strap-preview.tsx
3287
3337
  var import_jsx_runtime2 = require("react/jsx-runtime");
3288
- function StrapPreview({ material, color, swatch = false }) {
3338
+ function StrapPreview({ material, color, swatch = false, image = "", length = 100 }) {
3339
+ const id = (0, import_react4.useId)().replace(/:/g, "");
3340
+ const points = (0, import_react4.useMemo)(() => Array.from({ length: STRAP_TEXTURE_SEGMENTS + 1 }, (_, i) => swatch ? { x: 8 + 104 * i / STRAP_TEXTURE_SEGMENTS, y: 20 } : { x: 50, y: 6 + 121 * i / STRAP_TEXTURE_SEGMENTS }), [swatch]);
3289
3341
  const layers = (0, import_react4.useMemo)(() => strapGeometry(swatch ? [{ x: 8, y: 20 }, { x: 112, y: 20 }] : [{ x: 50, y: 6 }, { x: 50, y: 127 }], { material, color }, swatch ? 100 : 72), [material, color, swatch]);
3290
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { className: swatch ? "dsh-partner-strap-swatch" : void 0, viewBox: swatch ? "0 0 120 40" : "0 0 100 130", "aria-hidden": "true", children: [
3291
- layers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: layer.d, fill: "none", stroke: layer.stroke, strokeWidth: layer.width, opacity: layer.opacity, strokeLinecap: "round", strokeLinejoin: "round" }, layer.id)),
3342
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { className: swatch ? "dsh-partner-strap-swatch" : void 0, style: swatch ? void 0 : { height: `${130 * length / 100}px` }, viewBox: swatch ? "0 0 120 40" : "0 0 100 130", preserveAspectRatio: "none", "aria-hidden": "true", children: [
3343
+ image && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pattern", { id, patternUnits: "userSpaceOnUse", width: "1", height: "4", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("image", { href: image, width: "1", height: "4", preserveAspectRatio: "none" }) }) }),
3344
+ layers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react4.Fragment, { children: [
3345
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: layer.d, fill: "none", stroke: layer.stroke, strokeWidth: layer.width, opacity: layer.opacity, strokeLinecap: "round", strokeLinejoin: "round" }),
3346
+ image && layer.id === "surface" && points.slice(0, -1).map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "0", y: i - 5e-3, width: "1", height: "1.01", fill: `url(#${id})`, transform: strapTextureTransform(p, points[i + 1], layer.width, i) }, i))
3347
+ ] }, layer.id)),
3292
3348
  !swatch && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "42", y: "3", width: "16", height: "6", rx: "3", fill: "#c3ced0" })
3293
3349
  ] });
3294
3350
  }
@@ -3301,11 +3357,13 @@ var MATERIALS = [
3301
3357
  { id: "leather", name: "\u76AE\u9769", detail: "\u5E73\u6574\u7F1D\u7EBF" }
3302
3358
  ];
3303
3359
  var FRAME_RATES = [{ fps: 24, label: "\u7701\u7535" }, { fps: 30, label: "\u5747\u8861" }, { fps: 60, label: "\u6D41\u7545" }];
3360
+ var IMAGE_FITS = [{ fit: "contain", label: "\u5B8C\u6574\u663E\u793A", detail: "\u81EA\u9002\u5E94 \xB7 \u4E0D\u88C1\u5207" }, { fit: "cover", label: "\u94FA\u6EE1\u88C1\u5207", detail: "\u5C45\u4E2D \xB7 \u65E0\u7559\u767D" }];
3304
3361
  var COLORS = ["#617e73", "#46515b", "#b7afa0", "#997365", "#647c98", "#807388"];
3305
3362
  function PendantSettingsPanel() {
3306
3363
  const settings = usePendantSettings(), [draft, setDraft] = (0, import_react5.useState)(() => ({ ...settings }));
3307
3364
  const [error, setError] = (0, import_react5.useState)(""), [saved, setSaved] = (0, import_react5.useState)(false), [processing, setProcessing] = (0, import_react5.useState)(false);
3308
3365
  const file = (0, import_react5.useRef)(null), epoch = (0, import_react5.useRef)(0);
3366
+ const strapFile = (0, import_react5.useRef)(null);
3309
3367
  const previous = (0, import_react5.useRef)(settings);
3310
3368
  (0, import_react5.useEffect)(() => {
3311
3369
  const before = previous.current;
@@ -3323,7 +3381,7 @@ function PendantSettingsPanel() {
3323
3381
  const validColor = /^#[0-9a-f]{6}$/i.test(draft.color);
3324
3382
  const previewColor = validColor ? draft.color : DEFAULT_PENDANT_SETTINGS.color;
3325
3383
  const dirty = !samePendantSettings(draft, settings);
3326
- const upload = async (event) => {
3384
+ const upload = async (event, target = "image") => {
3327
3385
  const selected = event.currentTarget.files?.[0];
3328
3386
  event.currentTarget.value = "";
3329
3387
  if (!selected) return;
@@ -3332,8 +3390,8 @@ function PendantSettingsPanel() {
3332
3390
  setError("");
3333
3391
  setSaved(false);
3334
3392
  try {
3335
- const image = await prepareCardImage(selected);
3336
- if (request === epoch.current) update({ image });
3393
+ const image = await prepareCardImage(selected, target === "strapImage" ? 256 : 1536);
3394
+ if (request === epoch.current) update({ [target]: image });
3337
3395
  } catch (reason) {
3338
3396
  if (request === epoch.current) setError(errorMessage(reason));
3339
3397
  } finally {
@@ -3367,7 +3425,7 @@ function PendantSettingsPanel() {
3367
3425
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-setting-hint", children: "\u6D88\u606F\u4FDD\u7559\u5728\u5361\u7247\u5185\u4FA7\uFF1B\u6B63\u9762\u5C55\u793A\u56FE\u6848\uFF0C\u65B0\u6D88\u606F\u5230\u8FBE\u65F6\u8F7B\u6446\u3001\u8F6C\u6B63\u5E76\u95EA\u5149\u3002" }),
3368
3426
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-partner-pendant-fps-row", children: [
3369
3427
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u5E27\u7387\u4E0A\u9650" }),
3370
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-fps-options", role: "group", "aria-label": "\u6302\u9970\u5E27\u7387", children: FRAME_RATES.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", "aria-pressed": draft.fps === item.fps, onClick: () => update({ fps: item.fps }), children: [
3428
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-options", role: "group", "aria-label": "\u6302\u9970\u5E27\u7387", children: FRAME_RATES.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", "aria-pressed": draft.fps === item.fps, onClick: () => update({ fps: item.fps }), children: [
3371
3429
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("strong", { children: [
3372
3430
  item.fps,
3373
3431
  " FPS"
@@ -3378,6 +3436,17 @@ function PendantSettingsPanel() {
3378
3436
  ] })
3379
3437
  ] }),
3380
3438
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(WorkspaceBlock, { title: "\u7EF3\u5B50\u5916\u89C2", detail: "\u6750\u8D28\u53EA\u6539\u53D8\u5916\u89C2\uFF0C\u4FDD\u7559\u5F53\u524D\u7684\u62C9\u4F38\u4E0E\u56DE\u5F39\u624B\u611F\u3002", children: [
3439
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "dsh-partner-pendant-length", children: [
3440
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
3441
+ "\u7EF3\u5B50\u957F\u5EA6 ",
3442
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("output", { children: [
3443
+ draft.strapLength,
3444
+ "%"
3445
+ ] })
3446
+ ] }),
3447
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "range", min: "60", max: "160", step: "5", "aria-label": "\u7EF3\u5B50\u957F\u5EA6", value: draft.strapLength, onChange: (event) => update({ strapLength: Number(event.target.value) }) }),
3448
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: "60% \u77ED\u7EF3 \u2014 100% \u9ED8\u8BA4 \u2014 160% \u957F\u7EF3\uFF1B\u4FDD\u5B58\u540E\u8C03\u6574\u5B9E\u9645\u60AC\u6302\u957F\u5EA6\u3002" })
3449
+ ] }),
3381
3450
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-materials", role: "group", "aria-label": "\u7EF3\u5B50\u6750\u8D28", children: MATERIALS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", "aria-pressed": draft.material === item.id, onClick: () => update({ material: item.id }), children: [
3382
3451
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StrapPreview, { material: item.id, color: previewColor, swatch: true }),
3383
3452
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { children: item.name }),
@@ -3395,9 +3464,20 @@ function PendantSettingsPanel() {
3395
3464
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { "aria-label": "\u81EA\u5B9A\u4E49\u7EF3\u5B50\u989C\u8272", "aria-invalid": !validColor, value: draft.color, maxLength: 7, spellCheck: false, onChange: (event) => update({ color: event.target.value }) })
3396
3465
  ] })
3397
3466
  ] }),
3398
- !validColor && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-color-error", children: "\u8BF7\u8F93\u5165 # \u5F00\u5934\u7684\u516D\u4F4D\u989C\u8272\u503C\u3002" })
3467
+ !validColor && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-color-error", children: "\u8BF7\u8F93\u5165 # \u5F00\u5934\u7684\u516D\u4F4D\u989C\u8272\u503C\u3002" }),
3468
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { ref: strapFile, type: "file", accept: "image/png,image/jpeg,image/webp", hidden: true, "aria-label": "\u4E0A\u4F20\u7EF3\u5B50\u7EB9\u7406", onChange: (event) => {
3469
+ void upload(event, "strapImage");
3470
+ } }),
3471
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-partner-pendant-image-actions", children: [
3472
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", disabled: processing, onClick: () => strapFile.current?.click(), children: [
3473
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.IconPlusOutline16, { size: 15 }),
3474
+ draft.strapImage ? "\u66F4\u6362\u7EF3\u5B50\u7EB9\u7406" : "\u81EA\u5B9A\u4E49\u7EF3\u5B50\u7EB9\u7406"
3475
+ ] }),
3476
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", disabled: processing || !draft.strapImage, onClick: () => update({ strapImage: "" }), children: "\u79FB\u9664\u7EB9\u7406" })
3477
+ ] }),
3478
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-setting-hint", children: "\u7EB9\u7406\u6CBF\u7EF3\u5B50\u91CD\u590D\u8D34\u5408\uFF0C\u8DDF\u968F\u79FB\u52A8\u3001\u5F2F\u66F2\u548C\u62C9\u4F38\uFF1B\u5EFA\u8BAE\u4F7F\u7528\u65E0\u7F1D\u56FE\u6848\uFF0C\u4FDD\u7559\u6240\u9009\u6750\u8D28\u7684\u8FB9\u7F18\u548C\u7F16\u7EC7\u7EC6\u8282\u3002" })
3399
3479
  ] }),
3400
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(WorkspaceBlock, { title: "\u6B63\u9762\u56FE\u6848", detail: "\u652F\u6301 PNG\u3001JPEG\u3001WebP\uFF0C\u6700\u5927 5 MB\u3002\u56FE\u7247\u5C45\u4E2D\u88C1\u5207\u4E3A\u7AD6\u5411\u5361\u9762\uFF0C\u53EA\u5728\u672C\u673A\u5904\u7406\u3002", children: [
3480
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(WorkspaceBlock, { title: "\u6B63\u9762\u56FE\u6848", detail: "\u652F\u6301 PNG\u3001JPEG\u3001WebP\uFF0C\u6700\u5927 5 MB\u3002\u4FDD\u7559\u56FE\u7247\u6BD4\u4F8B\uFF0C\u53EA\u5728\u672C\u673A\u5904\u7406\u3002", children: [
3401
3481
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { ref: file, type: "file", accept: "image/png,image/jpeg,image/webp", hidden: true, "aria-label": "\u4E0A\u4F20\u5361\u7247\u56FE\u7247", onChange: (event) => {
3402
3482
  void upload(event);
3403
3483
  } }),
@@ -3411,7 +3491,23 @@ function PendantSettingsPanel() {
3411
3491
  "\u6062\u590D\u9ED8\u8BA4\u56FE\u6848"
3412
3492
  ] })
3413
3493
  ] }),
3414
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-setting-hint", children: "\u5EFA\u8BAE\u4F7F\u7528 8:11 \u7AD6\u56FE\uFF1B\u4FDD\u5B58\u540E\u5237\u65B0\u4ECD\u4F1A\u4FDD\u7559\uFF0C\u6D88\u606F\u4E0D\u4F1A\u8986\u76D6\u4F60\u7684\u56FE\u6848\u3002" })
3494
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-options", "data-columns": "2", role: "group", "aria-label": "\u56FE\u7247\u9002\u5E94\u65B9\u5F0F", children: IMAGE_FITS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", disabled: processing, "aria-pressed": draft.imageFit === item.fit, onClick: () => update({ imageFit: item.fit }), children: [
3495
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { children: item.label }),
3496
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: item.detail })
3497
+ ] }, item.fit)) }),
3498
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-setting-hint", children: "\u5B8C\u6574\u663E\u793A\u4F1A\u6309\u6BD4\u4F8B\u7F29\u653E\uFF0C\u7A7A\u4F59\u90E8\u5206\u4F7F\u7528\u5361\u9762\u5E95\u8272\uFF1B\u94FA\u6EE1\u4F1A\u88C1\u5207\u8FB9\u7F18\uFF0C\u4E0D\u62C9\u4F38\u56FE\u7247\u3002\u65E7\u7248\u5DF2\u88C1\u5207\u7684\u56FE\u7247\u9700\u91CD\u65B0\u4E0A\u4F20\u624D\u80FD\u6062\u590D\u5B8C\u6574\u5185\u5BB9\u3002" }),
3499
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "dsh-partner-pendant-length", children: [
3500
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
3501
+ "\u5361\u7247\u6E05\u6670\u5EA6 ",
3502
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("output", { children: [
3503
+ draft.quality,
3504
+ "%"
3505
+ ] })
3506
+ ] }),
3507
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "range", min: "0", max: "100", step: "5", value: draft.quality, "aria-label": "\u5361\u7247\u6E05\u6670\u5EA6", onChange: (event) => update({ quality: Number(event.target.value) }) }),
3508
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: "0% \u6807\u51C6\u3001\u7701\u8D44\u6E90 \u2014 100% \u9AD8\u6E05\uFF1B\u4FDD\u5B58\u540E\u751F\u6548\uFF0C\u4E0D\u6539\u53D8\u5E27\u7387\u4E0A\u9650\u3002" })
3509
+ ] }),
3510
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsh-partner-pendant-setting-hint", children: "\u56FE\u6848\u4F18\u5148\u65E0\u635F\u4FDD\u5B58\uFF0C\u6700\u957F\u8FB9\u4FDD\u7559\u81F3 1536 \u50CF\u7D20\u3002\u5DF2\u538B\u7F29\u7684\u65E7\u56FE\u7247\u5EFA\u8BAE\u91CD\u65B0\u4E0A\u4F20\uFF1B\u9AD8\u6E05\u65E0\u6CD5\u6062\u590D\u539F\u56FE\u7F3A\u5931\u7684\u7EC6\u8282\u3002" })
3415
3511
  ] }),
3416
3512
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-partner-pendant-settings-footer", children: [
3417
3513
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", disabled: processing, onClick: () => update({ ...DEFAULT_PENDANT_SETTINGS }), children: "\u91CD\u7F6E\u4E3A\u9ED8\u8BA4" }),
@@ -3424,8 +3520,8 @@ function PendantSettingsPanel() {
3424
3520
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: draft.enabled ? "\u4FDD\u5B58\u540E\u5E94\u7528\u5230\u4E3B\u754C\u9762" : "\u6302\u9970\u5C06\u9690\u85CF\uFF0C\u8BBE\u7F6E\u4ECD\u4F1A\u4FDD\u7559" })
3425
3521
  ] }),
3426
3522
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsh-partner-pendant-preview-stage", children: [
3427
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StrapPreview, { material: draft.material, color: previewColor }),
3428
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-preview-card", children: draft.image ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: draft.image, alt: "\u81EA\u5B9A\u4E49\u5361\u7247\u6B63\u9762\u9884\u89C8" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
3523
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StrapPreview, { material: draft.material, color: previewColor, image: draft.strapImage, length: draft.strapLength }),
3524
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsh-partner-pendant-preview-card", children: draft.image ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: draft.image, style: { objectFit: draft.imageFit }, alt: "\u81EA\u5B9A\u4E49\u5361\u7247\u6B63\u9762\u9884\u89C8" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
3429
3525
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.IconAgentPresetOutline16, { size: 38 }),
3430
3526
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { children: "WITH YOU" }),
3431
3527
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: "\u9ED8\u8BA4\u4F19\u4F34\u56FE\u6848" })
@@ -4984,8 +5080,79 @@ function TaskBoardStage({ id, label, tasks, focused, filtered, renderTask }) {
4984
5080
  ] });
4985
5081
  }
4986
5082
 
4987
- // src/ui/requirement-tasks-panel.tsx
5083
+ // src/ui/task-contract-panel.tsx
4988
5084
  var import_jsx_runtime12 = require("react/jsx-runtime");
5085
+ function TaskContractPanel({ task, checks, setChecks, busy }) {
5086
+ if (!task.acceptanceCriteria?.length && !task.resourceKeys?.length) return null;
5087
+ const editing = task.status === "review";
5088
+ const change = (criterion, patch) => setChecks((task.acceptanceCriteria ?? []).map((_, i) => ({ criterion: i + 1, verdict: "unverified", ...checks.find((c) => c.criterion === i + 1), ...criterion === i + 1 ? patch : {} })));
5089
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "dsh-partner-task-contract", children: [
5090
+ Boolean(task.acceptanceCriteria?.length) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { children: [
5091
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("strong", { children: [
5092
+ "\u9A8C\u6536\u6E05\u5355 \xB7 ",
5093
+ task.acceptanceCriteria?.length
5094
+ ] }),
5095
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: "\u4F19\u4F34 / \u4EBA\u5DE5\u6838\u9A8C\uFF0C\u4E0D\u7B49\u4E8E\u7A0B\u5E8F\u9A8C\u8BC1" })
5096
+ ] }),
5097
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ol", { children: task.acceptanceCriteria?.map((text, i) => {
5098
+ const criterion = i + 1, check = checks.find((c) => c.criterion === criterion);
5099
+ const saved = task.reviewChecks?.find((c) => c.criterion === criterion);
5100
+ const previous = task.previousAttempt?.reviewChecks?.find((c) => c.criterion === criterion);
5101
+ const evidence = (task.evidence ?? []).filter((e) => e.criterion === criterion);
5102
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
5103
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: text }),
5104
+ evidence.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("details", { className: "dsh-partner-requirement-disclosure", children: [
5105
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("summary", { children: [
5106
+ "\u6267\u884C\u8BC1\u636E \xB7 ",
5107
+ evidence.length,
5108
+ " \xB7 \u5C1A\u9700\u6838\u9A8C"
5109
+ ] }),
5110
+ evidence.map((e, j) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
5111
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: e.reference }),
5112
+ e.note && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: e.note })
5113
+ ] }, j))
5114
+ ] }),
5115
+ previous?.reason && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
5116
+ "\u4E0A\u6B21\u6838\u9A8C\uFF1A",
5117
+ previous.reason
5118
+ ] }),
5119
+ editing ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-task-fields", children: [
5120
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5121
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
5122
+ "\u7B2C ",
5123
+ criterion,
5124
+ " \u9879\u7ED3\u8BBA"
5125
+ ] }),
5126
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { disabled: busy, value: check?.verdict ?? "unverified", onChange: (e) => change(criterion, { verdict: e.target.value }), children: [
5127
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "unverified", children: "\u672A\u9A8C\u8BC1" }),
5128
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "passed", children: "\u5DF2\u6838\u9A8C\u901A\u8FC7" }),
5129
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "failed", children: "\u672A\u901A\u8FC7" })
5130
+ ] })
5131
+ ] }),
5132
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5133
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: check?.verdict === "passed" ? "\u5B9E\u9645\u6838\u9A8C\u8BC1\u636E" : "\u7F3A\u9879 / \u65E0\u6CD5\u6838\u9A8C\u7684\u539F\u56E0" }),
5134
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("textarea", { rows: 2, maxLength: 1e3, disabled: busy, value: (check?.verdict === "passed" ? check.evidence : check?.reason) ?? "", onChange: (e) => change(criterion, check?.verdict === "passed" ? { evidence: e.target.value } : { reason: e.target.value }) })
5135
+ ] })
5136
+ ] }) : saved && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
5137
+ saved.verdict === "passed" ? "\u6838\u9A8C\u901A\u8FC7" : saved.verdict === "failed" ? "\u672A\u901A\u8FC7" : "\u672A\u9A8C\u8BC1",
5138
+ " \xB7 ",
5139
+ saved.evidence ?? saved.reason
5140
+ ] })
5141
+ ] }, criterion);
5142
+ }) }),
5143
+ task.resourceKeys?.length ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("details", { className: "dsh-partner-requirement-disclosure", children: [
5144
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("summary", { children: [
5145
+ "\u72EC\u5360\u8D44\u6E90\u58F0\u660E \xB7 ",
5146
+ task.resourceKeys.length
5147
+ ] }),
5148
+ task.resourceKeys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { children: key }, key)),
5149
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: "\u4EC5\u7EA6\u675F\u770B\u677F\u5185\u76F8\u540C\u58F0\u660E\uFF0C\u4E0D\u662F\u64CD\u4F5C\u7CFB\u7EDF\u9501\u3002" })
5150
+ ] }) : null
5151
+ ] });
5152
+ }
5153
+
5154
+ // src/ui/requirement-tasks-panel.tsx
5155
+ var import_jsx_runtime13 = require("react/jsx-runtime");
4989
5156
  var COLUMNS = [
4990
5157
  { id: "backlog", label: "\u6536\u96C6\u7BB1" },
4991
5158
  { id: "ready", label: "\u5F85\u5F00\u59CB" },
@@ -5105,11 +5272,11 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5105
5272
  setBusy(void 0);
5106
5273
  }
5107
5274
  };
5108
- const accept = async (task) => {
5275
+ const accept = async (task, checks) => {
5109
5276
  setBusy(task.id);
5110
5277
  setError(void 0);
5111
5278
  try {
5112
- await api(`/tasks/${task.id}/accept`, { method: "POST", body: JSON.stringify({ expectedRevision: task.revision }) });
5279
+ await api(`/tasks/${task.id}/accept`, { method: "POST", body: JSON.stringify({ expectedRevision: task.revision, checks }) });
5113
5280
  await load2();
5114
5281
  } catch (reason) {
5115
5282
  setError(errorMessage(reason));
@@ -5117,12 +5284,12 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5117
5284
  setBusy(void 0);
5118
5285
  }
5119
5286
  };
5120
- const reject = async (task, reason) => {
5287
+ const reject = async (task, reason, checks) => {
5121
5288
  if (!reason) return;
5122
5289
  setBusy(task.id);
5123
5290
  setError(void 0);
5124
5291
  try {
5125
- await api(`/tasks/${task.id}/reject`, { method: "POST", body: JSON.stringify({ reason, expectedRevision: task.revision }) });
5292
+ await api(`/tasks/${task.id}/reject`, { method: "POST", body: JSON.stringify({ reason, expectedRevision: task.revision, checks }) });
5126
5293
  await load2();
5127
5294
  } catch (cause) {
5128
5295
  setError(errorMessage(cause));
@@ -5143,30 +5310,30 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5143
5310
  setBusy(void 0);
5144
5311
  }
5145
5312
  };
5146
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-feature-page is-board", children: [
5147
- !detailOnly && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
5148
- back && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("nav", { className: "dsh-partner-requirement-breadcrumb", children: [
5149
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: back, children: "\u9700\u6C42\u770B\u677F" }),
5150
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconChevronRightOutline14, { size: 14 }),
5151
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: requirement?.title ?? "\u672A\u5F52\u7C7B\u65E7\u4EFB\u52A1" })
5313
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-feature-page is-board", children: [
5314
+ !detailOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5315
+ back && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("nav", { className: "dsh-partner-requirement-breadcrumb", children: [
5316
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: back, children: "\u9700\u6C42\u770B\u677F" }),
5317
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconChevronRightOutline14, { size: 14 }),
5318
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: requirement?.title ?? "\u672A\u5F52\u7C7B\u65E7\u4EFB\u52A1" })
5152
5319
  ] }),
5153
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceHero, { eyebrow: requirement ? requirementStatus(requirement) : "\u65E7\u4EFB\u52A1", title: requirement?.title ?? "\u672A\u5F52\u7C7B\u65E7\u4EFB\u52A1", detail: requirement?.description || "\u4EFB\u52A1\u6309\u9636\u6BB5\u5C55\u793A\uFF0C\u70B9\u51FB\u67E5\u770B\u4EA4\u4ED8\u3001\u4F9D\u8D56\u548C\u6267\u884C\u72B6\u6001\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
5154
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "dsh-partner-board-live", title: syncedAt ? `\u6700\u8FD1\u540C\u6B65 ${new Date(syncedAt).toLocaleTimeString()}` : "\u6B63\u5728\u8FDE\u63A5", children: [
5155
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
5320
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceHero, { eyebrow: requirement ? requirementStatus(requirement) : "\u65E7\u4EFB\u52A1", title: requirement?.title ?? "\u672A\u5F52\u7C7B\u65E7\u4EFB\u52A1", detail: requirement?.description || "\u4EFB\u52A1\u6309\u9636\u6BB5\u5C55\u793A\uFF0C\u70B9\u51FB\u67E5\u770B\u4EA4\u4ED8\u3001\u4F9D\u8D56\u548C\u6267\u884C\u72B6\u6001\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5321
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsh-partner-board-live", title: syncedAt ? `\u6700\u8FD1\u540C\u6B65 ${new Date(syncedAt).toLocaleTimeString()}` : "\u6B63\u5728\u8FDE\u63A5", children: [
5322
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
5156
5323
  "\u5B9E\u65F6\u540C\u6B65"
5157
5324
  ] }),
5158
- requirement && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: () => setRequirementDetail(true), children: "\u9700\u6C42\u8BE6\u60C5" }),
5159
- requirement?.status === "planning" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", onClick: () => setCreating(true), children: [
5160
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconPlusOutline16, { size: 15 }),
5325
+ requirement && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => setRequirementDetail(true), children: "\u9700\u6C42\u8BE6\u60C5" }),
5326
+ requirement?.status === "planning" && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", onClick: () => setCreating(true), children: [
5327
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconPlusOutline16, { size: 15 }),
5161
5328
  "\u65B0\u4EFB\u52A1"
5162
5329
  ] })
5163
5330
  ] }) })
5164
5331
  ] }),
5165
- error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceNotice, { children: error }),
5166
- requirementDetail && requirement && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceDialog, { eyebrow: "\u9700\u6C42\u8BE6\u60C5", title: requirement.title, detail: requirementStatus(requirement), close: () => setRequirementDetail(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RequirementDetail, { item: requirement, tasks: requirementTasks, directory, changed: load2, close: () => setRequirementDetail(false) }, requirement.id) }),
5167
- creating && requirement && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u5B50\u4EFB\u52A1", detail: `\u6240\u5C5E\u9700\u6C42\uFF1A${requirement.title}`, close: () => setCreating(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TaskForm, { requirementId: requirement.id, companions: directory, tasks: requirementTasks, close: () => setCreating(false), changed: load2 }) }),
5168
- selectedTask && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(WorkspaceDialog, { eyebrow: "TASK DETAIL", title: selectedTask.title, detail: taskDialogSummary(selectedTask, directory), close: () => setSelectedTaskId(void 0), width: "wide", children: [
5169
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
5332
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceNotice, { children: error }),
5333
+ requirementDetail && requirement && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceDialog, { eyebrow: "\u9700\u6C42\u8BE6\u60C5", title: requirement.title, detail: requirementStatus(requirement), close: () => setRequirementDetail(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequirementDetail, { item: requirement, tasks: requirementTasks, directory, changed: load2, close: () => setRequirementDetail(false) }, requirement.id) }),
5334
+ creating && requirement && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u5B50\u4EFB\u52A1", detail: `\u6240\u5C5E\u9700\u6C42\uFF1A${requirement.title}`, close: () => setCreating(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TaskForm, { requirementId: requirement.id, companions: directory, tasks: requirementTasks, close: () => setCreating(false), changed: load2 }) }),
5335
+ selectedTask && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(WorkspaceDialog, { eyebrow: "TASK DETAIL", title: selectedTask.title, detail: taskDialogSummary(selectedTask, directory), close: () => setSelectedTaskId(void 0), width: "wide", children: [
5336
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5170
5337
  TaskDetail,
5171
5338
  {
5172
5339
  task: selectedTask,
@@ -5184,11 +5351,11 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5184
5351
  review: () => {
5185
5352
  void review(selectedTask);
5186
5353
  },
5187
- accept: () => {
5188
- void accept(selectedTask);
5354
+ accept: (checks) => {
5355
+ void accept(selectedTask, checks);
5189
5356
  },
5190
- reject: (reason) => {
5191
- void reject(selectedTask, reason);
5357
+ reject: (reason, checks) => {
5358
+ void reject(selectedTask, reason, checks);
5192
5359
  },
5193
5360
  remove: () => {
5194
5361
  void remove(selectedTask);
@@ -5196,61 +5363,61 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5196
5363
  },
5197
5364
  selectedTask.id
5198
5365
  ),
5199
- error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceNotice, { children: error })
5366
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceNotice, { children: error })
5200
5367
  ] }),
5201
- !detailOnly && (loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CollectionSkeleton, { rows: 6 }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
5202
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-board-tools", children: [
5203
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "dsh-partner-board-search", children: [
5204
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u4EFB\u52A1" }),
5205
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconSearchOutline16, { size: 16 }) }),
5206
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { value: query, onChange: (event) => setQuery(event.target.value), placeholder: "\u641C\u7D22\u4EFB\u52A1\u3001\u8D1F\u8D23\u4EBA\u6216\u524D\u7F6E\u4EFB\u52A1" }),
5207
- query && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: () => setQuery(""), "aria-label": "\u6E05\u9664\u4EFB\u52A1\u641C\u7D22", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconCloseOutline16, { size: 14 }) })
5368
+ !detailOnly && (loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollectionSkeleton, { rows: 6 }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5369
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-board-tools", children: [
5370
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "dsh-partner-board-search", children: [
5371
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u4EFB\u52A1" }),
5372
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconSearchOutline16, { size: 16 }) }),
5373
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { value: query, onChange: (event) => setQuery(event.target.value), placeholder: "\u641C\u7D22\u4EFB\u52A1\u3001\u8D1F\u8D23\u4EBA\u6216\u524D\u7F6E\u4EFB\u52A1" }),
5374
+ query && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => setQuery(""), "aria-label": "\u6E05\u9664\u4EFB\u52A1\u641C\u7D22", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconCloseOutline16, { size: 14 }) })
5208
5375
  ] }),
5209
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "dsh-partner-board-assignee", children: [
5210
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "\u6309\u8D1F\u8D23\u4EBA\u7B5B\u9009" }),
5211
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { value: assigneeFilter, onChange: (event) => setAssigneeFilter(event.target.value), children: [
5212
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "all", children: "\u5168\u90E8\u4F19\u4F34" }),
5213
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "unassigned", children: "\u672A\u6307\u6D3E" }),
5214
- directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5376
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "dsh-partner-board-assignee", children: [
5377
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "\u6309\u8D1F\u8D23\u4EBA\u7B5B\u9009" }),
5378
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { value: assigneeFilter, onChange: (event) => setAssigneeFilter(event.target.value), children: [
5379
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "all", children: "\u5168\u90E8\u4F19\u4F34" }),
5380
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "unassigned", children: "\u672A\u6307\u6D3E" }),
5381
+ directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5215
5382
  "@",
5216
5383
  item.name
5217
5384
  ] }, item.id))
5218
5385
  ] })
5219
5386
  ] }),
5220
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "dsh-partner-board-assignee is-mobile-stage", children: [
5221
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "\u6309\u4EFB\u52A1\u9636\u6BB5\u7B5B\u9009" }),
5222
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { value: statusFilter, onChange: (event) => setStatusFilter(event.target.value), children: [
5223
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: "all", children: [
5387
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "dsh-partner-board-assignee is-mobile-stage", children: [
5388
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "\u6309\u4EFB\u52A1\u9636\u6BB5\u7B5B\u9009" }),
5389
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { value: statusFilter, onChange: (event) => setStatusFilter(event.target.value), children: [
5390
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: "all", children: [
5224
5391
  "\u5168\u90E8\u9636\u6BB5 \xB7 ",
5225
5392
  scopedTasks.length
5226
5393
  ] }),
5227
- COLUMNS.map((column) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: column.id, children: [
5394
+ COLUMNS.map((column) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: column.id, children: [
5228
5395
  column.label,
5229
5396
  " \xB7 ",
5230
5397
  statusCounts.get(column.id) ?? 0
5231
5398
  ] }, column.id))
5232
5399
  ] })
5233
5400
  ] }),
5234
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { "aria-live": "polite", children: [
5401
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { "aria-live": "polite", children: [
5235
5402
  "\u663E\u793A ",
5236
5403
  visibleTaskCount,
5237
5404
  " / ",
5238
5405
  board.tasks.length
5239
5406
  ] })
5240
5407
  ] }),
5241
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("nav", { className: "dsh-partner-board-statuses", "aria-label": "\u6309\u4EFB\u52A1\u72B6\u6001\u7B5B\u9009", children: [
5242
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", className: statusFilter === "all" ? "is-active" : "", "aria-pressed": statusFilter === "all", onClick: () => setStatusFilter("all"), children: [
5243
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u5168\u90E8" }),
5244
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { children: scopedTasks.length })
5408
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("nav", { className: "dsh-partner-board-statuses", "aria-label": "\u6309\u4EFB\u52A1\u72B6\u6001\u7B5B\u9009", children: [
5409
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: statusFilter === "all" ? "is-active" : "", "aria-pressed": statusFilter === "all", onClick: () => setStatusFilter("all"), children: [
5410
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u5168\u90E8" }),
5411
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: scopedTasks.length })
5245
5412
  ] }),
5246
- COLUMNS.map((column) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", className: statusFilter === column.id ? "is-active" : "", "aria-pressed": statusFilter === column.id, onClick: () => setStatusFilter(column.id), children: [
5247
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: column.label }),
5248
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { children: statusCounts.get(column.id) ?? 0 })
5413
+ COLUMNS.map((column) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: statusFilter === column.id ? "is-active" : "", "aria-pressed": statusFilter === column.id, onClick: () => setStatusFilter(column.id), children: [
5414
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: column.label }),
5415
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: statusCounts.get(column.id) ?? 0 })
5249
5416
  ] }, column.id))
5250
5417
  ] }),
5251
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "dsh-partner-board", "data-focused": statusFilter !== "all", "aria-label": "\u4EFB\u52A1\u770B\u677F", children: visibleColumns.map((column) => {
5418
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "dsh-partner-board", "data-focused": statusFilter !== "all", "aria-label": "\u4EFB\u52A1\u770B\u677F", children: visibleColumns.map((column) => {
5252
5419
  const tasks = tasksByStatus.get(column.id) ?? [];
5253
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TaskBoardStage, { id: column.id, label: column.label, tasks, focused: statusFilter !== "all", filtered: Boolean(query || assigneeFilter !== "all"), renderTask: (task) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
5420
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TaskBoardStage, { id: column.id, label: column.label, tasks, focused: statusFilter !== "all", filtered: Boolean(query || assigneeFilter !== "all"), renderTask: (task) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5254
5421
  TaskCard,
5255
5422
  {
5256
5423
  task,
@@ -5263,9 +5430,9 @@ function RequirementTasksPanel({ initialTaskId, openRequest, requirementId, back
5263
5430
  task.id
5264
5431
  ) }, column.id);
5265
5432
  }) }),
5266
- !scopedTasks.length && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-collection-empty", children: [
5267
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: query || assigneeFilter !== "all" ? "\u6CA1\u6709\u5339\u914D\u7684\u4EFB\u52A1" : "\u8FD8\u6CA1\u6709\u5B50\u4EFB\u52A1" }),
5268
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: requirement?.status === "planning" ? "\u6DFB\u52A0\u5B50\u4EFB\u52A1\u5E76\u5B89\u6392\u8D1F\u8D23\u4EBA\uFF0C\u5B8C\u6210\u5206\u5DE5\u540E\u5728\u9700\u6C42\u8BE6\u60C5\u4E2D\u63D0\u4EA4\u89C4\u5212\u3002" : "\u53EF\u8FD4\u56DE\u9700\u6C42\u770B\u677F\u67E5\u770B\u5176\u4ED6\u9700\u6C42\u3002" })
5433
+ !scopedTasks.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-collection-empty", children: [
5434
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: query || assigneeFilter !== "all" ? "\u6CA1\u6709\u5339\u914D\u7684\u4EFB\u52A1" : "\u8FD8\u6CA1\u6709\u5B50\u4EFB\u52A1" }),
5435
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: requirement?.status === "planning" ? "\u6DFB\u52A0\u5B50\u4EFB\u52A1\u5E76\u5B89\u6392\u8D1F\u8D23\u4EBA\uFF0C\u5B8C\u6210\u5206\u5DE5\u540E\u5728\u9700\u6C42\u8BE6\u60C5\u4E2D\u63D0\u4EA4\u89C4\u5212\u3002" : "\u53EF\u8FD4\u56DE\u9700\u6C42\u770B\u677F\u67E5\u770B\u5176\u4ED6\u9700\u6C42\u3002" })
5269
5436
  ] })
5270
5437
  ] }))
5271
5438
  ] });
@@ -5275,37 +5442,47 @@ function TaskCard({ task, tasksById, directoryById, dependentCount, execution, o
5275
5442
  const blockers = dependencies.filter((item) => item.status !== "done");
5276
5443
  const completedDependencies = dependencies.length - blockers.length;
5277
5444
  const assignee = directoryById.get(task.assigneeCompanionId ?? "");
5278
- const executionState = execution ? delegationState(execution, blockers.length) : task.autoRun && task.status === "ready" ? { label: blockers.length ? "\u7B49\u5F85\u524D\u7F6E\u5B8C\u6210" : "\u7B49\u5F85\u8C03\u5EA6" } : void 0;
5279
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("article", { className: "dsh-partner-task-card", "data-blocked": blockers.length > 0, "data-priority": task.priority, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "button", className: "dsh-partner-task-summary", "aria-haspopup": "dialog", onClick: open, children: [
5280
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
5281
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "dsh-partner-task-card-title", children: [
5282
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { title: task.title, children: task.title }),
5283
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("em", { children: priorityLabel(task.priority) })
5445
+ const executionState = task.scheduling ? { label: task.scheduling.message } : execution ? delegationState(execution, blockers.length) : task.autoRun && task.status === "ready" ? { label: blockers.length ? "\u7B49\u5F85\u524D\u7F6E\u5B8C\u6210" : "\u7B49\u5F85\u8C03\u5EA6" } : void 0;
5446
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("article", { className: "dsh-partner-task-card", "data-blocked": blockers.length > 0, "data-priority": task.priority, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "dsh-partner-task-summary", "aria-haspopup": "dialog", onClick: open, children: [
5447
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
5448
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsh-partner-task-card-title", children: [
5449
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { title: task.title, children: task.title }),
5450
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("em", { children: priorityLabel(task.priority) })
5284
5451
  ] }),
5285
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { className: "dsh-partner-task-card-owner", children: [
5452
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { className: "dsh-partner-task-card-owner", children: [
5286
5453
  assignee ? `@${assignee.name}` : "\u672A\u6307\u6D3E",
5287
5454
  task.resultSummary ? " \xB7 \u5DF2\u6709\u7ED3\u679C" : "",
5288
5455
  executionState ? ` \xB7 ${executionState.label}` : ""
5289
5456
  ] }),
5290
- (dependencies.length > 0 || dependentCount > 0) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "dsh-partner-task-relations", children: [
5291
- dependencies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { "data-blocked": blockers.length > 0, children: [
5457
+ (dependencies.length > 0 || dependentCount > 0) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsh-partner-task-relations", children: [
5458
+ dependencies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { "data-blocked": blockers.length > 0, children: [
5292
5459
  "\u524D\u7F6E ",
5293
5460
  completedDependencies,
5294
5461
  "/",
5295
5462
  dependencies.length
5296
5463
  ] }),
5297
- dependentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
5464
+ dependentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
5298
5465
  "\u5B8C\u6210\u540E\u89E3\u9501 ",
5299
5466
  dependentCount
5300
5467
  ] })
5301
5468
  ] })
5302
5469
  ] }),
5303
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconChevronRightOutline14, { size: 14 })
5470
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconChevronRightOutline14, { size: 14 })
5304
5471
  ] }) });
5305
5472
  }
5306
5473
  function TaskDetail({ task, tasks, activities, directory, execution, busy, update, delegate, review, accept, reject, remove }) {
5307
5474
  const [rejecting, setRejecting] = (0, import_react17.useState)(false);
5475
+ const [checks, setChecks] = (0, import_react17.useState)([]);
5476
+ (0, import_react17.useEffect)(() => {
5477
+ setChecks([]);
5478
+ }, [task.id, task.revision]);
5308
5479
  const [rejectReason, setRejectReason] = (0, import_react17.useState)("");
5480
+ (0, import_react17.useEffect)(() => {
5481
+ if (task.status !== "review") {
5482
+ setRejecting(false);
5483
+ setRejectReason("");
5484
+ }
5485
+ }, [task.status]);
5309
5486
  const [confirmingDelete, setConfirmingDelete] = (0, import_react17.useState)(false);
5310
5487
  const byId = (0, import_react17.useMemo)(() => new Map(tasks.map((item) => [item.id, item])), [tasks]);
5311
5488
  const dependencies = task.dependencyTaskIds.map((id) => byId.get(id)).filter((item) => item !== void 0);
@@ -5316,21 +5493,30 @@ function TaskDetail({ task, tasks, activities, directory, execution, busy, updat
5316
5493
  const canExecute = Boolean(task.assigneeCompanionId) && !execution && !["doing", "review", "done"].includes(task.status);
5317
5494
  const recentActivities = [...activities].sort((left, right) => right.at - left.at).slice(0, 6);
5318
5495
  const executionState = execution ? delegationState(execution, blockers.length) : void 0;
5319
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-task-detail", children: [
5320
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "dsh-partner-task-description", children: [
5321
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "\u4EFB\u52A1\u8BF4\u660E" }),
5322
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: task.description || "\u6CA1\u6709\u8865\u5145\u8BF4\u660E" })
5496
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-task-detail", children: [
5497
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "dsh-partner-task-description", children: [
5498
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "\u4EFB\u52A1\u8BF4\u660E" }),
5499
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: task.description || "\u6CA1\u6709\u8865\u5145\u8BF4\u660E" })
5323
5500
  ] }),
5324
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-task-fields", children: [
5325
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5326
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u72B6\u6001" }),
5327
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("select", { value: task.status, disabled: busy, onChange: (event) => update({ status: event.target.value }), children: COLUMNS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: item.id, disabled: (item.id === "doing" || item.id === "review" || item.id === "done") && blockers.length > 0 || item.id === "done" && task.status !== "review" && task.status !== "done", children: item.label }, item.id)) })
5501
+ task.scheduling && task.status !== "done" && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "dsh-partner-task-description", children: [
5502
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: task.scheduling.message }),
5503
+ task.scheduling.taskIds?.length ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: task.scheduling.taskIds.map((id) => byId.get(id)?.title ?? "\u5DF2\u5220\u9664\u4EFB\u52A1").join("\u3001") }) : null,
5504
+ task.scheduling.retryAt ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
5505
+ "\u4E0B\u6B21\u91CD\u8BD5\uFF1A",
5506
+ new Date(task.scheduling.retryAt).toLocaleString()
5507
+ ] }) : null
5508
+ ] }),
5509
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TaskContractPanel, { task, checks, setChecks, busy }),
5510
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-task-fields", children: [
5511
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5512
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u72B6\u6001" }),
5513
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("select", { value: task.status, disabled: busy, onChange: (event) => update({ status: event.target.value, ...event.target.value === "done" ? { checks } : {} }), children: COLUMNS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: item.id, disabled: (item.id === "doing" || item.id === "review" || item.id === "done") && blockers.length > 0 || item.id === "done" && task.status !== "review" && task.status !== "done", children: item.label }, item.id)) })
5328
5514
  ] }),
5329
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5330
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u8D1F\u8D23\u4EBA" }),
5331
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { value: task.assigneeCompanionId ?? "", disabled: busy || task.status === "doing", onChange: (event) => update({ assigneeCompanionId: event.target.value }), children: [
5332
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "\u672A\u6307\u6D3E" }),
5333
- directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5515
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5516
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u8D1F\u8D23\u4EBA" }),
5517
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { value: task.assigneeCompanionId ?? "", disabled: busy || task.status === "doing", onChange: (event) => update({ assigneeCompanionId: event.target.value }), children: [
5518
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "\u672A\u6307\u6D3E" }),
5519
+ directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5334
5520
  "@",
5335
5521
  item.name,
5336
5522
  " \xB7 ",
@@ -5338,43 +5524,43 @@ function TaskDetail({ task, tasks, activities, directory, execution, busy, updat
5338
5524
  ] }, item.id))
5339
5525
  ] })
5340
5526
  ] }),
5341
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5342
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u9A8C\u6536\u4F19\u4F34" }),
5343
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { value: task.reviewerCompanionId ?? "", disabled: busy, onChange: (event) => update({ reviewerCompanionId: event.target.value }), children: [
5344
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "\u7559\u7A7A \xB7 \u4EBA\u5DE5\u9A8C\u6536" }),
5345
- directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5527
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5528
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u9A8C\u6536\u4F19\u4F34" }),
5529
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { value: task.reviewerCompanionId ?? "", disabled: busy, onChange: (event) => update({ reviewerCompanionId: event.target.value }), children: [
5530
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "\u7559\u7A7A \xB7 \u4EBA\u5DE5\u9A8C\u6536" }),
5531
+ directory.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5346
5532
  "@",
5347
5533
  item.name
5348
5534
  ] }, item.id))
5349
5535
  ] })
5350
5536
  ] })
5351
5537
  ] }),
5352
- executionState && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "dsh-partner-task-execution", "data-state": execution?.status, children: [
5353
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
5354
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
5355
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: executionState.title }),
5356
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: executionState.detail })
5538
+ executionState && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "dsh-partner-task-execution", "data-state": execution?.status, children: [
5539
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
5540
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
5541
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: executionState.title }),
5542
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: executionState.detail })
5357
5543
  ] })
5358
5544
  ] }),
5359
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "dsh-partner-task-dependency", children: [
5360
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { children: [
5361
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "\u524D\u7F6E\u4EFB\u52A1" }),
5362
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: blockers.length ? `${blockers.length} \u9879\u672A\u5B8C\u6210\uFF0C\u5F53\u524D\u4EFB\u52A1\u4E0D\u80FD\u542F\u52A8` : dependencies.length ? "\u5DF2\u5168\u90E8\u5B8C\u6210\uFF0C\u53EF\u4EE5\u542F\u52A8" : "\u6CA1\u6709\u524D\u7F6E\u4F9D\u8D56" })
5545
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "dsh-partner-task-dependency", children: [
5546
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { children: [
5547
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "\u524D\u7F6E\u4EFB\u52A1" }),
5548
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: blockers.length ? `${blockers.length} \u9879\u672A\u5B8C\u6210\uFF0C\u5F53\u524D\u4EFB\u52A1\u4E0D\u80FD\u542F\u52A8` : dependencies.length ? "\u5DF2\u5168\u90E8\u5B8C\u6210\uFF0C\u53EF\u4EE5\u542F\u52A8" : "\u6CA1\u6709\u524D\u7F6E\u4F9D\u8D56" })
5363
5549
  ] }),
5364
- dependencies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: dependencies.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { "data-done": item.status === "done", children: [
5365
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", { children: item.status === "done" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconCheckOutline16, { size: 12 }) : "" }),
5366
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("b", { children: item.title }),
5367
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", disabled: busy || ["doing", "review", "done"].includes(task.status), "aria-label": `\u79FB\u9664\u524D\u7F6E\u4EFB\u52A1 ${item.title}`, onClick: () => update({ dependencyTaskIds: task.dependencyTaskIds.filter((id) => id !== item.id) }), children: "\u79FB\u9664" })
5550
+ dependencies.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: dependencies.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { "data-done": item.status === "done", children: [
5551
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { children: item.status === "done" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconCheckOutline16, { size: 12 }) : "" }),
5552
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: item.title }),
5553
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: busy || ["doing", "review", "done"].includes(task.status), "aria-label": `\u79FB\u9664\u524D\u7F6E\u4EFB\u52A1 ${item.title}`, onClick: () => update({ dependencyTaskIds: task.dependencyTaskIds.filter((id) => id !== item.id) }), children: "\u79FB\u9664" })
5368
5554
  ] }, item.id)) }),
5369
- dependencyCandidates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5370
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "\u589E\u52A0\u524D\u7F6E\u4EFB\u52A1" }),
5371
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { defaultValue: "", disabled: busy || ["doing", "review", "done"].includes(task.status), onChange: (event) => {
5555
+ dependencyCandidates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5556
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "\u589E\u52A0\u524D\u7F6E\u4EFB\u52A1" }),
5557
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { defaultValue: "", disabled: busy || ["doing", "review", "done"].includes(task.status), onChange: (event) => {
5372
5558
  const id = event.currentTarget.value;
5373
5559
  if (id) update({ dependencyTaskIds: [...task.dependencyTaskIds, id] });
5374
5560
  event.currentTarget.value = "";
5375
5561
  }, children: [
5376
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "\u589E\u52A0\u524D\u7F6E\u4EFB\u52A1\u2026" }),
5377
- dependencyCandidates.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5562
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "\u589E\u52A0\u524D\u7F6E\u4EFB\u52A1\u2026" }),
5563
+ dependencyCandidates.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5378
5564
  item.title,
5379
5565
  " \xB7 ",
5380
5566
  statusLabel(item.status)
@@ -5382,67 +5568,65 @@ function TaskDetail({ task, tasks, activities, directory, execution, busy, updat
5382
5568
  ] })
5383
5569
  ] })
5384
5570
  ] }),
5385
- task.resultSummary && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ResultBlock, { label: "\u6267\u884C\u7ED3\u679C", value: task.resultSummary }),
5386
- task.reviewSummary && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ResultBlock, { label: `\u6838\u9A8C\u610F\u89C1${reviewer ? ` \xB7 @${reviewer.name}` : ""}`, value: task.reviewSummary }),
5387
- recentActivities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("details", { className: "dsh-partner-task-activity dsh-partner-requirement-disclosure", children: [
5388
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("summary", { children: [
5571
+ task.resultSummary && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ResultBlock, { label: "\u6267\u884C\u7ED3\u679C", value: task.resultSummary }),
5572
+ task.reviewSummary && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ResultBlock, { label: `\u6838\u9A8C\u610F\u89C1${reviewer ? ` \xB7 @${reviewer.name}` : ""}`, value: task.reviewSummary }),
5573
+ recentActivities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("details", { className: "dsh-partner-task-activity dsh-partner-requirement-disclosure", children: [
5574
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("summary", { children: [
5389
5575
  "\u6700\u8FD1\u6D3B\u52A8 \xB7 ",
5390
5576
  recentActivities.length
5391
5577
  ] }),
5392
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ol", { children: recentActivities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { children: [
5393
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: item.message }),
5394
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("time", { children: new Date(item.at).toLocaleString() })
5578
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ol", { children: recentActivities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { children: [
5579
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: item.message }),
5580
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("time", { children: new Date(item.at).toLocaleString() })
5395
5581
  ] }, item.id)) })
5396
5582
  ] }),
5397
- rejecting && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("form", { className: "dsh-partner-task-reject", onSubmit: (event) => {
5583
+ rejecting && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("form", { className: "dsh-partner-task-reject", onSubmit: (event) => {
5398
5584
  event.preventDefault();
5399
5585
  const reason = rejectReason.trim();
5400
5586
  if (!reason) return;
5401
- reject(reason);
5402
- setRejecting(false);
5403
- setRejectReason("");
5587
+ reject(reason, checks);
5404
5588
  }, children: [
5405
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5406
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u6253\u56DE\u539F\u56E0" }),
5407
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("textarea", { autoFocus: true, value: rejectReason, onChange: (event) => setRejectReason(event.target.value), rows: 3, maxLength: 1200, placeholder: "\u8BF4\u660E\u9700\u8981\u91CD\u505A\u6216\u8865\u5145\u7684\u5185\u5BB9" })
5589
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5590
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u6253\u56DE\u539F\u56E0" }),
5591
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("textarea", { autoFocus: true, value: rejectReason, onChange: (event) => setRejectReason(event.target.value), rows: 3, maxLength: 1200, placeholder: "\u8BF4\u660E\u9700\u8981\u91CD\u505A\u6216\u8865\u5145\u7684\u5185\u5BB9" })
5408
5592
  ] }),
5409
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
5410
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: () => {
5593
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
5594
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => {
5411
5595
  setRejecting(false);
5412
5596
  setRejectReason("");
5413
5597
  }, children: "\u53D6\u6D88" }),
5414
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "submit", className: "is-primary", disabled: busy || !rejectReason.trim(), children: "\u786E\u8BA4\u6253\u56DE" })
5598
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "submit", className: "is-primary", disabled: busy || !rejectReason.trim(), children: "\u786E\u8BA4\u6253\u56DE" })
5415
5599
  ] })
5416
5600
  ] }),
5417
- confirmingDelete && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-task-delete-confirm", role: "alert", children: [
5418
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u5220\u9664\u4F1A\u53D6\u6D88\u5173\u8054\u6267\u884C\uFF0C\u4F9D\u8D56\u5B83\u7684\u672A\u5B8C\u6210\u4EFB\u52A1\u5C06\u6682\u505C\u3002\u9700\u6C42\u9700\u91CD\u65B0\u786E\u8BA4\u8303\u56F4\uFF1B\u4E0D\u80FD\u64A4\u9500\u3002" }),
5419
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
5420
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: () => setConfirmingDelete(false), children: "\u4FDD\u7559\u4EFB\u52A1" }),
5421
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: remove, children: "\u786E\u8BA4\u5220\u9664" })
5601
+ confirmingDelete && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-task-delete-confirm", role: "alert", children: [
5602
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u5220\u9664\u4F1A\u53D6\u6D88\u5173\u8054\u6267\u884C\uFF0C\u4F9D\u8D56\u5B83\u7684\u672A\u5B8C\u6210\u4EFB\u52A1\u5C06\u6682\u505C\u3002\u9700\u6C42\u9700\u91CD\u65B0\u786E\u8BA4\u8303\u56F4\uFF1B\u4E0D\u80FD\u64A4\u9500\u3002" }),
5603
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
5604
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => setConfirmingDelete(false), children: "\u4FDD\u7559\u4EFB\u52A1" }),
5605
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: remove, children: "\u786E\u8BA4\u5220\u9664" })
5422
5606
  ] })
5423
5607
  ] }),
5424
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("footer", { className: "dsh-partner-task-actions", children: [
5425
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("small", { children: [
5608
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("footer", { className: "dsh-partner-task-actions", children: [
5609
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
5426
5610
  "r",
5427
5611
  task.revision,
5428
5612
  " \xB7 ",
5429
5613
  new Date(task.updatedAt).toLocaleString()
5430
5614
  ] }),
5431
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
5432
- task.status === "review" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
5433
- task.reviewerCompanionId && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", disabled: busy, onClick: review, children: busy ? "\u6838\u9A8C\u4E2D\u2026" : `\u4EA4\u7ED9 @${reviewer?.name ?? "\u4F19\u4F34"} \u6838\u9A8C` }),
5434
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", disabled: busy, onClick: () => setRejecting(true), children: "\u6253\u56DE\u91CD\u505A" }),
5435
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "is-primary", disabled: busy, onClick: accept, children: "\u9A8C\u6536\u901A\u8FC7" })
5436
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", disabled: busy || !canExecute, title: blockers.length ? "\u53EF\u63D0\u524D\u6392\u961F\uFF0C\u4F9D\u8D56\u901A\u8FC7\u9A8C\u6536\u540E\u81EA\u52A8\u6267\u884C" : !task.assigneeCompanionId ? "\u8BF7\u5148\u9009\u62E9\u8D1F\u8D23\u4EBA" : void 0, onClick: delegate, children: busy ? "\u6267\u884C\u4E2D\u2026" : execution?.status === "queued" ? "\u5DF2\u63D0\u4EA4\uFF0C\u7B49\u5F85\u6267\u884C" : task.status === "doing" ? "\u6B63\u5728\u6267\u884C" : task.status === "done" ? "\u5DF2\u7ECF\u5B8C\u6210" : `\u4EA4\u7ED9 @${assignee?.name ?? "\u4F19\u4F34"}` }),
5437
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: "is-icon", "aria-label": `\u5220\u9664 ${task.title}`, "aria-expanded": confirmingDelete, disabled: busy, onClick: () => setConfirmingDelete(true), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconTrashOutline16, { size: 14 }) })
5615
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
5616
+ task.status === "review" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5617
+ task.reviewerCompanionId && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: busy, onClick: review, children: busy ? "\u6838\u9A8C\u4E2D\u2026" : `\u4EA4\u7ED9 @${reviewer?.name ?? "\u4F19\u4F34"} \u6838\u9A8C` }),
5618
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: busy, onClick: () => setRejecting(true), children: "\u6253\u56DE\u91CD\u505A" }),
5619
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "is-primary", disabled: busy || Boolean(task.acceptanceCriteria?.length && (checks.length !== task.acceptanceCriteria.length || checks.some((c) => c.verdict !== "passed" || !c.evidence?.trim()))), onClick: () => accept(checks), children: "\u9A8C\u6536\u901A\u8FC7" })
5620
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: busy || !canExecute, title: blockers.length ? "\u53EF\u63D0\u524D\u6392\u961F\uFF0C\u4F9D\u8D56\u901A\u8FC7\u9A8C\u6536\u540E\u81EA\u52A8\u6267\u884C" : !task.assigneeCompanionId ? "\u8BF7\u5148\u9009\u62E9\u8D1F\u8D23\u4EBA" : void 0, onClick: delegate, children: busy ? "\u6267\u884C\u4E2D\u2026" : execution?.status === "queued" ? "\u5DF2\u63D0\u4EA4\uFF0C\u7B49\u5F85\u6267\u884C" : task.status === "doing" ? "\u6B63\u5728\u6267\u884C" : task.status === "done" ? "\u5DF2\u7ECF\u5B8C\u6210" : `\u4EA4\u7ED9 @${assignee?.name ?? "\u4F19\u4F34"}` }),
5621
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", className: "is-icon", "aria-label": `\u5220\u9664 ${task.title}`, "aria-expanded": confirmingDelete, disabled: busy, onClick: () => setConfirmingDelete(true), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconTrashOutline16, { size: 14 }) })
5438
5622
  ] })
5439
5623
  ] })
5440
5624
  ] });
5441
5625
  }
5442
5626
  function ResultBlock({ label, value }) {
5443
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: "dsh-partner-task-result", children: [
5444
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: label }),
5445
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: value })
5627
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "dsh-partner-task-result", children: [
5628
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: label }),
5629
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: value })
5446
5630
  ] });
5447
5631
  }
5448
5632
  function TaskForm({ requirementId, companions, tasks, close, changed: changed2 }) {
@@ -5463,7 +5647,9 @@ function TaskForm({ requirementId, companions, tasks, close, changed: changed2 }
5463
5647
  autoRun: data.get("submission") === "run" && Boolean(data.get("assignee")),
5464
5648
  assigneeCompanionId: data.get("assignee") || void 0,
5465
5649
  reviewerCompanionId: data.get("reviewer") || void 0,
5466
- dependencyTaskIds: data.getAll("dependencyTaskId")
5650
+ dependencyTaskIds: data.getAll("dependencyTaskId"),
5651
+ acceptanceCriteria: String(data.get("acceptanceCriteria") ?? "").split("\n").map((s) => s.trim()).filter(Boolean),
5652
+ resourceKeys: String(data.get("resourceKeys") ?? "").split("\n").map((s) => s.trim()).filter(Boolean)
5467
5653
  }) });
5468
5654
  await changed2();
5469
5655
  close();
@@ -5473,71 +5659,79 @@ function TaskForm({ requirementId, companions, tasks, close, changed: changed2 }
5473
5659
  setBusy(false);
5474
5660
  }
5475
5661
  };
5476
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("form", { className: "dsh-partner-task-form", "aria-busy": busy, onSubmit: (event) => {
5662
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("form", { className: "dsh-partner-task-form", "aria-busy": busy, onSubmit: (event) => {
5477
5663
  void submit(event);
5478
5664
  }, children: [
5479
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5480
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u4EFB\u52A1\u540D\u79F0" }),
5481
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { name: "title", maxLength: 200, required: true, autoFocus: true, placeholder: "\u4E00\u53E5\u8BDD\u8BF4\u660E\u4EA4\u4ED8\u76EE\u6807" })
5665
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5666
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u4EFB\u52A1\u540D\u79F0" }),
5667
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { name: "title", maxLength: 200, required: true, autoFocus: true, placeholder: "\u4E00\u53E5\u8BDD\u8BF4\u660E\u4EA4\u4ED8\u76EE\u6807" })
5482
5668
  ] }),
5483
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5484
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u8D1F\u8D23\u4EBA" }),
5485
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { name: "assignee", defaultValue: "", children: [
5486
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "\u672A\u6307\u6D3E" }),
5487
- companions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5669
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5670
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u8D1F\u8D23\u4EBA" }),
5671
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { name: "assignee", defaultValue: "", children: [
5672
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "\u672A\u6307\u6D3E" }),
5673
+ companions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5488
5674
  "@",
5489
5675
  item.name
5490
5676
  ] }, item.id))
5491
5677
  ] })
5492
5678
  ] }),
5493
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "is-wide", children: [
5494
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u4EFB\u52A1\u8BF4\u660E" }),
5495
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("textarea", { name: "description", maxLength: 8e3, rows: 5, placeholder: "\u8865\u5145\u80CC\u666F\u3001\u4EA4\u4ED8\u7269\u548C\u5B8C\u6210\u6761\u4EF6" })
5679
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "is-wide", children: [
5680
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u4EFB\u52A1\u8BF4\u660E" }),
5681
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("textarea", { name: "description", maxLength: 8e3, rows: 5, placeholder: "\u8865\u5145\u80CC\u666F\u3001\u4EA4\u4ED8\u7269\u548C\u5B8C\u6210\u6761\u4EF6" })
5682
+ ] }),
5683
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "is-wide", children: [
5684
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u9A8C\u6536\u6E05\u5355 \xB7 \u53EF\u9009" }),
5685
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("textarea", { name: "acceptanceCriteria", rows: 3, maxLength: 1e4, placeholder: "\u6BCF\u884C\u4E00\u9879\u53EF\u6838\u9A8C\u4EA4\u4ED8\uFF0C\u6700\u591A 20 \u9879" })
5496
5686
  ] }),
5497
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5498
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u4F18\u5148\u7EA7" }),
5499
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { name: "priority", defaultValue: "normal", children: [
5500
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "low", children: "\u4F4E" }),
5501
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "normal", children: "\u666E\u901A" }),
5502
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "high", children: "\u9AD8" }),
5503
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "urgent", children: "\u7D27\u6025" })
5687
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "is-wide", children: [
5688
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u72EC\u5360\u8D44\u6E90 \xB7 \u53EF\u9009" }),
5689
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("textarea", { name: "resourceKeys", rows: 2, maxLength: 2400, placeholder: "\u6BCF\u884C\u4E00\u4E2A\u4E00\u81F4\u7684\u8D44\u6E90\u6807\u8BC6\uFF0C\u4F8B\u5982 repo:team/api\uFF1B\u76F8\u540C\u8D44\u6E90\u4E0D\u4F1A\u540C\u65F6\u6267\u884C" })
5690
+ ] }),
5691
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5692
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u4F18\u5148\u7EA7" }),
5693
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { name: "priority", defaultValue: "normal", children: [
5694
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "low", children: "\u4F4E" }),
5695
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "normal", children: "\u666E\u901A" }),
5696
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "high", children: "\u9AD8" }),
5697
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "urgent", children: "\u7D27\u6025" })
5504
5698
  ] })
5505
5699
  ] }),
5506
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5507
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u9A8C\u6536\u4F19\u4F34" }),
5508
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { name: "reviewer", defaultValue: "", children: [
5509
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "\u7559\u7A7A \xB7 \u4EBA\u5DE5\u9A8C\u6536" }),
5510
- companions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: item.id, children: [
5700
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5701
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u9A8C\u6536\u4F19\u4F34" }),
5702
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { name: "reviewer", defaultValue: "", children: [
5703
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "", children: "\u7559\u7A7A \xB7 \u4EBA\u5DE5\u9A8C\u6536" }),
5704
+ companions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("option", { value: item.id, children: [
5511
5705
  "@",
5512
5706
  item.name
5513
5707
  ] }, item.id))
5514
5708
  ] })
5515
5709
  ] }),
5516
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "dsh-partner-task-form-dependencies is-wide", children: [
5517
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
5710
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-task-form-dependencies is-wide", children: [
5711
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
5518
5712
  "\u4F9D\u8D56\u4EFB\u52A1 ",
5519
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: "\u53EF\u9009" })
5713
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "\u53EF\u9009" })
5520
5714
  ] }),
5521
- dependencyOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: dependencyOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
5522
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", name: "dependencyTaskId", value: item.id }),
5523
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("i", {}),
5524
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: item.title }),
5525
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: statusLabel(item.status) })
5526
- ] }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: "\u5F53\u524D\u6CA1\u6709\u53EF\u9009\u7684\u672A\u5B8C\u6210\u4EFB\u52A1" }),
5527
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("small", { children: "\u53EF\u4EE5\u9009\u62E9\u591A\u4E2A\uFF1B\u7559\u7A7A\u8868\u793A\u8BE5\u4EFB\u52A1\u4E0D\u4F9D\u8D56\u5176\u4ED6\u4EFB\u52A1\u3002" })
5715
+ dependencyOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: dependencyOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { children: [
5716
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "checkbox", name: "dependencyTaskId", value: item.id }),
5717
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", {}),
5718
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: item.title }),
5719
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: statusLabel(item.status) })
5720
+ ] }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: "\u5F53\u524D\u6CA1\u6709\u53EF\u9009\u7684\u672A\u5B8C\u6210\u4EFB\u52A1" }),
5721
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: "\u53EF\u4EE5\u9009\u62E9\u591A\u4E2A\uFF1B\u7559\u7A7A\u8868\u793A\u8BE5\u4EFB\u52A1\u4E0D\u4F9D\u8D56\u5176\u4ED6\u4EFB\u52A1\u3002" })
5528
5722
  ] }),
5529
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "is-wide", children: [
5530
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u521B\u5EFA\u540E\u6267\u884C" }),
5531
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { name: "submission", defaultValue: "run", children: [
5532
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "run", children: "\u5DF2\u6307\u5B9A\u8D1F\u8D23\u4EBA\u5219\u81EA\u52A8\u6392\u961F\uFF0C\u7B49\u5F85\u4F9D\u8D56\u5B8C\u6210\u540E\u6267\u884C" }),
5533
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "plan", children: "\u4EC5\u89C4\u5212\uFF0C\u7A0D\u540E\u624B\u52A8\u63D0\u4EA4" })
5723
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "is-wide", children: [
5724
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u521B\u5EFA\u540E\u6267\u884C" }),
5725
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("select", { name: "submission", defaultValue: "run", children: [
5726
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "run", children: "\u5DF2\u6307\u5B9A\u8D1F\u8D23\u4EBA\u5219\u81EA\u52A8\u6392\u961F\uFF0C\u7B49\u5F85\u4F9D\u8D56\u5B8C\u6210\u540E\u6267\u884C" }),
5727
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: "plan", children: "\u4EC5\u89C4\u5212\uFF0C\u7A0D\u540E\u624B\u52A8\u63D0\u4EA4" })
5534
5728
  ] })
5535
5729
  ] }),
5536
- error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorkspaceNotice, { children: error }),
5537
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("footer", { children: [
5538
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
5539
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
5540
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dsh_client_ui_primitives9.IconPlusOutline16, { size: 14 }),
5730
+ error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceNotice, { children: error }),
5731
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("footer", { children: [
5732
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
5733
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
5734
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives9.IconPlusOutline16, { size: 14 }),
5541
5735
  busy ? "\u521B\u5EFA\u4E2D\u2026" : "\u521B\u5EFA\u4EFB\u52A1"
5542
5736
  ] })
5543
5737
  ] })
@@ -5575,7 +5769,7 @@ function delegationState(value, blockers = 0) {
5575
5769
  }
5576
5770
 
5577
5771
  // src/ui/requirement-board.tsx
5578
- var import_jsx_runtime13 = require("react/jsx-runtime");
5772
+ var import_jsx_runtime14 = require("react/jsx-runtime");
5579
5773
  function RequirementBoard({ initialTaskId, openRequest } = {}) {
5580
5774
  const [board, setBoard] = (0, import_react18.useState)({ tasks: [], activities: [], requirements: [] });
5581
5775
  const [directory, setDirectory] = (0, import_react18.useState)([]);
@@ -5616,102 +5810,102 @@ function RequirementBoard({ initialTaskId, openRequest } = {}) {
5616
5810
  }, [board.tasks]);
5617
5811
  const visible = requirements.filter((r) => r.status === "done" === archived && [r.title, r.description, directory.find((c) => c.id === r.ownerCompanionId)?.name].some((v) => v?.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase()))).sort((a, b) => b.updatedAt - a.updatedAt);
5618
5812
  const detail = requirements.find((r) => r.id === detailId);
5619
- if (selected) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequirementTasksPanel, { requirementId: selected, back: () => {
5813
+ if (selected) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RequirementTasksPanel, { requirementId: selected, back: () => {
5620
5814
  setSelected(void 0);
5621
5815
  void load2();
5622
5816
  } }, selected);
5623
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-feature-page is-board", children: [
5624
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceHero, { eyebrow: "Shared workspace", title: "\u9700\u6C42\u770B\u677F", detail: "\u6309\u9700\u6C42\u7EC4\u7EC7\u5DE5\u4F5C\uFF0C\u5B50\u4EFB\u52A1\u72EC\u7ACB\u63A8\u8FDB\uFF0C\u6574\u4F53\u5B8C\u6210\u540E\u7EDF\u4E00\u6C47\u603B\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", onClick: () => setCreating(true), children: [
5625
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives10.IconPlusOutline16, { size: 15 }),
5817
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsh-partner-feature-page is-board", children: [
5818
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceHero, { eyebrow: "Shared workspace", title: "\u9700\u6C42\u770B\u677F", detail: "\u6309\u9700\u6C42\u7EC4\u7EC7\u5DE5\u4F5C\uFF0C\u5B50\u4EFB\u52A1\u72EC\u7ACB\u63A8\u8FDB\uFF0C\u6574\u4F53\u5B8C\u6210\u540E\u7EDF\u4E00\u6C47\u603B\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", onClick: () => setCreating(true), children: [
5819
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives10.IconPlusOutline16, { size: 15 }),
5626
5820
  "\u65B0\u9700\u6C42"
5627
5821
  ] }) }),
5628
- error && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(WorkspaceNotice, { children: [
5822
+ error && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(WorkspaceNotice, { children: [
5629
5823
  error,
5630
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => {
5824
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: () => {
5631
5825
  void load2();
5632
5826
  }, children: "\u91CD\u8BD5" })
5633
5827
  ] }),
5634
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-requirement-toolbar", children: [
5635
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "dsh-partner-board-statuses", "aria-label": "\u9700\u6C42\u8303\u56F4", children: [false, true].map((value) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", "aria-pressed": archived === value, className: archived === value ? "is-active" : "", onClick: () => {
5828
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsh-partner-requirement-toolbar", children: [
5829
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { className: "dsh-partner-board-statuses", "aria-label": "\u9700\u6C42\u8303\u56F4", children: [false, true].map((value) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", "aria-pressed": archived === value, className: archived === value ? "is-active" : "", onClick: () => {
5636
5830
  setArchived(value);
5637
5831
  setLimit(24);
5638
5832
  }, children: [
5639
5833
  value ? "\u5DF2\u5F52\u6863" : "\u8FDB\u884C\u4E2D",
5640
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: requirements.filter((r) => r.status === "done" === value).length })
5834
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: requirements.filter((r) => r.status === "done" === value).length })
5641
5835
  ] }, String(value))) }),
5642
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "dsh-partner-board-search", children: [
5643
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u9700\u6C42" }),
5644
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives10.IconSearchOutline16, { size: 16 }) }),
5645
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { placeholder: "\u641C\u7D22\u9700\u6C42\u6216\u8D1F\u8D23\u4EBA", value: query, onChange: (event) => {
5836
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "dsh-partner-board-search", children: [
5837
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u9700\u6C42" }),
5838
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives10.IconSearchOutline16, { size: 16 }) }),
5839
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { placeholder: "\u641C\u7D22\u9700\u6C42\u6216\u8D1F\u8D23\u4EBA", value: query, onChange: (event) => {
5646
5840
  setQuery(event.target.value);
5647
5841
  setLimit(24);
5648
5842
  } })
5649
5843
  ] })
5650
5844
  ] }),
5651
- loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollectionSkeleton, { rows: 4 }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5652
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "dsh-partner-requirement-grid", children: visible.slice(0, limit).map((item) => {
5845
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CollectionSkeleton, { rows: 4 }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
5846
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsh-partner-requirement-grid", children: visible.slice(0, limit).map((item) => {
5653
5847
  const tasks = groups.get(item.id) ?? [], total = item.status === "done" ? item.results?.length ?? tasks.length : tasks.length;
5654
5848
  const done = item.status === "done" ? total : tasks.filter((t) => t.status === "done").length;
5655
5849
  const blocked = tasks.filter((t) => t.status === "blocked").length;
5656
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("article", { className: "dsh-partner-requirement-card", children: [
5657
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "dsh-partner-requirement-open", onClick: () => item.status === "done" ? setDetailId(item.id) : setSelected(item.id), children: [
5658
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsh-partner-requirement-meta", children: [
5659
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: requirementStatus(item) }),
5660
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { children: directory.find((c) => c.id === item.ownerCompanionId)?.name ?? "\u4EBA\u5DE5\u6536\u5C3E" })
5850
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("article", { className: "dsh-partner-requirement-card", children: [
5851
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "dsh-partner-requirement-open", onClick: () => item.status === "done" ? setDetailId(item.id) : setSelected(item.id), children: [
5852
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsh-partner-requirement-meta", children: [
5853
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: requirementStatus(item) }),
5854
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("small", { children: directory.find((c) => c.id === item.ownerCompanionId)?.name ?? "\u4EBA\u5DE5\u6536\u5C3E" })
5661
5855
  ] }),
5662
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { title: item.title, children: item.title }),
5663
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: item.summary || item.description || "\u5C1A\u672A\u8865\u5145\u9700\u6C42\u8BF4\u660E" }),
5664
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "dsh-partner-requirement-progress", role: "progressbar", "aria-label": "\u5B50\u4EFB\u52A1\u9A8C\u6536\u8FDB\u5EA6", "aria-valuemin": 0, "aria-valuemax": Math.max(total, 1), "aria-valuenow": done, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("i", { style: { width: `${total ? done / total * 100 : 0}%` } }) }),
5665
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsh-partner-requirement-meta", children: [
5666
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
5856
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { title: item.title, children: item.title }),
5857
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: item.summary || item.description || "\u5C1A\u672A\u8865\u5145\u9700\u6C42\u8BF4\u660E" }),
5858
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsh-partner-requirement-progress", role: "progressbar", "aria-label": "\u5B50\u4EFB\u52A1\u9A8C\u6536\u8FDB\u5EA6", "aria-valuemin": 0, "aria-valuemax": Math.max(total, 1), "aria-valuenow": done, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", { style: { width: `${total ? done / total * 100 : 0}%` } }) }),
5859
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsh-partner-requirement-meta", children: [
5860
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
5667
5861
  done,
5668
5862
  " / ",
5669
5863
  total,
5670
5864
  " \u5DF2\u9A8C\u6536",
5671
5865
  blocked ? ` \xB7 ${blocked} \u53D7\u963B` : ""
5672
5866
  ] }),
5673
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives10.IconChevronRightOutline14, { size: 14 })
5867
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives10.IconChevronRightOutline14, { size: 14 })
5674
5868
  ] })
5675
5869
  ] }),
5676
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("footer", { children: [
5677
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("small", { children: [
5870
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("footer", { children: [
5871
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
5678
5872
  new Date(item.updatedAt).toLocaleDateString(),
5679
5873
  " \u66F4\u65B0"
5680
5874
  ] }),
5681
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { type: "button", onClick: () => setDetailId(item.id), "aria-haspopup": "dialog", children: item.lastError ? "\u67E5\u770B\u5F02\u5E38" : "\u9700\u6C42\u8BE6\u60C5" })
5875
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: () => setDetailId(item.id), "aria-haspopup": "dialog", children: item.lastError ? "\u67E5\u770B\u5F02\u5E38" : "\u9700\u6C42\u8BE6\u60C5" })
5682
5876
  ] })
5683
5877
  ] }, item.id);
5684
5878
  }) }),
5685
- !visible.length && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsh-partner-collection-empty", children: [
5686
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: query ? "\u6CA1\u6709\u5339\u914D\u7684\u9700\u6C42" : archived ? "\u8FD8\u6CA1\u6709\u5F52\u6863\u9700\u6C42" : "\u4ECE\u4E00\u4E2A\u9700\u6C42\u5F00\u59CB" }),
5687
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: archived ? "\u5B50\u4EFB\u52A1\u5168\u90E8\u9A8C\u6536\u901A\u8FC7\u3001\u5B8C\u6210\u603B\u7ED3\u540E\uFF0C\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002" : "\u5148\u5199\u6E05\u4EA4\u4ED8\u76EE\u6807\uFF0C\u518D\u5B89\u6392\u8D1F\u8D23\u4EBA\u548C\u5B50\u4EFB\u52A1\u3002" })
5879
+ !visible.length && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsh-partner-collection-empty", children: [
5880
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: query ? "\u6CA1\u6709\u5339\u914D\u7684\u9700\u6C42" : archived ? "\u8FD8\u6CA1\u6709\u5F52\u6863\u9700\u6C42" : "\u4ECE\u4E00\u4E2A\u9700\u6C42\u5F00\u59CB" }),
5881
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: archived ? "\u5B50\u4EFB\u52A1\u5168\u90E8\u9A8C\u6536\u901A\u8FC7\u3001\u5B8C\u6210\u603B\u7ED3\u540E\uFF0C\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002" : "\u5148\u5199\u6E05\u4EA4\u4ED8\u76EE\u6807\uFF0C\u518D\u5B89\u6392\u8D1F\u8D23\u4EBA\u548C\u5B50\u4EFB\u52A1\u3002" })
5688
5882
  ] }),
5689
- visible.length > limit && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", onClick: () => setLimit((n) => n + 24), children: [
5883
+ visible.length > limit && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", onClick: () => setLimit((n) => n + 24), children: [
5690
5884
  "\u663E\u793A\u66F4\u591A\u9700\u6C42 \xB7 \u8FD8\u6709 ",
5691
5885
  visible.length - limit,
5692
5886
  " \u9879"
5693
5887
  ] }),
5694
- !archived && Boolean(groups.get("legacy")?.length) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("button", { type: "button", className: "dsh-partner-requirement-legacy", onClick: () => setSelected("legacy"), children: [
5888
+ !archived && Boolean(groups.get("legacy")?.length) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", className: "dsh-partner-requirement-legacy", onClick: () => setSelected("legacy"), children: [
5695
5889
  "\u672A\u5F52\u7C7B\u65E7\u4EFB\u52A1 ",
5696
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("b", { children: groups.get("legacy").length }),
5697
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "\u4FDD\u7559\u539F\u8BB0\u5F55\uFF0C\u4E0D\u81EA\u52A8\u5408\u5E76" }),
5698
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives10.IconChevronRightOutline14, { size: 14 })
5890
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("b", { children: groups.get("legacy").length }),
5891
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u4FDD\u7559\u539F\u8BB0\u5F55\uFF0C\u4E0D\u81EA\u52A8\u5408\u5E76" }),
5892
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives10.IconChevronRightOutline14, { size: 14 })
5699
5893
  ] })
5700
5894
  ] }),
5701
- creating && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u9700\u6C42", detail: "\u4E00\u4E2A\u9700\u6C42\u5BF9\u5E94\u4E00\u4EFD\u6700\u7EC8\u4EA4\u4ED8\uFF0C\u7531\u8D1F\u8D23\u4EBA\u7EDF\u4E00\u6536\u5C3E\u3002", close: () => setCreating(false), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequirementForm, { directory, close: () => setCreating(false), created: async (item) => {
5895
+ creating && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u9700\u6C42", detail: "\u4E00\u4E2A\u9700\u6C42\u5BF9\u5E94\u4E00\u4EFD\u6700\u7EC8\u4EA4\u4ED8\uFF0C\u7531\u8D1F\u8D23\u4EBA\u7EDF\u4E00\u6536\u5C3E\u3002", close: () => setCreating(false), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RequirementForm, { directory, close: () => setCreating(false), created: async (item) => {
5702
5896
  setCreating(false);
5703
5897
  await load2();
5704
5898
  setSelected(item.id);
5705
5899
  } }) }),
5706
- detail && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorkspaceDialog, { title: detail.title, eyebrow: "\u9700\u6C42\u8BE6\u60C5", detail: requirementStatus(detail), close: () => setDetailId(void 0), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequirementDetail, { item: detail, tasks: groups.get(detail.id) ?? [], directory, changed: load2, close: () => setDetailId(void 0) }, detail.id) }),
5707
- initialTaskId && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequirementTasksPanel, { initialTaskId, openRequest, detailOnly: true })
5900
+ detail && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceDialog, { title: detail.title, eyebrow: "\u9700\u6C42\u8BE6\u60C5", detail: requirementStatus(detail), close: () => setDetailId(void 0), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RequirementDetail, { item: detail, tasks: groups.get(detail.id) ?? [], directory, changed: load2, close: () => setDetailId(void 0) }, detail.id) }),
5901
+ initialTaskId && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RequirementTasksPanel, { initialTaskId, openRequest, detailOnly: true })
5708
5902
  ] });
5709
5903
  }
5710
5904
 
5711
5905
  // src/ui/schedule-panel.tsx
5712
5906
  var import_react19 = require("react");
5713
5907
  var import_dsh_client_ui_primitives11 = require("@deepseek-ai/dsh-client-ui-primitives");
5714
- var import_jsx_runtime14 = require("react/jsx-runtime");
5908
+ var import_jsx_runtime15 = require("react/jsx-runtime");
5715
5909
  function SchedulePanel({ companions }) {
5716
5910
  const [schedules, setSchedules] = (0, import_react19.useState)([]);
5717
5911
  const [runs, setRuns] = (0, import_react19.useState)([]);
@@ -5767,65 +5961,65 @@ function SchedulePanel({ companions }) {
5767
5961
  setBusy(void 0);
5768
5962
  }
5769
5963
  };
5770
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsh-partner-feature-page", children: [
5771
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceHero, { eyebrow: "Ephemeral automation", title: "\u4F19\u4F34\u5B9A\u65F6\u4EFB\u52A1", detail: "\u7531\u6307\u5B9A\u4F19\u4F34\u5728\u9694\u79BB\u4E34\u65F6\u4F1A\u8BDD\u4E2D\u6267\u884C\uFF1B\u9ED8\u8BA4\u5B8C\u6210\u5373\u9500\u6BC1\uFF0C\u907F\u514D\u957F\u671F\u4F1A\u8BDD\u88AB\u540E\u53F0\u4EFB\u52A1\u6C61\u67D3\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
5772
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", disabled: loading, onClick: () => {
5964
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsh-partner-feature-page", children: [
5965
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceHero, { eyebrow: "Ephemeral automation", title: "\u4F19\u4F34\u5B9A\u65F6\u4EFB\u52A1", detail: "\u7531\u6307\u5B9A\u4F19\u4F34\u5728\u9694\u79BB\u4E34\u65F6\u4F1A\u8BDD\u4E2D\u6267\u884C\uFF1B\u9ED8\u8BA4\u5B8C\u6210\u5373\u9500\u6BC1\uFF0C\u907F\u514D\u957F\u671F\u4F1A\u8BDD\u88AB\u540E\u53F0\u4EFB\u52A1\u6C61\u67D3\u3002", actions: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
5966
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", disabled: loading, onClick: () => {
5773
5967
  void load2();
5774
5968
  }, children: [
5775
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconRefreshOutline16, { size: 15 }),
5969
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconRefreshOutline16, { size: 15 }),
5776
5970
  "\u5237\u65B0"
5777
5971
  ] }),
5778
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", disabled: companions.length === 0, onClick: () => setCreating(true), children: [
5779
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 15 }),
5972
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", disabled: companions.length === 0, onClick: () => setCreating(true), children: [
5973
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 15 }),
5780
5974
  "\u65B0\u8BA1\u5212"
5781
5975
  ] })
5782
5976
  ] }) }),
5783
- error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceNotice, { children: error }),
5784
- creating && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1", detail: "\u9009\u62E9\u6267\u884C\u4F19\u4F34\u3001\u8FD0\u884C\u9891\u7387\u548C\u4F1A\u8BDD\u4FDD\u7559\u7B56\u7565\u3002\u8BA1\u5212\u521B\u5EFA\u540E\u53EF\u4EE5\u968F\u65F6\u505C\u7528\u6216\u7ACB\u5373\u6267\u884C\u3002", close: () => setCreating(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScheduleForm, { companions, close: () => setCreating(false), changed: load2 }) }),
5785
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceBlock, { title: "\u6267\u884C\u8BA1\u5212", detail: `${schedules.filter((item) => item.enabled).length} \u4E2A\u542F\u7528`, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CollectionSkeleton, { rows: 3 }) : schedules.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1", detail: "\u521B\u5EFA\u8BA1\u5212\u540E\uFF0C\u4F19\u4F34\u4F1A\u6309\u8BBE\u5B9A\u5728\u72EC\u7ACB\u4F1A\u8BDD\u4E2D\u6267\u884C\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", disabled: companions.length === 0, onClick: () => setCreating(true), children: [
5786
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 14 }),
5977
+ error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceNotice, { children: error }),
5978
+ creating && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceDialog, { title: "\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1", detail: "\u9009\u62E9\u6267\u884C\u4F19\u4F34\u3001\u8FD0\u884C\u9891\u7387\u548C\u4F1A\u8BDD\u4FDD\u7559\u7B56\u7565\u3002\u8BA1\u5212\u521B\u5EFA\u540E\u53EF\u4EE5\u968F\u65F6\u505C\u7528\u6216\u7ACB\u5373\u6267\u884C\u3002", close: () => setCreating(false), width: "wide", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ScheduleForm, { companions, close: () => setCreating(false), changed: load2 }) }),
5979
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceBlock, { title: "\u6267\u884C\u8BA1\u5212", detail: `${schedules.filter((item) => item.enabled).length} \u4E2A\u542F\u7528`, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionSkeleton, { rows: 3 }) : schedules.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u5B9A\u65F6\u4EFB\u52A1", detail: "\u521B\u5EFA\u8BA1\u5212\u540E\uFF0C\u4F19\u4F34\u4F1A\u6309\u8BBE\u5B9A\u5728\u72EC\u7ACB\u4F1A\u8BDD\u4E2D\u6267\u884C\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", disabled: companions.length === 0, onClick: () => setCreating(true), children: [
5980
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 14 }),
5787
5981
  "\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8BA1\u5212"
5788
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsh-partner-schedule-list", children: schedules.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("article", { children: [
5789
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
5790
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("strong", { children: entry.title }),
5791
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: entry.prompt }),
5792
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsh-partner-schedule-meta", children: [
5793
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("em", { children: [
5982
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsh-partner-schedule-list", children: schedules.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("article", { children: [
5983
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
5984
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: entry.title }),
5985
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: entry.prompt }),
5986
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "dsh-partner-schedule-meta", children: [
5987
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("em", { children: [
5794
5988
  "@",
5795
5989
  companionName(companions, entry.companionId)
5796
5990
  ] }),
5797
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("em", { children: scheduleLabel(entry) }),
5798
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("em", { children: [
5991
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("em", { children: scheduleLabel(entry) }),
5992
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("em", { children: [
5799
5993
  "\u4E0B\u6B21 ",
5800
5994
  new Date(entry.nextRunAt).toLocaleString()
5801
5995
  ] }),
5802
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("em", { children: entry.destroySessionAfterRun ? "\u6267\u884C\u540E\u9500\u6BC1" : "\u4FDD\u7559\u4F1A\u8BDD" })
5996
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("em", { children: entry.destroySessionAfterRun ? "\u6267\u884C\u540E\u9500\u6BC1" : "\u4FDD\u7559\u4F1A\u8BDD" })
5803
5997
  ] })
5804
5998
  ] }),
5805
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "dsh-partner-feature-switch", "data-on": entry.enabled, "aria-pressed": entry.enabled, disabled: busy === entry.id, onClick: () => {
5999
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "dsh-partner-feature-switch", "data-on": entry.enabled, "aria-pressed": entry.enabled, disabled: busy === entry.id, onClick: () => {
5806
6000
  void update(entry, { enabled: !entry.enabled });
5807
- }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}) }),
5808
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", disabled: busy === entry.id, onClick: () => {
6001
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}) }),
6002
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", disabled: busy === entry.id, onClick: () => {
5809
6003
  void run(entry);
5810
6004
  }, children: [
5811
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconPlayOutline16, { size: 14 }),
6005
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconPlayOutline16, { size: 14 }),
5812
6006
  busy === entry.id ? "\u6267\u884C\u4E2D\u2026" : "\u7ACB\u5373\u6267\u884C"
5813
6007
  ] }),
5814
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "is-icon", disabled: busy === entry.id, onClick: () => {
6008
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "is-icon", disabled: busy === entry.id, onClick: () => {
5815
6009
  void remove(entry);
5816
- }, "aria-label": `\u5220\u9664 ${entry.title}`, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconTrashOutline16, { size: 14 }) })
6010
+ }, "aria-label": `\u5220\u9664 ${entry.title}`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconTrashOutline16, { size: 14 }) })
5817
6011
  ] }, entry.id)) }) }),
5818
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(WorkspaceBlock, { title: "\u6700\u8FD1\u8FD0\u884C", detail: "\u4FDD\u7559\u6700\u8FD1\u7684\u72B6\u6001\u4E0E\u7ED3\u679C\u6458\u8981", children: [
5819
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsh-partner-run-list", children: runs.map((run2) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("article", { "data-status": run2.status, children: [
5820
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
5821
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
5822
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("strong", { children: [
6012
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(WorkspaceBlock, { title: "\u6700\u8FD1\u8FD0\u884C", detail: "\u4FDD\u7559\u6700\u8FD1\u7684\u72B6\u6001\u4E0E\u7ED3\u679C\u6458\u8981", children: [
6013
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsh-partner-run-list", children: runs.map((run2) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("article", { "data-status": run2.status, children: [
6014
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
6015
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
6016
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("strong", { children: [
5823
6017
  schedules.find((item) => item.id === run2.sourceId)?.title ?? "\u5DF2\u5220\u9664\u8BA1\u5212",
5824
6018
  " \xB7 @",
5825
6019
  companionName(companions, run2.ownerCompanionId)
5826
6020
  ] }),
5827
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: run2.error || run2.outputSummary || "\u7B49\u5F85\u7ED3\u679C" }),
5828
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("small", { children: [
6021
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: run2.error || run2.outputSummary || "\u7B49\u5F85\u7ED3\u679C" }),
6022
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("small", { children: [
5829
6023
  new Date(run2.startedAt).toLocaleString(),
5830
6024
  " \xB7 ",
5831
6025
  run2.status,
@@ -5834,7 +6028,7 @@ function SchedulePanel({ companions }) {
5834
6028
  ] })
5835
6029
  ] })
5836
6030
  ] }, run2.id)) }),
5837
- !loading && runs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u6267\u884C\u8BB0\u5F55", detail: "\u8BA1\u5212\u7B2C\u4E00\u6B21\u6267\u884C\u540E\uFF0C\u7ED3\u679C\u548C\u8017\u65F6\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002" })
6031
+ !loading && runs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u6267\u884C\u8BB0\u5F55", detail: "\u8BA1\u5212\u7B2C\u4E00\u6B21\u6267\u884C\u540E\uFF0C\u7ED3\u679C\u548C\u8017\u65F6\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002" })
5838
6032
  ] })
5839
6033
  ] });
5840
6034
  }
@@ -5858,18 +6052,18 @@ function ScheduleForm({ companions, close, changed: changed2 }) {
5858
6052
  setBusy(false);
5859
6053
  }
5860
6054
  };
5861
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("form", { className: "dsh-partner-schedule-form", "aria-busy": busy, onSubmit: (event) => {
6055
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("form", { className: "dsh-partner-schedule-form", "aria-busy": busy, onSubmit: (event) => {
5862
6056
  void submit(event);
5863
6057
  }, children: [
5864
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5865
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u8BA1\u5212\u540D\u79F0" }),
5866
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "title", required: true, maxLength: 160, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u6BCF\u65E5\u6574\u7406\u9879\u76EE\u53D8\u5316" })
6058
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6059
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u8BA1\u5212\u540D\u79F0" }),
6060
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "title", required: true, maxLength: 160, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u6BCF\u65E5\u6574\u7406\u9879\u76EE\u53D8\u5316" })
5867
6061
  ] }),
5868
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5869
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u6267\u884C\u4F19\u4F34" }),
5870
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { name: "companionId", required: true, defaultValue: companions[0]?.id ?? "", children: [
5871
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", disabled: true, children: "\u9009\u62E9\u4F19\u4F34" }),
5872
- companions.map((companion) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("option", { value: companion.id, children: [
6062
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6063
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u6267\u884C\u4F19\u4F34" }),
6064
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { name: "companionId", required: true, defaultValue: companions[0]?.id ?? "", children: [
6065
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", disabled: true, children: "\u9009\u62E9\u4F19\u4F34" }),
6066
+ companions.map((companion) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: companion.id, children: [
5873
6067
  "@",
5874
6068
  companion.name,
5875
6069
  " \xB7 ",
@@ -5877,51 +6071,51 @@ function ScheduleForm({ companions, close, changed: changed2 }) {
5877
6071
  ] }, companion.id))
5878
6072
  ] })
5879
6073
  ] }),
5880
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "is-wide", children: [
5881
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u6267\u884C\u5185\u5BB9" }),
5882
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("textarea", { name: "prompt", required: true, maxLength: 12e3, rows: 5, placeholder: "\u660E\u786E\u8BF4\u660E\u8981\u68C0\u67E5\u3001\u6574\u7406\u6216\u5B8C\u6210\u4EC0\u4E48\uFF0C\u4EE5\u53CA\u5E0C\u671B\u8FD4\u56DE\u4EC0\u4E48\u7ED3\u679C" })
6074
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "is-wide", children: [
6075
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u6267\u884C\u5185\u5BB9" }),
6076
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("textarea", { name: "prompt", required: true, maxLength: 12e3, rows: 5, placeholder: "\u660E\u786E\u8BF4\u660E\u8981\u68C0\u67E5\u3001\u6574\u7406\u6216\u5B8C\u6210\u4EC0\u4E48\uFF0C\u4EE5\u53CA\u5E0C\u671B\u8FD4\u56DE\u4EC0\u4E48\u7ED3\u679C" })
5883
6077
  ] }),
5884
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5885
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u9891\u7387" }),
5886
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { value: kind, onChange: (event) => setKind(event.target.value), children: [
5887
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "interval", children: "\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4" }),
5888
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "daily", children: "\u6BCF\u5929\u56FA\u5B9A\u65F6\u95F4" })
6078
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6079
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u9891\u7387" }),
6080
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { value: kind, onChange: (event) => setKind(event.target.value), children: [
6081
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "interval", children: "\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4" }),
6082
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "daily", children: "\u6BCF\u5929\u56FA\u5B9A\u65F6\u95F4" })
5889
6083
  ] })
5890
6084
  ] }),
5891
- kind === "interval" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5892
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u95F4\u9694\u5206\u949F" }),
5893
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "minutes", type: "number", min: 5, max: 43200, defaultValue: 60 })
5894
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsh-partner-schedule-time", children: [
5895
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5896
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u5C0F\u65F6" }),
5897
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "hour", type: "number", min: 0, max: 23, defaultValue: 9 })
6085
+ kind === "interval" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6086
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u95F4\u9694\u5206\u949F" }),
6087
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "minutes", type: "number", min: 5, max: 43200, defaultValue: 60 })
6088
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsh-partner-schedule-time", children: [
6089
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6090
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u5C0F\u65F6" }),
6091
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "hour", type: "number", min: 0, max: 23, defaultValue: 9 })
5898
6092
  ] }),
5899
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5900
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u5206\u949F" }),
5901
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "minute", type: "number", min: 0, max: 59, defaultValue: 0 })
6093
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6094
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u5206\u949F" }),
6095
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "minute", type: "number", min: 0, max: 59, defaultValue: 0 })
5902
6096
  ] })
5903
6097
  ] }),
5904
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5905
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u91CD\u53E0\u7B56\u7565" }),
5906
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { name: "overlapPolicy", defaultValue: "skip", children: [
5907
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "skip", children: "\u8DF3\u8FC7\u91CD\u53E0" }),
5908
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "queue", children: "\u6392\u961F\u6267\u884C" })
6098
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6099
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u91CD\u53E0\u7B56\u7565" }),
6100
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { name: "overlapPolicy", defaultValue: "skip", children: [
6101
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "skip", children: "\u8DF3\u8FC7\u91CD\u53E0" }),
6102
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "queue", children: "\u6392\u961F\u6267\u884C" })
5909
6103
  ] })
5910
6104
  ] }),
5911
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { children: [
5912
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u8D85\u65F6\u5206\u949F" }),
5913
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "timeoutMinutes", type: "number", min: 1, max: 120, defaultValue: 10 })
6105
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
6106
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u8D85\u65F6\u5206\u949F" }),
6107
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "timeoutMinutes", type: "number", min: 1, max: 120, defaultValue: 10 })
5914
6108
  ] }),
5915
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "dsh-partner-check is-wide", children: [
5916
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "retain", type: "checkbox" }),
5917
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("i", {}),
5918
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u6267\u884C\u540E\u4FDD\u7559\u4E34\u65F6\u4F1A\u8BDD" })
6109
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "dsh-partner-check is-wide", children: [
6110
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { name: "retain", type: "checkbox" }),
6111
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {}),
6112
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "\u6267\u884C\u540E\u4FDD\u7559\u4E34\u65F6\u4F1A\u8BDD" })
5919
6113
  ] }),
5920
- error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorkspaceNotice, { children: error }),
5921
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("footer", { children: [
5922
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
5923
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
5924
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 14 }),
6114
+ error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceNotice, { children: error }),
6115
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("footer", { children: [
6116
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
6117
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
6118
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives11.IconPlusOutline16, { size: 14 }),
5925
6119
  busy ? "\u521B\u5EFA\u4E2D\u2026" : "\u521B\u5EFA\u8BA1\u5212"
5926
6120
  ] })
5927
6121
  ] })
@@ -5957,7 +6151,7 @@ function isCompanionCapability(value) {
5957
6151
  // src/ui/companion-access-panel.tsx
5958
6152
  var import_react20 = require("react");
5959
6153
  var import_dsh_client_ui_primitives12 = require("@deepseek-ai/dsh-client-ui-primitives");
5960
- var import_jsx_runtime15 = require("react/jsx-runtime");
6154
+ var import_jsx_runtime16 = require("react/jsx-runtime");
5961
6155
  function CompanionAccessPanel({ companionId }) {
5962
6156
  const [access, setAccess] = (0, import_react20.useState)({ targetIds: [], companions: [] });
5963
6157
  const [busy, setBusy] = (0, import_react20.useState)();
@@ -5989,38 +6183,38 @@ function CompanionAccessPanel({ companionId }) {
5989
6183
  setBusy(void 0);
5990
6184
  }
5991
6185
  };
5992
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsh-partner-capability-detail dsh-partner-access", "aria-labelledby": "dsh-partner-access-title", children: [
5993
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("header", { children: [
5994
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
5995
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: "DIRECTED ACCESS" }),
5996
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { id: "dsh-partner-access-title", children: "\u53EF\u8BBF\u95EE\u7684\u4F19\u4F34" })
6186
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "dsh-partner-capability-detail dsh-partner-access", "aria-labelledby": "dsh-partner-access-title", children: [
6187
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { children: [
6188
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
6189
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: "DIRECTED ACCESS" }),
6190
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { id: "dsh-partner-access-title", children: "\u53EF\u8BBF\u95EE\u7684\u4F19\u4F34" })
5997
6191
  ] }),
5998
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("em", { children: [
6192
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("em", { children: [
5999
6193
  access.targetIds.length,
6000
6194
  " \u4F4D\u5DF2\u6388\u6743"
6001
6195
  ] })
6002
6196
  ] }),
6003
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsh-partner-access-note", children: "\u52FE\u9009\u540E\uFF0C\u5F53\u524D\u4F19\u4F34\u80FD\u4E86\u89E3\u5BF9\u65B9\u7684\u516C\u5F00\u80FD\u529B\uFF0C\u5E76\u5728\u4EFB\u52A1\u770B\u677F\u4E2D `@` \u5BF9\u65B9\u6267\u884C\u4EFB\u52A1\u3002\u6388\u6743\u53EA\u6CBF\u5F53\u524D\u65B9\u5411\u751F\u6548\uFF0C\u4E0D\u4F1A\u53CD\u5411\u6388\u6743\uFF0C\u4E5F\u4E0D\u4F1A\u5171\u4EAB\u4F1A\u8BDD\u3001\u8BB0\u5FC6\u3001\u6E20\u9053\u6216\u51ED\u636E\u3002" }),
6004
- access.companions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u53EF\u6388\u6743\u7684\u4F19\u4F34", detail: "\u521B\u5EFA\u7B2C\u4E8C\u4F4D\u4F19\u4F34\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u5EFA\u7ACB\u5355\u5411\u534F\u4F5C\u6388\u6743\u3002" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsh-partner-access-list", children: access.companions.map((companion) => {
6197
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "dsh-partner-access-note", children: "\u52FE\u9009\u540E\uFF0C\u5F53\u524D\u4F19\u4F34\u80FD\u4E86\u89E3\u5BF9\u65B9\u7684\u516C\u5F00\u80FD\u529B\uFF0C\u5E76\u5728\u4EFB\u52A1\u770B\u677F\u4E2D `@` \u5BF9\u65B9\u6267\u884C\u4EFB\u52A1\u3002\u6388\u6743\u53EA\u6CBF\u5F53\u524D\u65B9\u5411\u751F\u6548\uFF0C\u4E0D\u4F1A\u53CD\u5411\u6388\u6743\uFF0C\u4E5F\u4E0D\u4F1A\u5171\u4EAB\u4F1A\u8BDD\u3001\u8BB0\u5FC6\u3001\u6E20\u9053\u6216\u51ED\u636E\u3002" }),
6198
+ access.companions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CollectionEmpty, { title: "\u8FD8\u6CA1\u6709\u53EF\u6388\u6743\u7684\u4F19\u4F34", detail: "\u521B\u5EFA\u7B2C\u4E8C\u4F4D\u4F19\u4F34\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u5EFA\u7ACB\u5355\u5411\u534F\u4F5C\u6388\u6743\u3002" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "dsh-partner-access-list", children: access.companions.map((companion) => {
6005
6199
  const selected = access.targetIds.includes(companion.id);
6006
6200
  const abilities = companion.capabilities.map((capability) => isCompanionCapability(capability) ? CAPABILITY_LABELS[capability] : capability);
6007
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { type: "button", className: selected ? "is-active" : "", "aria-pressed": selected, disabled: busy === companion.id, onClick: () => {
6201
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { type: "button", className: selected ? "is-active" : "", "aria-pressed": selected, disabled: busy === companion.id, onClick: () => {
6008
6202
  void toggle(companion.id);
6009
6203
  }, children: [
6010
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "dsh-partner-access-avatar", "aria-hidden": "true", children: initials(companion.name) }),
6011
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "dsh-partner-access-copy", children: [
6012
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("strong", { children: [
6204
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "dsh-partner-access-avatar", "aria-hidden": "true", children: initials(companion.name) }),
6205
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "dsh-partner-access-copy", children: [
6206
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("strong", { children: [
6013
6207
  "@",
6014
6208
  companion.name
6015
6209
  ] }),
6016
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("small", { children: companion.role }),
6017
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: companion.description || "\u672A\u586B\u5199\u4F19\u4F34\u8BF4\u660E" }),
6018
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: [...abilities, ...companion.enabledSkills.map((skill) => skill.name)].map((item) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("em", { children: item }, item)) })
6210
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: companion.role }),
6211
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: companion.description || "\u672A\u586B\u5199\u4F19\u4F34\u8BF4\u660E" }),
6212
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: [...abilities, ...companion.enabledSkills.map((skill) => skill.name)].map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("em", { children: item }, item)) })
6019
6213
  ] }),
6020
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "dsh-partner-access-check", "aria-hidden": "true", children: selected && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives12.IconCheckOutline16, { size: 15 }) })
6214
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "dsh-partner-access-check", "aria-hidden": "true", children: selected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_dsh_client_ui_primitives12.IconCheckOutline16, { size: 15 }) })
6021
6215
  ] }, companion.id);
6022
6216
  }) }),
6023
- error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkspaceNotice, { children: error })
6217
+ error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(WorkspaceNotice, { children: error })
6024
6218
  ] });
6025
6219
  }
6026
6220
  function initials(name) {
@@ -6033,7 +6227,7 @@ function companionDraft(companion) {
6033
6227
  }
6034
6228
 
6035
6229
  // src/ui/capability-editor.tsx
6036
- var import_jsx_runtime16 = require("react/jsx-runtime");
6230
+ var import_jsx_runtime17 = require("react/jsx-runtime");
6037
6231
  function CapabilityEditor({ companion, presets, onChanged }) {
6038
6232
  const [form, setForm] = (0, import_react21.useState)(() => companionDraft(companion));
6039
6233
  const [modelCatalog, setModelCatalog] = (0, import_react21.useState)();
@@ -6106,69 +6300,69 @@ function CapabilityEditor({ companion, presets, onChanged }) {
6106
6300
  const selectedProvider = form.provider || modelCatalog?.defaultSelection.provider || "";
6107
6301
  const modelOptions = modelCatalog?.providers.find((item) => item.id === selectedProvider)?.models ?? [];
6108
6302
  const currentModelMissing = Boolean(form.model) && !modelOptions.some((item) => item.id === form.model);
6109
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "dsh-partner-form is-capabilities", children: [
6110
- /* @__PURE__ */ (0, import_jsx_runtime16.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" }),
6111
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "dsh-partner-runtime-fields", children: [
6112
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FormField, { label: "Agent Preset", hint: "\u5DE5\u5177\u3001Skill \u4E0E\u7CFB\u7EDF\u63D0\u793A", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("select", { disabled: saving, value: form.presetId, onChange: (event) => edit({ ...form, presetId: event.target.value }), children: [
6113
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "\u8DDF\u968F DSH \u9ED8\u8BA4 Preset" }),
6114
- presets.filter((item) => !item.broken).map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: item.id, children: item.name }, item.id))
6303
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-form is-capabilities", children: [
6304
+ /* @__PURE__ */ (0, import_jsx_runtime17.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" }),
6305
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-runtime-fields", children: [
6306
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { label: "Agent Preset", hint: "\u5DE5\u5177\u3001Skill \u4E0E\u7CFB\u7EDF\u63D0\u793A", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("select", { disabled: saving, value: form.presetId, onChange: (event) => edit({ ...form, presetId: event.target.value }), children: [
6307
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "", children: "\u8DDF\u968F DSH \u9ED8\u8BA4 Preset" }),
6308
+ presets.filter((item) => !item.broken).map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: item.id, children: item.name }, item.id))
6115
6309
  ] }) }),
6116
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FormField, { label: "\u6A21\u578B\u63D0\u4F9B\u65B9", hint: "\u6765\u81EA\u5F53\u524D\u5BA2\u6237\u7AEF", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("select", { disabled: saving, value: form.provider, onChange: (event) => edit({ ...form, provider: event.target.value, model: "" }), children: [
6117
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: "", children: [
6310
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { label: "\u6A21\u578B\u63D0\u4F9B\u65B9", hint: "\u6765\u81EA\u5F53\u524D\u5BA2\u6237\u7AEF", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("select", { disabled: saving, value: form.provider, onChange: (event) => edit({ ...form, provider: event.target.value, model: "" }), children: [
6311
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: "", children: [
6118
6312
  "\u8DDF\u968F DSH \u9ED8\u8BA4 \xB7 ",
6119
6313
  modelCatalog?.defaultSelection.provider || "\u6B63\u5728\u8BFB\u53D6"
6120
6314
  ] }),
6121
- modelCatalog?.providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: provider.id, children: provider.name || provider.id }, provider.id))
6315
+ modelCatalog?.providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: provider.id, children: provider.name || provider.id }, provider.id))
6122
6316
  ] }) }),
6123
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FormField, { label: "\u6A21\u578B", hint: "\u968F\u63D0\u4F9B\u65B9\u8054\u52A8", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("select", { disabled: saving, value: form.model, onChange: (event) => edit({ ...form, model: event.target.value }), children: [
6124
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: "", children: [
6317
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { label: "\u6A21\u578B", hint: "\u968F\u63D0\u4F9B\u65B9\u8054\u52A8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("select", { disabled: saving, value: form.model, onChange: (event) => edit({ ...form, model: event.target.value }), children: [
6318
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: "", children: [
6125
6319
  "\u8DDF\u968F DSH \u9ED8\u8BA4 \xB7 ",
6126
6320
  modelCatalog?.defaultSelection.model || "\u6B63\u5728\u8BFB\u53D6"
6127
6321
  ] }),
6128
- currentModelMissing && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("option", { value: form.model, children: [
6322
+ currentModelMissing && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("option", { value: form.model, children: [
6129
6323
  "\u5F53\u524D\u914D\u7F6E \xB7 ",
6130
6324
  form.model
6131
6325
  ] }),
6132
- modelOptions.map((model) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: model.id, children: model.name || model.id }, model.id))
6326
+ modelOptions.map((model) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: model.id, children: model.name || model.id }, model.id))
6133
6327
  ] }) })
6134
6328
  ] }),
6135
- /* @__PURE__ */ (0, import_jsx_runtime16.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" }),
6136
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "dsh-partner-capability-groups", children: groups.map((group) => {
6329
+ /* @__PURE__ */ (0, import_jsx_runtime17.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" }),
6330
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "dsh-partner-capability-groups", children: groups.map((group) => {
6137
6331
  const enabled = group.choices.filter((choice) => form.capabilities.includes(choice.id)).length;
6138
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "dsh-partner-capability-group", "aria-labelledby": `partner-capability-${group.id}`, children: [
6139
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { children: [
6140
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
6141
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: group.eyebrow }),
6142
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { id: `partner-capability-${group.id}`, children: group.title }),
6143
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: group.detail })
6332
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "dsh-partner-capability-group", "aria-labelledby": `partner-capability-${group.id}`, children: [
6333
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { children: [
6334
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
6335
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: group.eyebrow }),
6336
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { id: `partner-capability-${group.id}`, children: group.title }),
6337
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: group.detail })
6144
6338
  ] }),
6145
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("em", { children: [
6339
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("em", { children: [
6146
6340
  enabled,
6147
6341
  " / ",
6148
6342
  group.choices.length,
6149
6343
  " \u5DF2\u542F\u7528"
6150
6344
  ] })
6151
6345
  ] }),
6152
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "dsh-partner-capabilities", children: group.choices.map((choice) => {
6346
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "dsh-partner-capabilities", children: group.choices.map((choice) => {
6153
6347
  const active = form.capabilities.includes(choice.id);
6154
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { type: "button", disabled: saving, className: active ? "is-active" : "", "aria-pressed": active, onClick: () => toggle(choice.id), children: [
6155
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: active && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_dsh_client_ui_primitives13.IconCheckOutline14, { size: 14 }) }),
6156
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: choice.title }),
6157
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: choice.detail })
6348
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", disabled: saving, className: active ? "is-active" : "", "aria-pressed": active, onClick: () => toggle(choice.id), children: [
6349
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: active && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_dsh_client_ui_primitives13.IconCheckOutline14, { size: 14 }) }),
6350
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: choice.title }),
6351
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: choice.detail })
6158
6352
  ] }, choice.id);
6159
6353
  }) })
6160
6354
  ] }, group.id);
6161
6355
  }) }),
6162
- form.capabilities.includes("skills") && companion.capabilities.includes("skills") && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CompanionSkillSettings, { companionId: companion.id }),
6163
- form.capabilities.includes("skills") && !companion.capabilities.includes("skills") && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "dsh-partner-inline-note", children: "\u5148\u5E94\u7528\u80FD\u529B\u7EC4\u5408\uFF0C\u518D\u4E3A\u5F53\u524D\u4F19\u4F34\u9009\u62E9\u5177\u4F53 Skill\u3002" }),
6164
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CompanionAccessPanel, { companionId: companion.id }),
6165
- error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
6166
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "dsh-partner-form-actions is-capability-save", children: [
6167
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { role: "status", "aria-live": "polite", "aria-atomic": "true", children: saved && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
6168
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_dsh_client_ui_primitives13.IconCheckOutline14, { size: 14 }),
6169
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u751F\u6548" })
6356
+ form.capabilities.includes("skills") && companion.capabilities.includes("skills") && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CompanionSkillSettings, { companionId: companion.id }),
6357
+ form.capabilities.includes("skills") && !companion.capabilities.includes("skills") && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "dsh-partner-inline-note", children: "\u5148\u5E94\u7528\u80FD\u529B\u7EC4\u5408\uFF0C\u518D\u4E3A\u5F53\u524D\u4F19\u4F34\u9009\u62E9\u5177\u4F53 Skill\u3002" }),
6358
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CompanionAccessPanel, { companionId: companion.id }),
6359
+ error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
6360
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-form-actions is-capability-save", children: [
6361
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { role: "status", "aria-live": "polite", "aria-atomic": "true", children: saved && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
6362
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_dsh_client_ui_primitives13.IconCheckOutline14, { size: 14 }),
6363
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u751F\u6548" })
6170
6364
  ] }) }),
6171
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", disabled: saving, "aria-busy": saving, onClick: () => {
6365
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", disabled: saving, "aria-busy": saving, onClick: () => {
6172
6366
  void save();
6173
6367
  }, children: saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u5E94\u7528\u80FD\u529B\u7EC4\u5408" })
6174
6368
  ] })
@@ -6178,9 +6372,9 @@ function CapabilityEditor({ companion, presets, onChanged }) {
6178
6372
  // src/ui/identity-editor.tsx
6179
6373
  var import_react22 = require("react");
6180
6374
  var import_dsh_client_ui_primitives14 = require("@deepseek-ai/dsh-client-ui-primitives");
6181
- var import_jsx_runtime17 = require("react/jsx-runtime");
6375
+ var import_jsx_runtime18 = require("react/jsx-runtime");
6182
6376
  function IdentityEditor(props) {
6183
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IdentityEditorForm, { ...props }, props.companion.id);
6377
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IdentityEditorForm, { ...props }, props.companion.id);
6184
6378
  }
6185
6379
  function IdentityEditorForm({ companion, count, onChanged, onRemoved }) {
6186
6380
  const [form, setForm] = (0, import_react22.useState)(() => companionDraft(companion));
@@ -6244,33 +6438,33 @@ function IdentityEditorForm({ companion, count, onChanged, onRemoved }) {
6244
6438
  if (alive.current) setOperation(void 0);
6245
6439
  }
6246
6440
  };
6247
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("form", { className: "dsh-partner-form is-identity", "aria-busy": operation !== void 0, onSubmit: (event) => {
6441
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("form", { className: "dsh-partner-form is-identity", "aria-busy": operation !== void 0, onSubmit: (event) => {
6248
6442
  void submit(event);
6249
6443
  }, children: [
6250
- /* @__PURE__ */ (0, import_jsx_runtime17.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" }),
6251
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-fields two", children: [
6252
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { label: "\u540D\u5B57", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { disabled: busy, required: true, maxLength: 60, value: form.name, onChange: (event) => setForm({ ...form, name: event.target.value }) }) }),
6253
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { label: "\u89D2\u8272", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { disabled: busy, required: true, maxLength: 120, value: form.role, onChange: (event) => setForm({ ...form, role: event.target.value }) }) })
6444
+ /* @__PURE__ */ (0, import_jsx_runtime18.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" }),
6445
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dsh-partner-fields two", children: [
6446
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormField, { label: "\u540D\u5B57", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { disabled: busy, required: true, maxLength: 60, value: form.name, onChange: (event) => setForm({ ...form, name: event.target.value }) }) }),
6447
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormField, { label: "\u89D2\u8272", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { disabled: busy, required: true, maxLength: 120, value: form.role, onChange: (event) => setForm({ ...form, role: event.target.value }) }) })
6254
6448
  ] }),
6255
- /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("textarea", { disabled: busy, rows: 2, maxLength: 500, value: form.description, onChange: (event) => setForm({ ...form, description: event.target.value }) }) }),
6256
- /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("textarea", { disabled: busy, rows: 9, maxLength: 12e3, value: form.instructions, onChange: (event) => setForm({ ...form, instructions: event.target.value }) }) }),
6257
- error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
6258
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-form-actions", children: [
6259
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { role: "status", children: saved && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
6260
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_dsh_client_ui_primitives14.IconCheckOutline14, { size: 14 }),
6449
+ /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)("textarea", { disabled: busy, rows: 2, maxLength: 500, value: form.description, onChange: (event) => setForm({ ...form, description: event.target.value }) }) }),
6450
+ /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)("textarea", { disabled: busy, rows: 9, maxLength: 12e3, value: form.instructions, onChange: (event) => setForm({ ...form, instructions: event.target.value }) }) }),
6451
+ error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "dsh-partner-inline-error", role: "alert", children: error }),
6452
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dsh-partner-form-actions", children: [
6453
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { role: "status", children: saved && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
6454
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_dsh_client_ui_primitives14.IconCheckOutline14, { size: 14 }),
6261
6455
  "\u5DF2\u4FDD\u5B58\uFF0C\u4E0B\u4E00\u8F6E\u5C06\u4F7F\u7528\u65B0\u8EAB\u4EFD"
6262
6456
  ] }) }),
6263
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { disabled: busy, children: operation === "save" ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8EAB\u4EFD" })
6457
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { disabled: busy, children: operation === "save" ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8EAB\u4EFD" })
6264
6458
  ] }),
6265
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "dsh-partner-identity-danger", "data-confirming": confirming, children: [
6266
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
6267
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: removed ? "\u4F19\u4F34\u5DF2\u5220\u9664" : confirming ? `\u786E\u8BA4\u5220\u9664\u300C${companion.name}\u300D\uFF1F` : "\u5220\u9664\u4F19\u4F34" }),
6268
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: confirming ? "\u5C06\u5220\u9664\u8BE5\u4F19\u4F34\u7684\u914D\u7F6E\u3001\u8BB0\u5FC6\u3001\u6302\u5FF5\u3001\u4E13\u5C5E\u76EE\u5F55\u53CA\u5176\u4E2D\u5168\u90E8\u6587\u4EF6\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002\u5171\u4EAB\u6216\u5F02\u5E38\u76EE\u5F55\u4F1A\u62E6\u622A\uFF1BDSH \u539F\u4F1A\u8BDD\u65E5\u5FD7\u4ECD\u7531\u5BBF\u4E3B\u7BA1\u7406\uFF0C\u4E0D\u5728\u6B64\u6B21\u6E05\u7406\u8303\u56F4\u5185\u3002" : "\u5FC5\u987B\u5148\u89E3\u7ED1\u5FAE\u4FE1\u5E76\u7ED3\u675F\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1\u3002\u5220\u9664\u53EA\u9488\u5BF9\u672C\u6B21\u786E\u8BA4\u7684\u4F19\u4F34\uFF0C\u4E0D\u4F1A\u8F6C\u4EA4\u8054\u7CFB\u4EBA\u3002" })
6459
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "dsh-partner-identity-danger", "data-confirming": confirming, children: [
6460
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
6461
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: removed ? "\u4F19\u4F34\u5DF2\u5220\u9664" : confirming ? `\u786E\u8BA4\u5220\u9664\u300C${companion.name}\u300D\uFF1F` : "\u5220\u9664\u4F19\u4F34" }),
6462
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("small", { children: confirming ? "\u5C06\u5220\u9664\u8BE5\u4F19\u4F34\u7684\u914D\u7F6E\u3001\u8BB0\u5FC6\u3001\u6302\u5FF5\u3001\u4E13\u5C5E\u76EE\u5F55\u53CA\u5176\u4E2D\u5168\u90E8\u6587\u4EF6\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002\u5171\u4EAB\u6216\u5F02\u5E38\u76EE\u5F55\u4F1A\u62E6\u622A\uFF1BDSH \u539F\u4F1A\u8BDD\u65E5\u5FD7\u4ECD\u7531\u5BBF\u4E3B\u7BA1\u7406\uFF0C\u4E0D\u5728\u6B64\u6B21\u6E05\u7406\u8303\u56F4\u5185\u3002" : "\u5FC5\u987B\u5148\u89E3\u7ED1\u5FAE\u4FE1\u5E76\u7ED3\u675F\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1\u3002\u5220\u9664\u53EA\u9488\u5BF9\u672C\u6B21\u786E\u8BA4\u7684\u4F19\u4F34\uFF0C\u4E0D\u4F1A\u8F6C\u4EA4\u8054\u7CFB\u4EBA\u3002" })
6269
6463
  ] }),
6270
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
6271
- confirming && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", disabled: busy, className: "is-secondary", onClick: () => setConfirmationId(void 0), children: "\u53D6\u6D88" }),
6272
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: confirming ? "is-danger" : "", disabled: busy || count <= 1, onClick: () => confirming ? void remove() : setConfirmationId(companion.id), children: [
6273
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_dsh_client_ui_primitives14.IconTrashOutline16, { size: 16 }),
6464
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
6465
+ confirming && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, className: "is-secondary", onClick: () => setConfirmationId(void 0), children: "\u53D6\u6D88" }),
6466
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "button", className: confirming ? "is-danger" : "", disabled: busy || count <= 1, onClick: () => confirming ? void remove() : setConfirmationId(companion.id), children: [
6467
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_dsh_client_ui_primitives14.IconTrashOutline16, { size: 16 }),
6274
6468
  operation === "remove" ? "\u6B63\u5728\u5220\u9664\u2026" : removed ? "\u5DF2\u5220\u9664" : confirming ? "\u786E\u8BA4\u5220\u9664" : "\u5220\u9664"
6275
6469
  ] })
6276
6470
  ] })
@@ -6281,7 +6475,7 @@ function IdentityEditorForm({ companion, count, onChanged, onRemoved }) {
6281
6475
  // src/ui/companion-create.tsx
6282
6476
  var import_react23 = require("react");
6283
6477
  var import_dsh_client_ui_primitives15 = require("@deepseek-ai/dsh-client-ui-primitives");
6284
- var import_jsx_runtime18 = require("react/jsx-runtime");
6478
+ var import_jsx_runtime19 = require("react/jsx-runtime");
6285
6479
  function CompanionCreateDialog({ close, create }) {
6286
6480
  const [busy, setBusy] = (0, import_react23.useState)(false);
6287
6481
  const [error, setError] = (0, import_react23.useState)();
@@ -6303,30 +6497,30 @@ function CompanionCreateDialog({ close, create }) {
6303
6497
  setBusy(false);
6304
6498
  }
6305
6499
  };
6306
- return /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-companion-create-form", "aria-busy": busy, onSubmit: (event) => {
6500
+ return /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsxs)("form", { className: "dsh-partner-feature-form dsh-partner-companion-create-form", "aria-busy": busy, onSubmit: (event) => {
6307
6501
  void submit(event);
6308
6502
  }, children: [
6309
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
6310
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u4F19\u4F34\u540D\u5B57" }),
6311
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { name: "name", required: true, maxLength: 60, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u5C0F\u9ED1" })
6503
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { children: [
6504
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u4F19\u4F34\u540D\u5B57" }),
6505
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { name: "name", required: true, maxLength: 60, autoFocus: true, placeholder: "\u4F8B\u5982\uFF1A\u5C0F\u9ED1" })
6312
6506
  ] }),
6313
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { children: [
6314
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u4E3B\u8981\u89D2\u8272" }),
6315
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { name: "role", required: true, maxLength: 120, placeholder: "\u4F8B\u5982\uFF1A\u4EA7\u54C1\u4E0E\u5DE5\u7A0B\u534F\u4F5C\u4F19\u4F34" })
6507
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { children: [
6508
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u4E3B\u8981\u89D2\u8272" }),
6509
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { name: "role", required: true, maxLength: 120, placeholder: "\u4F8B\u5982\uFF1A\u4EA7\u54C1\u4E0E\u5DE5\u7A0B\u534F\u4F5C\u4F19\u4F34" })
6316
6510
  ] }),
6317
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "is-wide", children: [
6318
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D" }),
6319
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", { name: "description", maxLength: 500, placeholder: "\u5B83\u4E3B\u8981\u8D1F\u8D23\u4EC0\u4E48\uFF0C\u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u627E\u5B83" })
6511
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "is-wide", children: [
6512
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u4E00\u53E5\u8BDD\u5B9A\u4F4D" }),
6513
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { name: "description", maxLength: 500, placeholder: "\u5B83\u4E3B\u8981\u8D1F\u8D23\u4EC0\u4E48\uFF0C\u4EC0\u4E48\u65F6\u5019\u5E94\u8BE5\u627E\u5B83" })
6320
6514
  ] }),
6321
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "is-wide", children: [
6322
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u521D\u59CB\u884C\u4E3A\u51C6\u5219" }),
6323
- /* @__PURE__ */ (0, import_jsx_runtime18.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" })
6515
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "is-wide", children: [
6516
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u521D\u59CB\u884C\u4E3A\u51C6\u5219" }),
6517
+ /* @__PURE__ */ (0, import_jsx_runtime19.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" })
6324
6518
  ] }),
6325
- error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(WorkspaceNotice, { children: error }),
6326
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("footer", { children: [
6327
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
6328
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
6329
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_dsh_client_ui_primitives15.IconPlusOutline16, { size: 14 }),
6519
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WorkspaceNotice, { children: error }),
6520
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("footer", { children: [
6521
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: close, children: "\u53D6\u6D88" }),
6522
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "submit", className: "is-primary", disabled: busy, children: [
6523
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives15.IconPlusOutline16, { size: 14 }),
6330
6524
  busy ? "\u6B63\u5728\u521B\u5EFA\u2026" : "\u521B\u5EFA\u4F19\u4F34"
6331
6525
  ] })
6332
6526
  ] })
@@ -6416,7 +6610,7 @@ function sessions(ctx) {
6416
6610
  }
6417
6611
 
6418
6612
  // src/client.tsx
6419
- var import_jsx_runtime19 = require("react/jsx-runtime");
6613
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6420
6614
  var PLUGIN_ID = "@lemoncat7/dsh-partner";
6421
6615
  var STYLE_ID = `${PLUGIN_ID}/client`;
6422
6616
  var cssText = `${client_default}
@@ -6430,15 +6624,15 @@ var WORKSPACE_PAGES = /* @__PURE__ */ new Set(["skills", "board", "schedules", "
6430
6624
  var inject = ["slots", "layout", "sessions"];
6431
6625
  function apply(ctx) {
6432
6626
  ctx.effect(installStyles, "dsh-partner: styles");
6433
- const controller = createPartnerController(ctx, PLUGIN_ID, (props, current2) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PartnerWorkspace, { ...props, controller: current2 }));
6434
- ctx.slots.inject("shell.overlay", () => ctx.slots.register({ name: "shell.overlay", id: "partner-pendant", order: 30 }, () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PartnerPendant, { controller })));
6627
+ const controller = createPartnerController(ctx, PLUGIN_ID, (props, current2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PartnerWorkspace, { ...props, controller: current2 }));
6628
+ ctx.slots.inject("shell.overlay", () => ctx.slots.register({ name: "shell.overlay", id: "partner-pendant", order: 30 }, () => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PartnerPendant, { controller })));
6435
6629
  ctx.effect(() => observePluginWorkspace(PLUGIN_ID, controller.close), "dsh-partner: exclusive workspace");
6436
6630
  ctx.effect(() => () => controller.close(), "dsh-partner: workspace lifecycle");
6437
6631
  ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
6438
6632
  name: "sidebar.footer.action",
6439
6633
  id: "partner",
6440
6634
  order: -120
6441
- }, (props) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PartnerSidebar, { ...props, controller, collapse: () => ctx.layout.toggleSidebar() })));
6635
+ }, (props) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PartnerSidebar, { ...props, controller, collapse: () => ctx.layout.toggleSidebar() })));
6442
6636
  }
6443
6637
  function PartnerSidebar(props) {
6444
6638
  const ref = (0, import_react24.useRef)(null);
@@ -6455,19 +6649,19 @@ function PartnerSidebar(props) {
6455
6649
  props.controller.open(id);
6456
6650
  if (props.wide && window.matchMedia("(max-width: 820px)").matches) props.collapse();
6457
6651
  };
6458
- if (!props.wide) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("section", { ref, className: "dsh-partner-sidebar is-rail", children: /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 18 }) }) });
6459
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { ref, className: "dsh-partner-sidebar", children: [
6460
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-sidebar-heading", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "dsh-partner-sidebar-title", "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [
6461
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "data-open": open, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconChevronDownOutline14, { size: 14 }) }),
6652
+ if (!props.wide) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("section", { ref, className: "dsh-partner-sidebar is-rail", children: /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 18 }) }) });
6653
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { ref, className: "dsh-partner-sidebar", children: [
6654
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-sidebar-heading", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: "dsh-partner-sidebar-title", "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [
6655
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { "data-open": open, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconChevronDownOutline14, { size: 14 }) }),
6462
6656
  "\u4F19\u4F34"
6463
6657
  ] }) }),
6464
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: `dsh-partner-sidebar-list${open ? " is-open" : ""}`, "aria-hidden": !open, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-sidebar-list-inner", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", tabIndex: open ? 0 : -1, className: `dsh-partner-sidebar-row${props.controller.isOpen() ? " is-active" : ""}`, onClick: () => launch(), children: [
6465
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "dsh-partner-sidebar-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }) }),
6466
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6467
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4F19\u4F34\u9762\u677F" }),
6468
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: snapshot ? `${snapshot.companions.length} \u4F4D\u4F19\u4F34 \xB7 ${snapshot.channels.filter((item) => item.runtimeStatus === "running").length} \u4E2A\u5FAE\u4FE1\u5728\u7EBF` : "\u8EAB\u4EFD\u3001\u80FD\u529B\u4E0E\u6E20\u9053" })
6658
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `dsh-partner-sidebar-list${open ? " is-open" : ""}`, "aria-hidden": !open, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-sidebar-list-inner", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", tabIndex: open ? 0 : -1, className: `dsh-partner-sidebar-row${props.controller.isOpen() ? " is-active" : ""}`, onClick: () => launch(), children: [
6659
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "dsh-partner-sidebar-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }) }),
6660
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6661
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4F19\u4F34\u9762\u677F" }),
6662
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: snapshot ? `${snapshot.companions.length} \u4F4D\u4F19\u4F34 \xB7 ${snapshot.channels.filter((item) => item.runtimeStatus === "running").length} \u4E2A\u5FAE\u4FE1\u5728\u7EBF` : "\u8EAB\u4EFD\u3001\u80FD\u529B\u4E0E\u6E20\u9053" })
6469
6663
  ] }),
6470
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { className: snapshot?.channels.some((item) => item.runtimeStatus === "running") ? "is-online" : "" })
6664
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { className: snapshot?.channels.some((item) => item.runtimeStatus === "running") ? "is-online" : "" })
6471
6665
  ] }) }) })
6472
6666
  ] });
6473
6667
  }
@@ -6567,18 +6761,18 @@ function PartnerWorkspace({ controller }) {
6567
6761
  setSelectedId(id);
6568
6762
  setView("home");
6569
6763
  };
6570
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "dsh-partner-workspace", children: [
6571
- creatingCompanion && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CompanionCreateDialog, { close: () => setCreatingCompanion(false), create }),
6572
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "dsh-partner-topbar", children: [
6573
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-topbar-brand", children: [
6574
- /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(import_dsh_client_ui_primitives16.IconChevronLeftOutline14, { size: 15 }) }),
6575
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 18 }),
6576
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6577
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4F19\u4F34" }),
6578
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u957F\u671F\u8EAB\u4EFD\u4E0E\u5FAE\u4FE1\u6E20\u9053" })
6764
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("main", { className: "dsh-partner-workspace", children: [
6765
+ creatingCompanion && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CompanionCreateDialog, { close: () => setCreatingCompanion(false), create }),
6766
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "dsh-partner-topbar", children: [
6767
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-topbar-brand", children: [
6768
+ /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)(import_dsh_client_ui_primitives16.IconChevronLeftOutline14, { size: 15 }) }),
6769
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 18 }),
6770
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6771
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4F19\u4F34" }),
6772
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u957F\u671F\u8EAB\u4EFD\u4E0E\u5FAE\u4FE1\u6E20\u9053" })
6579
6773
  ] })
6580
6774
  ] }),
6581
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6775
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6582
6776
  MobileWorkspaceControls,
6583
6777
  {
6584
6778
  companions: snapshot?.companions ?? [],
@@ -6590,115 +6784,115 @@ function PartnerWorkspace({ controller }) {
6590
6784
  }
6591
6785
  )
6592
6786
  ] }),
6593
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-grid", children: [
6594
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("aside", { className: "dsh-partner-roster", children: [
6595
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-roster-title", children: [
6596
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6597
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "COMPANIONS" }),
6598
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4F19\u4F34\u540D\u518C" })
6787
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-grid", children: [
6788
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("aside", { className: "dsh-partner-roster", children: [
6789
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-roster-title", children: [
6790
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6791
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "COMPANIONS" }),
6792
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4F19\u4F34\u540D\u518C" })
6599
6793
  ] }),
6600
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setCreatingCompanion(true), "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 16 }) })
6794
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setCreatingCompanion(true), "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 16 }) })
6601
6795
  ] }),
6602
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-roster-list", children: snapshot?.companions.map((companion) => {
6796
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-roster-list", children: snapshot?.companions.map((companion) => {
6603
6797
  const channel = snapshot.channels.find((item) => item.companionId === companion.id);
6604
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: !workspacePage && selectedId === companion.id ? "is-active" : "", onClick: () => openCompanion(companion.id), children: [
6605
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Avatar, { name: companion.name }),
6606
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6607
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: companion.name }),
6608
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: companion.role })
6798
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: !workspacePage && selectedId === companion.id ? "is-active" : "", onClick: () => openCompanion(companion.id), children: [
6799
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Avatar, { name: companion.name }),
6800
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6801
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: companion.name }),
6802
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: companion.role })
6609
6803
  ] }),
6610
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { className: channel?.runtimeStatus === "running" ? "is-online" : "", title: channel ? channel.runtimeStatus : "\u672A\u8FDE\u63A5\u6E20\u9053" })
6804
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { className: channel?.runtimeStatus === "running" ? "is-online" : "", title: channel ? channel.runtimeStatus : "\u672A\u8FDE\u63A5\u6E20\u9053" })
6611
6805
  ] }, companion.id);
6612
6806
  }) }),
6613
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "dsh-partner-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A", children: [
6614
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "skills" ? "is-active" : "", "aria-current": view === "skills" ? "page" : void 0, onClick: () => setView("skills"), children: [
6615
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconBrowseOutline16, { size: 16 }) }),
6616
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Skill \u5E02\u573A" }),
6617
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5B89\u88C5\u4E0E\u7BA1\u7406\u80FD\u529B" })
6807
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("nav", { className: "dsh-partner-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A", children: [
6808
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "skills" ? "is-active" : "", "aria-current": view === "skills" ? "page" : void 0, onClick: () => setView("skills"), children: [
6809
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconBrowseOutline16, { size: 16 }) }),
6810
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Skill \u5E02\u573A" }),
6811
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5B89\u88C5\u4E0E\u7BA1\u7406\u80FD\u529B" })
6618
6812
  ] }),
6619
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "board" ? "is-active" : "", "aria-current": view === "board" ? "page" : void 0, onClick: () => setView("board"), children: [
6620
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconListPenOutline16, { size: 16 }) }),
6621
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4EFB\u52A1\u770B\u677F" }),
6622
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u534F\u4F5C\u3001\u59D4\u6D3E\u4E0E\u9A8C\u6536" })
6813
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "board" ? "is-active" : "", "aria-current": view === "board" ? "page" : void 0, onClick: () => setView("board"), children: [
6814
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconListPenOutline16, { size: 16 }) }),
6815
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4EFB\u52A1\u770B\u677F" }),
6816
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u534F\u4F5C\u3001\u59D4\u6D3E\u4E0E\u9A8C\u6536" })
6623
6817
  ] }),
6624
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "schedules" ? "is-active" : "", "aria-current": view === "schedules" ? "page" : void 0, onClick: () => setView("schedules"), children: [
6625
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlayOutline16, { size: 16 }) }),
6626
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u5B9A\u65F6\u4EFB\u52A1" }),
6627
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u9009\u62E9\u4F19\u4F34\u5468\u671F\u6267\u884C" })
6818
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "schedules" ? "is-active" : "", "aria-current": view === "schedules" ? "page" : void 0, onClick: () => setView("schedules"), children: [
6819
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlayOutline16, { size: 16 }) }),
6820
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u5B9A\u65F6\u4EFB\u52A1" }),
6821
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u9009\u62E9\u4F19\u4F34\u5468\u671F\u6267\u884C" })
6628
6822
  ] }),
6629
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "pendant" ? "is-active" : "", "aria-current": view === "pendant" ? "page" : void 0, onClick: () => setView("pendant"), children: [
6630
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }) }),
6631
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u5361\u7247\u8BBE\u7F6E" }),
6632
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u6302\u9970\u3001\u7EF3\u5B50\u4E0E\u56FE\u6848" })
6823
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "pendant" ? "is-active" : "", "aria-current": view === "pendant" ? "page" : void 0, onClick: () => setView("pendant"), children: [
6824
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }) }),
6825
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u5361\u7247\u8BBE\u7F6E" }),
6826
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u6302\u9970\u3001\u7EF3\u5B50\u4E0E\u56FE\u6848" })
6633
6827
  ] })
6634
6828
  ] }),
6635
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-roster-note", children: [
6636
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconLinkOutline16, { size: 16 }),
6637
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6638
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u8EAB\u4EFD\u4E0E\u6E20\u9053\u5206\u79BB" }),
6639
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5FAE\u4FE1\u53EA\u8D1F\u8D23\u6536\u53D1\uFF0C\u6743\u9650\u4ECD\u7531 DSH \u5DE5\u5177\u51B3\u5B9A\u3002" })
6829
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-roster-note", children: [
6830
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconLinkOutline16, { size: 16 }),
6831
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6832
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u8EAB\u4EFD\u4E0E\u6E20\u9053\u5206\u79BB" }),
6833
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5FAE\u4FE1\u53EA\u8D1F\u8D23\u6536\u53D1\uFF0C\u6743\u9650\u4ECD\u7531 DSH \u5DE5\u5177\u51B3\u5B9A\u3002" })
6640
6834
  ] })
6641
6835
  ] })
6642
6836
  ] }),
6643
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: `dsh-partner-stage${workspacePage ? " is-workspace-page" : ""}`, children: [
6644
- loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u6B63\u5728\u8BFB\u53D6\u4F19\u4F34\u2026" }) : workspacePage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-stage-scroll is-workspace-page", children: [
6645
- view === "skills" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SkillsPanel, {}),
6646
- view === "board" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RequirementBoard, { initialTaskId: requestedDestination?.taskId, openRequest: requestedDestination }),
6647
- view === "schedules" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SchedulePanel, { companions: snapshot?.companions ?? [] }),
6648
- view === "pendant" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PendantSettingsPanel, {})
6649
- ] }) : selected === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)("button", { onClick: () => setCreatingCompanion(true), children: "\u65B0\u5EFA\u4F19\u4F34" }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6650
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-identity", children: [
6651
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Avatar, { name: selected.name }),
6652
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6653
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "ACTIVE COMPANION" }),
6654
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h1", { children: selected.name }),
6655
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: selected.description || selected.role })
6837
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: `dsh-partner-stage${workspacePage ? " is-workspace-page" : ""}`, children: [
6838
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u6B63\u5728\u8BFB\u53D6\u4F19\u4F34\u2026" }) : workspacePage ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-stage-scroll is-workspace-page", children: [
6839
+ view === "skills" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SkillsPanel, {}),
6840
+ view === "board" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RequirementBoard, { initialTaskId: requestedDestination?.taskId, openRequest: requestedDestination }),
6841
+ view === "schedules" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SchedulePanel, { companions: snapshot?.companions ?? [] }),
6842
+ view === "pendant" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PendantSettingsPanel, {})
6843
+ ] }) : selected === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)("button", { onClick: () => setCreatingCompanion(true), children: "\u65B0\u5EFA\u4F19\u4F34" }) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6844
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-identity", children: [
6845
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Avatar, { name: selected.name }),
6846
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6847
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "ACTIVE COMPANION" }),
6848
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { children: selected.name }),
6849
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: selected.description || selected.role })
6656
6850
  ] }),
6657
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChannelStatus, { channel: snapshot?.channels.find((item) => item.companionId === selected.id) })
6851
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChannelStatus, { channel: snapshot?.channels.find((item) => item.companionId === selected.id) })
6658
6852
  ] }),
6659
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "dsh-partner-tabs", "aria-label": "\u4F19\u4F34\u914D\u7F6E", children: [
6660
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabButton, { active: view === "home", onClick: () => setView("home"), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }), children: "\u603B\u89C8" }),
6661
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabButton, { active: view === "identity", onClick: () => setView("identity"), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }), children: "\u8EAB\u4EFD" }),
6662
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabButton, { active: view === "capabilities", onClick: () => setView("capabilities"), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }), children: "\u80FD\u529B" }),
6663
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabButton, { active: view === "weixin", onClick: () => setView("weixin"), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WeixinGlyph, {}), children: "\u5FAE\u4FE1" }),
6664
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabButton, { active: view === "memory", onClick: () => setView("memory"), icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }), children: "\u8BB0\u5FC6" })
6853
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("nav", { className: "dsh-partner-tabs", "aria-label": "\u4F19\u4F34\u914D\u7F6E", children: [
6854
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabButton, { active: view === "home", onClick: () => setView("home"), icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }), children: "\u603B\u89C8" }),
6855
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabButton, { active: view === "identity", onClick: () => setView("identity"), icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }), children: "\u8EAB\u4EFD" }),
6856
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabButton, { active: view === "capabilities", onClick: () => setView("capabilities"), icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }), children: "\u80FD\u529B" }),
6857
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabButton, { active: view === "weixin", onClick: () => setView("weixin"), icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WeixinGlyph, {}), children: "\u5FAE\u4FE1" }),
6858
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabButton, { active: view === "memory", onClick: () => setView("memory"), icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }), children: "\u8BB0\u5FC6" })
6665
6859
  ] }),
6666
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-stage-scroll", children: [
6667
- notice && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-inline-notice", role: "status", children: notice }),
6668
- view === "home" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(HomePanel, { companion: selected, snapshot, navigate: setView, openSession, startSession, renewSession }),
6669
- view === "identity" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IdentityEditor, { companion: selected, count: snapshot?.companions.length ?? 1, onChanged: () => refresh(true), onRemoved: companionRemoved }),
6670
- view === "capabilities" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CapabilityEditor, { companion: selected, presets: snapshot?.presets ?? [], onChanged: () => refresh(true) }, selected.id),
6671
- view === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WeixinPanel, { companion: selected, snapshot, onChanged: refresh }),
6672
- view === "memory" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryPanel, { companion: selected, snapshot, openSession, startSession, renewSession, onChanged: refresh })
6860
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-stage-scroll", children: [
6861
+ notice && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-inline-notice", role: "status", children: notice }),
6862
+ view === "home" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(HomePanel, { companion: selected, snapshot, navigate: setView, openSession, startSession, renewSession }),
6863
+ view === "identity" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IdentityEditor, { companion: selected, count: snapshot?.companions.length ?? 1, onChanged: () => refresh(true), onRemoved: companionRemoved }),
6864
+ view === "capabilities" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CapabilityEditor, { companion: selected, presets: snapshot?.presets ?? [], onChanged: () => refresh(true) }, selected.id),
6865
+ view === "weixin" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WeixinPanel, { companion: selected, snapshot, onChanged: refresh }),
6866
+ view === "memory" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryPanel, { companion: selected, snapshot, openSession, startSession, renewSession, onChanged: refresh })
6673
6867
  ] })
6674
6868
  ] }),
6675
- error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-error", role: "alert", children: error })
6869
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-error", role: "alert", children: error })
6676
6870
  ] })
6677
6871
  ] })
6678
6872
  ] });
6679
6873
  }
6680
6874
  function MobileWorkspaceControls({ companions, selectedId, view, openCompanion, openPage, createCompanion }) {
6681
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-mobile-controls", children: [
6682
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-mobile-companion-row", children: [
6683
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CompanionPicker, { companions, selectedId, onChange: openCompanion }),
6684
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "dsh-partner-mobile-create", onClick: createCompanion, "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 17 }) })
6875
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-mobile-controls", children: [
6876
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-mobile-companion-row", children: [
6877
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CompanionPicker, { companions, selectedId, onChange: openCompanion }),
6878
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "dsh-partner-mobile-create", onClick: createCompanion, "aria-label": "\u65B0\u5EFA\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 17 }) })
6685
6879
  ] }),
6686
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "dsh-partner-mobile-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A\u5FEB\u6377\u5165\u53E3", children: [
6687
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "skills" ? "is-active" : "", "aria-pressed": view === "skills", onClick: () => openPage("skills"), children: [
6688
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconBrowseOutline16, { size: 16 }),
6689
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Skill" })
6880
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("nav", { className: "dsh-partner-mobile-workspace-nav", "aria-label": "\u4F19\u4F34\u5DE5\u4F5C\u533A\u5FEB\u6377\u5165\u53E3", children: [
6881
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "skills" ? "is-active" : "", "aria-pressed": view === "skills", onClick: () => openPage("skills"), children: [
6882
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconBrowseOutline16, { size: 16 }),
6883
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Skill" })
6690
6884
  ] }),
6691
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "board" ? "is-active" : "", "aria-pressed": view === "board", onClick: () => openPage("board"), children: [
6692
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconListPenOutline16, { size: 16 }),
6693
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u770B\u677F" })
6885
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "board" ? "is-active" : "", "aria-pressed": view === "board", onClick: () => openPage("board"), children: [
6886
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconListPenOutline16, { size: 16 }),
6887
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u770B\u677F" })
6694
6888
  ] }),
6695
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "schedules" ? "is-active" : "", "aria-pressed": view === "schedules", onClick: () => openPage("schedules"), children: [
6696
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlayOutline16, { size: 16 }),
6697
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u5B9A\u65F6" })
6889
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "schedules" ? "is-active" : "", "aria-pressed": view === "schedules", onClick: () => openPage("schedules"), children: [
6890
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlayOutline16, { size: 16 }),
6891
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u5B9A\u65F6" })
6698
6892
  ] }),
6699
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: view === "pendant" ? "is-active" : "", "aria-pressed": view === "pendant", onClick: () => openPage("pendant"), children: [
6700
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }),
6701
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u5361\u7247" })
6893
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: view === "pendant" ? "is-active" : "", "aria-pressed": view === "pendant", onClick: () => openPage("pendant"), children: [
6894
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconEditOutline16, { size: 16 }),
6895
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u5361\u7247" })
6702
6896
  ] })
6703
6897
  ] })
6704
6898
  ] });
@@ -6711,66 +6905,66 @@ function HomePanel({ companion, snapshot, navigate, openSession, startSession, r
6711
6905
  const approved = channel ? snapshot.pairings.filter((item) => item.channelId === channel.id && item.status === "approved").length : 0;
6712
6906
  const capabilities = companion.capabilities.map((item) => CAPABILITY_LABELS[item]);
6713
6907
  const online = channel?.runtimeStatus === "running";
6714
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-home", children: [
6715
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "dsh-partner-home-heading", children: [
6716
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6717
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5DE5\u4F5C\u53F0" }),
6718
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { children: online ? `${companion.name} \u6B63\u5728\u5FAE\u4FE1\u5F85\u547D` : `${companion.name} \u5DF2\u51C6\u5907\u5C31\u7EEA` })
6908
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-home", children: [
6909
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "dsh-partner-home-heading", children: [
6910
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
6911
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5DE5\u4F5C\u53F0" }),
6912
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { children: online ? `${companion.name} \u6B63\u5728\u5FAE\u4FE1\u5F85\u547D` : `${companion.name} \u5DF2\u51C6\u5907\u5C31\u7EEA` })
6719
6913
  ] }),
6720
- /* @__PURE__ */ (0, import_jsx_runtime19.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" })
6914
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" })
6721
6915
  ] }),
6722
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: `dsh-partner-home-channel${online ? " is-online" : ""}`, children: [
6723
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-home-route", "aria-hidden": "true", children: [
6724
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Avatar, { name: companion.name }),
6725
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "dsh-partner-route-line", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}) }),
6726
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "dsh-partner-route-weixin", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WeixinGlyph, { large: true }) })
6916
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: `dsh-partner-home-channel${online ? " is-online" : ""}`, children: [
6917
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-home-route", "aria-hidden": "true", children: [
6918
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Avatar, { name: companion.name }),
6919
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "dsh-partner-route-line", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}) }),
6920
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "dsh-partner-route-weixin", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WeixinGlyph, { large: true }) })
6727
6921
  ] }),
6728
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-home-channel-copy", children: [
6729
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "dsh-partner-home-kicker", children: [
6730
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}),
6922
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-home-channel-copy", children: [
6923
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "dsh-partner-home-kicker", children: [
6924
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}),
6731
6925
  "\u4E3B\u8981\u6E20\u9053 \xB7 \u5FAE\u4FE1"
6732
6926
  ] }),
6733
- /* @__PURE__ */ (0, import_jsx_runtime19.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" }),
6734
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: !channel ? "\u901A\u8FC7\u5FAE\u4FE1 iLink Bot \u63A5\u5165\u3002\u51ED\u636E\u53EA\u8FDB\u5165 DSH \u51ED\u636E\u5E93\uFF0C\u8054\u7CFB\u4EBA\u9996\u6B21\u53D1\u6D88\u606F\u4ECD\u9700\u4F60\u7684\u6279\u51C6\u3002" : online ? "\u6BCF\u4F4D\u8054\u7CFB\u4EBA\u62E5\u6709\u72EC\u7ACB DSH \u4F1A\u8BDD\uFF0C\u4F19\u4F34\u8EAB\u4EFD\u4E00\u81F4\uFF0C\u4F46\u4E0A\u4E0B\u6587\u4E0D\u4F1A\u4E92\u76F8\u6DF7\u5408\u3002" : channel.lastError || "\u6E20\u9053\u914D\u7F6E\u4ECD\u7136\u4FDD\u7559\uFF0C\u53EF\u4EE5\u968F\u65F6\u91CD\u65B0\u542F\u7528\u3002" }),
6735
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-home-channel-actions", children: [
6736
- /* @__PURE__ */ (0, import_jsx_runtime19.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" }),
6737
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: !channel ? "\u626B\u7801\u5B8C\u6210\uFF0C\u65E0\u9700\u7C98\u8D34 Token" : `${approved} \u4F4D\u8054\u7CFB\u4EBA \xB7 ${sessions2.length} \u4E2A\u72EC\u7ACB\u4F1A\u8BDD` })
6927
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" }),
6928
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: !channel ? "\u901A\u8FC7\u5FAE\u4FE1 iLink Bot \u63A5\u5165\u3002\u51ED\u636E\u53EA\u8FDB\u5165 DSH \u51ED\u636E\u5E93\uFF0C\u8054\u7CFB\u4EBA\u9996\u6B21\u53D1\u6D88\u606F\u4ECD\u9700\u4F60\u7684\u6279\u51C6\u3002" : online ? "\u6BCF\u4F4D\u8054\u7CFB\u4EBA\u62E5\u6709\u72EC\u7ACB DSH \u4F1A\u8BDD\uFF0C\u4F19\u4F34\u8EAB\u4EFD\u4E00\u81F4\uFF0C\u4F46\u4E0A\u4E0B\u6587\u4E0D\u4F1A\u4E92\u76F8\u6DF7\u5408\u3002" : channel.lastError || "\u6E20\u9053\u914D\u7F6E\u4ECD\u7136\u4FDD\u7559\uFF0C\u53EF\u4EE5\u968F\u65F6\u91CD\u65B0\u542F\u7528\u3002" }),
6929
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-home-channel-actions", children: [
6930
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" }),
6931
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: !channel ? "\u626B\u7801\u5B8C\u6210\uFF0C\u65E0\u9700\u7C98\u8D34 Token" : `${approved} \u4F4D\u8054\u7CFB\u4EBA \xB7 ${sessions2.length} \u4E2A\u72EC\u7ACB\u4F1A\u8BDD` })
6738
6932
  ] })
6739
6933
  ] })
6740
6934
  ] }),
6741
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-home-details", children: [
6742
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-home-profile", children: [
6743
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
6744
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
6745
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
6746
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u4F19\u4F34\u5E95\u7A3F" }),
6747
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: companion.role })
6935
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-home-details", children: [
6936
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-home-profile", children: [
6937
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
6938
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
6939
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
6940
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u4F19\u4F34\u5E95\u7A3F" }),
6941
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: companion.role })
6748
6942
  ] }),
6749
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => navigate("identity"), children: "\u7F16\u8F91" })
6943
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => navigate("identity"), children: "\u7F16\u8F91" })
6750
6944
  ] }),
6751
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("blockquote", { children: companion.instructions || companion.description || "\u5C1A\u672A\u8BBE\u7F6E\u957F\u671F\u884C\u4E3A\u51C6\u5219\u3002" })
6945
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("blockquote", { children: companion.instructions || companion.description || "\u5C1A\u672A\u8BBE\u7F6E\u957F\u671F\u884C\u4E3A\u51C6\u5219\u3002" })
6752
6946
  ] }),
6753
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-home-runtime", children: [
6754
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
6755
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }) }),
6756
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
6757
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u8FD0\u884C\u80FD\u529B" }),
6758
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: companion.presetId || "DSH \u9ED8\u8BA4 Preset" })
6947
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-home-runtime", children: [
6948
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
6949
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconAgentPresetOutline16, { size: 16 }) }),
6950
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
6951
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u8FD0\u884C\u80FD\u529B" }),
6952
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: companion.presetId || "DSH \u9ED8\u8BA4 Preset" })
6759
6953
  ] }),
6760
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => navigate("capabilities"), children: "\u8C03\u6574" })
6954
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => navigate("capabilities"), children: "\u8C03\u6574" })
6761
6955
  ] }),
6762
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-home-capability-list", children: capabilities.length ? capabilities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("em", { children: item }, item)) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5C1A\u672A\u58F0\u660E\u80FD\u529B\u8303\u56F4" }) })
6956
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-home-capability-list", children: capabilities.length ? capabilities.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("em", { children: item }, item)) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5C1A\u672A\u58F0\u660E\u80FD\u529B\u8303\u56F4" }) })
6763
6957
  ] }),
6764
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-home-continuity", children: [
6765
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
6766
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }) }),
6767
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
6768
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u4F19\u4F34\u5BF9\u8BDD" }),
6769
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: localSession?.archived ? "\u4F1A\u8BDD\u5DF2\u5F52\u6863" : "\u4F19\u4F34\u4F1A\u8BDD\u5DF2\u5EFA\u7ACB" })
6958
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-home-continuity", children: [
6959
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
6960
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }) }),
6961
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
6962
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u4F19\u4F34\u5BF9\u8BDD" }),
6963
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: localSession?.archived ? "\u4F1A\u8BDD\u5DF2\u5F52\u6863" : "\u4F19\u4F34\u4F1A\u8BDD\u5DF2\u5EFA\u7ACB" })
6770
6964
  ] }),
6771
- /* @__PURE__ */ (0, import_jsx_runtime19.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" })
6965
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" })
6772
6966
  ] }),
6773
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: localSession ? `\u6700\u8FD1\u6D3B\u52A8\u4E8E ${relativeTime(localSession.lastMessageAt)}\uFF1B\u53E6\u6709 ${sessions2.filter((item) => item.kind === "channel").length} \u4E2A\u6E20\u9053\u4F1A\u8BDD\u3002` : "\u4F19\u4F34\u4F1A\u8BDD\u6B63\u5728\u521D\u59CB\u5316\uFF0C\u7A0D\u540E\u5373\u53EF\u6253\u5F00\u3002" })
6967
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: localSession ? `\u6700\u8FD1\u6D3B\u52A8\u4E8E ${relativeTime(localSession.lastMessageAt)}\uFF1B\u53E6\u6709 ${sessions2.filter((item) => item.kind === "channel").length} \u4E2A\u6E20\u9053\u4F1A\u8BDD\u3002` : "\u4F19\u4F34\u4F1A\u8BDD\u6B63\u5728\u521D\u59CB\u5316\uFF0C\u7A0D\u540E\u5373\u53EF\u6253\u5F00\u3002" })
6774
6968
  ] })
6775
6969
  ] })
6776
6970
  ] });
@@ -6826,93 +7020,93 @@ function WeixinPanel({ companion, snapshot, onChanged }) {
6826
7020
  setError(errorMessage(reason));
6827
7021
  }
6828
7022
  };
6829
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-form is-channel", children: [
6830
- /* @__PURE__ */ (0, import_jsx_runtime19.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" }),
6831
- !channel && !login && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-weixin-connect", borderRadius: 15, distortionScale: -10, saturation: 1.06, children: [
6832
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WeixinGlyph, { large: true }) }),
6833
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6834
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7023
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-form is-channel", children: [
7024
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" }),
7025
+ !channel && !login && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-weixin-connect", borderRadius: 15, distortionScale: -10, saturation: 1.06, children: [
7026
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WeixinGlyph, { large: true }) }),
7027
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7028
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
6835
7029
  "\u628A ",
6836
7030
  companion.name,
6837
7031
  " \u5E26\u5230\u5FAE\u4FE1"
6838
7032
  ] }),
6839
- /* @__PURE__ */ (0, import_jsx_runtime19.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" }),
6840
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("ul", { children: [
6841
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\u79C1\u804A\u9996\u6B21\u8054\u7CFB\u5FC5\u987B\u5BA1\u6279" }),
6842
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\u8054\u7CFB\u4EBA\u4E4B\u95F4\u4E0A\u4E0B\u6587\u5B8C\u5168\u9694\u79BB" }),
6843
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\u5DE5\u5177\u6743\u9650\u4E0D\u4F1A\u56E0\u5FAE\u4FE1\u8EAB\u4EFD\u81EA\u52A8\u6269\u5927" })
7033
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" }),
7034
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("ul", { children: [
7035
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { children: "\u79C1\u804A\u9996\u6B21\u8054\u7CFB\u5FC5\u987B\u5BA1\u6279" }),
7036
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { children: "\u8054\u7CFB\u4EBA\u4E4B\u95F4\u4E0A\u4E0B\u6587\u5B8C\u5168\u9694\u79BB" }),
7037
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { children: "\u5DE5\u5177\u6743\u9650\u4E0D\u4F1A\u56E0\u5FAE\u4FE1\u8EAB\u4EFD\u81EA\u52A8\u6269\u5927" })
6844
7038
  ] })
6845
7039
  ] }),
6846
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => {
7040
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => {
6847
7041
  void begin();
6848
7042
  }, children: busy ? "\u6B63\u5728\u7533\u8BF7\u4E8C\u7EF4\u7801\u2026" : "\u626B\u7801\u8FDE\u63A5\u5FAE\u4FE1" })
6849
7043
  ] }),
6850
- login && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-qr", borderRadius: 16, distortionScale: -10, saturation: 1.06, children: [
6851
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-qr-code", children: login.qrContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(QRCodeSVG, { value: login.qrContent, size: 176, level: "M" }) }),
6852
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6853
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "WECHAT ILINK BOT" }),
6854
- /* @__PURE__ */ (0, import_jsx_runtime19.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" }),
6855
- /* @__PURE__ */ (0, import_jsx_runtime19.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") }),
6856
- (login.phase === "expired" || login.phase === "error") && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", onClick: () => {
7044
+ login && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-qr", borderRadius: 16, distortionScale: -10, saturation: 1.06, children: [
7045
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-qr-code", children: login.qrContent && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(QRCodeSVG, { value: login.qrContent, size: 176, level: "M" }) }),
7046
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7047
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "WECHAT ILINK BOT" }),
7048
+ /* @__PURE__ */ (0, import_jsx_runtime20.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" }),
7049
+ /* @__PURE__ */ (0, import_jsx_runtime20.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") }),
7050
+ (login.phase === "expired" || login.phase === "error") && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", onClick: () => {
6857
7051
  setLogin(void 0);
6858
7052
  void begin();
6859
7053
  }, children: [
6860
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconRefreshOutline16, { size: 16 }),
7054
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconRefreshOutline16, { size: 16 }),
6861
7055
  "\u91CD\u65B0\u751F\u6210"
6862
7056
  ] })
6863
7057
  ] })
6864
7058
  ] }),
6865
- channel && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6866
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-channel-card", borderRadius: 14, distortionScale: -10, saturation: 1.06, children: [
6867
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WeixinGlyph, { large: true }) }),
6868
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6869
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "WECHAT CHANNEL" }),
6870
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: channel.name }),
6871
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: channel.accountId })
7059
+ channel && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
7060
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(GlassSurface, { as: "div", interactive: true, className: "dsh-partner-channel-card", borderRadius: 14, distortionScale: -10, saturation: 1.06, children: [
7061
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-weixin-mark", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WeixinGlyph, { large: true }) }),
7062
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7063
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "WECHAT CHANNEL" }),
7064
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: channel.name }),
7065
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: channel.accountId })
6872
7066
  ] }),
6873
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChannelStatus, { channel }),
6874
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": channel.enabled, disabled: busy, "aria-label": channel.enabled ? "\u505C\u7528\u5FAE\u4FE1\u6E20\u9053" : "\u542F\u7528\u5FAE\u4FE1\u6E20\u9053", onClick: () => {
7067
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChannelStatus, { channel }),
7068
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": channel.enabled, disabled: busy, "aria-label": channel.enabled ? "\u505C\u7528\u5FAE\u4FE1\u6E20\u9053" : "\u542F\u7528\u5FAE\u4FE1\u6E20\u9053", onClick: () => {
6875
7069
  void toggle();
6876
- }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}) })
7070
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}) })
6877
7071
  ] }),
6878
- channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-inline-error", children: channel.lastError }),
6879
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-pairing-heading", children: [
6880
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
6881
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "ACCESS" }),
6882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u79C1\u804A\u914D\u5BF9" })
7072
+ channel.lastError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-inline-error", children: channel.lastError }),
7073
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-pairing-heading", children: [
7074
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7075
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "ACCESS" }),
7076
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u79C1\u804A\u914D\u5BF9" })
6883
7077
  ] }),
6884
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("em", { children: [
7078
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("em", { children: [
6885
7079
  pairings.filter((item) => item.status === "pending").length,
6886
7080
  " \u4E2A\u5F85\u5904\u7406"
6887
7081
  ] })
6888
7082
  ] }),
6889
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-pairings", children: pairings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u8054\u7CFB\u4EBA", detail: "\u6709\u4EBA\u9996\u6B21\u5411\u673A\u5668\u4EBA\u53D1\u6D88\u606F\u540E\uFF0C\u914D\u5BF9\u8BF7\u6C42\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002", compact: true }) : pairings.map((pairing) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { children: [
6890
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: `is-${pairing.status}`, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
6891
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
6892
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: pairing.displayName }),
6893
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7083
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-pairings", children: pairings.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u8054\u7CFB\u4EBA", detail: "\u6709\u4EBA\u9996\u6B21\u5411\u673A\u5668\u4EBA\u53D1\u6D88\u606F\u540E\uFF0C\u914D\u5BF9\u8BF7\u6C42\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002", compact: true }) : pairings.map((pairing) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { children: [
7084
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: `is-${pairing.status}`, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
7085
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
7086
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: pairing.displayName }),
7087
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
6894
7088
  pairing.status === "pending" ? "\u7B49\u5F85\u5BA1\u6279" : pairing.status === "approved" ? "\u5DF2\u6388\u6743\u72EC\u7ACB\u4F1A\u8BDD" : "\u5DF2\u963B\u6B62",
6895
7089
  " \xB7 ",
6896
7090
  new Date(pairing.updatedAt).toLocaleString()
6897
7091
  ] })
6898
7092
  ] }),
6899
- pairing.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6900
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { onClick: () => {
7093
+ pairing.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
7094
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { onClick: () => {
6901
7095
  void actPairing(pairing.id, "blocked");
6902
7096
  }, children: "\u62D2\u7EDD" }),
6903
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "is-primary", onClick: () => {
7097
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "is-primary", onClick: () => {
6904
7098
  void actPairing(pairing.id, "approved");
6905
7099
  }, children: "\u6279\u51C6" })
6906
7100
  ] }),
6907
- pairing.status === "approved" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { onClick: () => {
7101
+ pairing.status === "approved" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { onClick: () => {
6908
7102
  void actPairing(pairing.id, "blocked");
6909
7103
  }, children: "\u64A4\u9500" }),
6910
- pairing.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { onClick: () => {
7104
+ pairing.status === "blocked" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { onClick: () => {
6911
7105
  void actPairing(pairing.id, "approved");
6912
7106
  }, children: "\u91CD\u65B0\u6279\u51C6" })
6913
7107
  ] }, pairing.id)) })
6914
7108
  ] }),
6915
- error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-inline-error", children: error })
7109
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-inline-error", children: error })
6916
7110
  ] });
6917
7111
  }
6918
7112
  function MemoryPanel({ companion, snapshot, openSession, startSession, renewSession, onChanged }) {
@@ -7054,157 +7248,157 @@ function MemoryPanel({ companion, snapshot, openSession, startSession, renewSess
7054
7248
  setBusy(false);
7055
7249
  }
7056
7250
  };
7057
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-form is-memory", children: [
7058
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SectionHeading, { eyebrow: "CONTINUITY", title: "\u4F1A\u8BDD\u8BB0\u5FC6", detail: "\u4F19\u4F34\u53EF\u4EE5\u76F4\u63A5\u5728 DSH \u4E2D\u5EFA\u7ACB\u672C\u5730\u5BF9\u8BDD\uFF1B\u5FAE\u4FE1\u53EA\u662F\u53EF\u9009\u6E20\u9053\u3002\u4E0D\u540C\u8054\u7CFB\u4EBA\u4ECD\u4FDD\u6301\u72EC\u7ACB\u4E0A\u4E0B\u6587\uFF0C\u77E5\u8BC6\u5E93\u7EE7\u7EED\u7531\u77E5\u8BC6\u5E93\u63D2\u4EF6\u7BA1\u7406\u3002" }),
7059
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-metrics", children: [
7060
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { children: [
7061
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u4F19\u4F34\u4F1A\u8BDD" }),
7062
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: sessions2.length }),
7063
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: localSession ? `1 \u4E2A\u672C\u5730 \xB7 ${channelSessionCount} \u4E2A\u6E20\u9053` : `${channelSessionCount} \u4E2A\u6E20\u9053` })
7251
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-form is-memory", children: [
7252
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SectionHeading, { eyebrow: "CONTINUITY", title: "\u4F1A\u8BDD\u8BB0\u5FC6", detail: "\u4F19\u4F34\u53EF\u4EE5\u76F4\u63A5\u5728 DSH \u4E2D\u5EFA\u7ACB\u672C\u5730\u5BF9\u8BDD\uFF1B\u5FAE\u4FE1\u53EA\u662F\u53EF\u9009\u6E20\u9053\u3002\u4E0D\u540C\u8054\u7CFB\u4EBA\u4ECD\u4FDD\u6301\u72EC\u7ACB\u4E0A\u4E0B\u6587\uFF0C\u77E5\u8BC6\u5E93\u7EE7\u7EED\u7531\u77E5\u8BC6\u5E93\u63D2\u4EF6\u7BA1\u7406\u3002" }),
7253
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-metrics", children: [
7254
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { children: [
7255
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u4F19\u4F34\u4F1A\u8BDD" }),
7256
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: sessions2.length }),
7257
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: localSession ? `1 \u4E2A\u672C\u5730 \xB7 ${channelSessionCount} \u4E2A\u6E20\u9053` : `${channelSessionCount} \u4E2A\u6E20\u9053` })
7064
7258
  ] }),
7065
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { children: [
7066
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u957F\u671F\u8BB0\u5FC6" }),
7067
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: memories.filter((item) => item.status === "active").length }),
7068
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { children: [
7259
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { children: [
7260
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u957F\u671F\u8BB0\u5FC6" }),
7261
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: memories.filter((item) => item.status === "active").length }),
7262
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { children: [
7069
7263
  reflections.length,
7070
7264
  " \u7BC7\u6BCF\u65E5\u56DE\u987E"
7071
7265
  ] })
7072
7266
  ] }),
7073
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { children: [
7074
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u6700\u8FD1\u5FC3\u8DF3" }),
7075
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: heartbeat?.lastCheckedAt ? relativeTime(heartbeat.lastCheckedAt) : "\u5C1A\u672A" }),
7076
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: heartbeat?.lastError ? "\u4E0A\u6B21\u6267\u884C\u5F02\u5E38" : `\u4ECA\u65E5\u53D1\u9001 ${heartbeat?.sentCount ?? 0} \u6B21` })
7267
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { children: [
7268
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u6700\u8FD1\u5FC3\u8DF3" }),
7269
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: heartbeat?.lastCheckedAt ? relativeTime(heartbeat.lastCheckedAt) : "\u5C1A\u672A" }),
7270
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: heartbeat?.lastError ? "\u4E0A\u6B21\u6267\u884C\u5F02\u5E38" : `\u4ECA\u65E5\u53D1\u9001 ${heartbeat?.sentCount ?? 0} \u6B21` })
7077
7271
  ] })
7078
7272
  ] }),
7079
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-automation-grid", children: [
7080
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-automation", children: [
7081
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7082
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7083
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u5B66\u4E60\u4E0E\u957F\u671F\u8BB0\u5FC6" }),
7084
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u6309\u8054\u7CFB\u4EBA\u5F52\u6863\u5B8C\u6574\u5BF9\u8BDD\uFF0C\u63D0\u70BC\u6BCF\u65E5\u56DE\u987E\u548C\u7ED3\u6784\u5316\u8BB0\u5FC6\uFF0C\u5E76\u5728\u76F8\u5173\u8BDD\u9898\u51FA\u73B0\u65F6\u53EC\u56DE\u3002" })
7273
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-automation-grid", children: [
7274
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-automation", children: [
7275
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7276
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7277
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u5B66\u4E60\u4E0E\u957F\u671F\u8BB0\u5FC6" }),
7278
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u6309\u8054\u7CFB\u4EBA\u5F52\u6863\u5B8C\u6574\u5BF9\u8BDD\uFF0C\u63D0\u70BC\u6BCF\u65E5\u56DE\u987E\u548C\u7ED3\u6784\u5316\u8BB0\u5FC6\uFF0C\u5E76\u5728\u76F8\u5173\u8BDD\u9898\u51FA\u73B0\u65F6\u53EC\u56DE\u3002" })
7085
7279
  ] }),
7086
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.memory.enabled, "aria-label": "\u542F\u7528\u4F19\u4F34\u5B66\u4E60", onClick: () => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, enabled: !current2.memory.enabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}) })
7280
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.memory.enabled, "aria-label": "\u542F\u7528\u4F19\u4F34\u5B66\u4E60", onClick: () => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, enabled: !current2.memory.enabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}) })
7087
7281
  ] }),
7088
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-automation-fields is-memory-model", children: [
7089
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u4FDD\u7559\u671F\u9650", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("select", { value: automation.memory.retentionDays, onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, retentionDays: Number(event.target.value) } })), children: [
7090
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 0, children: "\u6C38\u4E45\u4FDD\u7559" }),
7091
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 30, children: "30 \u5929" }),
7092
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 90, children: "90 \u5929" }),
7093
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 180, children: "180 \u5929" }),
7094
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 365, children: "1 \u5E74" }),
7095
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 1095, children: "3 \u5E74" })
7282
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-automation-fields is-memory-model", children: [
7283
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u4FDD\u7559\u671F\u9650", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("select", { value: automation.memory.retentionDays, onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, retentionDays: Number(event.target.value) } })), children: [
7284
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 0, children: "\u6C38\u4E45\u4FDD\u7559" }),
7285
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 30, children: "30 \u5929" }),
7286
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 90, children: "90 \u5929" }),
7287
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 180, children: "180 \u5929" }),
7288
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 365, children: "1 \u5E74" }),
7289
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 1095, children: "3 \u5E74" })
7096
7290
  ] }) }),
7097
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u63D0\u70BC Provider", hint: "\u9ED8\u8BA4\u7EE7\u627F\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("select", { value: automation.memory.provider ?? "", onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, provider: event.target.value, model: "" } })), children: [
7098
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("option", { value: "", children: [
7291
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u63D0\u70BC Provider", hint: "\u9ED8\u8BA4\u7EE7\u627F\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("select", { value: automation.memory.provider ?? "", onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, provider: event.target.value, model: "" } })), children: [
7292
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: "", children: [
7099
7293
  "\u8DDF\u968F\u4F19\u4F34 \xB7 ",
7100
7294
  inheritedProvider || "DSH \u9ED8\u8BA4"
7101
7295
  ] }),
7102
- modelCatalog?.providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: provider.id, children: provider.name || provider.id }, provider.id))
7296
+ modelCatalog?.providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: provider.id, children: provider.name || provider.id }, provider.id))
7103
7297
  ] }) }),
7104
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u63D0\u70BC\u6A21\u578B", hint: "\u9ED8\u8BA4\u7EE7\u627F\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("select", { value: automation.memory.model ?? "", onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, model: event.target.value } })), children: [
7105
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("option", { value: "", children: [
7298
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u63D0\u70BC\u6A21\u578B", hint: "\u9ED8\u8BA4\u7EE7\u627F\u4F19\u4F34", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("select", { value: automation.memory.model ?? "", onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, model: event.target.value } })), children: [
7299
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: "", children: [
7106
7300
  "\u8DDF\u968F\u4F19\u4F34 \xB7 ",
7107
7301
  companion.model || modelCatalog?.defaultSelection.model || "DSH \u9ED8\u8BA4"
7108
7302
  ] }),
7109
- modelOptions.map((model) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: model.id, children: model.name || model.id }, model.id))
7303
+ modelOptions.map((model) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: model.id, children: model.name || model.id }, model.id))
7110
7304
  ] }) })
7111
7305
  ] }),
7112
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-review-policy", children: [
7113
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.memory.dailyReviewEnabled, "aria-label": "\u542F\u7528\u6BCF\u65E5\u7EC8\u5BA1", onClick: () => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, dailyReviewEnabled: !current2.memory.dailyReviewEnabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}) }),
7114
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7115
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u6BCF\u65E5\u7EC8\u5BA1" }),
7116
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u6B21\u65E5\u81EA\u52A8\u5408\u5E76\u91CD\u590D\u3001\u7EA0\u6B63\u504F\u5DEE\u5E76\u5EFA\u7ACB\u8BB0\u5FC6\u5173\u7CFB" })
7306
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-review-policy", children: [
7307
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.memory.dailyReviewEnabled, "aria-label": "\u542F\u7528\u6BCF\u65E5\u7EC8\u5BA1", onClick: () => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, dailyReviewEnabled: !current2.memory.dailyReviewEnabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}) }),
7308
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7309
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u6BCF\u65E5\u7EC8\u5BA1" }),
7310
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u6B21\u65E5\u81EA\u52A8\u5408\u5E76\u91CD\u590D\u3001\u7EA0\u6B63\u504F\u5DEE\u5E76\u5EFA\u7ACB\u8BB0\u5FC6\u5173\u7CFB" })
7117
7311
  ] }),
7118
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("select", { "aria-label": "\u6BCF\u65E5\u7EC8\u5BA1\u65F6\u95F4", value: automation.memory.dailyReviewHour, onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, dailyReviewHour: Number(event.target.value) } })), children: Array.from({ length: 24 }, (_, hour) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("option", { value: hour, children: [
7312
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("select", { "aria-label": "\u6BCF\u65E5\u7EC8\u5BA1\u65F6\u95F4", value: automation.memory.dailyReviewHour, onChange: (event) => setAutomation((current2) => ({ ...current2, memory: { ...current2.memory, dailyReviewHour: Number(event.target.value) } })), children: Array.from({ length: 24 }, (_, hour) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("option", { value: hour, children: [
7119
7313
  String(hour).padStart(2, "0"),
7120
7314
  ":00"
7121
7315
  ] }, hour)) }) }),
7122
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy || reflections.length === 0, onClick: () => {
7316
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy || reflections.length === 0, onClick: () => {
7123
7317
  void review();
7124
7318
  }, children: "\u7ACB\u5373\u7EC8\u5BA1" })
7125
7319
  ] })
7126
7320
  ] }),
7127
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-automation", children: [
7128
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7129
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7130
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u6301\u7EED\u611F\u77E5" }),
7131
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u4F19\u4F34\u53EA\u89C2\u5BDF\u5C1A\u672A\u95ED\u73AF\u7684\u4E8B\u60C5\u662F\u5426\u51FA\u73B0\u65B0\u53D8\u5316\uFF0C\u5E76\u7531\u514B\u5236\u7684\u6253\u6270\u7B56\u7565\u51B3\u5B9A\u4F55\u65F6\u544A\u8BC9\u4F60\u3002" })
7321
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-automation", children: [
7322
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7323
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7324
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u6301\u7EED\u611F\u77E5" }),
7325
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u4F19\u4F34\u53EA\u89C2\u5BDF\u5C1A\u672A\u95ED\u73AF\u7684\u4E8B\u60C5\u662F\u5426\u51FA\u73B0\u65B0\u53D8\u5316\uFF0C\u5E76\u7531\u514B\u5236\u7684\u6253\u6270\u7B56\u7565\u51B3\u5B9A\u4F55\u65F6\u544A\u8BC9\u4F60\u3002" })
7132
7326
  ] }),
7133
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.heartbeat.enabled, "aria-label": "\u542F\u7528\u4F19\u4F34\u5FC3\u8DF3", onClick: () => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, enabled: !current2.heartbeat.enabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}) })
7327
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "dsh-partner-switch", "data-on": automation.heartbeat.enabled, "aria-label": "\u542F\u7528\u4F19\u4F34\u5FC3\u8DF3", onClick: () => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, enabled: !current2.heartbeat.enabled } })), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}) })
7134
7328
  ] }),
7135
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-automation-fields is-heartbeat", children: [
7136
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u68C0\u67E5\u95F4\u9694", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("select", { value: automation.heartbeat.intervalMinutes, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, intervalMinutes: Number(event.target.value) } })), children: [
7137
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 30, children: "30 \u5206\u949F" }),
7138
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 60, children: "1 \u5C0F\u65F6" }),
7139
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 180, children: "3 \u5C0F\u65F6" }),
7140
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 360, children: "6 \u5C0F\u65F6" }),
7141
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 720, children: "12 \u5C0F\u65F6" }),
7142
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 1440, children: "24 \u5C0F\u65F6" })
7329
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-automation-fields is-heartbeat", children: [
7330
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u68C0\u67E5\u95F4\u9694", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("select", { value: automation.heartbeat.intervalMinutes, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, intervalMinutes: Number(event.target.value) } })), children: [
7331
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 30, children: "30 \u5206\u949F" }),
7332
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 60, children: "1 \u5C0F\u65F6" }),
7333
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 180, children: "3 \u5C0F\u65F6" }),
7334
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 360, children: "6 \u5C0F\u65F6" }),
7335
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 720, children: "12 \u5C0F\u65F6" }),
7336
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 1440, children: "24 \u5C0F\u65F6" })
7143
7337
  ] }) }),
7144
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u514D\u6253\u6270\u5F00\u59CB", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { type: "number", min: 0, max: 23, value: automation.heartbeat.quietStartHour, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, quietStartHour: Number(event.target.value) } })) }) }),
7145
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u514D\u6253\u6270\u7ED3\u675F", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { type: "number", min: 0, max: 23, value: automation.heartbeat.quietEndHour, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, quietEndHour: Number(event.target.value) } })) }) }),
7146
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormField, { label: "\u6BCF\u65E5\u4E0A\u9650", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("select", { value: automation.heartbeat.dailyLimit, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, dailyLimit: Number(event.target.value) } })), children: [
7147
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 0, children: "\u4E0D\u9650" }),
7148
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 1, children: "1 \u6B21" }),
7149
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 2, children: "2 \u6B21" }),
7150
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 3, children: "3 \u6B21" }),
7151
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 5, children: "5 \u6B21" }),
7152
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value: 8, children: "8 \u6B21" })
7338
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u514D\u6253\u6270\u5F00\u59CB", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { type: "number", min: 0, max: 23, value: automation.heartbeat.quietStartHour, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, quietStartHour: Number(event.target.value) } })) }) }),
7339
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u514D\u6253\u6270\u7ED3\u675F", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { type: "number", min: 0, max: 23, value: automation.heartbeat.quietEndHour, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, quietEndHour: Number(event.target.value) } })) }) }),
7340
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormField, { label: "\u6BCF\u65E5\u4E0A\u9650", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("select", { value: automation.heartbeat.dailyLimit, onChange: (event) => setAutomation((current2) => ({ ...current2, heartbeat: { ...current2.heartbeat, dailyLimit: Number(event.target.value) } })), children: [
7341
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 0, children: "\u4E0D\u9650" }),
7342
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 1, children: "1 \u6B21" }),
7343
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 2, children: "2 \u6B21" }),
7344
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 3, children: "3 \u6B21" }),
7345
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 5, children: "5 \u6B21" }),
7346
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: 8, children: "8 \u6B21" })
7153
7347
  ] }) })
7154
7348
  ] }),
7155
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ConcernBoard, { companionId: companion.id, activity: concernActivity, value: newConcern, busy, onValue: setNewConcern, onAdd: () => {
7349
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ConcernBoard, { companionId: companion.id, activity: concernActivity, value: newConcern, busy, onValue: setNewConcern, onAdd: () => {
7156
7350
  void addConcern();
7157
7351
  }, onCheck: (item) => {
7158
7352
  void trigger(item.id);
7159
7353
  }, onAct: (item, action) => {
7160
7354
  void actConcern(item, action);
7161
7355
  } }),
7162
- heartbeat?.lastError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-inline-error", children: heartbeat.lastError }),
7163
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-automation-actions", children: [
7164
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy || sessions2.length === 0, onClick: () => {
7356
+ heartbeat?.lastError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-inline-error", children: heartbeat.lastError }),
7357
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-automation-actions", children: [
7358
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy || sessions2.length === 0, onClick: () => {
7165
7359
  void trigger();
7166
7360
  }, children: "\u68C0\u67E5\u5230\u671F\u9879" }),
7167
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "is-primary", disabled: busy, onClick: () => {
7361
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "is-primary", disabled: busy, onClick: () => {
7168
7362
  void save();
7169
7363
  }, children: busy ? "\u6B63\u5728\u5904\u7406\u2026" : "\u4FDD\u5B58\u8BBE\u7F6E" })
7170
7364
  ] })
7171
7365
  ] })
7172
7366
  ] }),
7173
- notice && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "dsh-partner-inline-notice", children: [
7174
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconCheckOutline14, { size: 14 }),
7367
+ notice && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "dsh-partner-inline-notice", children: [
7368
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconCheckOutline14, { size: 14 }),
7175
7369
  notice
7176
7370
  ] }),
7177
- error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-inline-error", children: error }),
7178
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryLibrary, { companionId: companion.id, revision: memoryRevision, profiles, memories, reflections, editing, busy, setEditing, save: () => {
7371
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-inline-error", children: error }),
7372
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryLibrary, { companionId: companion.id, revision: memoryRevision, profiles, memories, reflections, editing, busy, setEditing, save: () => {
7179
7373
  void saveMemory();
7180
7374
  }, remove: (item) => {
7181
7375
  void deleteMemory(item);
7182
7376
  } }),
7183
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-section-heading", children: [
7184
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7185
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "SESSIONS" }),
7186
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4F19\u4F34\u4F1A\u8BDD" })
7377
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-section-heading", children: [
7378
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7379
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "SESSIONS" }),
7380
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4F19\u4F34\u4F1A\u8BDD" })
7187
7381
  ] }),
7188
- localSession === void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", onClick: () => {
7382
+ localSession === void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", onClick: () => {
7189
7383
  void startSession(companion.id);
7190
7384
  }, children: [
7191
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 14 }),
7385
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 14 }),
7192
7386
  "\u5F00\u59CB\u672C\u5730\u5BF9\u8BDD"
7193
7387
  ] })
7194
7388
  ] }),
7195
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-session-list", children: [
7196
- sessions2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { "data-archived": item.archived, "data-kind": item.kind, children: [
7197
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }) }),
7198
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
7199
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.kind === "local" ? "\u672C\u5730\u4F19\u4F34\u4F1A\u8BDD" : `\u5FAE\u4FE1\u8054\u7CFB\u4EBA \xB7 ${item.userId.slice(-6)}` }),
7200
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: item.archived ? "\u5DF2\u5F52\u6863 \xB7 \u957F\u671F\u8BB0\u5FC6\u4FDD\u7559" : `${item.sessionId} \xB7 ${new Date(item.lastMessageAt).toLocaleString()}` })
7389
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-session-list", children: [
7390
+ sessions2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { "data-archived": item.archived, "data-kind": item.kind, children: [
7391
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 16 }) }),
7392
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
7393
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.kind === "local" ? "\u672C\u5730\u4F19\u4F34\u4F1A\u8BDD" : `\u5FAE\u4FE1\u8054\u7CFB\u4EBA \xB7 ${item.userId.slice(-6)}` }),
7394
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: item.archived ? "\u5DF2\u5F52\u6863 \xB7 \u957F\u671F\u8BB0\u5FC6\u4FDD\u7559" : `${item.sessionId} \xB7 ${new Date(item.lastMessageAt).toLocaleString()}` })
7201
7395
  ] }),
7202
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: item.archived ? "is-primary" : void 0, onClick: () => {
7396
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: item.archived ? "is-primary" : void 0, onClick: () => {
7203
7397
  if (item.archived) void renewSession(item.id);
7204
7398
  else void openSession(item.id, item.sessionId);
7205
7399
  }, children: item.archived ? "\u5F00\u59CB\u65B0\u4F1A\u8BDD" : "\u6253\u5F00\u4F1A\u8BDD" })
7206
7400
  ] }, item.id)),
7207
- sessions2.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u4F19\u4F34\u4F1A\u8BDD", detail: "\u65E0\u9700\u8FDE\u63A5\u5FAE\u4FE1\uFF0C\u76F4\u63A5\u5F00\u59CB\u672C\u5730\u5BF9\u8BDD\uFF1B\u4EE5\u540E\u8FDE\u63A5\u7684\u5FAE\u4FE1\u8054\u7CFB\u4EBA\u4F1A\u7EE7\u7EED\u4F7F\u7528\u5404\u81EA\u72EC\u7ACB\u7684\u6E20\u9053\u4F1A\u8BDD\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => {
7401
+ sessions2.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u4F19\u4F34\u4F1A\u8BDD", detail: "\u65E0\u9700\u8FDE\u63A5\u5FAE\u4FE1\uFF0C\u76F4\u63A5\u5F00\u59CB\u672C\u5730\u5BF9\u8BDD\uFF1B\u4EE5\u540E\u8FDE\u63A5\u7684\u5FAE\u4FE1\u8054\u7CFB\u4EBA\u4F1A\u7EE7\u7EED\u4F7F\u7528\u5404\u81EA\u72EC\u7ACB\u7684\u6E20\u9053\u4F1A\u8BDD\u3002", action: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => {
7208
7402
  void startSession(companion.id);
7209
7403
  }, children: "\u5F00\u59CB\u5BF9\u8BDD" }), compact: true })
7210
7404
  ] })
@@ -7276,25 +7470,25 @@ function ConcernBoard({ companionId, activity, value, busy, onValue, onAdd, onCh
7276
7470
  inputRef.current?.setSelectionRange(cursor, cursor);
7277
7471
  });
7278
7472
  };
7279
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-concern-board", "aria-labelledby": "partner-concerns-title", children: [
7280
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7281
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7282
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { id: "partner-concerns-title", children: [
7473
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-concern-board", "aria-labelledby": "partner-concerns-title", children: [
7474
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7475
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7476
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { id: "partner-concerns-title", children: [
7283
7477
  "\u4F19\u4F34\u5728\u610F\u7684\u4E8B ",
7284
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: active.length })
7478
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: active.length })
7285
7479
  ] }),
7286
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "\u5C1A\u672A\u95ED\u73AF\u3001\u503C\u5F97\u7EE7\u7EED\u7559\u610F\u7684\u4E8B\u60C5" })
7480
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: "\u5C1A\u672A\u95ED\u73AF\u3001\u503C\u5F97\u7EE7\u7EED\u7559\u610F\u7684\u4E8B\u60C5" })
7287
7481
  ] }),
7288
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", "aria-expanded": composing, onClick: () => setComposing((current2) => !current2), children: [
7289
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 14 }),
7482
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", "aria-expanded": composing, onClick: () => setComposing((current2) => !current2), children: [
7483
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconPlusOutline16, { size: 14 }),
7290
7484
  "\u4EA4\u4EE3\u4E00\u4EF6\u4E8B"
7291
7485
  ] })
7292
7486
  ] }),
7293
- composing && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("form", { className: "dsh-partner-concern-compose", onSubmit: submit, children: [
7294
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { children: [
7295
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u9700\u8981\u7559\u610F\u7684\u4E8B" }),
7296
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-concern-input-wrap", children: [
7297
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7487
+ composing && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { className: "dsh-partner-concern-compose", onSubmit: submit, children: [
7488
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { children: [
7489
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u9700\u8981\u7559\u610F\u7684\u4E8B" }),
7490
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-concern-input-wrap", children: [
7491
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7298
7492
  "input",
7299
7493
  {
7300
7494
  ref: inputRef,
@@ -7330,10 +7524,10 @@ function ConcernBoard({ companionId, activity, value, busy, onValue, onAdd, onCh
7330
7524
  }
7331
7525
  }
7332
7526
  ),
7333
- suggestionsOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { id: listboxId, className: "dsh-partner-concern-sources", role: "listbox", "aria-label": "\u53EF\u5F15\u7528\u7684\u6587\u4EF6\u4E0E\u77E5\u8BC6\u6587\u6863", children: sourcesLoading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "status", children: "\u6B63\u5728\u67E5\u627E\u53EF\u5F15\u7528\u5185\u5BB9\u2026" }) : sourceError ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { role: "status", children: [
7527
+ suggestionsOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { id: listboxId, className: "dsh-partner-concern-sources", role: "listbox", "aria-label": "\u53EF\u5F15\u7528\u7684\u6587\u4EF6\u4E0E\u77E5\u8BC6\u6587\u6863", children: sourcesLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "status", children: "\u6B63\u5728\u67E5\u627E\u53EF\u5F15\u7528\u5185\u5BB9\u2026" }) : sourceError ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { role: "status", children: [
7334
7528
  "\u5019\u9009\u52A0\u8F7D\u5931\u8D25\uFF1A",
7335
7529
  sourceError
7336
- ] }) : sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "status", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u6587\u4EF6\u6216\u5DF2\u6302\u8F7D\u77E5\u8BC6\u6587\u6863" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: sources.map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
7530
+ ] }) : sources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "status", children: "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u6587\u4EF6\u6216\u5DF2\u6302\u8F7D\u77E5\u8BC6\u6587\u6863" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: sources.map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
7337
7531
  "button",
7338
7532
  {
7339
7533
  type: "button",
@@ -7345,97 +7539,97 @@ function ConcernBoard({ companionId, activity, value, busy, onValue, onAdd, onCh
7345
7539
  onMouseEnter: () => setActiveSource(index),
7346
7540
  onClick: () => chooseSource(source),
7347
7541
  children: [
7348
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: source.kind === "file" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 15 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconLinkOutline16, { size: 15 }) }),
7349
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: source.label }),
7350
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: source.detail })
7542
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: source.kind === "file" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconDataOutline16, { size: 15 }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconLinkOutline16, { size: 15 }) }),
7543
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: source.label }),
7544
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: source.detail })
7351
7545
  ]
7352
7546
  },
7353
7547
  `${source.kind}:${source.token}`
7354
7548
  )) }) })
7355
7549
  ] }),
7356
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { className: "dsh-partner-concern-compose-hint", children: [
7550
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { className: "dsh-partner-concern-compose-hint", children: [
7357
7551
  "\u8F93\u5165 ",
7358
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: "@" }),
7552
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: "@" }),
7359
7553
  " \u4F1A\u5217\u51FA\u5F53\u524D\u4F1A\u8BDD\u6587\u4EF6\u548C\u5DF2\u6302\u8F7D\u7684\u77E5\u8BC6\u6587\u6863\uFF0C\u4E5F\u53EF\u4EE5\u7EE7\u7EED\u8F93\u5165\u5173\u952E\u8BCD\u7B5B\u9009\u3002"
7360
7554
  ] })
7361
7555
  ] }),
7362
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
7363
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => {
7556
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
7557
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => {
7364
7558
  setComposing(false);
7365
7559
  setMention(void 0);
7366
7560
  onValue("");
7367
7561
  }, children: "\u53D6\u6D88" }),
7368
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "submit", className: "is-primary", disabled: busy || !value.trim(), children: "\u8BA9\u4F19\u4F34\u8BB0\u7740" })
7562
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "submit", className: "is-primary", disabled: busy || !value.trim(), children: "\u8BA9\u4F19\u4F34\u8BB0\u7740" })
7369
7563
  ] })
7370
7564
  ] }),
7371
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-concern-list", role: "list", children: active.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "dsh-partner-concern-empty", children: "\u6700\u8FD1\u6CA1\u6709\u672A\u95ED\u73AF\u7684\u4E8B\u3002\u4F60\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5BF9\u4F19\u4F34\u8BF4\u201C\u8FD9\u4E2A\u5E2E\u6211\u7559\u610F\u201D\u3002" }) : shown.map((item) => {
7565
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-concern-list", role: "list", children: active.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "dsh-partner-concern-empty", children: "\u6700\u8FD1\u6CA1\u6709\u672A\u95ED\u73AF\u7684\u4E8B\u3002\u4F60\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5BF9\u4F19\u4F34\u8BF4\u201C\u8FD9\u4E2A\u5E2E\u6211\u7559\u610F\u201D\u3002" }) : shown.map((item) => {
7372
7566
  const observation = latest.get(item.id);
7373
7567
  const expanded = expandedId === item.id;
7374
7568
  const status = observation ? concernObservationStatus(observation) : item.state === "active" ? "\u6B63\u5728\u7559\u610F" : "\u6682\u65F6\u8BB0\u7740";
7375
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { role: "listitem", "data-state": item.state, "data-expanded": expanded, children: [
7376
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: "dsh-partner-concern-row", "aria-expanded": expanded, onClick: () => setExpandedId((current2) => current2 === item.id ? void 0 : item.id), children: [
7377
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "dsh-partner-concern-state", children: [
7378
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}),
7569
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { role: "listitem", "data-state": item.state, "data-expanded": expanded, children: [
7570
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: "dsh-partner-concern-row", "aria-expanded": expanded, onClick: () => setExpandedId((current2) => current2 === item.id ? void 0 : item.id), children: [
7571
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "dsh-partner-concern-state", children: [
7572
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}),
7379
7573
  status
7380
7574
  ] }),
7381
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "dsh-partner-concern-copy", children: [
7382
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.subject }),
7383
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: observation ? observation.event : item.reason })
7575
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "dsh-partner-concern-copy", children: [
7576
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.subject }),
7577
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: observation ? observation.event : item.reason })
7384
7578
  ] }),
7385
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "dsh-partner-concern-time", title: `\u8BA1\u5212\u4E8E ${new Date(item.nextCheckAt).toLocaleString()} \u518D\u6B21\u7559\u610F`, children: [
7386
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u4E0B\u6B21\u7559\u610F" }),
7387
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: futureTime(item.nextCheckAt) })
7579
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "dsh-partner-concern-time", title: `\u8BA1\u5212\u4E8E ${new Date(item.nextCheckAt).toLocaleString()} \u518D\u6B21\u7559\u610F`, children: [
7580
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u4E0B\u6B21\u7559\u610F" }),
7581
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: futureTime(item.nextCheckAt) })
7388
7582
  ] }),
7389
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconChevronDownOutline14, { size: 14 })
7583
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconChevronDownOutline14, { size: 14 })
7390
7584
  ] }),
7391
- expanded && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-concern-detail", children: [
7392
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: item.reason }),
7393
- observation && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
7394
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("blockquote", { children: observation.event }),
7395
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-concern-decision", "data-decision": observation.decision, children: [
7396
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: concernObservationStatus(observation) }),
7397
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: observation.decisionReason || concernObservationExplanation(observation) }),
7398
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7585
+ expanded && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-concern-detail", children: [
7586
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: item.reason }),
7587
+ observation && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
7588
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("blockquote", { children: observation.event }),
7589
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-concern-decision", "data-decision": observation.decision, children: [
7590
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: concernObservationStatus(observation) }),
7591
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: observation.decisionReason || concernObservationExplanation(observation) }),
7592
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7399
7593
  "\u6253\u6270\u5206\u6570 ",
7400
7594
  Math.round(observation.interruptScore * 100),
7401
7595
  observation.notificationRuleEffect !== "auto" && observation.notificationRuleReason ? ` \xB7 \u77E5\u8BC6\u89C4\u5219\uFF1A${observation.notificationRuleReason}` : ""
7402
7596
  ] })
7403
7597
  ] })
7404
7598
  ] }),
7405
- item.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-concern-resources", children: item.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7599
+ item.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-concern-resources", children: item.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7406
7600
  resource.kind === "file" ? "\u6587\u4EF6" : "\u77E5\u8BC6",
7407
7601
  " \xB7 ",
7408
7602
  resource.label
7409
7603
  ] }, `${resource.kind}:${resource.locator}`)) }),
7410
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7604
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7411
7605
  item.origin === "explicit" ? "\u4F60\u660E\u786E\u4EA4\u4EE3" : "\u4F19\u4F34\u4ECE\u5BF9\u8BDD\u4E2D\u6CE8\u610F\u5230",
7412
7606
  " \xB7 ",
7413
7607
  watchKindLabel(item.watchKind)
7414
7608
  ] }),
7415
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-concern-actions", "aria-label": `${item.subject} \u7684\u64CD\u4F5C`, children: [
7416
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => onCheck(item), children: "\u7ACB\u5373\u68C0\u67E5\u8FD9\u6761" }),
7417
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "watch"), children: "\u7EE7\u7EED\u7559\u610F" }),
7418
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "prioritize"), children: "\u63D0\u9AD8\u5173\u6CE8" }),
7419
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "resolve"), children: "\u5DF2\u7ECF\u89E3\u51B3" }),
7420
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: () => onAct(item, "ignore"), children: "\u522B\u7BA1\u8FD9\u4E2A" })
7609
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-concern-actions", "aria-label": `${item.subject} \u7684\u64CD\u4F5C`, children: [
7610
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => onCheck(item), children: "\u7ACB\u5373\u68C0\u67E5\u8FD9\u6761" }),
7611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "watch"), children: "\u7EE7\u7EED\u7559\u610F" }),
7612
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "prioritize"), children: "\u63D0\u9AD8\u5173\u6CE8" }),
7613
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "resolve"), children: "\u5DF2\u7ECF\u89E3\u51B3" }),
7614
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: () => onAct(item, "ignore"), children: "\u522B\u7BA1\u8FD9\u4E2A" })
7421
7615
  ] })
7422
7616
  ] })
7423
7617
  ] }, item.id);
7424
7618
  }) }),
7425
- (active.length > shown.length || visibleCount > 5) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-concern-more", children: active.length > shown.length ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", onClick: () => setVisibleCount((count) => Math.min(active.length, count + 20)), children: [
7619
+ (active.length > shown.length || visibleCount > 5) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-concern-more", children: active.length > shown.length ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", onClick: () => setVisibleCount((count) => Math.min(active.length, count + 20)), children: [
7426
7620
  "\u518D\u663E\u793A ",
7427
7621
  Math.min(20, active.length - shown.length),
7428
7622
  " \u6761"
7429
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setVisibleCount(5), children: "\u6536\u8D77\u5217\u8868" }) }),
7430
- resolved.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "dsh-partner-concern-resolved", children: [
7431
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("summary", { children: [
7623
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setVisibleCount(5), children: "\u6536\u8D77\u5217\u8868" }) }),
7624
+ resolved.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("details", { className: "dsh-partner-concern-resolved", children: [
7625
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("summary", { children: [
7432
7626
  "\u5DF2\u7ECF\u89E3\u51B3 ",
7433
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: resolved.length })
7627
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: resolved.length })
7434
7628
  ] }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: resolved.slice(0, 30).map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { children: [
7436
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconCheckOutline14, { size: 13 }) }),
7437
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.subject }),
7438
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "watch"), children: "\u91CD\u65B0\u7559\u610F" })
7629
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: resolved.slice(0, 30).map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { children: [
7630
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconCheckOutline14, { size: 13 }) }),
7631
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.subject }),
7632
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", disabled: busy, onClick: () => onAct(item, "watch"), children: "\u91CD\u65B0\u7559\u610F" })
7439
7633
  ] }, item.id)) })
7440
7634
  ] })
7441
7635
  ] });
@@ -7500,67 +7694,67 @@ function MemoryLibrary({ companionId, revision, profiles, memories, reflections,
7500
7694
  ), [reflections, normalized]);
7501
7695
  const selectedMemory = filteredMemories.find((item) => item.id === selectedMemoryId) ?? filteredMemories[0];
7502
7696
  const selectedReflection = filteredReflections.find((item) => item.date === selectedDate) ?? filteredReflections[0];
7503
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "dsh-partner-memory-library", children: [
7504
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "dsh-partner-library-header", children: [
7505
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7506
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "MEMORY LIBRARY" }),
7507
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "\u4F19\u4F34\u8BB0\u5FC6\u5E93" }),
7508
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "\u67E5\u770B\u4F19\u4F34\u5982\u4F55\u4ECE\u957F\u671F\u5BF9\u8BDD\u4E2D\u8BA4\u8BC6\u4F60\uFF0C\u4EE5\u53CA\u8FD9\u4E9B\u7406\u89E3\u600E\u6837\u968F\u8BC1\u636E\u53D8\u5316\u3002" })
7697
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "dsh-partner-memory-library", children: [
7698
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "dsh-partner-library-header", children: [
7699
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7700
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "MEMORY LIBRARY" }),
7701
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "\u4F19\u4F34\u8BB0\u5FC6\u5E93" }),
7702
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: "\u67E5\u770B\u4F19\u4F34\u5982\u4F55\u4ECE\u957F\u671F\u5BF9\u8BDD\u4E2D\u8BA4\u8BC6\u4F60\uFF0C\u4EE5\u53CA\u8FD9\u4E9B\u7406\u89E3\u600E\u6837\u968F\u8BC1\u636E\u53D8\u5316\u3002" })
7509
7703
  ] }),
7510
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { "aria-label": "\u8BB0\u5FC6\u5185\u5BB9", children: [
7511
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: mode === "profile" ? "is-active" : "", onClick: () => setMode("profile"), children: [
7704
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("nav", { "aria-label": "\u8BB0\u5FC6\u5185\u5BB9", children: [
7705
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: mode === "profile" ? "is-active" : "", onClick: () => setMode("profile"), children: [
7512
7706
  "\u4EBA\u7269\u753B\u50CF ",
7513
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: profiles.length })
7707
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: profiles.length })
7514
7708
  ] }),
7515
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: mode === "memory" ? "is-active" : "", onClick: () => setMode("memory"), children: [
7709
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: mode === "memory" ? "is-active" : "", onClick: () => setMode("memory"), children: [
7516
7710
  "\u8BDD\u9898\u8BB0\u5FC6 ",
7517
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: activeMemories.length })
7711
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: activeMemories.length })
7518
7712
  ] }),
7519
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: mode === "reflection" ? "is-active" : "", onClick: () => setMode("reflection"), children: [
7713
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: mode === "reflection" ? "is-active" : "", onClick: () => setMode("reflection"), children: [
7520
7714
  "\u6BCF\u65E5\u56DE\u987E ",
7521
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: reflections.length })
7715
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: reflections.length })
7522
7716
  ] }),
7523
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: mode === "graph" ? "is-active" : "", onClick: () => setMode("graph"), children: [
7717
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: mode === "graph" ? "is-active" : "", onClick: () => setMode("graph"), children: [
7524
7718
  "\u5173\u7CFB\u56FE\u8C31 ",
7525
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: graph?.relations.length ?? "\u2014" })
7719
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: graph?.relations.length ?? "\u2014" })
7526
7720
  ] })
7527
7721
  ] })
7528
7722
  ] }),
7529
- mode !== "profile" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-library-tools", children: [
7530
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { children: [
7531
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u8BB0\u5FC6" }),
7532
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { value: query, onChange: (event) => setQuery(event.target.value), placeholder: mode === "memory" ? "\u641C\u7D22\u4E3B\u9898\u6216\u8BB0\u5FC6\u5185\u5BB9" : "\u641C\u7D22\u65E5\u671F\u3001\u603B\u7ED3\u6216\u5F85\u529E" })
7723
+ mode !== "profile" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-library-tools", children: [
7724
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { children: [
7725
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: "\u641C\u7D22\u8BB0\u5FC6" }),
7726
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { value: query, onChange: (event) => setQuery(event.target.value), placeholder: mode === "memory" ? "\u641C\u7D22\u4E3B\u9898\u6216\u8BB0\u5FC6\u5185\u5BB9" : "\u641C\u7D22\u65E5\u671F\u3001\u603B\u7ED3\u6216\u5F85\u529E" })
7533
7727
  ] }),
7534
- mode === "memory" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-memory-kinds", children: MEMORY_KINDS.map((value) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: kind === value ? "is-active" : "", onClick: () => setKind(value), children: value === "all" ? "\u5168\u90E8" : memoryKind(value) }, value)) })
7728
+ mode === "memory" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-memory-kinds", children: MEMORY_KINDS.map((value) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: kind === value ? "is-active" : "", onClick: () => setKind(value), children: value === "all" ? "\u5168\u90E8" : memoryKind(value) }, value)) })
7535
7729
  ] }),
7536
- mode === "profile" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProfileLibrary, { profiles, memories: profileMemories, editing, busy, setEditing, save, remove }) : mode === "memory" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-library-browser", children: [
7537
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-library-list", role: "list", children: filteredMemories.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: activeMemories.length === 0 ? "\u8FD8\u6CA1\u6709\u957F\u671F\u8BB0\u5FC6" : "\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6", detail: activeMemories.length === 0 ? "\u4F19\u4F34\u5B8C\u6210\u5BF9\u8BDD\u540E\u4F1A\u81EA\u52A8\u63D0\u70BC\u503C\u5F97\u957F\u671F\u4FDD\u7559\u7684\u4FE1\u606F\u3002" : "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u7C7B\u578B\u8BD5\u8BD5\u3002", compact: true }) : filteredMemories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "listitem", className: selectedMemory?.id === item.id ? "is-active" : "", onClick: () => {
7730
+ mode === "profile" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ProfileLibrary, { profiles, memories: profileMemories, editing, busy, setEditing, save, remove }) : mode === "memory" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-library-browser", children: [
7731
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-library-list", role: "list", children: filteredMemories.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: activeMemories.length === 0 ? "\u8FD8\u6CA1\u6709\u957F\u671F\u8BB0\u5FC6" : "\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6", detail: activeMemories.length === 0 ? "\u4F19\u4F34\u5B8C\u6210\u5BF9\u8BDD\u540E\u4F1A\u81EA\u52A8\u63D0\u70BC\u503C\u5F97\u957F\u671F\u4FDD\u7559\u7684\u4FE1\u606F\u3002" : "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u7C7B\u578B\u8BD5\u8BD5\u3002", compact: true }) : filteredMemories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", role: "listitem", className: selectedMemory?.id === item.id ? "is-active" : "", onClick: () => {
7538
7732
  setSelectedMemoryId(item.id);
7539
7733
  setEditing(void 0);
7540
7734
  }, children: [
7541
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "data-kind": item.kind, children: memoryKind(item.kind) }),
7542
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.subject }),
7543
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: item.content }),
7544
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: relativeTime(item.updatedAt) })
7735
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { "data-kind": item.kind, children: memoryKind(item.kind) }),
7736
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.subject }),
7737
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: item.content }),
7738
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: relativeTime(item.updatedAt) })
7545
7739
  ] }, item.id)) }),
7546
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-library-detail", children: selectedMemory ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryCard, { item: selectedMemory, editing: editing?.id === selectedMemory.id ? editing : void 0, busy, setEditing, save, remove: () => remove(selectedMemory) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u6761\u8BB0\u5FC6", detail: "\u8BB0\u5FC6\u8BE6\u60C5\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7547
- ] }) : mode === "reflection" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-library-browser", children: [
7548
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-library-list is-diary", role: "list", children: filteredReflections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: reflections.length === 0 ? "\u8FD8\u6CA1\u6709\u6BCF\u65E5\u56DE\u987E" : "\u6CA1\u6709\u5339\u914D\u7684\u56DE\u987E", detail: reflections.length === 0 ? "\u6BCF\u65E5\u56DE\u987E\u4F1A\u5728\u6BCF\u8F6E\u5B8C\u6574\u5BF9\u8BDD\u540E\u6301\u7EED\u66F4\u65B0\u3002" : "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u65E5\u671F\u8BD5\u8BD5\u3002", compact: true }) : filteredReflections.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "listitem", className: selectedReflection?.date === entry.date ? "is-active" : "", onClick: () => setSelectedDate(entry.date), children: [
7549
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("time", { children: entry.date }),
7550
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7740
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-library-detail", children: selectedMemory ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryCard, { item: selectedMemory, editing: editing?.id === selectedMemory.id ? editing : void 0, busy, setEditing, save, remove: () => remove(selectedMemory) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u6761\u8BB0\u5FC6", detail: "\u8BB0\u5FC6\u8BE6\u60C5\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7741
+ ] }) : mode === "reflection" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-library-browser", children: [
7742
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-library-list is-diary", role: "list", children: filteredReflections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: reflections.length === 0 ? "\u8FD8\u6CA1\u6709\u6BCF\u65E5\u56DE\u987E" : "\u6CA1\u6709\u5339\u914D\u7684\u56DE\u987E", detail: reflections.length === 0 ? "\u6BCF\u65E5\u56DE\u987E\u4F1A\u5728\u6BCF\u8F6E\u5B8C\u6574\u5BF9\u8BDD\u540E\u6301\u7EED\u66F4\u65B0\u3002" : "\u6362\u4E2A\u5173\u952E\u8BCD\u6216\u65E5\u671F\u8BD5\u8BD5\u3002", compact: true }) : filteredReflections.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", role: "listitem", className: selectedReflection?.date === entry.date ? "is-active" : "", onClick: () => setSelectedDate(entry.date), children: [
7743
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("time", { children: entry.date }),
7744
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7551
7745
  entry.turnCount,
7552
7746
  " \u8F6E\u4EA4\u6D41"
7553
7747
  ] }),
7554
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: entry.summary }),
7555
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7748
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: entry.summary }),
7749
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7556
7750
  entry.openTasks.length,
7557
7751
  " \u9879\u5F85\u8DDF\u8FDB \xB7 ",
7558
7752
  entry.learnings.length,
7559
7753
  " \u9879\u7406\u89E3"
7560
7754
  ] })
7561
7755
  ] }, entry.date)) }),
7562
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-library-detail", children: selectedReflection ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DailyReflectionDetail, { entry: selectedReflection }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u5929", detail: "\u5F53\u5929\u7684\u603B\u7ED3\u4E0E\u5F85\u529E\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7563
- ] }) : graphError ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u5173\u7CFB\u56FE\u8C31\u52A0\u8F7D\u5931\u8D25", detail: graphError, action: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setGraphRequest((value) => value + 1), children: "\u91CD\u65B0\u52A0\u8F7D" }) }) : graphLoading || graph === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u6B63\u5728\u52A0\u8F7D\u5173\u7CFB\u56FE\u8C31", detail: "\u53EA\u5728\u9700\u8981\u67E5\u770B\u5173\u7CFB\u65F6\u8BFB\u53D6\u5BA1\u8BA1\u6570\u636E\u3002" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryGraph, { graph, profiles, query: normalized, inspect: (item) => {
7756
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-library-detail", children: selectedReflection ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DailyReflectionDetail, { entry: selectedReflection }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u5929", detail: "\u5F53\u5929\u7684\u603B\u7ED3\u4E0E\u5F85\u529E\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7757
+ ] }) : graphError ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u5173\u7CFB\u56FE\u8C31\u52A0\u8F7D\u5931\u8D25", detail: graphError, action: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setGraphRequest((value) => value + 1), children: "\u91CD\u65B0\u52A0\u8F7D" }) }) : graphLoading || graph === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u6B63\u5728\u52A0\u8F7D\u5173\u7CFB\u56FE\u8C31", detail: "\u53EA\u5728\u9700\u8981\u67E5\u770B\u5173\u7CFB\u65F6\u8BFB\u53D6\u5BA1\u8BA1\u6570\u636E\u3002" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryGraph, { graph, profiles, query: normalized, inspect: (item) => {
7564
7758
  setEditing(void 0);
7565
7759
  if (item.kind === "profile") setMode("profile");
7566
7760
  else {
@@ -7573,69 +7767,69 @@ function MemoryLibrary({ companionId, revision, profiles, memories, reflections,
7573
7767
  function ProfileLibrary({ profiles, memories, editing, busy, setEditing, save, remove }) {
7574
7768
  const [selectedScopeId, setSelectedScopeId] = (0, import_react24.useState)();
7575
7769
  const selected = profiles.find((item) => item.scopeId === selectedScopeId) ?? profiles[0];
7576
- if (!selected) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u8054\u7CFB\u4EBA\u753B\u50CF", detail: "\u8054\u7CFB\u4EBA\u5F00\u59CB\u548C\u4F19\u4F34\u4EA4\u6D41\u540E\uFF0C\u8FD9\u91CC\u4F1A\u9010\u6B65\u5C55\u793A\u4F19\u4F34\u4ECE\u660E\u786E\u5BF9\u8BDD\u4E2D\u5F62\u6210\u7684\u957F\u671F\u7406\u89E3\u3002" });
7770
+ if (!selected) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u8054\u7CFB\u4EBA\u753B\u50CF", detail: "\u8054\u7CFB\u4EBA\u5F00\u59CB\u548C\u4F19\u4F34\u4EA4\u6D41\u540E\uFF0C\u8FD9\u91CC\u4F1A\u9010\u6B65\u5C55\u793A\u4F19\u4F34\u4ECE\u660E\u786E\u5BF9\u8BDD\u4E2D\u5F62\u6210\u7684\u957F\u671F\u7406\u89E3\u3002" });
7577
7771
  const activeIds = new Set(selected.entries.map((item) => item.id));
7578
7772
  const pending = memories.filter((item) => item.scopeId === selected.scopeId && !activeIds.has(item.id));
7579
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-profile-browser", children: [
7580
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-profile-people", role: "list", "aria-label": "\u8054\u7CFB\u4EBA\u753B\u50CF", children: profiles.map((profile) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "listitem", className: profile.scopeId === selected.scopeId ? "is-active" : "", onClick: () => {
7773
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-profile-browser", children: [
7774
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-profile-people", role: "list", "aria-label": "\u8054\u7CFB\u4EBA\u753B\u50CF", children: profiles.map((profile) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", role: "listitem", className: profile.scopeId === selected.scopeId ? "is-active" : "", onClick: () => {
7581
7775
  setSelectedScopeId(profile.scopeId);
7582
7776
  setEditing(void 0);
7583
7777
  }, children: [
7584
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
7585
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
7586
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: profile.label }),
7587
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: profile.entries.length > 0 ? `${profile.entries.length} \u9879\u7A33\u5B9A\u7406\u89E3` : "\u8FD8\u5728\u8BA4\u8BC6\u4E2D" })
7778
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_dsh_client_ui_primitives16.IconUserOutline16, { size: 16 }) }),
7779
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
7780
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: profile.label }),
7781
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: profile.entries.length > 0 ? `${profile.entries.length} \u9879\u7A33\u5B9A\u7406\u89E3` : "\u8FD8\u5728\u8BA4\u8BC6\u4E2D" })
7588
7782
  ] }),
7589
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { "aria-hidden": "true" })
7783
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { "aria-hidden": "true" })
7590
7784
  ] }, profile.scopeId)) }),
7591
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-profile-stage", children: [
7592
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "dsh-partner-profile-heading", children: [
7593
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7594
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "PARTNER UNDERSTANDING" }),
7595
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7785
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-profile-stage", children: [
7786
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "dsh-partner-profile-heading", children: [
7787
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7788
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "PARTNER UNDERSTANDING" }),
7789
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7596
7790
  "\u4F19\u4F34\u773C\u4E2D\u7684 ",
7597
7791
  selected.label
7598
7792
  ] }),
7599
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "\u8FD9\u4E9B\u5185\u5BB9\u6765\u81EA\u4F60\u5728\u5BF9\u8BDD\u4E2D\u7684\u660E\u786E\u8868\u8FBE\u3002\u4F19\u4F34\u4F1A\u7528\u5B83\u4FDD\u6301\u7406\u89E3\u8FDE\u7EED\uFF0C\u4F46\u4E0D\u4F1A\u628A\u753B\u50CF\u5F53\u6210\u6807\u7B7E\u53CD\u590D\u590D\u8FF0\u3002" })
7793
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: "\u8FD9\u4E9B\u5185\u5BB9\u6765\u81EA\u4F60\u5728\u5BF9\u8BDD\u4E2D\u7684\u660E\u786E\u8868\u8FBE\u3002\u4F19\u4F34\u4F1A\u7528\u5B83\u4FDD\u6301\u7406\u89E3\u8FDE\u7EED\uFF0C\u4F46\u4E0D\u4F1A\u628A\u753B\u50CF\u5F53\u6210\u6807\u7B7E\u53CD\u590D\u590D\u8FF0\u3002" })
7600
7794
  ] }),
7601
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "data-ready": selected.entries.length > 0, children: [
7602
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}),
7795
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { "data-ready": selected.entries.length > 0, children: [
7796
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}),
7603
7797
  selected.entries.length > 0 ? "\u4E0A\u4E0B\u6587\u57FA\u7EBF\u5DF2\u5C31\u7EEA" : "\u7B49\u5F85\u53EF\u9760\u8BC1\u636E"
7604
7798
  ] })
7605
7799
  ] }),
7606
- selected.entries.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
7607
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-profile-meta", children: [
7608
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7609
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u753B\u50CF\u7248\u672C" }),
7610
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: selected.version })
7800
+ selected.entries.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
7801
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-profile-meta", children: [
7802
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7803
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u753B\u50CF\u7248\u672C" }),
7804
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: selected.version })
7611
7805
  ] }),
7612
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7613
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5BF9\u8BDD\u4F9D\u636E" }),
7614
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7806
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7807
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5BF9\u8BDD\u4F9D\u636E" }),
7808
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7615
7809
  selected.evidenceCount,
7616
7810
  " \u5904"
7617
7811
  ] })
7618
7812
  ] }),
7619
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7620
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u7528\u6237\u786E\u8BA4" }),
7621
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7813
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7814
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u7528\u6237\u786E\u8BA4" }),
7815
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7622
7816
  selected.lockedCount,
7623
7817
  " \u9879"
7624
7818
  ] })
7625
7819
  ] }),
7626
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7627
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u6700\u8FD1\u4F9D\u636E" }),
7628
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: selected.updatedAt ? relativeTime(selected.updatedAt) : "\u5C1A\u672A" })
7820
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7821
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u6700\u8FD1\u4F9D\u636E" }),
7822
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: selected.updatedAt ? relativeTime(selected.updatedAt) : "\u5C1A\u672A" })
7629
7823
  ] })
7630
7824
  ] }),
7631
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-profile-entries", children: selected.entries.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryCard, { item, editing: editing?.id === item.id ? editing : void 0, busy, setEditing, save, remove: () => remove(item) }, item.id)) })
7632
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u4F19\u4F34\u8FD8\u5728\u8BA4\u8BC6\u4F60", detail: "\u53EA\u6709\u660E\u786E\u3001\u7A33\u5B9A\u5E76\u8FBE\u5230\u53EF\u9760\u6807\u51C6\u7684\u957F\u671F\u4FE1\u606F\u624D\u4F1A\u8FDB\u5165\u753B\u50CF\uFF1B\u666E\u901A\u504F\u597D\u3001\u4E34\u65F6\u4EFB\u52A1\u548C\u4E00\u6B21\u6027\u60C5\u7EEA\u4E0D\u4F1A\u653E\u5728\u8FD9\u91CC\u3002", compact: true }),
7633
- pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "dsh-partner-profile-pending", children: [
7634
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("summary", { children: [
7825
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-profile-entries", children: selected.entries.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryCard, { item, editing: editing?.id === item.id ? editing : void 0, busy, setEditing, save, remove: () => remove(item) }, item.id)) })
7826
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u4F19\u4F34\u8FD8\u5728\u8BA4\u8BC6\u4F60", detail: "\u53EA\u6709\u660E\u786E\u3001\u7A33\u5B9A\u5E76\u8FBE\u5230\u53EF\u9760\u6807\u51C6\u7684\u957F\u671F\u4FE1\u606F\u624D\u4F1A\u8FDB\u5165\u753B\u50CF\uFF1B\u666E\u901A\u504F\u597D\u3001\u4E34\u65F6\u4EFB\u52A1\u548C\u4E00\u6B21\u6027\u60C5\u7EEA\u4E0D\u4F1A\u653E\u5728\u8FD9\u91CC\u3002", compact: true }),
7827
+ pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("details", { className: "dsh-partner-profile-pending", children: [
7828
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("summary", { children: [
7635
7829
  "\u5F85\u786E\u8BA4\u7684\u7406\u89E3 ",
7636
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: pending.length })
7830
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: pending.length })
7637
7831
  ] }),
7638
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: pending.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MemoryCard, { item, editing: editing?.id === item.id ? editing : void 0, busy, setEditing, save, remove: () => remove(item) }, item.id)) })
7832
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: pending.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MemoryCard, { item, editing: editing?.id === item.id ? editing : void 0, busy, setEditing, save, remove: () => remove(item) }, item.id)) })
7639
7833
  ] })
7640
7834
  ] })
7641
7835
  ] });
@@ -7660,109 +7854,109 @@ function MemoryGraph({ graph, profiles, query, inspect }) {
7660
7854
  const target = selected ? byId.get(selected.targetMemoryId) : void 0;
7661
7855
  const label = profiles.find((item) => item.scopeId === scopeId)?.label ?? (scopeId ? `\u8054\u7CFB\u4EBA ${scopeId.slice(-6)}` : "\u5F53\u524D\u8054\u7CFB\u4EBA");
7662
7856
  const conflictCount = scoped.filter((item) => item.kind === "conflicts_with").length;
7663
- if (graph.relations.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u53EF\u9760\u5173\u7CFB", detail: "\u6BCF\u65E5\u7EC8\u5BA1\u53EA\u4F1A\u4FDD\u5B58\u6709\u660E\u786E\u8BC1\u636E\u7684\u8BB0\u5FC6\u8054\u7CFB\uFF0C\u4E0D\u4F1A\u4E3A\u4E86\u586B\u6EE1\u56FE\u8C31\u800C\u731C\u6D4B\u3002" });
7664
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-graph-audit", children: [
7665
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { className: "dsh-partner-graph-toolbar", children: [
7666
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
7667
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: "\u5173\u7CFB\u5BA1\u8BA1" }),
7668
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7857
+ if (graph.relations.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u8FD8\u6CA1\u6709\u53EF\u9760\u5173\u7CFB", detail: "\u6BCF\u65E5\u7EC8\u5BA1\u53EA\u4F1A\u4FDD\u5B58\u6709\u660E\u786E\u8BC1\u636E\u7684\u8BB0\u5FC6\u8054\u7CFB\uFF0C\u4E0D\u4F1A\u4E3A\u4E86\u586B\u6EE1\u56FE\u8C31\u800C\u731C\u6D4B\u3002" });
7858
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-graph-audit", children: [
7859
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { className: "dsh-partner-graph-toolbar", children: [
7860
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
7861
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: "\u5173\u7CFB\u5BA1\u8BA1" }),
7862
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7669
7863
  label,
7670
7864
  " \u7684\u7406\u89E3\u5173\u7CFB"
7671
7865
  ] }),
7672
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { children: [
7866
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { children: [
7673
7867
  scoped.length,
7674
7868
  " \u6761\u53EF\u9760\u8054\u7CFB",
7675
7869
  conflictCount > 0 ? `\uFF0C\u5176\u4E2D ${conflictCount} \u6761\u9700\u8981\u786E\u8BA4` : "\uFF0C\u6682\u65E0\u5F85\u786E\u8BA4\u51B2\u7A81"
7676
7870
  ] })
7677
7871
  ] }),
7678
- scopeIds.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { children: [
7679
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "\u8054\u7CFB\u4EBA" }),
7680
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("select", { value: scopeId, onChange: (event) => {
7872
+ scopeIds.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { children: [
7873
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u8054\u7CFB\u4EBA" }),
7874
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("select", { value: scopeId, onChange: (event) => {
7681
7875
  setRequestedScopeId(event.target.value);
7682
7876
  setSelectedRelationId(void 0);
7683
- }, children: scopeIds.map((value) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { value, children: profiles.find((item) => item.scopeId === value)?.label ?? `\u8054\u7CFB\u4EBA ${value.slice(-6)}` }, value)) })
7877
+ }, children: scopeIds.map((value) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value, children: profiles.find((item) => item.scopeId === value)?.label ?? `\u8054\u7CFB\u4EBA ${value.slice(-6)}` }, value)) })
7684
7878
  ] })
7685
7879
  ] }),
7686
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { className: "dsh-partner-graph-filters", "aria-label": "\u5173\u7CFB\u7C7B\u578B", children: RELATION_FILTERS.map((value) => {
7880
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { className: "dsh-partner-graph-filters", "aria-label": "\u5173\u7CFB\u7C7B\u578B", children: RELATION_FILTERS.map((value) => {
7687
7881
  const count = value === "all" ? scoped.length : scoped.filter((item) => item.kind === value).length;
7688
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", className: filter === value ? "is-active" : "", "aria-pressed": filter === value, onClick: () => {
7882
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: filter === value ? "is-active" : "", "aria-pressed": filter === value, onClick: () => {
7689
7883
  setFilter(value);
7690
7884
  setSelectedRelationId(void 0);
7691
7885
  }, children: [
7692
7886
  value === "all" ? "\u5168\u90E8" : relationLabel(value),
7693
7887
  " ",
7694
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: count })
7888
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: count })
7695
7889
  ] }, value);
7696
7890
  }) }),
7697
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-graph-browser", children: [
7698
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-graph-index", role: "list", children: visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u6CA1\u6709\u5339\u914D\u7684\u5173\u7CFB", detail: "\u8C03\u6574\u5173\u7CFB\u7C7B\u578B\u6216\u641C\u7D22\u5173\u952E\u8BCD\u540E\u518D\u8BD5\u3002", compact: true }) : visible.map((item) => {
7891
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-graph-browser", children: [
7892
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-graph-index", role: "list", children: visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u6CA1\u6709\u5339\u914D\u7684\u5173\u7CFB", detail: "\u8C03\u6574\u5173\u7CFB\u7C7B\u578B\u6216\u641C\u7D22\u5173\u952E\u8BCD\u540E\u518D\u8BD5\u3002", compact: true }) : visible.map((item) => {
7699
7893
  const from = byId.get(item.sourceMemoryId);
7700
7894
  const to = byId.get(item.targetMemoryId);
7701
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { type: "button", role: "listitem", "data-kind": item.kind, className: selected?.id === item.id ? "is-active" : "", onClick: () => setSelectedRelationId(item.id), children: [
7702
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: relationLabel(item.kind) }),
7703
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7895
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", role: "listitem", "data-kind": item.kind, className: selected?.id === item.id ? "is-active" : "", onClick: () => setSelectedRelationId(item.id), children: [
7896
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: relationLabel(item.kind) }),
7897
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7704
7898
  from?.subject ?? "\u5DF2\u5220\u9664\u8BB0\u5FC6",
7705
7899
  " ",
7706
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { "aria-hidden": "true", children: "\u2192" }),
7900
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { "aria-hidden": "true", children: "\u2192" }),
7707
7901
  " ",
7708
7902
  to?.subject ?? "\u5DF2\u5220\u9664\u8BB0\u5FC6"
7709
7903
  ] }),
7710
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: item.label }),
7711
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7904
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: item.label }),
7905
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7712
7906
  Math.round(item.confidence * 100),
7713
7907
  "% \u53EF\u4FE1"
7714
7908
  ] })
7715
7909
  ] }, item.id);
7716
7910
  }) }),
7717
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "dsh-partner-graph-stage", children: selected && source && target ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { "data-kind": selected.kind, children: [
7718
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7719
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: relationLabel(selected.kind) }),
7720
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7911
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "dsh-partner-graph-stage", children: selected && source && target ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { "data-kind": selected.kind, children: [
7912
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7913
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: relationLabel(selected.kind) }),
7914
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7721
7915
  source.subject,
7722
7916
  " ",
7723
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", { "aria-hidden": "true", children: "\u2192" }),
7917
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { "aria-hidden": "true", children: "\u2192" }),
7724
7918
  " ",
7725
7919
  target.subject
7726
7920
  ] }),
7727
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: selected.label }),
7728
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("small", { children: relationGuidance(selected.kind) })
7921
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: selected.label }),
7922
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("small", { children: relationGuidance(selected.kind) })
7729
7923
  ] }),
7730
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-graph-pair", children: [
7731
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GraphMemory, { item: source, side: "\u8D77\u70B9", inspect }),
7732
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "aria-hidden": "true", children: [
7733
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {}),
7734
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: relationLabel(selected.kind) }),
7735
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {})
7924
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-graph-pair", children: [
7925
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GraphMemory, { item: source, side: "\u8D77\u70B9", inspect }),
7926
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { "aria-hidden": "true", children: [
7927
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {}),
7928
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: relationLabel(selected.kind) }),
7929
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", {})
7736
7930
  ] }),
7737
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GraphMemory, { item: target, side: "\u5173\u8054\u9879", inspect })
7931
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GraphMemory, { item: target, side: "\u5173\u8054\u9879", inspect })
7738
7932
  ] }),
7739
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("footer", { children: [
7740
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7933
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("footer", { children: [
7934
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7741
7935
  "\u6700\u8FD1\u7EC8\u5BA1\u4E8E ",
7742
7936
  new Date(selected.updatedAt).toLocaleString()
7743
7937
  ] }),
7744
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7938
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7745
7939
  "\u5173\u7CFB\u7F6E\u4FE1\u5EA6 ",
7746
7940
  Math.round(selected.confidence * 100),
7747
7941
  "%"
7748
7942
  ] })
7749
7943
  ] })
7750
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u6761\u5173\u7CFB", detail: "\u5173\u7CFB\u4E24\u7AEF\u7684\u8BB0\u5FC6\u4E0E\u4F7F\u7528\u65B9\u5F0F\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7944
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ContentState, { title: "\u9009\u62E9\u4E00\u6761\u5173\u7CFB", detail: "\u5173\u7CFB\u4E24\u7AEF\u7684\u8BB0\u5FC6\u4E0E\u4F7F\u7528\u65B9\u5F0F\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
7751
7945
  ] })
7752
7946
  ] });
7753
7947
  }
7754
7948
  function GraphMemory({ item, side, inspect }) {
7755
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { children: [
7756
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7757
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7949
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { children: [
7950
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7951
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7758
7952
  side,
7759
7953
  " \xB7 ",
7760
7954
  memoryKind(item.kind)
7761
7955
  ] }),
7762
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.subject })
7956
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.subject })
7763
7957
  ] }),
7764
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: item.content }),
7765
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => inspect(item), children: "\u67E5\u770B\u5E76\u4FEE\u6B63" })
7958
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: item.content }),
7959
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => inspect(item), children: "\u67E5\u770B\u5E76\u4FEE\u6B63" })
7766
7960
  ] });
7767
7961
  }
7768
7962
  function relationLabel(kind) {
@@ -7778,70 +7972,70 @@ function relationGuidance(kind) {
7778
7972
  }[kind];
7779
7973
  }
7780
7974
  function DailyReflectionDetail({ entry }) {
7781
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("article", { className: "dsh-partner-diary-detail", children: [
7782
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7783
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("time", { children: entry.date }),
7784
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("strong", { children: [
7975
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { className: "dsh-partner-diary-detail", children: [
7976
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
7977
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("time", { children: entry.date }),
7978
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("strong", { children: [
7785
7979
  entry.turnCount,
7786
7980
  " \u8F6E\u4EA4\u6D41\u540E\u7684\u7406\u89E3"
7787
7981
  ] }),
7788
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
7982
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7789
7983
  "\u66F4\u65B0\u4E8E ",
7790
7984
  new Date(entry.updatedAt).toLocaleString()
7791
7985
  ] })
7792
7986
  ] }),
7793
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: entry.summary }),
7794
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReflectionGroup, { title: "\u5F85\u8DDF\u8FDB", items: entry.openTasks }),
7795
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReflectionGroup, { title: "\u5F53\u5929\u4E8B\u4EF6", items: entry.events }),
7796
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReflectionGroup, { title: "\u65B0\u7406\u89E3", items: entry.learnings }),
7797
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReflectionGroup, { title: "\u5DF2\u5B8C\u6210", items: entry.completedTasks })
7987
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: entry.summary }),
7988
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReflectionGroup, { title: "\u5F85\u8DDF\u8FDB", items: entry.openTasks }),
7989
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReflectionGroup, { title: "\u5F53\u5929\u4E8B\u4EF6", items: entry.events }),
7990
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReflectionGroup, { title: "\u65B0\u7406\u89E3", items: entry.learnings }),
7991
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ReflectionGroup, { title: "\u5DF2\u5B8C\u6210", items: entry.completedTasks })
7798
7992
  ] });
7799
7993
  }
7800
7994
  function ReflectionGroup({ title, items }) {
7801
7995
  if (items.length === 0) return null;
7802
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { children: [
7803
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: title }),
7804
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: item }, item)) })
7996
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { children: [
7997
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: title }),
7998
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { children: item }, item)) })
7805
7999
  ] });
7806
8000
  }
7807
8001
  function MemoryCard({ item, editing, busy, setEditing, save, remove }) {
7808
8002
  const [confirmingRemove, setConfirmingRemove] = (0, import_react24.useState)(false);
7809
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("article", { "data-kind": item.kind, children: editing ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "dsh-partner-memory-editor", children: [
7810
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { "aria-label": "\u8BB0\u5FC6\u4E3B\u9898", value: editing.subject, onChange: (event) => setEditing({ ...editing, subject: event.target.value }) }),
7811
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("textarea", { "aria-label": "\u8BB0\u5FC6\u5185\u5BB9", value: editing.content, onChange: (event) => setEditing({ ...editing, content: event.target.value }) }),
7812
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("footer", { children: [
7813
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setEditing(void 0), children: "\u53D6\u6D88" }),
7814
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "is-primary", disabled: busy || !editing.subject.trim() || !editing.content.trim(), onClick: save, children: "\u4FDD\u5B58\u4FEE\u6B63" })
8003
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("article", { "data-kind": item.kind, children: editing ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "dsh-partner-memory-editor", children: [
8004
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { "aria-label": "\u8BB0\u5FC6\u4E3B\u9898", value: editing.subject, onChange: (event) => setEditing({ ...editing, subject: event.target.value }) }),
8005
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("textarea", { "aria-label": "\u8BB0\u5FC6\u5185\u5BB9", value: editing.content, onChange: (event) => setEditing({ ...editing, content: event.target.value }) }),
8006
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("footer", { children: [
8007
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setEditing(void 0), children: "\u53D6\u6D88" }),
8008
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "is-primary", disabled: busy || !editing.subject.trim() || !editing.content.trim(), onClick: save, children: "\u4FDD\u5B58\u4FEE\u6B63" })
7815
8009
  ] })
7816
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
7817
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("header", { children: [
7818
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: memoryKind(item.kind) }),
7819
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: confirmingRemove ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
7820
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setConfirmingRemove(false), children: "\u53D6\u6D88" }),
7821
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: remove, children: "\u786E\u8BA4\u5220\u9664" })
7822
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
7823
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setEditing({ ...item }), children: "\u7F16\u8F91" }),
7824
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { type: "button", onClick: () => setConfirmingRemove(true), children: "\u5220\u9664" })
8010
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
8011
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("header", { children: [
8012
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: memoryKind(item.kind) }),
8013
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: confirmingRemove ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
8014
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setConfirmingRemove(false), children: "\u53D6\u6D88" }),
8015
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", className: "is-danger", disabled: busy, onClick: remove, children: "\u786E\u8BA4\u5220\u9664" })
8016
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
8017
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setEditing({ ...item }), children: "\u7F16\u8F91" }),
8018
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { type: "button", onClick: () => setConfirmingRemove(true), children: "\u5220\u9664" })
7825
8019
  ] }) })
7826
8020
  ] }),
7827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: item.subject }),
7828
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: item.content }),
7829
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("footer", { children: [
7830
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("progress", { max: 1, value: item.confidence, "aria-label": `\u7F6E\u4FE1\u5EA6 ${Math.round(item.confidence * 100)}%` }),
7831
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("small", { children: [
8021
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: item.subject }),
8022
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: item.content }),
8023
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("footer", { children: [
8024
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("progress", { max: 1, value: item.confidence, "aria-label": `\u7F6E\u4FE1\u5EA6 ${Math.round(item.confidence * 100)}%` }),
8025
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("small", { children: [
7832
8026
  item.locked ? "\u624B\u52A8\u786E\u8BA4" : `${Math.round(item.confidence * 100)}% \u53EF\u4FE1`,
7833
8027
  " \xB7 ",
7834
8028
  relativeTime(item.updatedAt)
7835
8029
  ] })
7836
8030
  ] }),
7837
- item.evidence.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("details", { className: "dsh-partner-memory-evidence", children: [
7838
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("summary", { children: [
8031
+ item.evidence.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("details", { className: "dsh-partner-memory-evidence", children: [
8032
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("summary", { children: [
7839
8033
  "\u67E5\u770B\u5BF9\u8BDD\u4F9D\u636E ",
7840
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("b", { children: item.evidence.length })
8034
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: item.evidence.length })
7841
8035
  ] }),
7842
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: [...item.evidence].reverse().map((evidence) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("blockquote", { children: [
7843
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: evidence.excerpt }),
7844
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("time", { children: new Date(evidence.at).toLocaleString() })
8036
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: [...item.evidence].reverse().map((evidence) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("blockquote", { children: [
8037
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: evidence.excerpt }),
8038
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("time", { children: new Date(evidence.at).toLocaleString() })
7845
8039
  ] }, `${evidence.turnId}:${evidence.at}`)) })
7846
8040
  ] })
7847
8041
  ] }) });