dsh-leader-agent 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.agents/skills/doubao-tts/SKILL.md +158 -0
  2. package/.agents/skills/doubao-tts/scripts/tts.mjs +253 -0
  3. package/.agents/skills/e2e-scenarios/SKILL.md +15 -0
  4. package/.agents/skills/leader-mode/SKILL.md +3 -1
  5. package/.agents/skills/leader-mode/playbooks/implementation.md +1 -1
  6. package/.agents/skills/leader-mode/playbooks/program.md +1 -1
  7. package/.agents/skills/promo-stills/SKILL.md +107 -0
  8. package/.agents/skills/promo-stills/scripts/render.mjs +186 -0
  9. package/.agents/skills/promo-video/SKILL.md +134 -0
  10. package/.agents/skills/promo-video/references/copy-and-storyboard.md +74 -0
  11. package/.agents/skills/promo-video/references/qa.md +60 -0
  12. package/.agents/skills/promo-video/references/timeline-and-render.md +155 -0
  13. package/README.md +6 -16
  14. package/README_ZH.md +6 -18
  15. package/lib/client.js +611 -344
  16. package/package.json +1 -1
  17. package/src/client/board-card.js +104 -82
  18. package/src/client/board-projection.js +53 -0
  19. package/src/client/board-styles.js +221 -75
  20. package/src/client/board.js +85 -5
  21. package/src/client/card-detail-view.js +26 -0
  22. package/src/client/card-detail.js +36 -6
  23. package/src/client/icons.js +0 -7
  24. package/src/client/project-panel.js +51 -11
  25. package/src/client/project-section.js +30 -20
  26. package/src/host/cards/card-list-view.js +97 -0
  27. package/src/host/cards/store.js +36 -1
  28. package/src/host/index.js +9 -2
  29. package/src/host/projects/remote.js +24 -0
  30. package/src/host/tools/cards.js +259 -6
  31. package/src/host/tools/gate.js +32 -7
  32. package/src/shared/projects.js +1 -0
package/lib/client.js CHANGED
@@ -49,7 +49,7 @@ __export(index_exports, {
49
49
  module.exports = __toCommonJS(index_exports);
50
50
 
51
51
  // src/client/board.js
52
- var import_react7 = require("react");
52
+ var import_react8 = require("react");
53
53
 
54
54
  // src/client/session-watermark.js
55
55
  var SESSION_WATERMARK_BASE = 5;
@@ -156,6 +156,11 @@ function slotViewsForCard(card, states) {
156
156
  state: slotStateOf(sessionId, states)
157
157
  }));
158
158
  }
159
+ function cardKind(card) {
160
+ if (typeof card?.kind !== "string") return null;
161
+ const trimmed = card.kind.trim();
162
+ return trimmed === "" ? null : trimmed;
163
+ }
159
164
  function cardSignal(card, states) {
160
165
  if (card?.status === "done") return "none";
161
166
  const slots = slotViewsForCard(card, states);
@@ -221,11 +226,22 @@ function mergeCardUpdate(cards, updated) {
221
226
  if (updated === null || typeof updated !== "object") return cards;
222
227
  return cards.map((card) => card.id === updated.id ? updated : card);
223
228
  }
229
+ function removeCardFromList(cards, id) {
230
+ if (!Array.isArray(cards)) return [];
231
+ return cards.filter((card) => card?.id !== id);
232
+ }
224
233
  function mergeDetailCard(current2, updated) {
225
234
  if (current2 === null || current2 === void 0) return null;
226
235
  if (updated === null || typeof updated !== "object") return current2;
227
236
  return current2.card?.id === updated.id ? { ...current2, card: updated } : current2;
228
237
  }
238
+ function reconcileBoardOverlays(cards, detail, pendingDelete) {
239
+ const ids = new Set(Array.isArray(cards) ? cards.map((card) => card?.id) : []);
240
+ return {
241
+ detail: detail !== null && detail !== void 0 && ids.has(detail.card?.id) ? detail : null,
242
+ pendingDelete: pendingDelete !== null && pendingDelete !== void 0 && ids.has(pendingDelete.id) ? pendingDelete : null
243
+ };
244
+ }
229
245
  function mergeCardSnapshot(current2, next) {
230
246
  const byId = new Map(current2.map((card) => [card.id, card]));
231
247
  return next.map((card) => {
@@ -592,13 +608,6 @@ function slotDisplayName(name, labels, t) {
592
608
  var import_react = require("react");
593
609
  var STROKE_WIDTH = 1;
594
610
  var GLYPHS = {
595
- "folder-open-outline": {
596
- size: 16,
597
- paths: [
598
- { d: "M12.3994 13.5986H2.04956C1.49728 13.5986 1.04956 13.1509 1.04956 12.5986V3.40137C1.04956 2.84908 1.49728 2.40137 2.04956 2.40137H4.76632C5.01016 2.40137 5.24561 2.49046 5.42836 2.6519L6.94088 3.98799C7.12364 4.14943 7.35908 4.23852 7.60293 4.23852H12.3994C12.9517 4.23852 13.3994 4.68624 13.3994 5.23852V7.16991" },
599
- { d: "M2.55911 7.93683C2.67584 7.49906 3.07229 7.19446 3.52536 7.19446H13.6491C14.3061 7.19446 14.7846 7.81725 14.6153 8.45209L13.4411 12.856C13.3244 13.2938 12.9279 13.5984 12.4748 13.5984H2.35113C1.69411 13.5984 1.21562 12.9756 1.38489 12.3407L2.55911 7.93683Z" }
600
- ]
601
- },
602
611
  // 应用格子:项目行首是 leader 会话的入口,用它替代目录图标——目录图标与宿主
603
612
  // 工作区树同形,「项目」和「工作区」在侧边栏里分不开。路径原样取自宿主
604
613
  // `apps-add-outline`(三格加一个「+」),三个 rect 折成等价 path,形状与宿主一致。
@@ -765,7 +774,6 @@ function productIcon(glyph, options = {}) {
765
774
  }
766
775
 
767
776
  // src/client/board-card.js
768
- var LINKS_ROW_INDENT = 22;
769
777
  function openDetailOnKey(event, card, onOpenDetail) {
770
778
  if (event.target !== event.currentTarget) return;
771
779
  if (event.key === "Enter" || event.key === " ") {
@@ -773,28 +781,29 @@ function openDetailOnKey(event, card, onOpenDetail) {
773
781
  onOpenDetail(card, event.currentTarget);
774
782
  }
775
783
  }
776
- function linkChipContent(link) {
784
+ function linkContent(link) {
777
785
  return (0, import_react2.createElement)(
778
786
  "span",
779
- { className: "dsh-leader-agent-board-link-chip-body" },
780
- productIcon("link-outline", { size: 10 }),
781
- (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-link-chip-label" }, link.label ?? "")
787
+ { className: "dsh-leader-agent-board-link-body" },
788
+ (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-link-label" }, link.label ?? "")
782
789
  );
783
790
  }
784
791
  function BoardLinks({ links, onOpenDetail }) {
785
792
  const row = (0, import_react2.useRef)(null);
786
793
  const measure = (0, import_react2.useRef)(null);
787
794
  const [visibleCount, setVisibleCount] = (0, import_react2.useState)(links.length);
795
+ const [expanded, setExpanded] = (0, import_react2.useState)(false);
788
796
  (0, import_react2.useLayoutEffect)(() => {
789
797
  const rowElement = row.current;
790
798
  const measureElement = measure.current;
791
799
  if (rowElement === null || measureElement === null) return void 0;
792
800
  const fit = () => {
801
+ if (expanded) return;
793
802
  const widths = Array.from(measureElement.children).map((element) => element.getBoundingClientRect().width);
794
803
  const overflowWidth = widths.pop() ?? 0;
795
804
  const gap = Number.parseFloat(getComputedStyle(rowElement).columnGap);
796
805
  setVisibleCount(fitLinkChips({
797
- availableWidth: rowElement.getBoundingClientRect().width - LINKS_ROW_INDENT,
806
+ availableWidth: rowElement.getBoundingClientRect().width,
798
807
  chipWidths: widths,
799
808
  overflowWidth,
800
809
  gap: Number.isFinite(gap) ? gap : 0
@@ -805,11 +814,18 @@ function BoardLinks({ links, onOpenDetail }) {
805
814
  const observer = new ResizeObserver(fit);
806
815
  observer.observe(rowElement);
807
816
  return () => observer.disconnect();
808
- }, [links]);
809
- const plan = planLinkRow(links, visibleCount);
817
+ }, [links, expanded]);
818
+ const plan = planLinkRow(links, expanded ? links.length : visibleCount);
819
+ const indexed = links.map((link, index) => ({ link, index }));
820
+ const shown = expanded ? indexed : indexed.slice(0, plan.visible.length);
821
+ const overflow = expanded ? null : plan.overflow;
822
+ const remaining = links.slice(plan.visible.length);
810
823
  return (0, import_react2.createElement)(
811
824
  "div",
812
- { ref: row, className: "dsh-leader-agent-board-card-links" },
825
+ {
826
+ ref: row,
827
+ className: expanded ? "dsh-leader-agent-board-card-links dsh-leader-agent-board-card-links-expanded" : "dsh-leader-agent-board-card-links"
828
+ },
813
829
  (0, import_react2.createElement)(
814
830
  "div",
815
831
  { ref: measure, "aria-hidden": "true", className: "dsh-leader-agent-board-links-measure" },
@@ -817,48 +833,49 @@ function BoardLinks({ links, onOpenDetail }) {
817
833
  key: linkRowKey(link, index),
818
834
  href: link.url,
819
835
  tabIndex: -1,
820
- className: "dsh-leader-agent-board-link-chip"
821
- }, linkChipContent(link)) : (0, import_react2.createElement)("button", {
836
+ className: "dsh-leader-agent-board-link"
837
+ }, linkContent(link)) : (0, import_react2.createElement)("button", {
822
838
  key: linkRowKey(link, index),
823
839
  type: "button",
824
840
  tabIndex: -1,
825
- className: "dsh-leader-agent-board-link-chip"
826
- }, linkChipContent(link))),
841
+ className: "dsh-leader-agent-board-link"
842
+ }, linkContent(link))),
827
843
  (0, import_react2.createElement)(
828
844
  "button",
829
- { type: "button", tabIndex: -1, className: "dsh-leader-agent-board-link-chip dsh-leader-agent-board-link-overflow" },
845
+ { type: "button", tabIndex: -1, className: "dsh-leader-agent-board-link dsh-leader-agent-board-link-overflow" },
830
846
  plan.measureOverflow
831
847
  )
832
848
  ),
833
- links.map((link, index) => ({ link, index })).slice(0, plan.visible.length).map(({ link, index }) => isJumpableLink(link) ? (0, import_react2.createElement)("a", {
849
+ shown.map(({ link, index }) => isJumpableLink(link) ? (0, import_react2.createElement)("a", {
834
850
  key: linkRowKey(link, index),
835
851
  href: link.url,
836
852
  target: "_blank",
837
853
  rel: "noreferrer",
838
854
  title: link.purpose || link.url,
839
- className: "dsh-leader-agent-board-link-chip",
855
+ className: "dsh-leader-agent-board-link",
840
856
  onClick: (event) => {
841
857
  event.stopPropagation();
842
858
  }
843
- }, linkChipContent(link)) : (0, import_react2.createElement)("button", {
859
+ }, linkContent(link)) : (0, import_react2.createElement)("button", {
844
860
  key: linkRowKey(link, index),
845
861
  type: "button",
846
862
  title: link.purpose || link.label,
847
- className: "dsh-leader-agent-board-link-chip",
863
+ className: "dsh-leader-agent-board-link",
848
864
  onClick: (event) => {
849
865
  event.stopPropagation();
850
866
  onOpenDetail(event.currentTarget);
851
867
  }
852
- }, linkChipContent(link))),
853
- plan.overflow !== null ? (0, import_react2.createElement)("button", {
868
+ }, linkContent(link))),
869
+ overflow !== null || expanded ? (0, import_react2.createElement)("button", {
854
870
  type: "button",
855
- title: links.map((link) => link.label).join(" \xB7 "),
856
- className: "dsh-leader-agent-board-link-chip dsh-leader-agent-board-link-overflow",
871
+ "aria-expanded": expanded,
872
+ title: expanded ? void 0 : remaining.map((link) => link.label).join(" \xB7 "),
873
+ className: "dsh-leader-agent-board-link dsh-leader-agent-board-link-overflow",
857
874
  onClick: (event) => {
858
875
  event.stopPropagation();
859
- onOpenDetail(event.currentTarget);
876
+ setExpanded((value) => !value);
860
877
  }
861
- }, plan.overflow) : null
878
+ }, expanded ? "\u6536\u8D77" : overflow) : null
862
879
  );
863
880
  }
864
881
  var STATE_LABELS = {
@@ -872,32 +889,28 @@ var STATE_LABELS = {
872
889
  none: "\u65E0\u4FE1\u53F7"
873
890
  };
874
891
  function BoardSlot({ slot, onOpenSession, labels, t }) {
875
- const dot = (0, import_react2.createElement)("span", {
876
- className: `dsh-leader-agent-board-slot-dot dsh-leader-agent-board-slot-dot-${slot.state}`
877
- });
878
892
  const stateLabel = STATE_LABELS[slot.state] ?? slot.state;
879
893
  const name = slotDisplayName(slot.name, labels, t);
880
- if (slot.sessionId === "") {
881
- return (0, import_react2.createElement)(
882
- "span",
883
- { className: "dsh-leader-agent-board-slot-chip", title: `${name}\uFF1A${stateLabel}` },
884
- dot,
885
- name
886
- );
887
- }
888
894
  return (0, import_react2.createElement)(
889
895
  "button",
890
896
  {
891
897
  type: "button",
892
- className: "dsh-leader-agent-board-slot-chip",
898
+ className: "dsh-leader-agent-board-slot",
893
899
  title: `${name}\uFF1A${stateLabel}`,
894
900
  onClick: (event) => {
895
901
  event.stopPropagation();
896
902
  onOpenSession(slot.sessionId);
897
903
  }
898
904
  },
899
- dot,
900
- name
905
+ (0, import_react2.createElement)("span", {
906
+ className: `dsh-leader-agent-board-slot-dot dsh-leader-agent-board-slot-dot-${slot.state}`
907
+ }),
908
+ (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-slot-name" }, name),
909
+ (0, import_react2.createElement)(
910
+ "span",
911
+ { className: "dsh-leader-agent-board-slot-arrow", "aria-hidden": "true" },
912
+ productIcon("chevron-right-outline", { size: 12 })
913
+ )
901
914
  );
902
915
  }
903
916
  function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLabels, t }) {
@@ -924,8 +937,10 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
924
937
  );
925
938
  }
926
939
  const signal = cardSignal(card, states);
927
- const slots = slotViewsForCard(card, states);
940
+ const slots = slotViewsForCard(card, states).filter((slot) => slot.sessionId !== "");
928
941
  const stalled = isCardStalled(card, states, now);
942
+ const hollow = stalled && signal !== "attention";
943
+ const kind = cardKind(card);
929
944
  return (0, import_react2.createElement)(
930
945
  "div",
931
946
  {
@@ -937,27 +952,28 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
937
952
  },
938
953
  (0, import_react2.createElement)(
939
954
  "div",
940
- { className: "dsh-leader-agent-board-card-title-row" },
955
+ { className: "dsh-leader-agent-board-card-head" },
956
+ (0, import_react2.createElement)(
957
+ "span",
958
+ { className: "dsh-leader-agent-board-card-id" },
959
+ (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-number" }, `#${card.number ?? "?"}`),
960
+ kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind-separator" }, "/"),
961
+ kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind", title: kind }, kind)
962
+ ),
941
963
  (0, import_react2.createElement)(
942
964
  "span",
943
965
  { className: "dsh-leader-agent-board-signal-slot" },
944
966
  (0, import_react2.createElement)("span", {
945
- className: `dsh-leader-agent-board-signal dsh-leader-agent-board-signal-${signal}`,
967
+ className: `dsh-leader-agent-board-signal dsh-leader-agent-board-signal-${signal}${hollow ? " dsh-leader-agent-board-signal-hollow" : ""}`,
946
968
  title: STATE_LABELS[signal] ?? signal
947
969
  })
948
- ),
949
- (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-number" }, `#${card.number ?? "?"}`),
950
- (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-title", title: card.title }, card.title ?? ""),
951
- stalled ? (0, import_react2.createElement)(
952
- "span",
953
- { className: "dsh-leader-agent-board-card-stalled" },
954
- `\u505C\u6EDE ${formatDuration(card.updatedAt ?? 0, now)}`
955
- ) : null
970
+ )
956
971
  ),
972
+ (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-title", title: card.title }, card.title ?? ""),
957
973
  links.length > 0 ? (0, import_react2.createElement)(BoardLinks, { links, onOpenDetail: (anchor) => onOpenDetail(card, anchor) }) : null,
958
974
  slots.length > 0 ? (0, import_react2.createElement)(
959
975
  "div",
960
- { className: "dsh-leader-agent-board-card-meta" },
976
+ { className: "dsh-leader-agent-board-card-slots" },
961
977
  slots.map((slot) => (0, import_react2.createElement)(BoardSlot, {
962
978
  key: slot.name,
963
979
  slot,
@@ -1332,6 +1348,14 @@ function detailSections(card) {
1332
1348
  function canEditCardLinks(card) {
1333
1349
  return card?.status !== "archived";
1334
1350
  }
1351
+ function canDeleteCard(card) {
1352
+ return typeof card?.id === "string" && card.id !== "";
1353
+ }
1354
+ function describeCardRemoval(card) {
1355
+ const number = card?.number ?? "?";
1356
+ const title = card?.title ?? "";
1357
+ return `\u5C06\u5220\u9664\u5361\u7247 #${number}\u300C${title}\u300D\u3002\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u7F16\u53F7\u4E0D\u4F1A\u518D\u5206\u914D\uFF0C\u5361\u7247\u4E0A\u7684\u69FD\u4F4D\u7ED1\u5B9A\u4F1A\u4E00\u5E76\u89E3\u9664\u3002`;
1358
+ }
1335
1359
 
1336
1360
  // src/client/card-links-editor.js
1337
1361
  var import_react4 = require("react");
@@ -1605,25 +1629,38 @@ var STYLE_TEXT2 = `
1605
1629
  outline-offset: -2px;
1606
1630
  }
1607
1631
 
1608
- .dsh-leader-agent-board-card-title-row {
1632
+ /* \u5934\u90E8\uFF1A\u5DE6\u4FA7\u53EA\u8BFB\u8EAB\u4EFD\uFF08#\u7F16\u53F7 / \u5206\u7C7B\uFF09\uFF0C\u53F3\u4FA7\u4E3B\u4FE1\u53F7\u3002\u4E24\u4FA7\u90FD\u4E0D\u8FDB Tab \u5E8F\uFF0C
1633
+ \u6574\u884C\u5BBD\u5EA6\u7559\u7ED9\u6807\u9898\uFF1B\u5934\u90E8\u4E0E\u6807\u9898\u4E4B\u95F4\u53EA\u7559 4px\uFF0C\u4FDD\u6301\u540C\u7EC4\u7D27\u51D1 */
1634
+ .dsh-leader-agent-board-card-head {
1609
1635
  display: flex;
1610
- align-items: flex-start;
1636
+ align-items: center;
1637
+ justify-content: space-between;
1611
1638
  gap: 8px;
1639
+ margin-bottom: 4px;
1612
1640
  }
1613
1641
 
1614
- /* \u4FE1\u53F7\u706F\u69FD\uFF1A\u56FA\u5B9A 14px\uFF0C\u8BA9\u5404\u5361\u7684\u6807\u9898\u5DE6\u7F18\u5BF9\u9F50 */
1642
+ .dsh-leader-agent-board-card-id {
1643
+ display: flex;
1644
+ align-items: center;
1645
+ gap: 6px;
1646
+ min-width: 0;
1647
+ }
1648
+
1649
+ /* \u4FE1\u53F7\u706F\u69FD\uFF1A\u56FA\u5B9A 14px\uFF0C\u5934\u90E8\u53F3\u7AEF\u4E0D\u968F\u7F16\u53F7/\u5206\u7C7B\u5BBD\u5EA6\u6F02\u79FB */
1615
1650
  .dsh-leader-agent-board-signal-slot {
1616
1651
  flex: none;
1617
1652
  display: inline-flex;
1618
1653
  align-items: center;
1619
1654
  justify-content: center;
1620
1655
  width: 14px;
1621
- height: 20px;
1656
+ height: 16px;
1622
1657
  }
1623
1658
 
1624
1659
  /* \u56FE\u5F62\u70B9\u7684\u5F31\u5316\u6CBF\u7528 alpha\uFF1A\u8FD9\u91CC\u6CA1\u6709\u300C\u6BD4 tertiary \u66F4\u6D45\u300D\u7684 token \u6863\uFF0C\u800C\u70B9\u8981\u7684\u662F
1625
1660
  \u9762\u79EF\u4E0A\u7684\u9000\u8BA9\u800C\u4E0D\u662F\u8272\u76F8\u7684\u8BED\u4E49\u3002\u6587\u5B57\u7C7B\u5F31\u5316\u4E00\u5F8B\u6362\u6863\u4E0D\u53E0 alpha\uFF08\u7F16\u53F7/\u65F6\u95F4\u7528
1626
- label-caption\u3001\u6298\u53E0\u5F00\u5173\u7528 label-secondary\uFF09\uFF0C\u4E24\u6761\u754C\u7EBF\u4E92\u4E0D\u8D8A\u754C */
1661
+ label-caption\u3001\u6298\u53E0\u5F00\u5173\u7528 label-secondary\uFF09\uFF0C\u4E24\u6761\u754C\u7EBF\u4E92\u4E0D\u8D8A\u754C\u3002
1662
+ --dsh-leader-agent-signal-tone \u540C\u65F6\u4F9B\u5B9E\u5FC3\u4E0E\u7A7A\u5FC3\u4F7F\u7528\uFF1A\u7A7A\u5FC3\u706F\u53EA\u628A\u586B\u5145\u6362\u6210
1663
+ 1px \u63CF\u8FB9\uFF0C\u8272\u76F8\u4E0D\u52A8\u2014\u2014\u505C\u6EDE\u662F\u5F62\u72B6\u53D8\u5316\uFF0C\u4E0D\u662F\u53E6\u4E00\u6863\u72B6\u6001\u8272 */
1627
1664
  .dsh-leader-agent-board-signal {
1628
1665
  display: inline-block;
1629
1666
  box-sizing: border-box;
@@ -1631,46 +1668,55 @@ var STYLE_TEXT2 = `
1631
1668
  height: 8px;
1632
1669
  border-radius: 50%;
1633
1670
  corner-shape: round;
1634
- background: var(--dsw-alias-label-tertiary);
1671
+ --dsh-leader-agent-signal-tone: var(--dsw-alias-label-tertiary);
1672
+ background: var(--dsh-leader-agent-signal-tone);
1635
1673
  opacity: 0.4;
1636
1674
  }
1637
1675
 
1638
1676
  /* \u7B49\u4F60\u8F93\u5165\u4E0E\u672A\u8BFB\u540C\u8272\u4E0D\u540C\u52A8\u6548\uFF1A\u90FD\u5728\u7B49\u4F60\u52A8\u4F5C\uFF0C\u4F46\u300C\u6709\u4EBA\u5728\u7B49\u300D\u4E0E\u300C\u6709\u7ED3\u679C\u6CA1\u770B\u300D\u4E0D\u540C */
1639
1677
  .dsh-leader-agent-board-signal-waiting {
1640
- background: var(--dsw-static-blue-500);
1678
+ --dsh-leader-agent-signal-tone: var(--dsw-static-blue-500);
1641
1679
  opacity: 1;
1642
1680
  animation: dsh-leader-agent-board-pulse 1.6s ease-in-out infinite;
1643
1681
  }
1644
1682
 
1645
1683
  .dsh-leader-agent-board-signal-unread {
1646
- background: var(--dsw-static-blue-500);
1684
+ --dsh-leader-agent-signal-tone: var(--dsw-static-blue-500);
1647
1685
  opacity: 1;
1648
1686
  }
1649
1687
 
1650
1688
  .dsh-leader-agent-board-signal-running {
1651
- background: var(--dsw-alias-state-warn-primary);
1689
+ --dsh-leader-agent-signal-tone: var(--dsw-alias-state-warn-primary);
1652
1690
  opacity: 1;
1653
1691
  animation: dsh-leader-agent-board-pulse 1.6s ease-in-out infinite;
1654
1692
  }
1655
1693
 
1656
1694
  .dsh-leader-agent-board-signal-attention {
1657
- background: var(--dsw-alias-state-error-primary);
1695
+ --dsh-leader-agent-signal-tone: var(--dsw-alias-state-error-primary);
1658
1696
  opacity: 1;
1659
1697
  }
1660
1698
 
1661
1699
  .dsh-leader-agent-board-signal-idle {
1662
- background: var(--dsw-alias-label-tertiary);
1700
+ --dsh-leader-agent-signal-tone: var(--dsw-alias-label-tertiary);
1663
1701
  opacity: 0.55;
1664
1702
  }
1665
1703
 
1666
1704
  /* \u672A\u6D3E\u5DE5\u4E0E\u72B6\u6001\u672A\u77E5\u5171\u7528\u865A\u7EBF\u5708\uFF1A\u4E24\u8005\u90FD\u4E0D\u8C0E\u79F0\u7A7A\u95F2\uFF0C\u5F62\u72B6\u4E0A\u4E0E\u5B9E\u5FC3\u6863\u533A\u5206 */
1667
1705
  .dsh-leader-agent-board-signal-unknown,
1668
1706
  .dsh-leader-agent-board-signal-none {
1707
+ --dsh-leader-agent-signal-tone: var(--dsw-alias-label-tertiary);
1669
1708
  background: transparent;
1670
1709
  border: 1px dashed var(--dsw-alias-label-tertiary);
1671
1710
  opacity: 0.55;
1672
1711
  }
1673
1712
 
1713
+ /* \u505C\u6EDE\uFF1A\u5B9E\u5FC3\u6539\u7A7A\u5FC3\uFF081px \u72B6\u6001\u8272\u63CF\u8FB9\uFF09\u3002\u5361\u9762\u4E0D\u518D\u5199\u300C\u505C\u4E86\u591A\u4E45\u300D\uFF0C\u5F62\u72B6\u5C31\u662F\u5168\u90E8
1714
+ \u4FE1\u606F\uFF1B\u4E0E unknown/none \u7684\u865A\u7EBF\u533A\u5206\u5F00\u2014\u2014\u505C\u6EDE\u662F\u786E\u5B9A\u7684\u7A7A\u95F2\uFF0C\u4E0D\u662F\u4E0D\u53EF\u77E5 */
1715
+ .dsh-leader-agent-board-signal-hollow {
1716
+ background: transparent;
1717
+ border: 1px solid var(--dsh-leader-agent-signal-tone);
1718
+ }
1719
+
1674
1720
  @keyframes dsh-leader-agent-board-pulse {
1675
1721
  0%, 100% { opacity: 1; }
1676
1722
  50% { opacity: 0.35; }
@@ -1685,49 +1731,69 @@ var STYLE_TEXT2 = `
1685
1731
  flex: none;
1686
1732
  font-family: var(--ds-font-family-code);
1687
1733
  font-size: 11px;
1688
- line-height: 20px;
1734
+ line-height: 16px;
1689
1735
  font-variant-numeric: tabular-nums;
1690
1736
  color: var(--dsw-alias-label-caption);
1691
1737
  }
1692
1738
 
1693
- .dsh-leader-agent-board-card-title {
1694
- flex: 1;
1739
+ /* \u5206\u7C7B\uFF1A\u53EA\u8BFB\u5143\u4FE1\u606F\u7528\u7EAF\u6587\u672C\uFF0C\u4E0D\u52A0\u586B\u5145\u5757\u3001\u5706\u89D2\u6216\u56FE\u6807\u2014\u2014\u586B\u5145\u5757\u4F1A\u88AB\u8BFB\u6210\u6309\u94AE\uFF0C
1740
+ \u800C\u540C\u4E00\u5F20\u5361\u91CC\u771F\u6B63\u53EF\u70B9\u7684\u94FE\u63A5\u4E0E\u4F1A\u8BDD\u5165\u53E3\u4F1A\u56E0\u6B64\u5931\u53BB\u793A\u80FD\u5DEE\u3002\u8D85\u957F\u622A\u65AD\u800C\u4E0D\u662F
1741
+ \u6491\u5BBD\u5934\u90E8\uFF1A\u7F16\u53F7\u4E0E\u4FE1\u53F7\u706F\u90FD\u4E0D\u8BE5\u88AB\u5206\u7C7B\u6324\u8D70 */
1742
+ .dsh-leader-agent-board-card-kind {
1695
1743
  min-width: 0;
1696
- font-size: 13px;
1697
- line-height: 20px;
1698
- font-weight: 500;
1699
- color: var(--dsw-alias-label-primary);
1700
- display: -webkit-box;
1701
- -webkit-line-clamp: 2;
1702
- -webkit-box-orient: vertical;
1744
+ max-width: 140px;
1703
1745
  overflow: hidden;
1704
- overflow-wrap: anywhere;
1746
+ font-size: 11px;
1747
+ line-height: 16px;
1748
+ color: var(--dsw-alias-label-caption);
1749
+ text-overflow: ellipsis;
1750
+ white-space: nowrap;
1705
1751
  }
1706
1752
 
1707
- .dsh-leader-agent-board-card-stalled {
1753
+ .dsh-leader-agent-board-card-kind-separator {
1708
1754
  flex: none;
1709
- font-family: var(--ds-font-family-code);
1710
1755
  font-size: 11px;
1756
+ line-height: 16px;
1757
+ color: var(--dsw-alias-label-tertiary);
1758
+ }
1759
+
1760
+ /* \u6807\u9898\u72EC\u5360\u4E00\u884C\uFF1A\u7A84\u680F\u5355\u884C\u622A\u65AD\u770B\u4E0D\u6E05\u4EFB\u52A1\u5185\u5BB9\uFF0C\u4E24\u884C\u8986\u76D6\u7EDD\u5927\u591A\u6570\u6807\u9898\uFF1B\u5DE6\u7F18\u4E0E
1761
+ \u4E0B\u65B9\u94FE\u63A5/\u4F1A\u8BDD\u4E00\u81F4\u3002medium \u800C\u975E semibold\u2014\u2014\u4FE1\u53F7\u706F\u4E0E\u72B6\u6001\u8272\u5DF2\u627F\u62C5\u5F3A\u8C03 */
1762
+ .dsh-leader-agent-board-card-title {
1763
+ display: -webkit-box;
1764
+ -webkit-line-clamp: 2;
1765
+ -webkit-box-orient: vertical;
1766
+ font-size: 13px;
1711
1767
  line-height: 20px;
1712
- font-variant-numeric: tabular-nums;
1713
- /* warn \u7684 label \u6863\u6BD4 primary \u6863\u5728\u6D45\u8272\u4E0B\u66F4\u53EF\u8BFB */
1714
- color: var(--dsw-alias-state-warn-label);
1768
+ font-weight: 500;
1769
+ color: var(--dsw-alias-label-primary);
1770
+ overflow: hidden;
1771
+ overflow-wrap: anywhere;
1715
1772
  }
1716
1773
 
1717
- /* \u94FE\u63A5\u884C\u4E0E\u5143\u4FE1\u606F\u884C\u7F29\u8FDB 22px\uFF0C\u5BF9\u9F50\u6807\u9898\u6587\u5B57\u8D77\u70B9 */
1774
+ /* \u94FE\u63A5\u884C\uFF1A\u4E0E\u6807\u9898\u540C\u5DE6\u7F18\uFF08\u5361\u9762 padding\uFF09\u3002\u9ED8\u8BA4\u4E00\u884C\uFF0C\u653E\u4E0D\u4E0B\u7684\u7531\u300C+N\u300D\u6536\u8D77\uFF1B
1775
+ padding-bottom 1px \u7ED9 3px \u4E0B\u5212\u7EBF\u7684\u4E0B\u6C89\u7559\u4F4D\uFF0C\u5426\u5219\u6536\u8D77\u6001\u7684 overflow \u4F1A\u88C1\u6389\u5B83 */
1718
1776
  .dsh-leader-agent-board-card-links {
1719
1777
  position: relative;
1720
1778
  display: flex;
1721
1779
  align-items: center;
1722
- gap: 4px;
1780
+ gap: 12px;
1723
1781
  margin-top: 6px;
1724
- padding-left: 22px;
1782
+ padding-bottom: 1px;
1725
1783
  overflow: hidden;
1726
1784
  white-space: nowrap;
1727
1785
  }
1728
1786
 
1729
- /* \u6D4B\u91CF\u5C42\uFF1A\u5168\u91CF chip \u4E0E\u300C+N\u300D\u7684\u4E0D\u53EF\u89C1\u526F\u672C\uFF08visibility: hidden \u4ECD\u53C2\u4E0E\u5E03\u5C40\uFF09\uFF0C
1730
- \u53EA\u7528\u6765\u91CF\u771F\u5B9E\u5BBD\u5EA6\uFF0C\u4E0D\u627F\u8F7D\u4EA4\u4E92\u3002\u6807\u7B7E\u5FC5\u987B\u4E0E\u771F\u5B9E chip \u540C\u6784\uFF08a / button\uFF09\u2014\u2014
1787
+ /* \u5C55\u5F00\u6001\uFF1A\u5168\u90E8\u76F4\u51FA\u5E76\u81EA\u7136\u6362\u884C\u3002\u4E0D\u518D\u88C1\u5207\uFF0C\u7126\u70B9\u73AF\u4E0E\u4E0B\u5212\u7EBF\u90FD\u5B8C\u6574 */
1788
+ .dsh-leader-agent-board-card-links-expanded {
1789
+ flex-wrap: wrap;
1790
+ overflow: visible;
1791
+ row-gap: 4px;
1792
+ white-space: normal;
1793
+ }
1794
+
1795
+ /* \u6D4B\u91CF\u5C42\uFF1A\u5168\u91CF\u94FE\u63A5\u4E0E\u300C+N\u300D\u7684\u4E0D\u53EF\u89C1\u526F\u672C\uFF08visibility: hidden \u4ECD\u53C2\u4E0E\u5E03\u5C40\uFF09\uFF0C
1796
+ \u53EA\u7528\u6765\u91CF\u771F\u5B9E\u5BBD\u5EA6\uFF0C\u4E0D\u627F\u8F7D\u4EA4\u4E92\u3002\u6807\u7B7E\u5FC5\u987B\u4E0E\u771F\u5B9E\u94FE\u63A5\u540C\u6784\uFF08a / button\uFF09\u2014\u2014
1731
1797
  UA \u9ED8\u8BA4\u6837\u5F0F\u53EA\u8981\u6709\u4E00\u6761\u6CA1\u88AB\u8986\u76D6\uFF0C\u91CF\u51FA\u7684\u5BBD\u5EA6\u5C31\u548C\u6E32\u67D3\u4E0D\u4E00\u81F4 */
1732
1798
  .dsh-leader-agent-board-links-measure {
1733
1799
  position: absolute;
@@ -1735,62 +1801,55 @@ var STYLE_TEXT2 = `
1735
1801
  top: 0;
1736
1802
  display: flex;
1737
1803
  align-items: center;
1738
- gap: 4px;
1804
+ gap: 12px;
1739
1805
  visibility: hidden;
1740
1806
  pointer-events: none;
1741
1807
  }
1742
1808
 
1743
- /* \u94FE\u63A5 chip\uFF1A\u5BBF\u4E3B\u300C\u53EF\u70B9\u51FB\u4EA7\u7269\u94FE\u63A5\u300D\u7684\u793A\u80FD\u2014\u2014link \u8272 + 500 \u5B57\u91CD\u3001\u9ED8\u8BA4\u65E0
1744
- \u4E0B\u5212\u7EBF\u3001hover \u4E0E\u952E\u76D8\u7126\u70B9\u540C\u4E3A\u70B9\u72B6\u4E0B\u5212\u7EBF\uFF0C\u5916\u9762\u5957\u4E00\u5C42\u53D1\u4E1D\u7EBF\u5706\u89D2\u58F3\u628A\u5B83\u548C
1745
- \u5361\u9762\u5206\u5F00\u300218px \u9AD8\u5C5E\u300C\u4F4E\u4E8E H20 \u7684\u5FAE\u578B\u63A7\u4EF6\u300D\uFF0C\u5706\u89D2\u53D6 R4\u3002
1746
- max-width \u662F border-box \u4E0B\u7684 123px\uFF1A\u5185\u5BB9\u76D2\u6B63\u597D 110px\uFF0C\u4E0E\u6539\u524D content-box
1747
- \u5199\u6CD5\uFF08110 \u5185\u5BB9 + 12 \u6A2A\u5411 padding + 1 \u53CC\u8FB9\u8FB9\u6846 = \u603B\u5BBD 124\uFF09\u7B49\u4EF7\u2014\u2014\u6362\u6750\u8D28\u4E0D\u8BE5
1748
- \u987A\u5E26\u628A\u957F\u6807\u7B7E\u622A\u77ED\u3002\u6D4B\u91CF\u5C42\u4E0E\u771F\u5B9E chip \u540C class\uFF0C\u4E24\u8FB9\u91CF\u5230\u7684\u90FD\u662F\u8FD9\u4E2A border-box
1749
- \u5BBD\u5EA6\uFF0C\u6392\u5E03\u903B\u8F91\u4E0D\u53D7\u5F71\u54CD */
1750
- .dsh-leader-agent-board-link-chip {
1809
+ /* \u94FE\u63A5\uFF1A\u4E00\u6392\u94FE\u63A5\u5982\u679C\u90FD\u53D6\u5F3A\u8C03\u8272 + 500 \u5B57\u91CD\uFF0C\u4F1A\u628A\u6574\u5F20\u5361\u67D3\u6210\u4E00\u7247\u84DD\u3001\u538B\u8FC7\u6807\u9898\u3002
1810
+ \u9759\u606F\u6001\u53EA\u7559\u4E8C\u7EA7\u6587\u5B57\u8272\u7684\u7EAF\u6587\u672C\uFF0Chover \u4E0E\u952E\u76D8\u7126\u70B9\u624D\u63D0\u4EAE\u5230\u5BBF\u4E3B\u7684 link \u8272\u5E76\u51FA
1811
+ \u70B9\u72B6\u4E0B\u5212\u7EBF\u2014\u2014\u9759\u606F\u6001\u662F\u53EF\u8BFB\u6587\u672C\uFF0C\u4EA4\u4E92\u6001\u624D\u662F\u53EF\u70B9\u793A\u80FD\u3002\u4E0D\u524D\u7F6E\u56FE\u6807\uFF1A\u4E00\u884C\u4E03\u516B\u6761
1812
+ \u65F6\u56FE\u6807\u4F1A\u8FDE\u6210\u70B9\u9635\uFF0C\u6BD4\u6807\u7B7E\u672C\u8EAB\u66F4\u62A2\u773C\uFF1B\u7C7B\u578B\u8BC6\u522B\u7559\u7ED9\u8BE6\u60C5\u6D6E\u5C42\u3002
1813
+ \u4E0B\u5212\u7EBF\u504F\u79FB\u53D6\u5BBF\u4E3B\u89C4\u8303\u7684 3px\uFF1B\u4E0D\u518D\u5957\u53D1\u4E1D\u7EBF\u5706\u89D2\u58F3\uFF0C\u5361\u9762\u91CC\u94FE\u63A5\u7684\u5BB9\u5668\u662F\u6574\u5F20\u5361\u3002
1814
+ max-width \u53D6 110px \u5185\u5BB9\u5BBD\uFF0C\u957F\u6807\u7B7E\u622A\u65AD\uFF1B\u6D4B\u91CF\u5C42\u4E0E\u771F\u5B9E\u94FE\u63A5\u540C\u4E00\u4E2A class */
1815
+ .dsh-leader-agent-board-link {
1751
1816
  display: inline-flex;
1752
1817
  flex: none;
1753
1818
  align-items: center;
1754
1819
  box-sizing: border-box;
1755
- max-width: 123px;
1756
- padding: 0 6px;
1757
- border: 0.5px solid var(--dsw-alias-border-l3);
1758
- border-radius: var(--dsw-radius-xs);
1820
+ max-width: 110px;
1821
+ padding: 0;
1822
+ border: 0;
1823
+ background: transparent;
1759
1824
  font-size: 11px;
1760
1825
  line-height: 16px;
1761
- font-weight: 500;
1762
- color: var(--dsw-alias-link);
1763
- background: transparent;
1826
+ font-weight: 400;
1827
+ color: var(--dsw-alias-label-secondary);
1764
1828
  cursor: pointer;
1765
1829
  text-decoration: none;
1766
1830
  overflow: hidden;
1767
1831
  }
1768
1832
 
1769
- /* \u94FE\u8DEF\u884C\u662F overflow: hidden \u7684\u6A2A\u5411\u88C1\u5207\u5E26\uFF0C\u5916\u6269\u7126\u70B9\u73AF\u53EA\u5269\u5DE6\u53F3\u4E24\u6BB5\u5F27\uFF0C
1770
- \u6240\u4EE5\u7126\u70B9\u73AF\u6539\u5185\u5D4C\uFF1B\u4E0B\u5212\u7EBF\u793A\u80FD\u4E0E hover \u4E00\u81F4\u3002
1771
- \u4E0B\u5212\u7EBF\u504F\u79FB\u53D6 1px \u800C\u4E0D\u662F\u5BBF\u4E3B\u7684 3px\uFF1Achip \u7684\u5185\u5BB9\u76D2\u53EA\u6709 16px\uFF08line-height
1772
- 16 + \u4E0A\u4E0B\u5404 0.5px \u53D1\u4E1D\u7EBF\uFF09\u3002\u504F\u79FB\u5230 3px \u65F6\u70B9\u7EBF\u4ECD\u7136\u753B\u5F97\u51FA\u6765\uFF0C\u4F46\u5DF2\u7ECF\u538B\u5728\u5E95
1773
- \u8FB9\u6846\u4E0A\u3001\u4E0E\u53D1\u4E1D\u7EBF\u7CCA\u6210\u4E00\u6761\uFF1B\u518D\u5F80\u4E0A\u6574\u6761\u843D\u5230 padding box \u5916\uFF0C\u88AB\u4E24\u5C42 overflow
1774
- \u88C1\u6389\u2014\u2014\u4E24\u5904\u72EC\u7ACB\u8BFB\u6570\u5206\u522B\u4ECE 4px \u4E0E 5px \u8D77\u6D88\u5931\uFF0C\u5DEE\u5F02\u6765\u81EA 0.5px \u8FB9\u6846\u5728 Chrome
1775
- \u88AB\u53D6\u6574\u6210 1px\uFF08chip \u5B9E\u9645 18px \u9AD8\uFF09\u30021px \u7559\u51FA\u53EF\u8BFB\u7684\u95F4\u8DDD */
1776
- .dsh-leader-agent-board-link-chip:focus-visible {
1833
+ /* \u6536\u8D77\u6001\u662F overflow: hidden \u7684\u6A2A\u5411\u88C1\u5207\u5E26\uFF0C\u5916\u6269\u7126\u70B9\u73AF\u53EA\u5269\u5DE6\u53F3\u4E24\u6BB5\u5F27\uFF0C
1834
+ \u6240\u4EE5\u7126\u70B9\u73AF\u6539\u5185\u5D4C\uFF1B\u4E0B\u5212\u7EBF\u793A\u80FD\u4E0E hover \u4E00\u81F4 */
1835
+ .dsh-leader-agent-board-link:focus-visible {
1836
+ color: var(--dsw-alias-link);
1777
1837
  text-decoration: underline dotted;
1778
- text-underline-offset: 1px;
1838
+ text-underline-offset: 3px;
1779
1839
  outline: var(--dsw-focus-ring-width, 2px) solid
1780
1840
  var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
1781
1841
  outline-offset: -2px;
1782
1842
  }
1783
1843
 
1784
1844
  @media (hover: hover) {
1785
- .dsh-leader-agent-board-link-chip:hover {
1786
- border-color: var(--dsw-alias-border-l4);
1787
- background: var(--dsw-alias-interactive-bg-hover);
1845
+ .dsh-leader-agent-board-link:hover {
1846
+ color: var(--dsw-alias-link);
1788
1847
  text-decoration: underline dotted;
1789
- text-underline-offset: 1px;
1848
+ text-underline-offset: 3px;
1790
1849
  }
1791
1850
  }
1792
1851
 
1793
- .dsh-leader-agent-board-link-chip-body {
1852
+ .dsh-leader-agent-board-link-body {
1794
1853
  display: inline-flex;
1795
1854
  align-items: center;
1796
1855
  gap: 4px;
@@ -1798,44 +1857,100 @@ var STYLE_TEXT2 = `
1798
1857
  overflow: hidden;
1799
1858
  }
1800
1859
 
1801
- .dsh-leader-agent-board-link-chip-label {
1860
+ .dsh-leader-agent-board-link-label {
1802
1861
  min-width: 0;
1803
1862
  overflow: hidden;
1804
1863
  text-overflow: ellipsis;
1805
1864
  white-space: nowrap;
1806
1865
  }
1807
1866
 
1867
+ /* \u300C+N / \u6536\u8D77\u300D\uFF1A\u4E0E\u94FE\u63A5\u540C\u4E00\u884C\uFF0C\u4F46\u5B83\u662F\u5C55\u5F00\u5F00\u5173\u800C\u975E\u8DF3\u8F6C\u76EE\u6807\u2014\u2014\u7B49\u5BBD\u3001\u4E09\u7EA7\u6807\u7B7E\u8272\uFF0C
1868
+ \u60AC\u505C\u63D0\u4EAE\u5230\u4E8C\u7EA7\uFF1B\u4E0D\u52A0\u7BAD\u5934\uFF0C\u907F\u514D\u4E0E\u5361\u9762\u4E0A\u771F\u6B63\u4F1A\u6539\u53D8\u9875\u9762\u4F4D\u7F6E\u7684\u5165\u53E3\u6DF7\u6DC6 */
1808
1869
  .dsh-leader-agent-board-link-overflow {
1809
1870
  font-family: var(--ds-font-family-code);
1810
1871
  font-variant-numeric: tabular-nums;
1811
1872
  color: var(--dsw-alias-label-tertiary);
1812
1873
  }
1813
1874
 
1814
- .dsh-leader-agent-board-card-meta {
1875
+ @media (hover: hover) {
1876
+ .dsh-leader-agent-board-link-overflow:hover {
1877
+ color: var(--dsw-alias-label-secondary);
1878
+ text-decoration: none;
1879
+ }
1880
+ }
1881
+
1882
+ /* \u6EA2\u51FA\u5F00\u5173\u4E0D\u8DF3\u8F6C\uFF0C\u952E\u76D8\u7126\u70B9\u4E5F\u4E0D\u8BE5\u67D3\u6210\u94FE\u63A5\u84DD\uFF08\u4E0A\u9762\u7684 :focus-visible \u89C4\u5219\u4F1A\u547D\u4E2D\u5B83\uFF09 */
1883
+ .dsh-leader-agent-board-link-overflow:focus-visible {
1884
+ color: var(--dsw-alias-label-secondary);
1885
+ text-decoration: none;
1886
+ }
1887
+
1888
+ /* \u4F1A\u8BDD\u884C\uFF1A\u5168\u90E8\u76F4\u51FA\u3001\u81EA\u7136\u6362\u884C\uFF0C\u7528\u4E00\u6761\u53D1\u4E1D\u7EBF\u628A\u300C\u8C01\u5728\u505A\u300D\u4E0E\u300C\u4EA7\u7269\u5728\u54EA\u300D\u5206\u5F00\u3002
1889
+ \u884C\u95F4 4px \u7EB5\u5411\u300112px \u6A2A\u5411\u2014\u2014\u4E0D\u5F62\u6210\u7B49\u5BBD\u6309\u94AE\u77E9\u9635\uFF0C\u89D2\u8272\u6570\u589E\u957F\u65F6\u4E0D\u4F1A\u53D8\u6210\u6309\u94AE\u5899 */
1890
+ .dsh-leader-agent-board-card-slots {
1815
1891
  display: flex;
1892
+ flex-wrap: wrap;
1816
1893
  align-items: center;
1817
- gap: 12px;
1818
- margin-top: 6px;
1819
- padding-left: 22px;
1894
+ gap: 4px 12px;
1895
+ margin-top: 8px;
1896
+ padding-top: 6px;
1897
+ border-top: 0.5px solid var(--dsw-alias-border-l3);
1820
1898
  }
1821
1899
 
1822
- .dsh-leader-agent-board-slot-chip {
1900
+ /* \u4F1A\u8BDD\u5165\u53E3\uFF1A\u72B6\u6001\u70B9 + \u89D2\u8272\u540D + \u65B9\u5411\u7BAD\u5934\u3002hover \u4E0E\u952E\u76D8\u7126\u70B9\u7ED9\u80CC\u666F\u5757\u5E76\u663E\u793A\u7BAD\u5934\uFF1B
1901
+ \u7BAD\u5934\u53D6 link \u8272\uFF0C\u8868\u8FBE\u300C\u4F1A\u8DF3\u8D70\u300D\uFF0C\u800C\u72B6\u6001\u8272\u53EA\u7559\u7ED9\u72B6\u6001\u70B9 */
1902
+ .dsh-leader-agent-board-slot {
1823
1903
  display: inline-flex;
1824
1904
  align-items: center;
1825
1905
  gap: 4px;
1826
- padding: 0;
1906
+ min-width: 0;
1907
+ max-width: 100%;
1908
+ margin-left: -4px;
1909
+ padding: 0 4px;
1827
1910
  border: 0;
1911
+ border-radius: var(--dsw-radius-xs);
1828
1912
  background: transparent;
1829
1913
  font-size: 11px;
1830
- line-height: 16px;
1914
+ line-height: 20px;
1831
1915
  color: var(--dsw-alias-label-tertiary);
1832
1916
  cursor: pointer;
1833
1917
  }
1834
1918
 
1919
+ .dsh-leader-agent-board-slot:focus-visible {
1920
+ outline: var(--dsw-focus-ring-width, 2px) solid
1921
+ var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
1922
+ outline-offset: -2px;
1923
+ color: var(--dsw-alias-label-primary);
1924
+ }
1925
+
1926
+ .dsh-leader-agent-board-slot:focus-visible .dsh-leader-agent-board-slot-arrow {
1927
+ opacity: 1;
1928
+ }
1929
+
1835
1930
  @media (hover: hover) {
1836
- .dsh-leader-agent-board-slot-chip:hover {
1931
+ .dsh-leader-agent-board-slot:hover {
1932
+ background: var(--dsw-alias-interactive-bg-hover);
1837
1933
  color: var(--dsw-alias-label-primary);
1838
1934
  }
1935
+
1936
+ .dsh-leader-agent-board-slot:hover .dsh-leader-agent-board-slot-arrow {
1937
+ opacity: 1;
1938
+ }
1939
+ }
1940
+
1941
+ .dsh-leader-agent-board-slot-name {
1942
+ min-width: 0;
1943
+ overflow: hidden;
1944
+ text-overflow: ellipsis;
1945
+ white-space: nowrap;
1946
+ }
1947
+
1948
+ .dsh-leader-agent-board-slot-arrow {
1949
+ flex: none;
1950
+ display: inline-flex;
1951
+ color: var(--dsw-alias-link);
1952
+ opacity: 0;
1953
+ transition: opacity var(--ds-transition-duration) var(--ds-ease-in-out);
1839
1954
  }
1840
1955
 
1841
1956
  .dsh-leader-agent-board-slot-dot {
@@ -2141,6 +2256,26 @@ var STYLE_TEXT2 = `
2141
2256
  color: var(--dsw-alias-label-caption);
2142
2257
  }
2143
2258
 
2259
+ /* \u5206\u7C7B\u4E0E\u5361\u9762\u5934\u90E8\u540C\u4E00\u5957\u5224\u636E\u4E0E\u5F62\u72B6\uFF1A\u7EAF\u6587\u672C\u3001\u4E0D\u5957\u5BB9\u5668 */
2260
+ .dsh-leader-agent-card-detail-kind {
2261
+ display: inline-flex;
2262
+ align-items: center;
2263
+ gap: 6px;
2264
+ min-width: 0;
2265
+ max-width: 240px;
2266
+ font-size: 11px;
2267
+ line-height: 16px;
2268
+ color: var(--dsw-alias-label-caption);
2269
+ overflow: hidden;
2270
+ text-overflow: ellipsis;
2271
+ white-space: nowrap;
2272
+ }
2273
+
2274
+ .dsh-leader-agent-card-detail-kind-separator {
2275
+ flex: none;
2276
+ color: var(--dsw-alias-label-tertiary);
2277
+ }
2278
+
2144
2279
  .dsh-leader-agent-card-detail-status {
2145
2280
  padding: 2px 8px;
2146
2281
  border-radius: 999px;
@@ -2163,6 +2298,40 @@ var STYLE_TEXT2 = `
2163
2298
  padding: 0 24px 24px;
2164
2299
  }
2165
2300
 
2301
+ /* \u5220\u9664\u662F\u8BE6\u60C5\u91CC\u552F\u4E00\u4E0D\u53EF\u64A4\u9500\u7684\u52A8\u4F5C\uFF0C\u5355\u72EC\u653E\u9875\u811A\u3001\u4E0E\u6B63\u6587\u9694\u5F00 */
2302
+ .dsh-leader-agent-card-detail-footer {
2303
+ display: flex;
2304
+ justify-content: flex-end;
2305
+ padding: 12px 24px 20px;
2306
+ border-top: 0.5px solid var(--dsw-alias-border-l3);
2307
+ }
2308
+
2309
+ .dsh-leader-agent-card-detail-delete {
2310
+ display: inline-flex;
2311
+ align-items: center;
2312
+ gap: 6px;
2313
+ padding: 4px 8px;
2314
+ border: 0;
2315
+ border-radius: var(--dsw-radius-sm);
2316
+ background: transparent;
2317
+ color: var(--dsw-alias-state-error-primary);
2318
+ font-size: 12px;
2319
+ line-height: 18px;
2320
+ cursor: pointer;
2321
+ }
2322
+
2323
+ @media (hover: hover) {
2324
+ .dsh-leader-agent-card-detail-delete:hover {
2325
+ background: var(--dsw-alias-interactive-bg-hover);
2326
+ }
2327
+ }
2328
+
2329
+ .dsh-leader-agent-card-detail-delete:focus-visible {
2330
+ outline: var(--dsw-focus-ring-width, 2px) solid
2331
+ var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
2332
+ outline-offset: 1px;
2333
+ }
2334
+
2166
2335
  .dsh-leader-agent-card-detail-section {
2167
2336
  margin-top: 16px;
2168
2337
  }
@@ -2581,7 +2750,7 @@ function ensureBoardStyles() {
2581
2750
  }
2582
2751
 
2583
2752
  // src/client/card-detail.js
2584
- function CardDetail({ card, onClose, callRemote, onUpdated, restoreFocus = null }) {
2753
+ function CardDetail({ card, onClose, callRemote, onUpdated, onDelete, restoreFocus = null }) {
2585
2754
  const [editing, setEditing] = (0, import_react6.useState)(false);
2586
2755
  const editButton = (0, import_react6.useRef)(null);
2587
2756
  const wasEditing = (0, import_react6.useRef)(false);
@@ -2599,7 +2768,9 @@ function CardDetail({ card, onClose, callRemote, onUpdated, restoreFocus = null
2599
2768
  }, [editing]);
2600
2769
  const sections = detailSections(card);
2601
2770
  const done = card?.status === "done";
2771
+ const kind = cardKind(card);
2602
2772
  const editable = canEditCardLinks(card);
2773
+ const deletable = canDeleteCard(card);
2603
2774
  const saveLinks = (0, import_react6.useCallback)(async (links) => {
2604
2775
  const updated = await callRemote("updateCardLinks", [card.id, links]);
2605
2776
  onUpdated?.(updated);
@@ -2639,6 +2810,12 @@ function CardDetail({ card, onClose, callRemote, onUpdated, restoreFocus = null
2639
2810
  { className: "dsh-leader-agent-card-detail-number" },
2640
2811
  `#${card?.number ?? "?"}`
2641
2812
  ),
2813
+ kind === null ? null : (0, import_react6.createElement)(
2814
+ "span",
2815
+ { className: "dsh-leader-agent-card-detail-kind" },
2816
+ (0, import_react6.createElement)("span", { className: "dsh-leader-agent-card-detail-kind-separator" }, "/"),
2817
+ kind
2818
+ ),
2642
2819
  (0, import_react6.createElement)(
2643
2820
  "span",
2644
2821
  {
@@ -2692,11 +2869,11 @@ function CardDetail({ card, onClose, callRemote, onUpdated, restoreFocus = null
2692
2869
  sections.links.map((link, index) => {
2693
2870
  const row = (0, import_react6.createElement)(
2694
2871
  "span",
2695
- { className: "dsh-leader-agent-board-link-chip-body" },
2872
+ { className: "dsh-leader-agent-board-link-body" },
2696
2873
  productIcon("link-outline", { size: 12 }),
2697
2874
  (0, import_react6.createElement)(
2698
2875
  "span",
2699
- { className: "dsh-leader-agent-board-link-chip-label" },
2876
+ { className: "dsh-leader-agent-board-link-label" },
2700
2877
  link.label ?? ""
2701
2878
  ),
2702
2879
  link.purpose ? (0, import_react6.createElement)(
@@ -2723,16 +2900,71 @@ function CardDetail({ card, onClose, callRemote, onUpdated, restoreFocus = null
2723
2900
  })
2724
2901
  )
2725
2902
  ) : null
2726
- )
2903
+ ),
2904
+ deletable && !editing && typeof onDelete === "function" ? (0, import_react6.createElement)(
2905
+ "div",
2906
+ { className: "dsh-leader-agent-card-detail-footer" },
2907
+ (0, import_react6.createElement)(
2908
+ "button",
2909
+ {
2910
+ type: "button",
2911
+ className: "dsh-leader-agent-card-detail-delete",
2912
+ onClick: onDelete
2913
+ },
2914
+ productIcon("trash-outline", { size: 14 }),
2915
+ "\u5220\u9664\u5361\u7247"
2916
+ )
2917
+ ) : null
2727
2918
  )
2728
2919
  });
2729
2920
  }
2730
2921
 
2922
+ // src/client/confirm-dialog.js
2923
+ var import_react7 = require("react");
2924
+ function ConfirmDialog({
2925
+ open,
2926
+ title,
2927
+ description,
2928
+ confirmLabel,
2929
+ cancelLabel,
2930
+ danger = false,
2931
+ busy = false,
2932
+ error = "",
2933
+ onConfirm,
2934
+ onCancel
2935
+ }) {
2936
+ return (0, import_react7.createElement)(ModalShell, {
2937
+ open,
2938
+ onClose: onCancel,
2939
+ title,
2940
+ closeLabel: cancelLabel,
2941
+ description,
2942
+ children: error === "" ? null : (0, import_react7.createElement)("div", { className: "dsh-leader-agent-modal-error", role: "alert" }, error),
2943
+ footer: [
2944
+ (0, import_react7.createElement)("button", {
2945
+ key: "cancel",
2946
+ type: "button",
2947
+ className: "dsh-leader-agent-modal-button dsh-leader-agent-modal-button-outline",
2948
+ disabled: busy,
2949
+ onClick: onCancel
2950
+ }, cancelLabel),
2951
+ (0, import_react7.createElement)("button", {
2952
+ key: "confirm",
2953
+ type: "button",
2954
+ "data-modal-autofocus": "",
2955
+ className: `dsh-leader-agent-modal-button dsh-leader-agent-modal-button-outline${danger ? " dsh-leader-agent-modal-button-danger" : ""}`,
2956
+ disabled: busy,
2957
+ onClick: onConfirm
2958
+ }, confirmLabel)
2959
+ ]
2960
+ });
2961
+ }
2962
+
2731
2963
  // src/client/board.js
2732
2964
  var PROJECT_RECHECK_MS = 3e4;
2733
2965
  function BoardBody(props) {
2734
2966
  const { sessionId, getSessions, getUiWorkspace, useSessionStatus, callRemote, t } = props;
2735
- return (0, import_react7.createElement)(BoardPanel, {
2967
+ return (0, import_react8.createElement)(BoardPanel, {
2736
2968
  sessionId,
2737
2969
  getSessions,
2738
2970
  getUiWorkspace,
@@ -2764,13 +2996,13 @@ function sameStatuses(left, right) {
2764
2996
  return true;
2765
2997
  }
2766
2998
  function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
2767
- const [snapshots, setSnapshots] = (0, import_react7.useState)(() => /* @__PURE__ */ new Map());
2768
- const retention = (0, import_react7.useRef)(void 0);
2769
- const latest = (0, import_react7.useRef)(getSessions);
2999
+ const [snapshots, setSnapshots] = (0, import_react8.useState)(() => /* @__PURE__ */ new Map());
3000
+ const retention = (0, import_react8.useRef)(void 0);
3001
+ const latest = (0, import_react8.useRef)(getSessions);
2770
3002
  latest.current = getSessions;
2771
- const parent = (0, import_react7.useRef)(parentSessionId);
3003
+ const parent = (0, import_react8.useRef)(parentSessionId);
2772
3004
  parent.current = parentSessionId;
2773
- const parentsNow = (0, import_react7.useMemo)(() => {
3005
+ const parentsNow = (0, import_react8.useMemo)(() => {
2774
3006
  const table = /* @__PURE__ */ new Map();
2775
3007
  for (const card of cards) {
2776
3008
  const creator = typeof card.createdBy === "string" && card.createdBy !== "" ? card.createdBy : void 0;
@@ -2783,10 +3015,10 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
2783
3015
  }
2784
3016
  return table;
2785
3017
  }, [cards]);
2786
- const parents = (0, import_react7.useRef)(parentsNow);
3018
+ const parents = (0, import_react8.useRef)(parentsNow);
2787
3019
  parents.current = parentsNow;
2788
- const neededKey = (0, import_react7.useMemo)(() => [...parentsNow.keys()].sort().join("\n"), [parentsNow]);
2789
- const needed = (0, import_react7.useMemo)(
3020
+ const neededKey = (0, import_react8.useMemo)(() => [...parentsNow.keys()].sort().join("\n"), [parentsNow]);
3021
+ const needed = (0, import_react8.useMemo)(
2790
3022
  () => new Set(neededKey === "" ? [] : neededKey.split("\n")),
2791
3023
  [neededKey]
2792
3024
  );
@@ -2841,13 +3073,13 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
2841
3073
  }
2842
3074
  });
2843
3075
  }
2844
- (0, import_react7.useEffect)(() => {
3076
+ (0, import_react8.useEffect)(() => {
2845
3077
  retention.current.sync(needed);
2846
3078
  }, [needed]);
2847
- (0, import_react7.useEffect)(() => () => {
3079
+ (0, import_react8.useEffect)(() => () => {
2848
3080
  retention.current.dispose();
2849
3081
  }, []);
2850
- return (0, import_react7.useMemo)(() => {
3082
+ return (0, import_react8.useMemo)(() => {
2851
3083
  const merged = /* @__PURE__ */ new Map();
2852
3084
  for (const sessionId of needed) {
2853
3085
  merged.set(sessionId, mergeSessionState(
@@ -2860,22 +3092,22 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
2860
3092
  }
2861
3093
  function BoardEmpty({ allDone, projectName }) {
2862
3094
  const whose = projectName === void 0 ? "\u672C\u9879\u76EE" : `\u300C${projectName}\u300D`;
2863
- return (0, import_react7.createElement)(
3095
+ return (0, import_react8.createElement)(
2864
3096
  "div",
2865
3097
  { className: "dsh-leader-agent-board-empty" },
2866
- (0, import_react7.createElement)(
3098
+ (0, import_react8.createElement)(
2867
3099
  "div",
2868
3100
  {
2869
3101
  className: allDone ? "dsh-leader-agent-board-empty-icon dsh-leader-agent-board-empty-icon-success" : "dsh-leader-agent-board-empty-icon"
2870
3102
  },
2871
3103
  allDone ? productIcon("check-circle-outline", { size: 24 }) : productIcon("checklist-outline", { size: 24 })
2872
3104
  ),
2873
- (0, import_react7.createElement)(
3105
+ (0, import_react8.createElement)(
2874
3106
  "div",
2875
3107
  { className: "dsh-leader-agent-board-empty-title" },
2876
3108
  allDone ? "\u5168\u90E8\u5B8C\u6210" : "\u8FD8\u6CA1\u6709\u5361\u7247"
2877
3109
  ),
2878
- (0, import_react7.createElement)(
3110
+ (0, import_react8.createElement)(
2879
3111
  "div",
2880
3112
  { className: "dsh-leader-agent-board-empty-hint" },
2881
3113
  allDone ? `${whose}\u7684\u5361\u7247\u90FD\u5DF2\u5B8C\u6210` : "leader \u8C03\u7528 create_card \u540E\uFF0C\u5361\u7247\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC"
@@ -2883,41 +3115,49 @@ function BoardEmpty({ allDone, projectName }) {
2883
3115
  );
2884
3116
  }
2885
3117
  function BoardSkeleton() {
2886
- return (0, import_react7.createElement)(
3118
+ return (0, import_react8.createElement)(
2887
3119
  "div",
2888
3120
  { className: "dsh-leader-agent-board-list" },
2889
- (0, import_react7.createElement)(
3121
+ (0, import_react8.createElement)(
2890
3122
  "div",
2891
3123
  { className: "dsh-leader-agent-board-group" },
2892
- (0, import_react7.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
2893
- (0, import_react7.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
2894
- (0, import_react7.createElement)("div", { className: "dsh-leader-agent-board-skeleton" })
3124
+ (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
3125
+ (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
3126
+ (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" })
2895
3127
  )
2896
3128
  );
2897
3129
  }
2898
3130
  function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus, callRemote, t }) {
2899
- const [project, setProject] = (0, import_react7.useState)(void 0);
2900
- const [resolved, setResolved] = (0, import_react7.useState)(false);
2901
- const [worker, setWorker] = (0, import_react7.useState)(void 0);
2902
- const [cards, setCards] = (0, import_react7.useState)(() => []);
2903
- const [projectError, setProjectError] = (0, import_react7.useState)(null);
2904
- const [cardsError, setCardsError] = (0, import_react7.useState)(null);
2905
- const [slotLabels, setSlotLabels] = (0, import_react7.useState)(() => ({}));
2906
- const [loaded, setLoaded] = (0, import_react7.useState)(false);
2907
- const [detail, setDetail] = (0, import_react7.useState)(null);
2908
- const [doneOpen, setDoneOpen] = (0, import_react7.useState)(false);
2909
- const [doneWatermark, setDoneWatermark] = (0, import_react7.useState)(0);
2910
- const [now, setNow] = (0, import_react7.useState)(() => Date.now());
2911
- (0, import_react7.useEffect)(() => {
3131
+ const [project, setProject] = (0, import_react8.useState)(void 0);
3132
+ const [resolved, setResolved] = (0, import_react8.useState)(false);
3133
+ const [worker, setWorker] = (0, import_react8.useState)(void 0);
3134
+ const [cards, setCards] = (0, import_react8.useState)(() => []);
3135
+ const [projectError, setProjectError] = (0, import_react8.useState)(null);
3136
+ const [cardsError, setCardsError] = (0, import_react8.useState)(null);
3137
+ const [slotLabels, setSlotLabels] = (0, import_react8.useState)(() => ({}));
3138
+ const [loaded, setLoaded] = (0, import_react8.useState)(false);
3139
+ const [detail, setDetail] = (0, import_react8.useState)(null);
3140
+ const [pendingDelete, setPendingDelete] = (0, import_react8.useState)(null);
3141
+ const [deleteBusy, setDeleteBusy] = (0, import_react8.useState)(false);
3142
+ const [deleteError, setDeleteError] = (0, import_react8.useState)("");
3143
+ const deletedCardIds = (0, import_react8.useRef)(/* @__PURE__ */ new Set());
3144
+ const [doneOpen, setDoneOpen] = (0, import_react8.useState)(false);
3145
+ const [doneWatermark, setDoneWatermark] = (0, import_react8.useState)(0);
3146
+ const [now, setNow] = (0, import_react8.useState)(() => Date.now());
3147
+ (0, import_react8.useEffect)(() => {
2912
3148
  ensureBoardStyles();
2913
3149
  }, []);
2914
- (0, import_react7.useEffect)(() => {
3150
+ (0, import_react8.useEffect)(() => {
3151
+ setPendingDelete(null);
3152
+ setDeleteError("");
3153
+ }, [project?.id]);
3154
+ (0, import_react8.useEffect)(() => {
2915
3155
  const timer = setInterval(() => {
2916
3156
  setNow(Date.now());
2917
3157
  }, 6e4);
2918
3158
  return () => clearInterval(timer);
2919
3159
  }, []);
2920
- (0, import_react7.useEffect)(() => {
3160
+ (0, import_react8.useEffect)(() => {
2921
3161
  let cancelled = false;
2922
3162
  setProjectError(null);
2923
3163
  setResolved(false);
@@ -2925,6 +3165,9 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
2925
3165
  setLoaded(false);
2926
3166
  setWorker(void 0);
2927
3167
  setSlotLabels({});
3168
+ setPendingDelete(null);
3169
+ setDeleteError("");
3170
+ deletedCardIds.current.clear();
2928
3171
  const load = () => {
2929
3172
  resolveBoardAccess(callRemote, sessionId).then((access) => {
2930
3173
  if (cancelled) return;
@@ -2958,13 +3201,16 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
2958
3201
  window.removeEventListener("focus", onFocus);
2959
3202
  };
2960
3203
  }, [sessionId, callRemote]);
2961
- (0, import_react7.useEffect)(() => {
3204
+ (0, import_react8.useEffect)(() => {
2962
3205
  if (!isBoardViewable(project, sessionId, worker)) return void 0;
2963
3206
  let cancelled = false;
2964
3207
  const refresh = () => {
2965
3208
  fetchBoardCards(callRemote, project.id).then((next) => {
2966
3209
  if (cancelled) return;
2967
- setCards((current2) => mergeCardSnapshot(current2, next));
3210
+ setCards((current2) => {
3211
+ const merged = mergeCardSnapshot(current2, next);
3212
+ return deletedCardIds.current.size === 0 ? merged : merged.filter((card) => !deletedCardIds.current.has(card.id));
3213
+ });
2968
3214
  setLoaded(true);
2969
3215
  setCardsError(null);
2970
3216
  }).catch((cause) => {
@@ -2986,7 +3232,7 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
2986
3232
  }, [project, worker, callRemote, sessionId]);
2987
3233
  const cardList = cards;
2988
3234
  const states = useSlotStates(cardList, getSessions, useSessionStatus, sessionId);
2989
- const { active, done } = (0, import_react7.useMemo)(() => ({
3235
+ const { active, done } = (0, import_react8.useMemo)(() => ({
2990
3236
  active: sortActiveCards(
2991
3237
  cardList.filter((card) => card.status === "active"),
2992
3238
  states
@@ -2994,64 +3240,90 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
2994
3240
  done: sortDoneCards(cardList.filter((card) => card.status === "done"))
2995
3241
  }), [cardList, states]);
2996
3242
  const doneFold = foldDoneCards(done, doneWatermark);
2997
- const openSession = (0, import_react7.useCallback)((targetSessionId) => {
3243
+ const openSession = (0, import_react8.useCallback)((targetSessionId) => {
2998
3244
  const uiWorkspace = getUiWorkspace?.();
2999
3245
  if (uiWorkspace === void 0 || uiWorkspace === null) return;
3000
3246
  uiWorkspace.openSession(targetSessionId);
3001
3247
  }, [getUiWorkspace]);
3002
- const openDetail = (0, import_react7.useCallback)((card, anchor) => {
3248
+ const openDetail = (0, import_react8.useCallback)((card, anchor) => {
3003
3249
  setDetail({ card, anchor });
3004
3250
  }, []);
3005
- const cardUpdated = (0, import_react7.useCallback)((updated) => {
3251
+ const cardUpdated = (0, import_react8.useCallback)((updated) => {
3006
3252
  if (updated === null || typeof updated !== "object") return;
3007
3253
  setCards((current2) => mergeCardUpdate(current2, updated));
3008
3254
  setDetail((current2) => mergeDetailCard(current2, updated));
3009
3255
  }, []);
3256
+ const requestDelete = (0, import_react8.useCallback)(() => {
3257
+ setDeleteError("");
3258
+ setPendingDelete(detail?.card ?? null);
3259
+ }, [detail]);
3260
+ const cancelDelete = (0, import_react8.useCallback)(() => {
3261
+ if (deleteBusy) return;
3262
+ setDeleteError("");
3263
+ setPendingDelete(null);
3264
+ }, [deleteBusy]);
3265
+ const confirmDelete = (0, import_react8.useCallback)(async () => {
3266
+ if (deleteBusy || pendingDelete === null) return;
3267
+ setDeleteBusy(true);
3268
+ setDeleteError("");
3269
+ try {
3270
+ await callRemote("deleteCard", [pendingDelete.id]);
3271
+ deletedCardIds.current.add(pendingDelete.id);
3272
+ setCards((current2) => removeCardFromList(current2, pendingDelete.id));
3273
+ setDetail((current2) => current2?.card?.id === pendingDelete.id ? null : current2);
3274
+ setPendingDelete(null);
3275
+ } catch (error) {
3276
+ setDeleteError(`\u5220\u9664\u5931\u8D25\uFF1A${error instanceof Error ? error.message : String(error)}`);
3277
+ } finally {
3278
+ setDeleteBusy(false);
3279
+ }
3280
+ }, [callRemote, deleteBusy, pendingDelete]);
3010
3281
  const view = boardViewState(project, sessionId, worker);
3282
+ const overlays = reconcileBoardOverlays(cards, detail, pendingDelete);
3011
3283
  if (projectError !== null && project === void 0) {
3012
- return (0, import_react7.createElement)(
3284
+ return (0, import_react8.createElement)(
3013
3285
  "div",
3014
3286
  { className: "dsh-leader-agent-board-empty" },
3015
- (0, import_react7.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, projectError)
3287
+ (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, projectError)
3016
3288
  );
3017
3289
  }
3018
3290
  if (view === "no-project") {
3019
- return (0, import_react7.createElement)(
3291
+ return (0, import_react8.createElement)(
3020
3292
  "div",
3021
3293
  { className: "dsh-leader-agent-board-list" },
3022
- resolved ? (0, import_react7.createElement)(
3294
+ resolved ? (0, import_react8.createElement)(
3023
3295
  "div",
3024
3296
  { className: "dsh-leader-agent-board-empty" },
3025
- (0, import_react7.createElement)(
3297
+ (0, import_react8.createElement)(
3026
3298
  "div",
3027
3299
  { className: "dsh-leader-agent-board-empty-title" },
3028
3300
  "\u5F53\u524D\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u9879\u76EE"
3029
3301
  ),
3030
- (0, import_react7.createElement)(
3302
+ (0, import_react8.createElement)(
3031
3303
  "div",
3032
3304
  { className: "dsh-leader-agent-board-empty-hint" },
3033
3305
  "\u770B\u677F\u6309\u9879\u76EE\u7EC4\u7EC7\uFF1A\u5728\u9879\u76EE\u4F1A\u8BDD\uFF08leader \u6216 worker\uFF09\u91CC\u6253\u5F00\u5B83\u3002"
3034
3306
  )
3035
- ) : (0, import_react7.createElement)(BoardSkeleton)
3307
+ ) : (0, import_react8.createElement)(BoardSkeleton)
3036
3308
  );
3037
3309
  }
3038
3310
  if (view === "pending") {
3039
- return (0, import_react7.createElement)(BoardSkeleton);
3311
+ return (0, import_react8.createElement)(BoardSkeleton);
3040
3312
  }
3041
3313
  if (view === "leader-dead" || view === "not-viewable") {
3042
3314
  const leaderDead = view === "leader-dead";
3043
- return (0, import_react7.createElement)(
3315
+ return (0, import_react8.createElement)(
3044
3316
  "div",
3045
3317
  { className: "dsh-leader-agent-board-list" },
3046
- (0, import_react7.createElement)(
3318
+ (0, import_react8.createElement)(
3047
3319
  "div",
3048
3320
  { className: "dsh-leader-agent-board-empty" },
3049
- (0, import_react7.createElement)(
3321
+ (0, import_react8.createElement)(
3050
3322
  "div",
3051
3323
  { className: "dsh-leader-agent-board-empty-title" },
3052
3324
  leaderDead ? "\u8BE5\u9879\u76EE\u7684 leader \u4F1A\u8BDD\u5DF2\u5931\u6548" : "\u770B\u677F\u53EA\u5728\u9879\u76EE\u4F1A\u8BDD\u4E2D\u6253\u5F00"
3053
3325
  ),
3054
- (0, import_react7.createElement)(
3326
+ (0, import_react8.createElement)(
3055
3327
  "div",
3056
3328
  { className: "dsh-leader-agent-board-empty-hint" },
3057
3329
  leaderDead ? "\u8BF7\u5728\u5DE6\u680F\u9879\u76EE\u533A\u5757\u5BF9\u8BE5\u9879\u76EE\u6362\u65B0 Leader\uFF0C\u518D\u6253\u5F00\u770B\u677F\u3002" : `\u8FD9\u662F\u300C${project.name ?? "\u672C\u9879\u76EE"}\u300D\u6240\u5728\u76EE\u5F55\u91CC\u7684\u666E\u901A\u4F1A\u8BDD\uFF1B\u53BB\u8BE5\u9879\u76EE\u7684 leader \u6216 worker \u4F1A\u8BDD\u67E5\u770B\u4EA4\u4ED8\u770B\u677F\u3002`
@@ -3060,32 +3332,46 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3060
3332
  );
3061
3333
  }
3062
3334
  if (cardsError !== null && cards.length === 0) {
3063
- return (0, import_react7.createElement)(
3335
+ return (0, import_react8.createElement)(
3064
3336
  "div",
3065
3337
  { className: "dsh-leader-agent-board-empty" },
3066
- (0, import_react7.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, cardsError)
3338
+ (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, cardsError)
3067
3339
  );
3068
3340
  }
3069
3341
  if (!loaded) {
3070
- return (0, import_react7.createElement)(BoardSkeleton);
3342
+ return (0, import_react8.createElement)(BoardSkeleton);
3071
3343
  }
3072
3344
  if (cards.length === 0) {
3073
- return (0, import_react7.createElement)(
3345
+ return (0, import_react8.createElement)(
3074
3346
  "div",
3075
3347
  { className: "dsh-leader-agent-board-list" },
3076
- (0, import_react7.createElement)(BoardEmpty, { allDone: false, projectName: project.name })
3348
+ (0, import_react8.createElement)(BoardEmpty, { allDone: false, projectName: project.name })
3077
3349
  );
3078
3350
  }
3079
- return (0, import_react7.createElement)(
3351
+ const deleteDialog = (0, import_react8.createElement)(ConfirmDialog, {
3352
+ open: overlays.pendingDelete !== null,
3353
+ title: "\u5220\u9664\u5361\u7247",
3354
+ description: overlays.pendingDelete === null ? "" : describeCardRemoval(overlays.pendingDelete),
3355
+ confirmLabel: "\u5220\u9664",
3356
+ cancelLabel: "\u53D6\u6D88",
3357
+ danger: true,
3358
+ busy: deleteBusy,
3359
+ error: deleteError,
3360
+ onConfirm: () => {
3361
+ void confirmDelete();
3362
+ },
3363
+ onCancel: cancelDelete
3364
+ });
3365
+ return (0, import_react8.createElement)(
3080
3366
  "div",
3081
3367
  { className: "dsh-leader-agent-board" },
3082
- (0, import_react7.createElement)(
3368
+ (0, import_react8.createElement)(
3083
3369
  "div",
3084
3370
  { className: "dsh-leader-agent-board-list" },
3085
- active.length > 0 ? (0, import_react7.createElement)(
3371
+ active.length > 0 ? (0, import_react8.createElement)(
3086
3372
  "div",
3087
3373
  { className: "dsh-leader-agent-board-group" },
3088
- active.map((card) => (0, import_react7.createElement)(BoardCard, {
3374
+ active.map((card) => (0, import_react8.createElement)(BoardCard, {
3089
3375
  key: card.id,
3090
3376
  card,
3091
3377
  states,
@@ -3096,11 +3382,11 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3096
3382
  onOpenSession: openSession
3097
3383
  }))
3098
3384
  ) : null,
3099
- active.length === 0 ? (0, import_react7.createElement)(BoardEmpty, { allDone: true, projectName: project.name }) : null,
3100
- done.length > 0 ? (0, import_react7.createElement)(
3385
+ active.length === 0 ? (0, import_react8.createElement)(BoardEmpty, { allDone: true, projectName: project.name }) : null,
3386
+ done.length > 0 ? (0, import_react8.createElement)(
3101
3387
  "div",
3102
3388
  { className: "dsh-leader-agent-board-done-section" },
3103
- (0, import_react7.createElement)(
3389
+ (0, import_react8.createElement)(
3104
3390
  "button",
3105
3391
  {
3106
3392
  type: "button",
@@ -3110,7 +3396,7 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3110
3396
  setDoneOpen(!doneOpen);
3111
3397
  }
3112
3398
  },
3113
- (0, import_react7.createElement)(
3399
+ (0, import_react8.createElement)(
3114
3400
  "span",
3115
3401
  {
3116
3402
  className: doneOpen ? "dsh-leader-agent-board-done-chevron dsh-leader-agent-board-done-chevron-open" : "dsh-leader-agent-board-done-chevron"
@@ -3118,12 +3404,12 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3118
3404
  productIcon("chevron-right-outline", { size: 14 })
3119
3405
  ),
3120
3406
  "\u5DF2\u5B8C\u6210",
3121
- (0, import_react7.createElement)("span", { className: "dsh-leader-agent-board-done-count" }, String(done.length))
3407
+ (0, import_react8.createElement)("span", { className: "dsh-leader-agent-board-done-count" }, String(done.length))
3122
3408
  ),
3123
- doneOpen ? (0, import_react7.createElement)(
3409
+ doneOpen ? (0, import_react8.createElement)(
3124
3410
  "div",
3125
3411
  { className: "dsh-leader-agent-board-group" },
3126
- doneFold.rows.map((card) => (0, import_react7.createElement)(BoardCard, {
3412
+ doneFold.rows.map((card) => (0, import_react8.createElement)(BoardCard, {
3127
3413
  key: card.id,
3128
3414
  card,
3129
3415
  states,
@@ -3133,7 +3419,7 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3133
3419
  onOpenDetail: openDetail,
3134
3420
  onOpenSession: openSession
3135
3421
  })),
3136
- doneFold.hiddenCount === 0 && !doneFold.expanded ? null : (0, import_react7.createElement)(
3422
+ doneFold.hiddenCount === 0 && !doneFold.expanded ? null : (0, import_react8.createElement)(
3137
3423
  "button",
3138
3424
  {
3139
3425
  type: "button",
@@ -3155,20 +3441,22 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
3155
3441
  ) : null
3156
3442
  ) : null
3157
3443
  ),
3158
- detail === null ? null : (0, import_react7.createElement)(CardDetail, {
3159
- card: detail.card,
3444
+ overlays.detail === null || overlays.pendingDelete !== null ? null : (0, import_react8.createElement)(CardDetail, {
3445
+ card: overlays.detail.card,
3160
3446
  onClose: () => {
3161
3447
  setDetail(null);
3162
3448
  },
3163
3449
  callRemote,
3164
3450
  onUpdated: cardUpdated,
3165
- restoreFocus: detail.anchor
3166
- })
3451
+ onDelete: requestDelete,
3452
+ restoreFocus: overlays.detail.anchor
3453
+ }),
3454
+ deleteDialog
3167
3455
  );
3168
3456
  }
3169
3457
 
3170
3458
  // src/client/board-guide-entry.js
3171
- var import_react8 = require("react");
3459
+ var import_react9 = require("react");
3172
3460
 
3173
3461
  // src/shared/projects.js
3174
3462
  var PROJECT_REMOTE_SERVICE_KEY = "dsh-leader-agentProjects";
@@ -3186,7 +3474,8 @@ var PROJECT_REMOTE_METHODS = Object.freeze({
3186
3474
  boardCards: Object.freeze({ projectId: "string" }),
3187
3475
  projectSlots: Object.freeze({ projectId: "string" }),
3188
3476
  detachSession: Object.freeze({ sessionId: "string" }),
3189
- updateCardLinks: Object.freeze({ id: "string", links: "links" })
3477
+ updateCardLinks: Object.freeze({ id: "string", links: "links" }),
3478
+ deleteCard: Object.freeze({ id: "string" })
3190
3479
  });
3191
3480
 
3192
3481
  // src/client/project-remote.js
@@ -3417,11 +3706,11 @@ function mountProjectBoardMonitor({
3417
3706
  // src/client/board-guide-entry.js
3418
3707
  function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, callRemote }) {
3419
3708
  const { tab } = useTabInfo();
3420
- const [visible, setVisible] = (0, import_react8.useState)(false);
3421
- (0, import_react8.useEffect)(() => {
3709
+ const [visible, setVisible] = (0, import_react9.useState)(false);
3710
+ (0, import_react9.useEffect)(() => {
3422
3711
  ensureBoardStyles();
3423
3712
  }, []);
3424
- (0, import_react8.useEffect)(() => {
3713
+ (0, import_react9.useEffect)(() => {
3425
3714
  let cancelled = false;
3426
3715
  const check = async () => {
3427
3716
  try {
@@ -3451,7 +3740,7 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
3451
3740
  };
3452
3741
  }, [sessionId, callRemote]);
3453
3742
  if (!visible) return null;
3454
- return (0, import_react8.createElement)(
3743
+ return (0, import_react9.createElement)(
3455
3744
  "button",
3456
3745
  {
3457
3746
  type: "button",
@@ -3463,16 +3752,16 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
3463
3752
  tab.actions.openTab(BOARD_TAB_KIND, { replaceTab: true });
3464
3753
  }
3465
3754
  },
3466
- (0, import_react8.createElement)(
3755
+ (0, import_react9.createElement)(
3467
3756
  "span",
3468
3757
  { className: "dsh-leader-agent-guide-entry-icon" },
3469
3758
  productIcon("checklist-outline", { size: description === void 0 ? 22 : 26 })
3470
3759
  ),
3471
- (0, import_react8.createElement)(
3760
+ (0, import_react9.createElement)(
3472
3761
  "span",
3473
3762
  { className: "dsh-leader-agent-guide-entry-text" },
3474
- (0, import_react8.createElement)("span", { className: "dsh-leader-agent-guide-entry-title" }, title),
3475
- description === void 0 ? null : (0, import_react8.createElement)("span", { className: "dsh-leader-agent-guide-entry-description" }, description)
3763
+ (0, import_react9.createElement)("span", { className: "dsh-leader-agent-guide-entry-title" }, title),
3764
+ description === void 0 ? null : (0, import_react9.createElement)("span", { className: "dsh-leader-agent-guide-entry-description" }, description)
3476
3765
  )
3477
3766
  );
3478
3767
  }
@@ -3482,7 +3771,7 @@ var import_react11 = require("react");
3482
3771
  var import_react_dom3 = require("react-dom");
3483
3772
 
3484
3773
  // src/client/project-section.js
3485
- var import_react9 = require("react");
3774
+ var import_react10 = require("react");
3486
3775
  var import_react_dom2 = require("react-dom");
3487
3776
  var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
3488
3777
 
@@ -3692,13 +3981,20 @@ var STYLE_TEXT3 = `
3692
3981
  flex-direction: column;
3693
3982
  padding-right: var(--dsh-session-list-edge-inset, 0px);
3694
3983
  }
3984
+ /* \u5C0F\u8282\u6807\u9898\u7684\u5DE6\u5185\u8FB9\u8DDD\u4E0E\u9AD8\u5EA6\u7167\u5BBF\u4E3B 0.2.2 \u7684 sectionHeader\uFF1A--dsh-sidebar-row-padding
3985
+ \uFF080.2.1 \u6CA1\u6709\u8FD9\u4E2A\u53D8\u91CF\uFF0C\u9000\u56DE\u90A3\u7248\u7684 4px\uFF09\u4E0E 36px\u3002\u4E0A\u4E0B\u5916\u8FB9\u8DDD\u662F\u672C\u533A\u5757\u81EA\u5DF1\u7684\u53D6\u503C\u2014\u2014
3986
+ \u5BBF\u4E3B\u90A3\u4EFD\u662F margin-top \u65E0\u3001margin-bottom \u53D6 --workspace-toolbar-gap = 0px\uFF0C
3987
+ \u8FD9\u91CC\u7684 2/4 \u7559\u7684\u662F\u4E0E\u4E0B\u65B9\u5217\u8868\u7684\u95F4\u8DDD\u3002
3988
+ \u6807\u7B7E\u5FC5\u987B\u662F\u8FD9\u4E00\u884C\u7684\u7B2C\u4E00\u4E2A\u5185\u5BB9\u2014\u2014\u5BBF\u4E3B\u7684\u300C\u5DE5\u4F5C\u533A\u300D\u6807\u9898\u4ECE\u5185\u8FB9\u8DDD\u5904\u8D77\u6392\uFF0C\u524D\u9762\u591A\u4E00\u4E2A
3989
+ \u56FE\u6807\u69FD\u5C31\u4F1A\u628A\u300C\u9879\u76EE\u300D\u63A8\u53F3\u5341\u51E0\u50CF\u7D20\uFF080.2.2 \u5B9E\u6D4B 32 vs 19\uFF09\uFF1B\u6536\u8D77\u7BAD\u5934\u653E\u5728\u6807\u7B7E\u4E4B\u540E\uFF0C
3990
+ \u60AC\u505C\u624D\u51FA\u73B0\u3002 */
3695
3991
  .dsh-leader-agent-project-header {
3696
3992
  display: flex;
3697
3993
  align-items: center;
3698
3994
  gap: 4px;
3699
3995
  height: 36px;
3700
- padding-left: 4px;
3701
- margin-bottom: 4px;
3996
+ padding-left: var(--dsh-sidebar-row-padding, 4px);
3997
+ margin: 2px 0 4px;
3702
3998
  box-sizing: border-box;
3703
3999
  color: var(--dsw-alias-label-tertiary);
3704
4000
  }
@@ -3743,19 +4039,28 @@ var STYLE_TEXT3 = `
3743
4039
  }
3744
4040
  }
3745
4041
  /* \u9879\u76EE\u884C\u4E4B\u95F4\u7559 2px \u95F4\u8DDD\uFF0C\u7167\u5BBF\u4E3B\u5DE5\u4F5C\u533A\u6811\u7684\u300CgroupSection \u76F4\u63A5\u5B50\u5143\u7D20\u76F8\u90BB\u300D\u89C4\u5219\u3002
3746
- \u884C\u9AD8 34px\u3001\u80CC\u666F\u94FA\u6EE1\u6574\u884C\uFF0C\u884C\u95F4\u4E0D\u7559\u7F1D\u65F6\u4E0A\u4E0B\u4E24\u884C\u7684 hover \u5E95\u8272\u4F1A\u8D34\u7740\u62FC\u6210\u4E00\u6574\u5757\u3002 */
4042
+ \u884C\u9AD8 32px\uFF080.2.2 \u7684 projectRow/sessionRow\uFF09\u3001\u80CC\u666F\u94FA\u6EE1\u6574\u884C\uFF0C\u884C\u95F4\u4E0D\u7559\u7F1D\u65F6\u4E0A\u4E0B
4043
+ \u4E24\u884C\u7684 hover \u5E95\u8272\u4F1A\u8D34\u7740\u62FC\u6210\u4E00\u6574\u5757\u3002 */
3747
4044
  .dsh-leader-agent-project-list > * + * {
3748
4045
  margin-top: 2px;
3749
4046
  }
3750
4047
  .dsh-leader-agent-project-block {
3751
4048
  position: relative;
3752
4049
  }
4050
+ /* \u51E0\u4F55\u9010\u9879\u7167 0.2.2 \u7684\u5B98\u65B9\u5DE5\u4F5C\u533A\u884C\uFF08Rows.module.css \u7684 projectRow\uFF09\uFF1A\u884C\u9AD8 32\u3001
4051
+ \u900F\u660E\u8FB9\u6846\u5403\u6389 paint-inset\u3001padding-inline-start \u53EA\u7559 row_padding \u4E0E\u5B83\u7684\u5DEE\u3002
4052
+ \u65E7\u5199\u6CD5\u662F padding: 0 8px\uFF0C0.2.2 \u4E0A\u5185\u5BB9\u6BD4\u5BBF\u4E3B\u884C\u9760\u5DE6 4px\u3001hover \u5E95\u8272\u4E5F\u591A\u94FA 3px\uFF0C
4053
+ \u4E0E\u300C\u5DE5\u4F5C\u533A\u300D\u884C\u53CA\u672C\u533A\u5757\u81EA\u5DF1\u7684\u4F1A\u8BDD\u884C\u90FD\u5BF9\u4E0D\u9F50\u30020.2.1 \u6CA1\u6709\u8FD9\u51E0\u4E2A\u53D8\u91CF\uFF0C\u9000\u56DE
4054
+ 8px / \u65E0\u8FB9\u6846\uFF0C\u6B63\u662F\u90A3\u7248\u786C\u7F16\u7801\u7684\u51E0\u4F55\u3002 */
3753
4055
  .dsh-leader-agent-project-row {
3754
4056
  display: flex;
3755
4057
  align-items: center;
3756
4058
  gap: 6px;
3757
- height: 34px;
4059
+ height: 32px;
3758
4060
  padding: 0 8px;
4061
+ padding-inline-start: calc(var(--dsh-sidebar-row-padding, 8px) - var(--dsh-sidebar-paint-inset, 0px));
4062
+ border-inline: var(--dsh-sidebar-paint-inset, 0px) solid transparent;
4063
+ background-clip: padding-box;
3759
4064
  box-sizing: border-box;
3760
4065
  border-radius: var(--dsw-radius-md);
3761
4066
  color: var(--dsw-alias-label-primary);
@@ -3819,7 +4124,7 @@ var STYLE_TEXT3 = `
3819
4124
  }
3820
4125
  /* \u884C\u9996\u69FD\u4F4D\uFF1A\u9ED8\u8BA4\u5E94\u7528\u683C\u5B50\u56FE\u6807\uFF08\u9879\u76EE\u884C\u5C31\u662F leader \u4F1A\u8BDD\u7684\u5165\u53E3\uFF09\uFF0C\u60AC\u505C\u6574\u884C\u65F6\u6362\u6210\u5C55\u5F00\u7BAD\u5934
3821
4126
  \uFF08\u4E0E\u5B98\u65B9\u5DE5\u4F5C\u533A\u884C\u540C\u6B3E\uFF09\u3002\u91CC\u9762\u7684\u56FE\u6807\u4E0E\u52A0\u8F7D\u5708\u90FD\u662F SVG\uFF1A\u4E0D\u628A\u8FD9\u5C42\u6491\u6210 flex \u7684\u8BDD\uFF0C
3822
- SVG \u6309\u884C\u76D2\u57FA\u7EBF\u6392\uFF0C\u5708\u4F1A\u6BD4\u884C\u4E2D\u5FC3\u9AD8 1.5px\uFF0834px \u884C\u5B9E\u6D4B\uFF09\u3002\u7C7B\u540D\u6CBF\u7528 -folder \u540E\u7F00\uFF1A
4127
+ SVG \u6309\u884C\u76D2\u57FA\u7EBF\u6392\uFF0C\u5708\u4F1A\u6BD4\u884C\u4E2D\u5FC3\u9AD8 1.5px\uFF08\u884C\u76D2\u5B9E\u6D4B\uFF09\u3002\u7C7B\u540D\u6CBF\u7528 -folder \u540E\u7F00\uFF1A
3823
4128
  \u69FD\u4F4D\u4F4D\u7F6E\u4E0E\u5BBF\u4E3B\u5DE5\u4F5C\u533A\u884C\u7684\u76EE\u5F55\u56FE\u6807\u540C\u6E90\uFF0C\u6539\u5B57\u5F62\u4E0D\u6539\u69FD\u4F4D\u3002 */
3824
4129
  .dsh-leader-agent-project-lead-folder {
3825
4130
  display: inline-flex;
@@ -3862,9 +4167,6 @@ var STYLE_TEXT3 = `
3862
4167
  .dsh-leader-agent-project-header:hover .dsh-leader-agent-project-lead-arrow {
3863
4168
  display: inline-flex;
3864
4169
  }
3865
- .dsh-leader-agent-project-header:hover .dsh-leader-agent-project-lead-folder {
3866
- display: none;
3867
- }
3868
4170
  }
3869
4171
  @media (prefers-reduced-motion: reduce) {
3870
4172
  .dsh-leader-agent-project-lead-arrow {
@@ -4002,9 +4304,9 @@ var STYLE_TEXT3 = `
4002
4304
  }
4003
4305
  /* \u4F1A\u8BDD\u884C\u9010\u9879\u7167\u5B98\u65B9\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u884C\uFF08\u5BBF\u4E3B Rows.module.css \u7684 sessionRow \u4E0E
4004
4306
  sessionRow \u4E0B\u7684 title\uFF09\uFF1A\u884C\u9AD8 32\u3001\u884C\u5185\u4E0D\u8BBE gap\uFF08\u6807\u9898\u81EA\u5E26\u5DE6\u53F3\u5916\u8FB9\u8DDD\uFF09\u3001\u6587\u5B57\u7528
4005
- \u4E00\u7EA7\u6807\u7B7E\u8272\u3002\u5DE6\u53F3\u5185\u8FB9\u8DDD\u7167\u5B98\u65B9\u4E24\u4EE3\u5199\u6CD5\uFF1A0.2.2 \u8D77\u884C\u7528\u900F\u660E\u8FB9\u6846\u5403\u6389 paint-inset\u3001
4006
- padding \u53EA\u7559 row_padding \u4E0E\u5B83\u7684\u5DEE\uFF0Chover \u80CC\u666F\u624D\u4F1A\u6BD4\u5185\u5BB9\u7A84\u4E00\u5708\uFF1Brc.2 \u8FD9\u4E24\u4E2A\u53D8\u91CF
4007
- \u90FD\u4E0D\u5B58\u5728\uFF0C\u843D\u5230 8 / 0\uFF0C\u4E0E\u90A3\u7248\u786C\u7F16\u7801\u7684 8px \u4E00\u81F4\u3002 */
4307
+ \u4E00\u7EA7\u6807\u7B7E\u8272\u3002\u5185\u8FB9\u8DDD\u7167\u5B98\u65B9\u4E24\u4EE3\u5199\u6CD5\uFF1A0.2.2 \u8D77\u884C\u7528\u900F\u660E\u8FB9\u6846\u5403\u6389 paint-inset\u3001
4308
+ padding-inline-start \u53EA\u7559 row_padding \u4E0E\u5B83\u7684\u5DEE\uFF08\u53F3\u4FA7\u4ECD\u662F 8\uFF09\uFF0Chover \u80CC\u666F\u624D\u4F1A\u6BD4
4309
+ \u5185\u5BB9\u7A84\u4E00\u5708\uFF1B0.2.1 \u8FD9\u4E24\u4E2A\u53D8\u91CF\u90FD\u4E0D\u5B58\u5728\uFF0C\u843D\u5230 8 / 0\uFF0C\u4E0E\u90A3\u7248\u786C\u7F16\u7801\u7684 8px \u4E00\u81F4\u3002 */
4008
4310
  .dsh-leader-agent-session-row {
4009
4311
  display: flex;
4010
4312
  align-items: center;
@@ -4012,7 +4314,8 @@ var STYLE_TEXT3 = `
4012
4314
  height: 32px;
4013
4315
  border-inline: var(--dsh-sidebar-paint-inset, 0px) solid transparent;
4014
4316
  background-clip: padding-box;
4015
- padding: 0 calc(var(--dsh-sidebar-row-padding, 8px) - var(--dsh-sidebar-paint-inset, 0px));
4317
+ padding: 0 8px;
4318
+ padding-inline-start: calc(var(--dsh-sidebar-row-padding, 8px) - var(--dsh-sidebar-paint-inset, 0px));
4016
4319
  box-sizing: border-box;
4017
4320
  border-radius: var(--dsw-radius-md);
4018
4321
  color: var(--dsw-alias-label-primary);
@@ -4153,13 +4456,13 @@ function ProjectSection(props) {
4153
4456
  currentSessionId,
4154
4457
  onReorder
4155
4458
  } = props;
4156
- (0, import_react9.useEffect)(() => {
4459
+ (0, import_react10.useEffect)(() => {
4157
4460
  ensureStyles2();
4158
4461
  }, []);
4159
- const [draggingId, setDraggingId] = (0, import_react9.useState)(null);
4160
- const dragIdRef = (0, import_react9.useRef)(null);
4161
- const [dropTarget, setDropTarget] = (0, import_react9.useState)(null);
4162
- const projectIds = (0, import_react9.useMemo)(() => projects.map((project) => project.id), [projects]);
4462
+ const [draggingId, setDraggingId] = (0, import_react10.useState)(null);
4463
+ const dragIdRef = (0, import_react10.useRef)(null);
4464
+ const [dropTarget, setDropTarget] = (0, import_react10.useState)(null);
4465
+ const projectIds = (0, import_react10.useMemo)(() => projects.map((project) => project.id), [projects]);
4163
4466
  const beginDrag = (projectId) => {
4164
4467
  dragIdRef.current = projectId;
4165
4468
  setDraggingId(projectId);
@@ -4183,13 +4486,13 @@ function ProjectSection(props) {
4183
4486
  listExpanded,
4184
4487
  projectCount: projects.length
4185
4488
  });
4186
- return (0, import_react9.createElement)(
4489
+ return (0, import_react10.createElement)(
4187
4490
  "div",
4188
4491
  { className: "dsh-leader-agent-project-section" },
4189
- (0, import_react9.createElement)(
4492
+ (0, import_react10.createElement)(
4190
4493
  "div",
4191
4494
  { className: "dsh-leader-agent-project-header" },
4192
- (0, import_react9.createElement)(
4495
+ (0, import_react10.createElement)(
4193
4496
  "button",
4194
4497
  {
4195
4498
  type: "button",
@@ -4198,15 +4501,11 @@ function ProjectSection(props) {
4198
4501
  title: listExpanded ? "\u6536\u8D77\u9879\u76EE\u5217\u8868" : "\u5C55\u5F00\u9879\u76EE\u5217\u8868",
4199
4502
  onClick: onToggleList
4200
4503
  },
4201
- (0, import_react9.createElement)(
4504
+ (0, import_react10.createElement)("span", { className: "dsh-leader-agent-project-header-label" }, "\u9879\u76EE"),
4505
+ (0, import_react10.createElement)(
4202
4506
  "span",
4203
4507
  { className: "dsh-leader-agent-project-lead" },
4204
- (0, import_react9.createElement)(
4205
- "span",
4206
- { className: "dsh-leader-agent-project-lead-folder" },
4207
- productIcon("folder-open-outline", { size: 16 })
4208
- ),
4209
- (0, import_react9.createElement)(
4508
+ (0, import_react10.createElement)(
4210
4509
  "span",
4211
4510
  {
4212
4511
  className: "dsh-leader-agent-project-lead-arrow",
@@ -4214,13 +4513,12 @@ function ProjectSection(props) {
4214
4513
  },
4215
4514
  productIcon("triangle-right-fill", { size: 14 })
4216
4515
  )
4217
- ),
4218
- (0, import_react9.createElement)("span", { className: "dsh-leader-agent-project-header-label" }, "\u9879\u76EE")
4516
+ )
4219
4517
  ),
4220
- (0, import_react9.createElement)(
4518
+ (0, import_react10.createElement)(
4221
4519
  "div",
4222
4520
  { className: "dsh-leader-agent-project-header-actions" },
4223
- (0, import_react9.createElement)(
4521
+ (0, import_react10.createElement)(
4224
4522
  "button",
4225
4523
  {
4226
4524
  type: "button",
@@ -4233,20 +4531,20 @@ function ProjectSection(props) {
4233
4531
  )
4234
4532
  )
4235
4533
  ),
4236
- layout.status === "" ? null : (0, import_react9.createElement)(
4534
+ layout.status === "" ? null : (0, import_react10.createElement)(
4237
4535
  "div",
4238
4536
  { className: "dsh-leader-agent-project-notice" },
4239
4537
  layout.status
4240
4538
  ),
4241
- layout.showEmpty ? (0, import_react9.createElement)(
4539
+ layout.showEmpty ? (0, import_react10.createElement)(
4242
4540
  "div",
4243
4541
  { className: "dsh-leader-agent-project-notice" },
4244
4542
  "\u8FD8\u6CA1\u6709\u9879\u76EE\u3002\u52A0\u4E00\u4E2A\u5373\u5728\u5B83\u7684\u76EE\u5F55\u91CC\u5EFA\u597D leader \u4F1A\u8BDD\u3002"
4245
4543
  ) : null,
4246
- layout.showList ? (0, import_react9.createElement)(
4544
+ layout.showList ? (0, import_react10.createElement)(
4247
4545
  "div",
4248
4546
  { className: "dsh-leader-agent-project-list" },
4249
- projects.map((project) => (0, import_react9.createElement)(ProjectRow, {
4547
+ projects.map((project) => (0, import_react10.createElement)(ProjectRow, {
4250
4548
  key: project.id,
4251
4549
  project,
4252
4550
  busy,
@@ -4276,11 +4574,11 @@ function ProjectSection(props) {
4276
4574
  ) : null,
4277
4575
  // 目录名当不了项目名时才出现:这时直接提交只会换回一条没有出口的报错——
4278
4576
  // 项目没建成,列表里就没有那一行,行上的「重命名」也不存在。
4279
- naming === null || naming === void 0 ? null : (0, import_react9.createElement)(
4577
+ naming === null || naming === void 0 ? null : (0, import_react10.createElement)(
4280
4578
  "div",
4281
4579
  { className: "dsh-leader-agent-project-draft" },
4282
- (0, import_react9.createElement)("div", { className: "dsh-leader-agent-project-draft-directory" }, naming.directory),
4283
- (0, import_react9.createElement)("input", {
4580
+ (0, import_react10.createElement)("div", { className: "dsh-leader-agent-project-draft-directory" }, naming.directory),
4581
+ (0, import_react10.createElement)("input", {
4284
4582
  type: "text",
4285
4583
  className: "dsh-leader-agent-project-rename",
4286
4584
  value: naming.name,
@@ -4291,21 +4589,21 @@ function ProjectSection(props) {
4291
4589
  if (event.key === "Escape") onCancelNaming();
4292
4590
  }
4293
4591
  }),
4294
- (0, import_react9.createElement)(
4592
+ (0, import_react10.createElement)(
4295
4593
  "div",
4296
4594
  { style: { display: "flex", gap: "4px" } },
4297
- (0, import_react9.createElement)(
4595
+ (0, import_react10.createElement)(
4298
4596
  "button",
4299
4597
  { type: "button", disabled: busy, className: "dsh-leader-agent-project-draft-action", onClick: onConfirmNaming },
4300
4598
  "\u5EFA\u9879\u76EE"
4301
4599
  ),
4302
- (0, import_react9.createElement)(
4600
+ (0, import_react10.createElement)(
4303
4601
  "button",
4304
4602
  { type: "button", className: "dsh-leader-agent-project-draft-action", onClick: onCancelNaming },
4305
4603
  "\u53D6\u6D88"
4306
4604
  )
4307
4605
  ),
4308
- naming.error === "" || naming.error === void 0 ? null : (0, import_react9.createElement)("div", { className: "dsh-leader-agent-project-notice" }, naming.error)
4606
+ naming.error === "" || naming.error === void 0 ? null : (0, import_react10.createElement)("div", { className: "dsh-leader-agent-project-notice" }, naming.error)
4309
4607
  )
4310
4608
  );
4311
4609
  }
@@ -4338,15 +4636,15 @@ function ProjectRow(props) {
4338
4636
  onDropOn,
4339
4637
  onDragFinish
4340
4638
  } = props;
4341
- const [menuOpen, setMenuOpen] = (0, import_react9.useState)(false);
4342
- const [renaming, setRenaming] = (0, import_react9.useState)(false);
4343
- const [name, setName] = (0, import_react9.useState)(project.name);
4344
- const [renameError, setRenameError] = (0, import_react9.useState)("");
4345
- const [menuAnchor, setMenuAnchor] = (0, import_react9.useState)(null);
4346
- const moreRef = (0, import_react9.useRef)(null);
4347
- const leadRef = (0, import_react9.useRef)(null);
4639
+ const [menuOpen, setMenuOpen] = (0, import_react10.useState)(false);
4640
+ const [renaming, setRenaming] = (0, import_react10.useState)(false);
4641
+ const [name, setName] = (0, import_react10.useState)(project.name);
4642
+ const [renameError, setRenameError] = (0, import_react10.useState)("");
4643
+ const [menuAnchor, setMenuAnchor] = (0, import_react10.useState)(null);
4644
+ const moreRef = (0, import_react10.useRef)(null);
4645
+ const leadRef = (0, import_react10.useRef)(null);
4348
4646
  const openable = isProjectOpenable(project);
4349
- (0, import_react9.useEffect)(() => {
4647
+ (0, import_react10.useEffect)(() => {
4350
4648
  if (!menuOpen) return void 0;
4351
4649
  const onDismiss = () => setMenuOpen(false);
4352
4650
  const onKeyDown = (event) => {
@@ -4382,20 +4680,20 @@ function ProjectRow(props) {
4382
4680
  rows: childSessions,
4383
4681
  leaderRunning: isLeaderRunning(project, sessionRows, archivedSessionIds)
4384
4682
  });
4385
- const [watermark, setWatermark] = (0, import_react9.useState)(0);
4683
+ const [watermark, setWatermark] = (0, import_react10.useState)(0);
4386
4684
  const folded = foldSessions(childSessions, watermark, currentSessionId);
4387
4685
  const menuItems = buildProjectMenuItems(project, {
4388
4686
  onRename: () => setRenaming(true),
4389
4687
  onReplace,
4390
4688
  onRemove
4391
4689
  });
4392
- return (0, import_react9.createElement)(
4690
+ return (0, import_react10.createElement)(
4393
4691
  "div",
4394
4692
  {
4395
4693
  className: "dsh-leader-agent-project-block",
4396
4694
  "data-drop": dropHalf
4397
4695
  },
4398
- (0, import_react9.createElement)(
4696
+ (0, import_react10.createElement)(
4399
4697
  "div",
4400
4698
  {
4401
4699
  className: "dsh-leader-agent-project-row",
@@ -4432,7 +4730,7 @@ function ProjectRow(props) {
4432
4730
  onOpen(project);
4433
4731
  }
4434
4732
  },
4435
- (0, import_react9.createElement)(
4733
+ (0, import_react10.createElement)(
4436
4734
  "button",
4437
4735
  {
4438
4736
  type: "button",
@@ -4445,12 +4743,12 @@ function ProjectRow(props) {
4445
4743
  onToggleExpand(project.id);
4446
4744
  }
4447
4745
  },
4448
- (0, import_react9.createElement)(
4746
+ (0, import_react10.createElement)(
4449
4747
  "span",
4450
4748
  { className: "dsh-leader-agent-project-lead-folder" },
4451
- leadActivity ? (0, import_react9.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : productIcon("apps-add-outline", { size: 16 })
4749
+ leadActivity ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : productIcon("apps-add-outline", { size: 16 })
4452
4750
  ),
4453
- (0, import_react9.createElement)(
4751
+ (0, import_react10.createElement)(
4454
4752
  "span",
4455
4753
  {
4456
4754
  className: "dsh-leader-agent-project-lead-arrow",
@@ -4459,7 +4757,7 @@ function ProjectRow(props) {
4459
4757
  productIcon("triangle-right-fill", { size: 14 })
4460
4758
  )
4461
4759
  ),
4462
- renaming ? (0, import_react9.createElement)("input", {
4760
+ renaming ? (0, import_react10.createElement)("input", {
4463
4761
  type: "text",
4464
4762
  className: "dsh-leader-agent-project-rename",
4465
4763
  value: name,
@@ -4478,15 +4776,15 @@ function ProjectRow(props) {
4478
4776
  setRenaming(false);
4479
4777
  }
4480
4778
  }
4481
- }) : (0, import_react9.createElement)(
4779
+ }) : (0, import_react10.createElement)(
4482
4780
  "span",
4483
4781
  { className: "dsh-leader-agent-project-title" },
4484
4782
  project.name
4485
4783
  ),
4486
- (0, import_react9.createElement)(
4784
+ (0, import_react10.createElement)(
4487
4785
  "div",
4488
4786
  { className: "dsh-leader-agent-project-actions" },
4489
- openable ? null : (0, import_react9.createElement)(
4787
+ openable ? null : (0, import_react10.createElement)(
4490
4788
  "button",
4491
4789
  {
4492
4790
  type: "button",
@@ -4500,7 +4798,7 @@ function ProjectRow(props) {
4500
4798
  },
4501
4799
  productIcon("refresh-outline")
4502
4800
  ),
4503
- (0, import_react9.createElement)(
4801
+ (0, import_react10.createElement)(
4504
4802
  "button",
4505
4803
  {
4506
4804
  type: "button",
@@ -4525,20 +4823,20 @@ function ProjectRow(props) {
4525
4823
  )
4526
4824
  ),
4527
4825
  // 校验失败的原因跟着输入框留在行下:提示条五秒后消失,用户要照着它改。
4528
- renaming && renameError !== "" ? (0, import_react9.createElement)(
4826
+ renaming && renameError !== "" ? (0, import_react10.createElement)(
4529
4827
  "div",
4530
4828
  { className: "dsh-leader-agent-project-notice" },
4531
4829
  renameError
4532
4830
  ) : null,
4533
- expanded ? (0, import_react9.createElement)(
4831
+ expanded ? (0, import_react10.createElement)(
4534
4832
  "div",
4535
4833
  { className: "dsh-leader-agent-project-sessions" },
4536
- childSessions.length === 0 ? (0, import_react9.createElement)(
4834
+ childSessions.length === 0 ? (0, import_react10.createElement)(
4537
4835
  "div",
4538
4836
  { className: "dsh-leader-agent-project-notice" },
4539
4837
  "\u8BE5\u9879\u76EE\u4E0B\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"
4540
4838
  ) : [
4541
- ...folded.rows.map((row) => (0, import_react9.createElement)(SessionRow, {
4839
+ ...folded.rows.map((row) => (0, import_react10.createElement)(SessionRow, {
4542
4840
  key: row.id,
4543
4841
  row,
4544
4842
  selected: row.id === currentSessionId,
@@ -4546,7 +4844,7 @@ function ProjectRow(props) {
4546
4844
  onArchiveSession,
4547
4845
  busy
4548
4846
  })),
4549
- folded.hiddenCount === 0 && !folded.expanded ? null : (0, import_react9.createElement)(
4847
+ folded.hiddenCount === 0 && !folded.expanded ? null : (0, import_react10.createElement)(
4550
4848
  "button",
4551
4849
  {
4552
4850
  key: "overflow",
@@ -4569,7 +4867,7 @@ function ProjectRow(props) {
4569
4867
  ]
4570
4868
  ) : null,
4571
4869
  menuOpen && menuAnchor !== null ? (0, import_react_dom2.createPortal)(
4572
- (0, import_react9.createElement)(ProjectMenu, {
4870
+ (0, import_react10.createElement)(ProjectMenu, {
4573
4871
  anchor: menuAnchor,
4574
4872
  items: menuItems,
4575
4873
  onClose: () => setMenuOpen(false)
@@ -4580,14 +4878,14 @@ function ProjectRow(props) {
4580
4878
  }
4581
4879
  function ProjectMenu(props) {
4582
4880
  const { anchor, items, onClose } = props;
4583
- const ref = (0, import_react9.useRef)(null);
4584
- const [placement, setPlacement] = (0, import_react9.useState)({ left: anchor.left, top: anchor.bottom + 4 });
4585
- (0, import_react9.useLayoutEffect)(() => {
4881
+ const ref = (0, import_react10.useRef)(null);
4882
+ const [placement, setPlacement] = (0, import_react10.useState)({ left: anchor.left, top: anchor.bottom + 4 });
4883
+ (0, import_react10.useLayoutEffect)(() => {
4586
4884
  const height = ref.current?.offsetHeight ?? 0;
4587
4885
  const fitsBelow = anchor.bottom + 4 + height <= window.innerHeight - 12;
4588
4886
  setPlacement(fitsBelow ? { left: anchor.left, top: anchor.bottom + 4 } : { left: anchor.left, top: Math.max(12, anchor.top - height - 4) });
4589
4887
  }, [anchor]);
4590
- return (0, import_react9.createElement)(
4888
+ return (0, import_react10.createElement)(
4591
4889
  "div",
4592
4890
  {
4593
4891
  ref,
@@ -4597,7 +4895,7 @@ function ProjectMenu(props) {
4597
4895
  style: { left: `${placement.left}px`, top: `${placement.top}px` },
4598
4896
  onClick: (event) => event.stopPropagation()
4599
4897
  },
4600
- items.map((item) => (0, import_react9.createElement)(
4898
+ items.map((item) => (0, import_react10.createElement)(
4601
4899
  "button",
4602
4900
  {
4603
4901
  key: item.id,
@@ -4610,18 +4908,18 @@ function ProjectMenu(props) {
4610
4908
  item.onSelect();
4611
4909
  }
4612
4910
  },
4613
- item.icon === void 0 ? null : (0, import_react9.createElement)(
4911
+ item.icon === void 0 ? null : (0, import_react10.createElement)(
4614
4912
  "span",
4615
4913
  { className: "dsh-leader-agent-project-menu-icon" },
4616
4914
  productIcon(item.icon, { size: 14 })
4617
4915
  ),
4618
- (0, import_react9.createElement)("span", null, item.label)
4916
+ (0, import_react10.createElement)("span", null, item.label)
4619
4917
  ))
4620
4918
  );
4621
4919
  }
4622
4920
  function SessionRow(props) {
4623
4921
  const { row, selected, onOpenSession, onArchiveSession, busy } = props;
4624
- return (0, import_react9.createElement)(
4922
+ return (0, import_react10.createElement)(
4625
4923
  "div",
4626
4924
  {
4627
4925
  className: "dsh-leader-agent-session-row",
@@ -4632,20 +4930,20 @@ function SessionRow(props) {
4632
4930
  // 行没有官方那套悬停卡,完成状态拼进行标题里当唯一提示。
4633
4931
  title: `${row.displayTitle ?? row.title ?? row.id}${row.completed === true ? " \xB7 \u5DF2\u5B8C\u6210\uFF0C\u5F85\u67E5\u770B" : ""}`
4634
4932
  },
4635
- (0, import_react9.createElement)(
4933
+ (0, import_react10.createElement)(
4636
4934
  "span",
4637
4935
  { className: "dsh-leader-agent-session-status" },
4638
- row.running ? (0, import_react9.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : row.completed === true ? (0, import_react9.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "done" }) : null
4936
+ row.running ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : row.completed === true ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "done" }) : null
4639
4937
  ),
4640
- (0, import_react9.createElement)(
4938
+ (0, import_react10.createElement)(
4641
4939
  "span",
4642
4940
  { className: "dsh-leader-agent-session-title" },
4643
4941
  row.title ?? row.displayTitle ?? row.id
4644
4942
  ),
4645
- (0, import_react9.createElement)(
4943
+ (0, import_react10.createElement)(
4646
4944
  "div",
4647
4945
  { className: "dsh-leader-agent-session-actions" },
4648
- (0, import_react9.createElement)(
4946
+ (0, import_react10.createElement)(
4649
4947
  "button",
4650
4948
  {
4651
4949
  type: "button",
@@ -5021,47 +5319,6 @@ function createWorkspaceExclusion() {
5021
5319
  };
5022
5320
  }
5023
5321
 
5024
- // src/client/confirm-dialog.js
5025
- var import_react10 = require("react");
5026
- function ConfirmDialog({
5027
- open,
5028
- title,
5029
- description,
5030
- confirmLabel,
5031
- cancelLabel,
5032
- danger = false,
5033
- busy = false,
5034
- error = "",
5035
- onConfirm,
5036
- onCancel
5037
- }) {
5038
- return (0, import_react10.createElement)(ModalShell, {
5039
- open,
5040
- onClose: onCancel,
5041
- title,
5042
- closeLabel: cancelLabel,
5043
- description,
5044
- children: error === "" ? null : (0, import_react10.createElement)("div", { className: "dsh-leader-agent-modal-error", role: "alert" }, error),
5045
- footer: [
5046
- (0, import_react10.createElement)("button", {
5047
- key: "cancel",
5048
- type: "button",
5049
- className: "dsh-leader-agent-modal-button dsh-leader-agent-modal-button-outline",
5050
- disabled: busy,
5051
- onClick: onCancel
5052
- }, cancelLabel),
5053
- (0, import_react10.createElement)("button", {
5054
- key: "confirm",
5055
- type: "button",
5056
- "data-modal-autofocus": "",
5057
- className: `dsh-leader-agent-modal-button dsh-leader-agent-modal-button-outline${danger ? " dsh-leader-agent-modal-button-danger" : ""}`,
5058
- disabled: busy,
5059
- onClick: onConfirm
5060
- }, confirmLabel)
5061
- ]
5062
- });
5063
- }
5064
-
5065
5322
  // src/client/project-panel.js
5066
5323
  var PROJECT_REFRESH_INTERVAL_MS = 5e3;
5067
5324
  function ProjectPanel(props) {
@@ -5590,11 +5847,19 @@ function ProjectPanel(props) {
5590
5847
  function findSidebarRoot(anchor) {
5591
5848
  let node = anchor.parentElement;
5592
5849
  while (node !== null) {
5593
- if (node.querySelector(":scope > nav") !== null) return node;
5850
+ if (node.querySelector("nav") !== null) return node;
5594
5851
  node = node.parentElement;
5595
5852
  }
5596
5853
  return null;
5597
5854
  }
5855
+ function placementSpot(root, nav) {
5856
+ if (nav.parentElement === root) {
5857
+ return { parent: root, before: nav.nextElementSibling };
5858
+ }
5859
+ const region = nav.nextElementSibling;
5860
+ if (region === null) return null;
5861
+ return { parent: region, before: region.firstElementChild };
5862
+ }
5598
5863
  function SidebarPlacement(props) {
5599
5864
  const anchorRef = (0, import_react11.useRef)(null);
5600
5865
  const [container, setContainer] = (0, import_react11.useState)(null);
@@ -5603,12 +5868,14 @@ function SidebarPlacement(props) {
5603
5868
  if (anchor === null) return void 0;
5604
5869
  const root = findSidebarRoot(anchor);
5605
5870
  if (root === null) return void 0;
5606
- const nav = root.querySelector(":scope > nav");
5871
+ const nav = root.querySelector("nav");
5607
5872
  if (nav === null) return void 0;
5873
+ const spot = placementSpot(root, nav);
5874
+ if (spot === null) return void 0;
5608
5875
  const host = document.createElement("div");
5609
5876
  host.setAttribute("data-dsh-leader-agent-projects", "");
5610
5877
  host.style.flex = "none";
5611
- nav.insertAdjacentElement("afterend", host);
5878
+ spot.parent.insertBefore(host, spot.before);
5612
5879
  setContainer(host);
5613
5880
  return () => {
5614
5881
  host.remove();