@arbidocs/blocks 0.5.43 → 0.5.44

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 (91) hide show
  1. package/README.md +14 -0
  2. package/dist/{ConnectedNativeDocxComparison-52KQKJGY.js → ConnectedNativeDocxComparison-4DYPHNY2.js} +6 -6
  3. package/dist/{ConnectedNativeDocxComparison-52KQKJGY.js.map → ConnectedNativeDocxComparison-4DYPHNY2.js.map} +1 -1
  4. package/dist/{ConnectedNativeDocxComparison-UVLZGS2V.cjs → ConnectedNativeDocxComparison-OZE2SPNU.cjs} +7 -7
  5. package/dist/{ConnectedNativeDocxComparison-UVLZGS2V.cjs.map → ConnectedNativeDocxComparison-OZE2SPNU.cjs.map} +1 -1
  6. package/dist/{ConnectedNativeDocxEditor-BRBL3MOV.js → ConnectedNativeDocxEditor-F3EHJKDI.js} +5 -5
  7. package/dist/{ConnectedNativeDocxEditor-BRBL3MOV.js.map → ConnectedNativeDocxEditor-F3EHJKDI.js.map} +1 -1
  8. package/dist/{ConnectedNativeDocxEditor-KHR5I7W6.cjs → ConnectedNativeDocxEditor-MUM6YRPY.cjs} +7 -7
  9. package/dist/{ConnectedNativeDocxEditor-KHR5I7W6.cjs.map → ConnectedNativeDocxEditor-MUM6YRPY.cjs.map} +1 -1
  10. package/dist/{ConnectedStreamedWordArtifact-DSVFI7BX.cjs → ConnectedStreamedWordArtifact-F6M766FG.cjs} +7 -7
  11. package/dist/ConnectedStreamedWordArtifact-F6M766FG.cjs.map +1 -0
  12. package/dist/{ConnectedStreamedWordArtifact-EQUE6WT5.js → ConnectedStreamedWordArtifact-XUWLRRG5.js} +6 -6
  13. package/dist/{ConnectedStreamedWordArtifact-EQUE6WT5.js.map → ConnectedStreamedWordArtifact-XUWLRRG5.js.map} +1 -1
  14. package/dist/WorkspaceTableView-2CGEO5KK.cjs +1 -1
  15. package/dist/WorkspaceTableView-3ARFQYNO.js +1 -1
  16. package/dist/agents/index.cjs +326 -326
  17. package/dist/agents/index.js +4 -4
  18. package/dist/calls/index.cjs +73 -696
  19. package/dist/calls/index.cjs.map +1 -1
  20. package/dist/calls/index.js +10 -666
  21. package/dist/calls/index.js.map +1 -1
  22. package/dist/{chunk-3YZ3RUSB.cjs → chunk-3GHFTAOV.cjs} +4 -4
  23. package/dist/{chunk-3YZ3RUSB.cjs.map → chunk-3GHFTAOV.cjs.map} +1 -1
  24. package/dist/{chunk-6AJJJ5HR.cjs → chunk-5R256EMF.cjs} +671 -3
  25. package/dist/chunk-5R256EMF.cjs.map +1 -0
  26. package/dist/{chunk-EFDZRAW6.js → chunk-CG7EYB3J.js} +3 -3
  27. package/dist/{chunk-EFDZRAW6.js.map → chunk-CG7EYB3J.js.map} +1 -1
  28. package/dist/{chunk-YAGSGBVM.js → chunk-EY4IEOW3.js} +3 -3
  29. package/dist/{chunk-YAGSGBVM.js.map → chunk-EY4IEOW3.js.map} +1 -1
  30. package/dist/{chunk-YD3RN2FY.cjs → chunk-F72ZD5Q2.cjs} +3 -3
  31. package/dist/{chunk-YD3RN2FY.cjs.map → chunk-F72ZD5Q2.cjs.map} +1 -1
  32. package/dist/{chunk-E3IEZMRK.cjs → chunk-FKFGP7MQ.cjs} +18 -18
  33. package/dist/{chunk-E3IEZMRK.cjs.map → chunk-FKFGP7MQ.cjs.map} +1 -1
  34. package/dist/{chunk-WAIHNFUH.js → chunk-G5JENSLN.js} +3 -3
  35. package/dist/{chunk-WAIHNFUH.js.map → chunk-G5JENSLN.js.map} +1 -1
  36. package/dist/{chunk-O3MRE2HL.cjs → chunk-GUV63FUC.cjs} +11 -11
  37. package/dist/{chunk-O3MRE2HL.cjs.map → chunk-GUV63FUC.cjs.map} +1 -1
  38. package/dist/{chunk-REHG7VRQ.js → chunk-H6UK6LGL.js} +4 -4
  39. package/dist/{chunk-REHG7VRQ.js.map → chunk-H6UK6LGL.js.map} +1 -1
  40. package/dist/{chunk-75Z5AUMM.js → chunk-JS7KJRKG.js} +3 -3
  41. package/dist/{chunk-75Z5AUMM.js.map → chunk-JS7KJRKG.js.map} +1 -1
  42. package/dist/{chunk-TPNLYQD2.cjs → chunk-PV5A5SAC.cjs} +5 -5
  43. package/dist/{chunk-TPNLYQD2.cjs.map → chunk-PV5A5SAC.cjs.map} +1 -1
  44. package/dist/{chunk-K53QRFPJ.cjs → chunk-QPDQYZIR.cjs} +4 -4
  45. package/dist/{chunk-K53QRFPJ.cjs.map → chunk-QPDQYZIR.cjs.map} +1 -1
  46. package/dist/{chunk-UZVXVTTB.cjs → chunk-QWSAJNQE.cjs} +9 -9
  47. package/dist/{chunk-UZVXVTTB.cjs.map → chunk-QWSAJNQE.cjs.map} +1 -1
  48. package/dist/{chunk-2QDNQM63.cjs → chunk-T5BCPKU3.cjs} +3 -3
  49. package/dist/{chunk-2QDNQM63.cjs.map → chunk-T5BCPKU3.cjs.map} +1 -1
  50. package/dist/{chunk-X7CXCEGO.js → chunk-T6KAZPOZ.js} +3 -3
  51. package/dist/{chunk-X7CXCEGO.js.map → chunk-T6KAZPOZ.js.map} +1 -1
  52. package/dist/{chunk-4U4NXFV5.js → chunk-TKTNXFAB.js} +666 -9
  53. package/dist/chunk-TKTNXFAB.js.map +1 -0
  54. package/dist/{chunk-FOIDBAZB.js → chunk-TOP5BMS7.js} +3 -3
  55. package/dist/{chunk-FOIDBAZB.js.map → chunk-TOP5BMS7.js.map} +1 -1
  56. package/dist/{chunk-7CHI36EP.js → chunk-VE6DHRXD.js} +3 -3
  57. package/dist/{chunk-7CHI36EP.js.map → chunk-VE6DHRXD.js.map} +1 -1
  58. package/dist/connect/docx.cjs +9 -9
  59. package/dist/connect/docx.js +5 -5
  60. package/dist/connect/index.cjs +1957 -774
  61. package/dist/connect/index.cjs.map +1 -1
  62. package/dist/connect/index.d.ts +1 -0
  63. package/dist/connect/index.js +1667 -487
  64. package/dist/connect/index.js.map +1 -1
  65. package/dist/connect/viewer.cjs +3 -3
  66. package/dist/connect/viewer.js +3 -3
  67. package/dist/connection/ConnectedFilterDropdown.d.ts +6 -0
  68. package/dist/connection/conversation/ConnectedConversation.d.ts +7 -9
  69. package/dist/connection/conversation/ConnectedConversationPage.d.ts +30 -0
  70. package/dist/connection/conversation/SemanticSearchButton.d.ts +12 -0
  71. package/dist/connection/files/imports/ConnectedAccountsImport.d.ts +16 -0
  72. package/dist/connection/files/imports/DriveImportPanel.d.ts +10 -0
  73. package/dist/connection/files/imports/EmailImportPanel.d.ts +21 -0
  74. package/dist/connection/files/imports/ImportHandoff.d.ts +24 -0
  75. package/dist/connection/files/imports/useDriveSyncTrigger.d.ts +11 -0
  76. package/dist/connection/files/imports/useEmailSyncTrigger.d.ts +11 -0
  77. package/dist/connection/files/imports/useImportHandoff.d.ts +20 -0
  78. package/dist/connection/files/index.d.ts +1 -0
  79. package/dist/facts/index.cjs +55 -55
  80. package/dist/facts/index.js +3 -3
  81. package/dist/index.cjs +384 -384
  82. package/dist/index.js +5 -5
  83. package/dist/settings/index.cjs +1 -1
  84. package/dist/settings/index.js +1 -1
  85. package/dist/workflow-canvas/index.cjs +17 -17
  86. package/dist/workflow-canvas/index.js +4 -4
  87. package/node_modules/@arbidocs/coedit/package.json +1 -1
  88. package/package.json +5 -5
  89. package/dist/ConnectedStreamedWordArtifact-DSVFI7BX.cjs.map +0 -1
  90. package/dist/chunk-4U4NXFV5.js.map +0 -1
  91. package/dist/chunk-6AJJJ5HR.cjs.map +0 -1
@@ -5,13 +5,13 @@ var chunkV7JDMKNQ_cjs = require('../chunk-V7JDMKNQ.cjs');
5
5
  var chunkKFQ6E6LE_cjs = require('../chunk-KFQ6E6LE.cjs');
6
6
  var chunkKWJW5TMH_cjs = require('../chunk-KWJW5TMH.cjs');
7
7
  var chunkPSIKUQYM_cjs = require('../chunk-PSIKUQYM.cjs');
8
- var chunkYD3RN2FY_cjs = require('../chunk-YD3RN2FY.cjs');
8
+ var chunkF72ZD5Q2_cjs = require('../chunk-F72ZD5Q2.cjs');
9
9
  var chunkH6K7EWL2_cjs = require('../chunk-H6K7EWL2.cjs');
10
10
  var chunkOU3RGQFX_cjs = require('../chunk-OU3RGQFX.cjs');
11
11
  require('../chunk-UAEYU2NN.cjs');
12
12
  var chunkFEVJA4BP_cjs = require('../chunk-FEVJA4BP.cjs');
13
13
  var chunkK7S5BMAB_cjs = require('../chunk-K7S5BMAB.cjs');
14
- var chunkUZVXVTTB_cjs = require('../chunk-UZVXVTTB.cjs');
14
+ var chunkQWSAJNQE_cjs = require('../chunk-QWSAJNQE.cjs');
15
15
  var chunkGT5FCYV5_cjs = require('../chunk-GT5FCYV5.cjs');
16
16
  var chunkWALADS2S_cjs = require('../chunk-WALADS2S.cjs');
17
17
  var chunk2WLXQGWC_cjs = require('../chunk-2WLXQGWC.cjs');
@@ -24,7 +24,7 @@ require('../chunk-464YPRAE.cjs');
24
24
  require('../chunk-PICGTGEB.cjs');
25
25
  var chunk5FYU7ZIU_cjs = require('../chunk-5FYU7ZIU.cjs');
26
26
  require('../chunk-ZESMRGDV.cjs');
27
- var chunkTPNLYQD2_cjs = require('../chunk-TPNLYQD2.cjs');
27
+ var chunkPV5A5SAC_cjs = require('../chunk-PV5A5SAC.cjs');
28
28
  var chunkC2ECYOPP_cjs = require('../chunk-C2ECYOPP.cjs');
29
29
  var chunkGOWXP5KT_cjs = require('../chunk-GOWXP5KT.cjs');
30
30
  var chunkHV7XHZLW_cjs = require('../chunk-HV7XHZLW.cjs');
@@ -44,9 +44,9 @@ require('../chunk-VLCY46K6.cjs');
44
44
  require('../chunk-D54JXTPG.cjs');
45
45
  var chunkJIOHDVWH_cjs = require('../chunk-JIOHDVWH.cjs');
46
46
  var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
47
- var chunkO3MRE2HL_cjs = require('../chunk-O3MRE2HL.cjs');
47
+ var chunkGUV63FUC_cjs = require('../chunk-GUV63FUC.cjs');
48
48
  var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
49
- var chunk2QDNQM63_cjs = require('../chunk-2QDNQM63.cjs');
49
+ var chunkT5BCPKU3_cjs = require('../chunk-T5BCPKU3.cjs');
50
50
  var chunk3ZLNI7ZA_cjs = require('../chunk-3ZLNI7ZA.cjs');
51
51
  var chunkAQPZ4QMV_cjs = require('../chunk-AQPZ4QMV.cjs');
52
52
  require('../chunk-SIB6C7P7.cjs');
@@ -59,10 +59,7 @@ var chunkLKK52DEY_cjs = require('../chunk-LKK52DEY.cjs');
59
59
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
60
60
  var chunkBYJUI4AT_cjs = require('../chunk-BYJUI4AT.cjs');
61
61
  var chunkCG757WKY_cjs = require('../chunk-CG757WKY.cjs');
62
- var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
63
- var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
64
- var chunkVZOOGA47_cjs = require('../chunk-VZOOGA47.cjs');
65
- var chunk6AJJJ5HR_cjs = require('../chunk-6AJJJ5HR.cjs');
62
+ var chunk5R256EMF_cjs = require('../chunk-5R256EMF.cjs');
66
63
  var chunkEGSSLWNZ_cjs = require('../chunk-EGSSLWNZ.cjs');
67
64
  var chunkHDEOORSV_cjs = require('../chunk-HDEOORSV.cjs');
68
65
  var chunkP6HVJP6Z_cjs = require('../chunk-P6HVJP6Z.cjs');
@@ -70,6 +67,9 @@ var chunkMOIZ2R5X_cjs = require('../chunk-MOIZ2R5X.cjs');
70
67
  var chunkG2BKHCI2_cjs = require('../chunk-G2BKHCI2.cjs');
71
68
  var chunkMEMWZ72Y_cjs = require('../chunk-MEMWZ72Y.cjs');
72
69
  var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
70
+ var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
71
+ var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
72
+ var chunkVZOOGA47_cjs = require('../chunk-VZOOGA47.cjs');
73
73
  var chunkDWWRLKEZ_cjs = require('../chunk-DWWRLKEZ.cjs');
74
74
  var chunkLNYEYR7W_cjs = require('../chunk-LNYEYR7W.cjs');
75
75
  var chunkZ2XZ2D4N_cjs = require('../chunk-Z2XZ2D4N.cjs');
@@ -164,9 +164,9 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
164
164
  if (isMe) openSettings();
165
165
  else openDirectChat?.(user.external_id);
166
166
  };
167
- const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
167
+ const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltip, { children: [
168
168
  /* @__PURE__ */ jsxRuntime.jsx(
169
- chunkTPNLYQD2_cjs.EntityTooltipHeader,
169
+ chunkPV5A5SAC_cjs.EntityTooltipHeader,
170
170
  {
171
171
  lead: /* @__PURE__ */ jsxRuntime.jsxs(
172
172
  ui.Avatar,
@@ -197,13 +197,13 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
197
197
  subtitle: user.email
198
198
  }
199
199
  ),
200
- userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.EntityTooltipSection, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { className: "w-3.5 h-3.5 flex-shrink-0" }), children: [
200
+ userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.EntityTooltipSection, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { className: "w-3.5 h-3.5 flex-shrink-0" }), children: [
201
201
  "Agent of",
202
202
  " ",
203
203
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: ui.getUserDisplayName(agentOwner) })
204
204
  ] }) }),
205
205
  sharedWorkspaces.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
206
- chunkTPNLYQD2_cjs.EntityTooltipSection,
206
+ chunkPV5A5SAC_cjs.EntityTooltipSection,
207
207
  {
208
208
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-3.5 h-3.5 flex-shrink-0" }),
209
209
  heading: "Shared Workspaces",
@@ -234,7 +234,7 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
234
234
  ] })
235
235
  }
236
236
  ),
237
- interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.EntityTooltipHint, { isRuled: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3 h-3" }), children: "Click to send message" })
237
+ interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.EntityTooltipHint, { isRuled: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3 h-3" }), children: "Click to send message" })
238
238
  ] });
239
239
  return /* @__PURE__ */ jsxRuntime.jsx(
240
240
  ui.UserEntity,
@@ -388,7 +388,7 @@ function ConnectedWorkspaceActivity({
388
388
  [feed.data]
389
389
  );
390
390
  return /* @__PURE__ */ jsxRuntime.jsx(
391
- chunkTPNLYQD2_cjs.WorkspaceActivityList,
391
+ chunkPV5A5SAC_cjs.WorkspaceActivityList,
392
392
  {
393
393
  ...listProps,
394
394
  items,
@@ -1553,7 +1553,7 @@ function ConnectedWorkspaceNotificationMenu({
1553
1553
  }, [error, notify18]);
1554
1554
  if (!workspaceId) return null;
1555
1555
  return /* @__PURE__ */ jsxRuntime.jsx(
1556
- chunkTPNLYQD2_cjs.WorkspaceNotificationMenu,
1556
+ chunkPV5A5SAC_cjs.WorkspaceNotificationMenu,
1557
1557
  {
1558
1558
  ...menuProps,
1559
1559
  level,
@@ -1572,7 +1572,7 @@ function ConnectedThreadFollow({
1572
1572
  enabled: live
1573
1573
  });
1574
1574
  if (!conversationId) return null;
1575
- const Control = as === "menu-item" ? chunkTPNLYQD2_cjs.ThreadFollowMenuItem : chunkTPNLYQD2_cjs.ThreadFollowButton;
1575
+ const Control = as === "menu-item" ? chunkPV5A5SAC_cjs.ThreadFollowMenuItem : chunkPV5A5SAC_cjs.ThreadFollowButton;
1576
1576
  return /* @__PURE__ */ jsxRuntime.jsx(
1577
1577
  Control,
1578
1578
  {
@@ -1645,7 +1645,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1645
1645
  onChange: (e) => {
1646
1646
  const file = e.target.files?.[0];
1647
1647
  e.target.value = "";
1648
- if (file) void add(() => chunkO3MRE2HL_cjs.importSkillFile(file));
1648
+ if (file) void add(() => chunkGUV63FUC_cjs.importSkillFile(file));
1649
1649
  }
1650
1650
  }
1651
1651
  ),
@@ -1670,7 +1670,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1670
1670
  className: "space-y-2",
1671
1671
  onSubmit: (e) => {
1672
1672
  e.preventDefault();
1673
- if (url.trim()) void add(() => chunkO3MRE2HL_cjs.importSkillFromUrl(url));
1673
+ if (url.trim()) void add(() => chunkGUV63FUC_cjs.importSkillFromUrl(url));
1674
1674
  },
1675
1675
  children: [
1676
1676
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -1733,9 +1733,9 @@ function ConnectedSkillsLibrary({
1733
1733
  const [type, setType] = React9.useState("all");
1734
1734
  const [view, setView] = React9.useState("gallery");
1735
1735
  const [isBusy, setIsBusy] = React9.useState(false);
1736
- const all = React9.useMemo(() => chunkO3MRE2HL_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1736
+ const all = React9.useMemo(() => chunkGUV63FUC_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1737
1737
  const shown = React9.useMemo(
1738
- () => chunkO3MRE2HL_cjs.filterLibrarySkills(all, { query, source, type }),
1738
+ () => chunkGUV63FUC_cjs.filterLibrarySkills(all, { query, source, type }),
1739
1739
  [all, query, source, type]
1740
1740
  );
1741
1741
  const current = all.find((s) => s.slug === selected) ?? null;
@@ -1746,21 +1746,21 @@ function ConnectedSkillsLibrary({
1746
1746
  const count2 = (s) => all.filter((x) => x.source === s).length;
1747
1747
  const sourceOptions = [
1748
1748
  { id: "all", label: "All", count: all.length },
1749
- { id: "builtin", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.builtin, count: count2("builtin") },
1750
- { id: "mine", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.mine, count: count2("mine") },
1751
- { id: "shared", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.shared, count: count2("shared") }
1749
+ { id: "builtin", label: chunkGUV63FUC_cjs.SKILL_SOURCE_LABELS.builtin, count: count2("builtin") },
1750
+ { id: "mine", label: chunkGUV63FUC_cjs.SKILL_SOURCE_LABELS.mine, count: count2("mine") },
1751
+ { id: "shared", label: chunkGUV63FUC_cjs.SKILL_SOURCE_LABELS.shared, count: count2("shared") }
1752
1752
  ];
1753
1753
  const types = [...new Set(all.map((s) => s.type))];
1754
1754
  const typeOptions = [
1755
1755
  { id: "all", label: "Any kind" },
1756
- ...types.map((t) => ({ id: t, label: chunkO3MRE2HL_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1756
+ ...types.map((t) => ({ id: t, label: chunkGUV63FUC_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1757
1757
  ];
1758
1758
  const pick = (slug) => {
1759
1759
  setSelected(slug);
1760
1760
  setMode("detail");
1761
1761
  };
1762
1762
  const markdownOf = async (skill) => {
1763
- if (!skill.docExtId) return chunkO3MRE2HL_cjs.workflowToSkillMarkdown(skill.workflow);
1763
+ if (!skill.docExtId) return chunkGUV63FUC_cjs.workflowToSkillMarkdown(skill.workflow);
1764
1764
  const response = await arbi.documents.download(skill.docExtId);
1765
1765
  if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
1766
1766
  return response.text();
@@ -1824,7 +1824,7 @@ function ConnectedSkillsLibrary({
1824
1824
  try {
1825
1825
  documentTools.downloadBlob(
1826
1826
  new Blob([await markdownOf(skill)], { type: "text/markdown" }),
1827
- chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME
1827
+ chunkGUV63FUC_cjs.SKILL_MAIN_FILENAME
1828
1828
  );
1829
1829
  } catch (error) {
1830
1830
  notify18(errorText(error, "Could not export the skill"), "error");
@@ -1865,10 +1865,10 @@ function ConnectedSkillsLibrary({
1865
1865
  }
1866
1866
  )
1867
1867
  ] }),
1868
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.SkillViewToggle, { value: view, onChange: setView })
1868
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.SkillViewToggle, { value: view, onChange: setView })
1869
1869
  ] }),
1870
1870
  /* @__PURE__ */ jsxRuntime.jsx(
1871
- chunkO3MRE2HL_cjs.SkillFilterChips,
1871
+ chunkGUV63FUC_cjs.SkillFilterChips,
1872
1872
  {
1873
1873
  label: "Show",
1874
1874
  value: source,
@@ -1877,7 +1877,7 @@ function ConnectedSkillsLibrary({
1877
1877
  }
1878
1878
  ),
1879
1879
  types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1880
- chunkO3MRE2HL_cjs.SkillFilterChips,
1880
+ chunkGUV63FUC_cjs.SkillFilterChips,
1881
1881
  {
1882
1882
  label: "Kind",
1883
1883
  value: type,
@@ -1924,12 +1924,12 @@ function ConnectedSkillsLibrary({
1924
1924
  view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
1925
1925
  ),
1926
1926
  children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
1927
- chunkO3MRE2HL_cjs.SkillTile,
1927
+ chunkGUV63FUC_cjs.SkillTile,
1928
1928
  {
1929
1929
  name: skill.title,
1930
1930
  testId: `skill-tile-${skill.slug}`,
1931
1931
  description: skill.description,
1932
- sourceLabel: skill.isShared ? `${chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS[skill.source],
1932
+ sourceLabel: skill.isShared ? `${chunkGUV63FUC_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkGUV63FUC_cjs.SKILL_SOURCE_LABELS[skill.source],
1933
1933
  type: skill.type,
1934
1934
  icon,
1935
1935
  layout: view,
@@ -1964,7 +1964,7 @@ function ConnectedSkillsLibrary({
1964
1964
  }
1965
1965
  ),
1966
1966
  mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
1967
- chunkO3MRE2HL_cjs.SkillGenerateForm,
1967
+ chunkGUV63FUC_cjs.SkillGenerateForm,
1968
1968
  {
1969
1969
  icon,
1970
1970
  onGenerate: (desc) => {
@@ -1991,11 +1991,11 @@ function ConnectedSkillsLibrary({
1991
1991
  ),
1992
1992
  mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
1993
1993
  mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
1994
- chunkO3MRE2HL_cjs.SkillLibraryDetail,
1994
+ chunkGUV63FUC_cjs.SkillLibraryDetail,
1995
1995
  {
1996
1996
  skill: current,
1997
1997
  icon,
1998
- instructions: current.docExtId ? currentText ? chunkO3MRE2HL_cjs.parseSkillFrontmatter(currentText, chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1998
+ instructions: current.docExtId ? currentText ? chunkGUV63FUC_cjs.parseSkillFrontmatter(currentText, chunkGUV63FUC_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1999
1999
  isLoading: !!current.docExtId && textLoading,
2000
2000
  actions: {
2001
2001
  onRun: () => onRun(current.slug),
@@ -2030,7 +2030,7 @@ function SkillEditor({
2030
2030
  const [seeded, setSeeded] = React9.useState(!isEditing);
2031
2031
  const [nameError, setNameError] = React9.useState(null);
2032
2032
  if (isEditing && !seeded && text2 !== void 0) {
2033
- const parsed = chunkO3MRE2HL_cjs.parseSkillFrontmatter(text2, chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME);
2033
+ const parsed = chunkGUV63FUC_cjs.parseSkillFrontmatter(text2, chunkGUV63FUC_cjs.SKILL_MAIN_FILENAME);
2034
2034
  setDescription(parsed.description ?? "");
2035
2035
  setBody(parsed.content ?? "");
2036
2036
  setSeeded(true);
@@ -2044,15 +2044,15 @@ function SkillEditor({
2044
2044
  notify18("Add a short description.", "error");
2045
2045
  return;
2046
2046
  }
2047
- const slug = chunkO3MRE2HL_cjs.skillSlug(name);
2047
+ const slug = chunkGUV63FUC_cjs.skillSlug(name);
2048
2048
  try {
2049
- await onSave(slug, chunkO3MRE2HL_cjs.serializeSkill({ name: slug, description, body }), isEditing);
2049
+ await onSave(slug, chunkGUV63FUC_cjs.serializeSkill({ name: slug, description, body }), isEditing);
2050
2050
  } catch (err) {
2051
2051
  notify18(errorText(err, "Could not save the skill"), "error");
2052
2052
  }
2053
2053
  };
2054
2054
  return /* @__PURE__ */ jsxRuntime.jsx(
2055
- chunkO3MRE2HL_cjs.SkillEditForm,
2055
+ chunkGUV63FUC_cjs.SkillEditForm,
2056
2056
  {
2057
2057
  name,
2058
2058
  onNameChange: setName,
@@ -2088,9 +2088,9 @@ function ConnectedAgentCreator({
2088
2088
  agent,
2089
2089
  initialName,
2090
2090
  onSaved,
2091
- capabilities = chunkO3MRE2HL_cjs.DEFAULT_AGENT_CAPABILITIES,
2092
- templates = chunkO3MRE2HL_cjs.DEFAULT_AGENT_TEMPLATES,
2093
- types = chunkO3MRE2HL_cjs.DEFAULT_AGENT_TYPES,
2091
+ capabilities = chunkGUV63FUC_cjs.DEFAULT_AGENT_CAPABILITIES,
2092
+ templates = chunkGUV63FUC_cjs.DEFAULT_AGENT_TEMPLATES,
2093
+ types = chunkGUV63FUC_cjs.DEFAULT_AGENT_TYPES,
2094
2094
  canRevokeWorkspaces = false,
2095
2095
  labels
2096
2096
  }) {
@@ -2132,7 +2132,7 @@ function ConnectedAgentCreator({
2132
2132
  const initialValues = React9.useMemo(
2133
2133
  () => ({
2134
2134
  name: agent?.given_name ?? initialName ?? "",
2135
- persona: isEdit ? chunkO3MRE2HL_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
2135
+ persona: isEdit ? chunkGUV63FUC_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
2136
2136
  modelName: String(agents.AGENT_MODEL_NAME ?? ""),
2137
2137
  capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
2138
2138
  type: "builtin",
@@ -2151,7 +2151,7 @@ function ConnectedAgentCreator({
2151
2151
  try {
2152
2152
  let agentExtId = agent?.external_id ?? early?.id ?? "";
2153
2153
  if (!agentExtId) {
2154
- if (!chunkO3MRE2HL_cjs.isValidAgentName(values.name)) {
2154
+ if (!chunkGUV63FUC_cjs.isValidAgentName(values.name)) {
2155
2155
  notify18("Give the agent a name first.", "error");
2156
2156
  return;
2157
2157
  }
@@ -2187,7 +2187,7 @@ function ConnectedAgentCreator({
2187
2187
  title: `agent-${name}`,
2188
2188
  sections: {
2189
2189
  Agents: {
2190
- PERSONA: chunkO3MRE2HL_cjs.composePersona(name, values.persona),
2190
+ PERSONA: chunkGUV63FUC_cjs.composePersona(name, values.persona),
2191
2191
  ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
2192
2192
  ...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
2193
2193
  ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
@@ -2210,7 +2210,7 @@ function ConnectedAgentCreator({
2210
2210
  };
2211
2211
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2212
2212
  /* @__PURE__ */ jsxRuntime.jsx(
2213
- chunkO3MRE2HL_cjs.AgentCreator,
2213
+ chunkGUV63FUC_cjs.AgentCreator,
2214
2214
  {
2215
2215
  open: ready,
2216
2216
  onOpenChange,
@@ -2226,11 +2226,11 @@ function ConnectedAgentCreator({
2226
2226
  ) : void 0,
2227
2227
  revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
2228
2228
  avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
2229
- chunkO3MRE2HL_cjs.AgentAvatarField,
2229
+ chunkGUV63FUC_cjs.AgentAvatarField,
2230
2230
  {
2231
2231
  picture,
2232
2232
  isBusy: avatarBusy,
2233
- canGenerate: isEdit || chunkO3MRE2HL_cjs.isValidAgentName(values.name),
2233
+ canGenerate: isEdit || chunkGUV63FUC_cjs.isValidAgentName(values.name),
2234
2234
  onGenerate: () => handleGenerateAvatar(values)
2235
2235
  }
2236
2236
  ),
@@ -2282,7 +2282,7 @@ function ConnectedAgentCreator({
2282
2282
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
2283
2283
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
2284
2284
  ] }),
2285
- connect && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
2285
+ connect && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
2286
2286
  ]
2287
2287
  }
2288
2288
  ) })
@@ -2319,7 +2319,7 @@ function ConnectedWorkflowHistory({
2319
2319
  const { openConversation } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
2320
2320
  const { data: runs = [], isLoading } = react.useWorkflowRuns(workflow?.external_id);
2321
2321
  return /* @__PURE__ */ jsxRuntime.jsx(
2322
- chunkO3MRE2HL_cjs.TaskRunsDialog,
2322
+ chunkGUV63FUC_cjs.TaskRunsDialog,
2323
2323
  {
2324
2324
  inline,
2325
2325
  hideHeader,
@@ -2355,14 +2355,14 @@ function ConnectedTaskActivityDialog({
2355
2355
  const activity = react.useConversationActivity(conversationId, { live });
2356
2356
  const { data: agents = [] } = react.useAgents();
2357
2357
  const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
2358
- const { members } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
2358
+ const { members } = chunkQWSAJNQE_cjs.useConnectedWorkspaceRole();
2359
2359
  const renderPerson = React9.useCallback(
2360
2360
  (id) => {
2361
2361
  const isMe = !!id && id === userId;
2362
2362
  const member = members.find((m) => m.user.external_id === id)?.user;
2363
2363
  const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
2364
2364
  const person = { id, label: isMe ? "You" : name || "Someone", isMe };
2365
- return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunk2QDNQM63_cjs.PersonPill, { person });
2365
+ return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkT5BCPKU3_cjs.PersonPill, { person });
2366
2366
  },
2367
2367
  [renderTaskPerson, userId, members]
2368
2368
  );
@@ -2371,7 +2371,7 @@ function ConnectedTaskActivityDialog({
2371
2371
  [agents]
2372
2372
  );
2373
2373
  return /* @__PURE__ */ jsxRuntime.jsx(
2374
- chunkO3MRE2HL_cjs.TaskActivityDialog,
2374
+ chunkGUV63FUC_cjs.TaskActivityDialog,
2375
2375
  {
2376
2376
  open: true,
2377
2377
  onOpenChange: (open) => !open && onClose(),
@@ -2517,7 +2517,7 @@ function useWorkflowThread(workflow, options2 = {}) {
2517
2517
  );
2518
2518
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
2519
2519
  const steps = React9.useMemo(
2520
- () => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) : chunkO3MRE2HL_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
2520
+ () => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) : chunkGUV63FUC_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
2521
2521
  [workflow, conversation?.plan?.steps]
2522
2522
  );
2523
2523
  const activity = react.useConversationActivity(threadId, { live: !!threadId });
@@ -2577,7 +2577,7 @@ function useWorkflowThread(workflow, options2 = {}) {
2577
2577
  criteria: [],
2578
2578
  max_passes: 3,
2579
2579
  documents: [],
2580
- steps: chunkO3MRE2HL_cjs.toPlanSteps(workflow, {
2580
+ steps: chunkGUV63FUC_cjs.toPlanSteps(workflow, {
2581
2581
  inputs: values,
2582
2582
  resolveWorkflow: options2.resolveWorkflow,
2583
2583
  compose: options2.compose
@@ -2664,7 +2664,7 @@ function useWorkflowThread(workflow, options2 = {}) {
2664
2664
  const anyRunning = Object.values(states).some((s) => s.status === "running");
2665
2665
  const needsStart = !threadId || idle && !anyRunning;
2666
2666
  const runError = idle ? conversation?.last_error ?? null : null;
2667
- const view = chunkO3MRE2HL_cjs.useWorkflowView({
2667
+ const view = chunkGUV63FUC_cjs.useWorkflowView({
2668
2668
  steps,
2669
2669
  states,
2670
2670
  inputs,
@@ -2830,7 +2830,7 @@ function WorkflowWordDialog({
2830
2830
  title: title ?? labels.wordTitle,
2831
2831
  size: "xl",
2832
2832
  testId: "workflow-word-dialog",
2833
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkUZVXVTTB_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2833
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQWSAJNQE_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2834
2834
  }
2835
2835
  );
2836
2836
  }
@@ -3152,7 +3152,7 @@ function ConnectedWorkflowRunner({
3152
3152
  );
3153
3153
  };
3154
3154
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
3155
- chunkO3MRE2HL_cjs.WorkflowRunner,
3155
+ chunkGUV63FUC_cjs.WorkflowRunner,
3156
3156
  {
3157
3157
  people,
3158
3158
  ...runnerProps,
@@ -3198,7 +3198,7 @@ function ConnectedWorkflowRunner({
3198
3198
  ) }),
3199
3199
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3200
3200
  /* @__PURE__ */ jsxRuntime.jsx(
3201
- chunkO3MRE2HL_cjs.WorkflowStepBar,
3201
+ chunkGUV63FUC_cjs.WorkflowStepBar,
3202
3202
  {
3203
3203
  run: view,
3204
3204
  levels: chunkEZLZ3MDU_cjs.stepLevels(view.steps),
@@ -3489,7 +3489,7 @@ function ConnectedTagTable({
3489
3489
  const fail2 = (fallback) => (e) => notify18(browser.refusalReason(e, fallback), "error");
3490
3490
  const snapshot2 = (data) => {
3491
3491
  const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
3492
- const bytes = chunkTPNLYQD2_cjs.tagTableDocx(data, {
3492
+ const bytes = chunkPV5A5SAC_cjs.tagTableDocx(data, {
3493
3493
  title,
3494
3494
  nameOf: (id) => people.find((p) => p.value === id)?.label
3495
3495
  });
@@ -3498,7 +3498,7 @@ function ConnectedTagTable({
3498
3498
  return { blob: new Blob([bytes], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }), name };
3499
3499
  };
3500
3500
  return /* @__PURE__ */ jsxRuntime.jsx(
3501
- chunkTPNLYQD2_cjs.TagTable,
3501
+ chunkPV5A5SAC_cjs.TagTable,
3502
3502
  {
3503
3503
  ...props,
3504
3504
  table,
@@ -3539,7 +3539,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
3539
3539
  const [open, setOpen] = React9.useState(false);
3540
3540
  const doctag = docOf(docId)?.doctags?.find((dt) => dt.tag_ext_id === tagId);
3541
3541
  const citations = React9.useMemo(
3542
- () => chunkYD3RN2FY_cjs.toFactCitations(doctag?.citations) ?? [],
3542
+ () => chunkF72ZD5Q2_cjs.toFactCitations(doctag?.citations) ?? [],
3543
3543
  [doctag?.citations]
3544
3544
  );
3545
3545
  const { quoteFor, orderOf } = react.usePassageQuotes(
@@ -3548,7 +3548,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
3548
3548
  const { openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
3549
3549
  const viewingPassageId = react.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
3550
3550
  const id = testId ?? `doctag-passages-${docId}`;
3551
- const refOf = (cited) => chunkYD3RN2FY_cjs.citedVersionRef(cited.doc_ext_id, cited.version, docOf(cited.doc_ext_id)?.current_version);
3551
+ const refOf = (cited) => chunkF72ZD5Q2_cjs.citedVersionRef(cited.doc_ext_id, cited.version, docOf(cited.doc_ext_id)?.current_version);
3552
3552
  const ordered = (cited) => [...cited.chunks].sort((a, b) => {
3553
3553
  const oa = orderOf(a.chunk_id);
3554
3554
  const ob = orderOf(b.chunk_id);
@@ -3579,7 +3579,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
3579
3579
  const doc = docOf(cited.doc_ext_id);
3580
3580
  const passages = ordered(cited);
3581
3581
  return /* @__PURE__ */ jsxRuntime.jsx(
3582
- chunkYD3RN2FY_cjs.FactSourceGroup,
3582
+ chunkF72ZD5Q2_cjs.FactSourceGroup,
3583
3583
  {
3584
3584
  docId: cited.doc_ext_id,
3585
3585
  hasPassages: passages.length > 0,
@@ -3636,9 +3636,9 @@ function GlossaryExport({ labelId, nameOf }) {
3636
3636
  const narrowed = agreements.find((a) => a.id === narrowTo);
3637
3637
  const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
3638
3638
  const download = (format) => {
3639
- const entries = chunkTPNLYQD2_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
3640
- const blob = format === "docx" ? new Blob([chunkTPNLYQD2_cjs.glossaryDocx(entries, { title })], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }) : new Blob([chunkTPNLYQD2_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
3641
- documentTools.downloadBlob(blob, chunkTPNLYQD2_cjs.glossaryFileName(title, format));
3639
+ const entries = chunkPV5A5SAC_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
3640
+ const blob = format === "docx" ? new Blob([chunkPV5A5SAC_cjs.glossaryDocx(entries, { title })], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }) : new Blob([chunkPV5A5SAC_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
3641
+ documentTools.downloadBlob(blob, chunkPV5A5SAC_cjs.glossaryFileName(title, format));
3642
3642
  };
3643
3643
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
3644
3644
  agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -4424,7 +4424,7 @@ var DocumentSharedCell = React9.memo(function DocumentSharedCell2({
4424
4424
  [document2.external_id, onToggle]
4425
4425
  );
4426
4426
  return /* @__PURE__ */ jsxRuntime.jsx(
4427
- chunkTPNLYQD2_cjs.SharedCell,
4427
+ chunkPV5A5SAC_cjs.SharedCell,
4428
4428
  {
4429
4429
  item: document2,
4430
4430
  onToggle: handleToggle,
@@ -5135,7 +5135,7 @@ function KindSection({
5135
5135
  {
5136
5136
  testId: `tags-kind-${kind}`,
5137
5137
  title: ui.tagKindTitle(kind, { plural: true }),
5138
- description: chunkTPNLYQD2_cjs.tagKindDescription(kind),
5138
+ description: chunkPV5A5SAC_cjs.tagKindDescription(kind),
5139
5139
  actions: picker,
5140
5140
  children: [
5141
5141
  browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5146,9 +5146,9 @@ function KindSection({
5146
5146
  children: [
5147
5147
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
5148
5148
  "Extracting ",
5149
- chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase(),
5149
+ chunkPV5A5SAC_cjs.entitiesPhrase().toLowerCase(),
5150
5150
  " from ",
5151
- chunkTPNLYQD2_cjs.documentCount(extractingCount),
5151
+ chunkPV5A5SAC_cjs.documentCount(extractingCount),
5152
5152
  "\u2026"
5153
5153
  ]
5154
5154
  }
@@ -5166,7 +5166,7 @@ function KindSection({
5166
5166
  onOpenDocument: (id) => openDocument(id),
5167
5167
  onOpenFact: ctx.onOpenFact,
5168
5168
  onOpenThread: (id) => openConversation(id),
5169
- labels: chunkTPNLYQD2_cjs.tagTableLabels(kind),
5169
+ labels: chunkPV5A5SAC_cjs.tagTableLabels(kind),
5170
5170
  testId: `tags-table-${kind}`
5171
5171
  }
5172
5172
  )
@@ -5268,12 +5268,12 @@ function TagSection({
5268
5268
  onOpenDocument: (id) => openDocument(id),
5269
5269
  onOpenFact: ctx.onOpenFact,
5270
5270
  onOpenThread: (id) => openConversation(id),
5271
- labels: chunkTPNLYQD2_cjs.tagTableLabels(tag.kind),
5271
+ labels: chunkPV5A5SAC_cjs.tagTableLabels(tag.kind),
5272
5272
  testId: "tags-rows"
5273
5273
  }
5274
5274
  ),
5275
5275
  /* @__PURE__ */ jsxRuntime.jsx(
5276
- chunkTPNLYQD2_cjs.TagDetail,
5276
+ chunkPV5A5SAC_cjs.TagDetail,
5277
5277
  {
5278
5278
  row: detailRow && narrowTagRow(detailRow, ctx.filter.matches),
5279
5279
  fields: schema.data?.fields ?? [],
@@ -5285,10 +5285,10 @@ function TagSection({
5285
5285
  onOpenDocument: (id) => openDocument(id),
5286
5286
  onOpenFact: ctx.onOpenFact,
5287
5287
  onOpenThread: (id) => openConversation(id),
5288
- noteLabel: chunkTPNLYQD2_cjs.tagNoteLabel(tag.kind),
5288
+ noteLabel: chunkPV5A5SAC_cjs.tagNoteLabel(tag.kind),
5289
5289
  noteIsValue: tag.kind === "annotation",
5290
5290
  renderPassages: (d, label) => renderPassages(d.doc_ext_id, label),
5291
- labels: chunkTPNLYQD2_cjs.tagDetailLabels(),
5291
+ labels: chunkPV5A5SAC_cjs.tagDetailLabels(),
5292
5292
  testId: "tags-detail"
5293
5293
  }
5294
5294
  )
@@ -5376,7 +5376,7 @@ function ConnectedTagsPage({
5376
5376
  const onDelete = async (t) => {
5377
5377
  const nested = browser.getChildTags([...tags], t.external_id);
5378
5378
  const uses = browser.tagUseCount(t);
5379
- const n2 = chunkTPNLYQD2_cjs.tagsPageNouns();
5379
+ const n2 = chunkPV5A5SAC_cjs.tagsPageNouns();
5380
5380
  const tagNoun = (count2) => (count2 === 1 ? n2.tag : n2.tags).toLowerCase();
5381
5381
  const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
5382
5382
  const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
@@ -5397,16 +5397,16 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
5397
5397
  try {
5398
5398
  await extract.mutateAsync(docIds);
5399
5399
  notify18(
5400
- `Extracting ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()} from ${chunkTPNLYQD2_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
5400
+ `Extracting ${chunkPV5A5SAC_cjs.entitiesPhrase().toLowerCase()} from ${chunkPV5A5SAC_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
5401
5401
  "info"
5402
5402
  );
5403
5403
  } catch (error) {
5404
- notify18(browser.refusalReason(error, `Could not extract ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()}`), "error");
5404
+ notify18(browser.refusalReason(error, `Could not extract ${chunkPV5A5SAC_cjs.entitiesPhrase().toLowerCase()}`), "error");
5405
5405
  throw error;
5406
5406
  }
5407
5407
  };
5408
5408
  const picker = /* @__PURE__ */ jsxRuntime.jsx(
5409
- chunkTPNLYQD2_cjs.TagPicker,
5409
+ chunkPV5A5SAC_cjs.TagPicker,
5410
5410
  {
5411
5411
  tags: viewTags,
5412
5412
  selectedId: tag?.external_id,
@@ -5420,10 +5420,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
5420
5420
  onOpenTag: openTag,
5421
5421
  onOpenFact
5422
5422
  };
5423
- const n = chunkTPNLYQD2_cjs.tagsPageNouns();
5423
+ const n = chunkPV5A5SAC_cjs.tagsPageNouns();
5424
5424
  const action = view === "person" || view === "organisation" ? {
5425
5425
  label: "Extract",
5426
- title: `Extract ${chunkTPNLYQD2_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
5426
+ title: `Extract ${chunkPV5A5SAC_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
5427
5427
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
5428
5428
  run: () => setExtracting(true),
5429
5429
  testId: "tags-extract-entities"
@@ -5573,7 +5573,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
5573
5573
  }
5574
5574
  ),
5575
5575
  /* @__PURE__ */ jsxRuntime.jsx(
5576
- chunkTPNLYQD2_cjs.ExtractEntitiesDialog,
5576
+ chunkPV5A5SAC_cjs.ExtractEntitiesDialog,
5577
5577
  {
5578
5578
  open: extracting,
5579
5579
  onOpenChange: setExtracting,
@@ -5634,7 +5634,7 @@ function FactSourcesPopover({
5634
5634
  reset();
5635
5635
  }
5636
5636
  };
5637
- const refOf = (docId) => chunkYD3RN2FY_cjs.citedVersionRef(
5637
+ const refOf = (docId) => chunkF72ZD5Q2_cjs.citedVersionRef(
5638
5638
  docId,
5639
5639
  citations.find((d) => d.doc_ext_id === docId)?.version,
5640
5640
  citedDocs?.[docId]?.current_version
@@ -5664,7 +5664,7 @@ function FactSourcesPopover({
5664
5664
  const olderVersion = refOf(docId) !== docId ? refOf(docId).split("@v")[1] : null;
5665
5665
  const cited = passagesOf(docId);
5666
5666
  return /* @__PURE__ */ jsxRuntime.jsx(
5667
- chunkYD3RN2FY_cjs.FactSourceGroup,
5667
+ chunkF72ZD5Q2_cjs.FactSourceGroup,
5668
5668
  {
5669
5669
  docId,
5670
5670
  isViewing,
@@ -5733,8 +5733,8 @@ function FactMarkdownEditor({
5733
5733
  citationContainer,
5734
5734
  "data-testid": dataTestId
5735
5735
  }) {
5736
- const sources = React9.useMemo(() => chunkYD3RN2FY_cjs.toFactCitations(citations) ?? [], [citations]);
5737
- const docIds = chunkYD3RN2FY_cjs.docIdsOf(sources);
5736
+ const sources = React9.useMemo(() => chunkF72ZD5Q2_cjs.toFactCitations(citations) ?? [], [citations]);
5737
+ const docIds = chunkF72ZD5Q2_cjs.docIdsOf(sources);
5738
5738
  const hasSources = docIds.length > 0;
5739
5739
  const { quoteFor, orderOf } = react.usePassageQuotes(
5740
5740
  React9.useMemo(() => sources.filter((d) => d.chunks.length > 0).map((d) => d.doc_ext_id), [sources])
@@ -5753,7 +5753,7 @@ function FactMarkdownEditor({
5753
5753
  const editorRef = React9.useRef(null);
5754
5754
  React9.useEffect(() => {
5755
5755
  if (!editorRef.current) return;
5756
- return chunkYD3RN2FY_cjs.enableFactTableColumnResize(editorRef.current);
5756
+ return chunkF72ZD5Q2_cjs.enableFactTableColumnResize(editorRef.current);
5757
5757
  }, []);
5758
5758
  React9.useEffect(() => {
5759
5759
  if (!editing) return;
@@ -5768,14 +5768,14 @@ function FactMarkdownEditor({
5768
5768
  return () => document.removeEventListener("pointerdown", onPointerDown, true);
5769
5769
  }, [editing]);
5770
5770
  const removeDoc = (docExtId) => {
5771
- const remaining = chunkYD3RN2FY_cjs.withoutDoc(sources, docExtId);
5771
+ const remaining = chunkF72ZD5Q2_cjs.withoutDoc(sources, docExtId);
5772
5772
  if (!remaining) setSourcesOpen(false);
5773
5773
  onChange(value, remaining);
5774
5774
  };
5775
5775
  const citeDocument = (docExtId) => onCiteDocument(docExtId, { toggle: false });
5776
5776
  const handleToggleDoc = (docExtId) => {
5777
5777
  if (docIds.includes(docExtId)) removeDoc(docExtId);
5778
- else onChange(value, chunkYD3RN2FY_cjs.withDoc(sources, docExtId));
5778
+ else onChange(value, chunkF72ZD5Q2_cjs.withDoc(sources, docExtId));
5779
5779
  };
5780
5780
  const expandToggle = /* @__PURE__ */ jsxRuntime.jsx(
5781
5781
  "button",
@@ -5994,7 +5994,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
5994
5994
  const [composing, setComposing] = React9.useState(false);
5995
5995
  const [draft, setDraft] = React9.useState("");
5996
5996
  const [baselineText, setBaselineText] = React9.useState("");
5997
- const [draftDateFields, setDraftDateFields] = React9.useState(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
5997
+ const [draftDateFields, setDraftDateFields] = React9.useState(chunkF72ZD5Q2_cjs.EMPTY_FACT_DATE_FIELDS);
5998
5998
  const [composerError, setComposerError] = React9.useState(null);
5999
5999
  const [editingId, setEditingId] = React9.useState(null);
6000
6000
  const [draftShared, setDraftShared] = React9.useState(false);
@@ -6051,9 +6051,9 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6051
6051
  if (!collector || !picked?.length || !collectingFor || !docBeingCollected) return;
6052
6052
  const docExtId = docBeingCollected;
6053
6053
  const apply = (prev) => {
6054
- let next = chunkYD3RN2FY_cjs.toFactCitations(prev);
6054
+ let next = chunkF72ZD5Q2_cjs.toFactCitations(prev);
6055
6055
  for (const pending of picked) {
6056
- next = chunkYD3RN2FY_cjs.withChunk(next, docExtId, { chunk_id: pending.chunk_id, page: pending.page ?? null });
6056
+ next = chunkF72ZD5Q2_cjs.withChunk(next, docExtId, { chunk_id: pending.chunk_id, page: pending.page ?? null });
6057
6057
  }
6058
6058
  return next ?? [];
6059
6059
  };
@@ -6064,8 +6064,8 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6064
6064
  React9.useEffect(() => {
6065
6065
  if (!collector || !unpicked?.length || !collectingFor) return;
6066
6066
  setDraftCitations((prev) => {
6067
- let next = chunkYD3RN2FY_cjs.toFactCitations(prev);
6068
- for (const chunkId of unpicked) next = chunkYD3RN2FY_cjs.withoutChunk(next, chunkId);
6067
+ let next = chunkF72ZD5Q2_cjs.toFactCitations(prev);
6068
+ for (const chunkId of unpicked) next = chunkF72ZD5Q2_cjs.withoutChunk(next, chunkId);
6069
6069
  return next;
6070
6070
  });
6071
6071
  collector.consumeUnpicked();
@@ -6075,7 +6075,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6075
6075
  setBaselineText("");
6076
6076
  setDraftCitations(null);
6077
6077
  setDraftTagIds([]);
6078
- setDraftDateFields(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
6078
+ setDraftDateFields(chunkF72ZD5Q2_cjs.EMPTY_FACT_DATE_FIELDS);
6079
6079
  setDraftShared(false);
6080
6080
  setDraftConfirmed(true);
6081
6081
  setComposerError(null);
@@ -6089,7 +6089,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6089
6089
  setBaselineText("");
6090
6090
  setDraftCitations(null);
6091
6091
  setDraftTagIds([]);
6092
- setDraftDateFields(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
6092
+ setDraftDateFields(chunkF72ZD5Q2_cjs.EMPTY_FACT_DATE_FIELDS);
6093
6093
  setDraftShared(false);
6094
6094
  setDraftConfirmed(true);
6095
6095
  setComposerError(null);
@@ -6100,7 +6100,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6100
6100
  const content = chunkRC25WMVB_cjs.decodeWhitespaceEntities(draft).trim();
6101
6101
  if (!content) return;
6102
6102
  setComposerError(null);
6103
- const span = chunkYD3RN2FY_cjs.factDateFieldsToSpan(draftDateFields);
6103
+ const span = chunkF72ZD5Q2_cjs.factDateFieldsToSpan(draftDateFields);
6104
6104
  try {
6105
6105
  let saved;
6106
6106
  if (editingId) {
@@ -6138,7 +6138,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6138
6138
  setBaselineText(draft);
6139
6139
  setDraftCitations(saved.citations ?? null);
6140
6140
  setDraftTagIds(saved.tags.map((t) => t.tag_ext_id));
6141
- setDraftDateFields(chunkYD3RN2FY_cjs.factDateSpanToFields(saved.date_start, saved.date_end, saved.timezone));
6141
+ setDraftDateFields(chunkF72ZD5Q2_cjs.factDateSpanToFields(saved.date_start, saved.date_end, saved.timezone));
6142
6142
  setDraftShared(saved.shared ?? false);
6143
6143
  setDraftConfirmed(saved.confirmed ?? true);
6144
6144
  }
@@ -6163,7 +6163,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6163
6163
  setBaselineText(m.text);
6164
6164
  setDraftCitations(m.citations ?? null);
6165
6165
  setDraftTagIds(m.tags.map((t) => t.tag_ext_id));
6166
- setDraftDateFields(chunkYD3RN2FY_cjs.factDateSpanToFields(m.date_start, m.date_end, m.timezone));
6166
+ setDraftDateFields(chunkF72ZD5Q2_cjs.factDateSpanToFields(m.date_start, m.date_end, m.timezone));
6167
6167
  setDraftShared(m.shared ?? false);
6168
6168
  setDraftConfirmed(m.confirmed ?? true);
6169
6169
  setComposerError(null);
@@ -6177,7 +6177,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
6177
6177
  const textChanged = draft.trim() !== baselineText.trim();
6178
6178
  const citationsChanged = JSON.stringify(draftCitations ?? null) !== JSON.stringify(f.citations ?? null);
6179
6179
  const tagsChanged = JSON.stringify([...draftTagIds].sort()) !== JSON.stringify(f.tags.map((t) => t.tag_ext_id).sort());
6180
- const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(chunkYD3RN2FY_cjs.factDateSpanToFields(f.date_start, f.date_end, f.timezone));
6180
+ const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(chunkF72ZD5Q2_cjs.factDateSpanToFields(f.date_start, f.date_end, f.timezone));
6181
6181
  const sharedChanged = draftShared !== (f.shared ?? false);
6182
6182
  const confirmedChanged = draftConfirmed !== (f.confirmed ?? true);
6183
6183
  return textChanged || citationsChanged || tagsChanged || dateChanged || sharedChanged || confirmedChanged;
@@ -6351,7 +6351,7 @@ function useFactFilters(notes, view, chat) {
6351
6351
  const makeTagPicker = React9.useCallback(
6352
6352
  (selected, setSelected, opts) => {
6353
6353
  const applied = new Set(selected);
6354
- return /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactFieldRow, { label: "Labels", children: /* @__PURE__ */ jsxRuntime.jsx(
6354
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkF72ZD5Q2_cjs.FactFieldRow, { label: "Labels", children: /* @__PURE__ */ jsxRuntime.jsx(
6355
6355
  chunkWALADS2S_cjs.FieldLabelsSelect,
6356
6356
  {
6357
6357
  options: labelOptions,
@@ -6542,14 +6542,14 @@ function useFactSelection(notes, gridApiRef, setFactTags, chat) {
6542
6542
  }
6543
6543
  function renderSourcesCell(params) {
6544
6544
  const fact = params.data;
6545
- const count2 = chunkYD3RN2FY_cjs.sourceDocCount(fact);
6545
+ const count2 = chunkF72ZD5Q2_cjs.sourceDocCount(fact);
6546
6546
  if (!fact || count2 === 0) return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\u2014" });
6547
6547
  return /* @__PURE__ */ jsxRuntime.jsxs(
6548
6548
  "button",
6549
6549
  {
6550
6550
  type: "button",
6551
6551
  onClick: () => params.context?.openEdit?.(fact),
6552
- title: chunkYD3RN2FY_cjs.DEFAULT_FACT_COLUMN_LABELS.sourcedFrom(count2),
6552
+ title: chunkF72ZD5Q2_cjs.DEFAULT_FACT_COLUMN_LABELS.sourcedFrom(count2),
6553
6553
  "data-testid": `facts-grid-sources-${fact.external_id}`,
6554
6554
  className: "inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
6555
6555
  children: [
@@ -6606,14 +6606,14 @@ function createFactPageColumns({
6606
6606
  onToggleConfirmed,
6607
6607
  onToggleShared
6608
6608
  }) {
6609
- const columns = chunkYD3RN2FY_cjs.createFactColumns({
6609
+ const columns = chunkF72ZD5Q2_cjs.createFactColumns({
6610
6610
  onToggleInChat,
6611
6611
  isInChat,
6612
6612
  renderHeader: (params, colId) => /* @__PURE__ */ jsxRuntime.jsx(FactHeader, { params, colId }),
6613
6613
  renderRowActions: (fact, params) => {
6614
6614
  const ctx = params.context;
6615
6615
  return /* @__PURE__ */ jsxRuntime.jsx(
6616
- chunkYD3RN2FY_cjs.FactRowActions,
6616
+ chunkF72ZD5Q2_cjs.FactRowActions,
6617
6617
  {
6618
6618
  onEdit: () => ctx?.openEdit?.(fact),
6619
6619
  canEdit: ctx?.canRewrite?.(fact) !== false,
@@ -6743,7 +6743,7 @@ function useFactsGrid({
6743
6743
  );
6744
6744
  const renderFactTags = React9.useCallback(
6745
6745
  (fact, rowHeight) => /* @__PURE__ */ jsxRuntime.jsx(
6746
- chunkYD3RN2FY_cjs.FactLabelsCell,
6746
+ chunkF72ZD5Q2_cjs.FactLabelsCell,
6747
6747
  {
6748
6748
  options: labelOptions,
6749
6749
  selectedIds: fact.tags.map((t) => t.tag_ext_id),
@@ -7392,7 +7392,7 @@ var citedDocIdsCache = /* @__PURE__ */ new WeakMap();
7392
7392
  function citedDocIds(m) {
7393
7393
  const cached = citedDocIdsCache.get(m);
7394
7394
  if (cached) return cached;
7395
- const ids = chunkYD3RN2FY_cjs.docIdsOf(chunkYD3RN2FY_cjs.toFactCitations(m.citations));
7395
+ const ids = chunkF72ZD5Q2_cjs.docIdsOf(chunkF72ZD5Q2_cjs.toFactCitations(m.citations));
7396
7396
  citedDocIdsCache.set(m, ids);
7397
7397
  return ids;
7398
7398
  }
@@ -7493,7 +7493,7 @@ function ConnectedFactsPage({
7493
7493
  const citedDocs = React9.useMemo(() => {
7494
7494
  const wanted = /* @__PURE__ */ new Set([
7495
7495
  ...notes.flatMap((n) => citedDocIds(n)),
7496
- ...chunkYD3RN2FY_cjs.docIdsOf(chunkYD3RN2FY_cjs.toFactCitations(composer.draftCitations))
7496
+ ...chunkF72ZD5Q2_cjs.docIdsOf(chunkF72ZD5Q2_cjs.toFactCitations(composer.draftCitations))
7497
7497
  ]);
7498
7498
  return Object.fromEntries(
7499
7499
  documents.filter((d) => wanted.has(d.external_id)).map((d) => [d.external_id, d])
@@ -7547,7 +7547,7 @@ function ConnectedFactsPage({
7547
7547
  };
7548
7548
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: setFactSection, className: "relative flex h-full flex-col", "data-testid": "facts-page", children: [
7549
7549
  /* @__PURE__ */ jsxRuntime.jsx(
7550
- chunkYD3RN2FY_cjs.FactsToolbar,
7550
+ chunkF72ZD5Q2_cjs.FactsToolbar,
7551
7551
  {
7552
7552
  count: filteredNotes.length,
7553
7553
  hasActiveFilters: filters.hasActiveFilters,
@@ -7576,7 +7576,7 @@ function ConnectedFactsPage({
7576
7576
  onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
7577
7577
  navSlotRef: setNavSlot,
7578
7578
  navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
7579
- chunkTPNLYQD2_cjs.GridRowNavigator,
7579
+ chunkPV5A5SAC_cjs.GridRowNavigator,
7580
7580
  {
7581
7581
  gridApi,
7582
7582
  selectedId: editingId,
@@ -7587,7 +7587,7 @@ function ConnectedFactsPage({
7587
7587
  ) : null,
7588
7588
  showToolbarRow: view !== "smart_search",
7589
7589
  tools: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7590
- view === "table" && /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsFieldsButton, { getGridApi: () => gridApiRef.current }),
7590
+ view === "table" && /* @__PURE__ */ jsxRuntime.jsx(chunkF72ZD5Q2_cjs.FactsFieldsButton, { getGridApi: () => gridApiRef.current }),
7591
7591
  view === "table" && /* @__PURE__ */ jsxRuntime.jsx(
7592
7592
  chunkWALADS2S_cjs.RowDensityControl,
7593
7593
  {
@@ -7608,7 +7608,7 @@ function ConnectedFactsPage({
7608
7608
  }
7609
7609
  ),
7610
7610
  /* @__PURE__ */ jsxRuntime.jsx(
7611
- chunkYD3RN2FY_cjs.FactComposer,
7611
+ chunkF72ZD5Q2_cjs.FactComposer,
7612
7612
  {
7613
7613
  isOpen: composing,
7614
7614
  isEditing: !!editingId,
@@ -7641,7 +7641,7 @@ function ConnectedFactsPage({
7641
7641
  reserveSourcesSpace: view === "gantt" || view === "calendar",
7642
7642
  citationContainer: factSection,
7643
7643
  renderDocumentPicker: (onSelect, selectedIds, onOpen, sourcesToggle, sourcesOpen) => /* @__PURE__ */ jsxRuntime.jsx(
7644
- chunkYD3RN2FY_cjs.FactSourcesRow,
7644
+ chunkF72ZD5Q2_cjs.FactSourcesRow,
7645
7645
  {
7646
7646
  toggle: sourcesToggle,
7647
7647
  picker: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7687,7 +7687,7 @@ function ConnectedFactsPage({
7687
7687
  }
7688
7688
  ),
7689
7689
  dateInput: /* @__PURE__ */ jsxRuntime.jsx(
7690
- chunkYD3RN2FY_cjs.FactDateInput,
7690
+ chunkF72ZD5Q2_cjs.FactDateInput,
7691
7691
  {
7692
7692
  value: composer.draftDateFields,
7693
7693
  onChange: composer.setDraftDateFields,
@@ -7697,13 +7697,13 @@ function ConnectedFactsPage({
7697
7697
  }
7698
7698
  ),
7699
7699
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "scrollbar-subtle flex-1 overflow-y-auto pb-2", children: [
7700
- isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsLoading, {}) : isError ? /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsLoadError, { onRetry: () => refetch() }) : smartSearch ? (
7700
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkF72ZD5Q2_cjs.FactsLoading, {}) : isError ? /* @__PURE__ */ jsxRuntime.jsx(chunkF72ZD5Q2_cjs.FactsLoadError, { onRetry: () => refetch() }) : smartSearch ? (
7701
7701
  // Searches facts only (never documents). Kept before the empty-state guard so the
7702
7702
  // search UI is reachable even in an empty workspace.
7703
7703
  smartSearch({ selectedFactId: editingId, onOpenFact: openFactById })
7704
7704
  ) : notes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-full flex-col items-center justify-center", children: [
7705
7705
  /* @__PURE__ */ jsxRuntime.jsx(
7706
- chunkYD3RN2FY_cjs.FactsEmptyState,
7706
+ chunkF72ZD5Q2_cjs.FactsEmptyState,
7707
7707
  {
7708
7708
  onUseExample: (text2) => {
7709
7709
  composer.setDraft(text2);
@@ -7714,7 +7714,7 @@ function ConnectedFactsPage({
7714
7714
  ),
7715
7715
  emptyStateExtra
7716
7716
  ] }) : view === "calendar" ? /* @__PURE__ */ jsxRuntime.jsx(
7717
- chunkYD3RN2FY_cjs.FactsCalendar,
7717
+ chunkF72ZD5Q2_cjs.FactsCalendar,
7718
7718
  {
7719
7719
  facts: filteredNotes,
7720
7720
  onSelect: (n) => openEditIfAllowed(n),
@@ -7723,7 +7723,7 @@ function ConnectedFactsPage({
7723
7723
  navigatorTotal: filteredNotes.length
7724
7724
  }
7725
7725
  ) : view === "gantt" ? /* @__PURE__ */ jsxRuntime.jsx(
7726
- chunkYD3RN2FY_cjs.FactsGanttPane,
7726
+ chunkF72ZD5Q2_cjs.FactsGanttPane,
7727
7727
  {
7728
7728
  items: ganttItems,
7729
7729
  labelWidth: pageView.labelWidth,
@@ -7773,7 +7773,7 @@ function ConnectedFactsPage({
7773
7773
  )
7774
7774
  ] }),
7775
7775
  selectable && notes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
7776
- chunkYD3RN2FY_cjs.FactsBulkBar,
7776
+ chunkF72ZD5Q2_cjs.FactsBulkBar,
7777
7777
  {
7778
7778
  count: selection.selectedFacts.length,
7779
7779
  onClear: selection.clearSelection,
@@ -10759,13 +10759,13 @@ function ConnectedWorkspaceSettings({
10759
10759
  const [membersExpanded, setMembersExpanded] = React9.useState(false);
10760
10760
  const [shareOpen, setShareOpen] = React9.useState(false);
10761
10761
  if (!workspace) {
10762
- return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
10762
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
10763
10763
  }
10764
10764
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10765
10765
  /* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspacePageFrame, { testId, children: [
10766
10766
  /* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspaceIdentityPanel, { children: [
10767
10767
  /* @__PURE__ */ jsxRuntime.jsx(
10768
- chunkTPNLYQD2_cjs.EntityIdentityBar,
10768
+ chunkPV5A5SAC_cjs.EntityIdentityBar,
10769
10769
  {
10770
10770
  testId: "workspace-identity-bar",
10771
10771
  canEdit: isOwner,
@@ -10782,7 +10782,7 @@ function ConnectedWorkspaceSettings({
10782
10782
  label: "Name",
10783
10783
  value: workspace.name,
10784
10784
  placeholder: "Untitled",
10785
- maxLength: chunkTPNLYQD2_cjs.IDENTITY_NAME_MAX_LENGTH,
10785
+ maxLength: chunkPV5A5SAC_cjs.IDENTITY_NAME_MAX_LENGTH,
10786
10786
  valueClassName: "truncate text-base font-semibold",
10787
10787
  testId: "workspace-home-title",
10788
10788
  hideLabel: true,
@@ -11688,9 +11688,9 @@ function ConnectedWorkspaceEntity({
11688
11688
  );
11689
11689
  const documentCount2 = (workspace.shared_document_count ?? 0) + (workspace.private_document_count ?? 0);
11690
11690
  const conversationCount = (workspace.shared_conversation_count ?? 0) + (workspace.private_conversation_count ?? 0);
11691
- const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
11691
+ const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltip, { children: [
11692
11692
  /* @__PURE__ */ jsxRuntime.jsx(
11693
- chunkTPNLYQD2_cjs.EntityTooltipHeader,
11693
+ chunkPV5A5SAC_cjs.EntityTooltipHeader,
11694
11694
  {
11695
11695
  lead: /* @__PURE__ */ jsxRuntime.jsx(
11696
11696
  ui.ShieldIcon,
@@ -11707,7 +11707,7 @@ function ConnectedWorkspaceEntity({
11707
11707
  }
11708
11708
  ),
11709
11709
  /* @__PURE__ */ jsxRuntime.jsx(
11710
- chunkTPNLYQD2_cjs.EntityTooltipStats,
11710
+ chunkPV5A5SAC_cjs.EntityTooltipStats,
11711
11711
  {
11712
11712
  stats: [
11713
11713
  {
@@ -11731,11 +11731,11 @@ function ConnectedWorkspaceEntity({
11731
11731
  ]
11732
11732
  }
11733
11733
  ),
11734
- workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { children: [
11734
+ workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltipHint, { children: [
11735
11735
  "Updated ",
11736
11736
  ui.formatFriendlyDate(workspace.updated_at)
11737
11737
  ] }),
11738
- interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "WORKSPACE", className: "w-3 h-3" }), children: [
11738
+ interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "WORKSPACE", className: "w-3 h-3" }), children: [
11739
11739
  "Click to open ",
11740
11740
  ui.getEntityLabel("WORKSPACE").toLowerCase(),
11741
11741
  " settings"
@@ -12679,36 +12679,36 @@ function ConnectedSharePointAdminConsentPage({
12679
12679
  const result = givenResult === void 0 ? queryResult : givenResult;
12680
12680
  const { apiBaseUrl } = chunkB3NYBMDR_cjs.useBlocksEnvironment().runtimeConfig;
12681
12681
  const consentUrl = `${apiBaseUrl}/v1/connectors/microsoft_sharepoint/admin-consent`;
12682
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { size: "md", children: [
12682
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentCard, { size: "md", children: [
12683
12683
  /* @__PURE__ */ jsxRuntime.jsx(
12684
- chunkO3MRE2HL_cjs.ConsentHeader,
12684
+ chunkGUV63FUC_cjs.ConsentHeader,
12685
12685
  {
12686
12686
  icon: /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.VendorLogo, { vendorKey: "microsoft_sharepoint", product: "sharepoint" }),
12687
12687
  title: "Approve ARBI for SharePoint access",
12688
12688
  children: "A member of your organization uses ARBI and wants to sync documents from SharePoint. Your Microsoft 365 organization requires an administrator to approve this once for the whole organization."
12689
12689
  }
12690
12690
  ),
12691
- result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "success", title: "Access approved \u2014 you\u2019re all set.", className: "mt-4", children: "People in your organization can now connect SharePoint from their own ARBI account. Nothing is synced until each user connects and chooses what to import." }),
12692
- result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "warning", title: "The approval didn\u2019t complete.", className: "mt-4", children: "The request was declined or canceled on the Microsoft screen. You can try again below \u2014 you must sign in with a Microsoft 365 administrator account of your organization." }),
12693
- /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentSection, { title: "What you are approving", children: [
12691
+ result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentNotice, { tone: "success", title: "Access approved \u2014 you\u2019re all set.", className: "mt-4", children: "People in your organization can now connect SharePoint from their own ARBI account. Nothing is synced until each user connects and chooses what to import." }),
12692
+ result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentNotice, { tone: "warning", title: "The approval didn\u2019t complete.", className: "mt-4", children: "The request was declined or canceled on the Microsoft screen. You can try again below \u2014 you must sign in with a Microsoft 365 administrator account of your organization." }),
12693
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentSection, { title: "What you are approving", children: [
12694
12694
  /* @__PURE__ */ jsxRuntime.jsx(
12695
- chunkO3MRE2HL_cjs.ConsentBulletList,
12695
+ chunkGUV63FUC_cjs.ConsentBulletList,
12696
12696
  {
12697
12697
  items: [
12698
12698
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12699
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: "Read SharePoint sites and files" }),
12699
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentStrong, { children: "Read SharePoint sites and files" }),
12700
12700
  " \u2014 lets each user who connects their own account import documents from sites they already have access to. ARBI never gets more access than the user has."
12701
12701
  ] }),
12702
12702
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12703
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: "Sign users in and keep access" }),
12703
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentStrong, { children: "Sign users in and keep access" }),
12704
12704
  " \u2014 standard sign-in (openid, profile, email) and offline access so syncs keep working between sessions."
12705
12705
  ] })
12706
12706
  ]
12707
12707
  }
12708
12708
  ),
12709
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentText, { children: "Approving does not sync anything by itself and grants ARBI no standing access to your tenant. Each user still connects their own Microsoft account, and their tokens are end-to-end encrypted so ARBI\u2019s servers cannot read them at rest." }),
12709
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentText, { children: "Approving does not sync anything by itself and grants ARBI no standing access to your tenant. Each user still connects their own Microsoft account, and their tokens are end-to-end encrypted so ARBI\u2019s servers cannot read them at rest." }),
12710
12710
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { asChild: true, className: "w-full pointer-coarse:h-11", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: consentUrl, children: "Review and approve in Microsoft" }) }),
12711
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentText, { variant: "footnote", children: "You\u2019ll sign in at login.microsoftonline.com and see Microsoft\u2019s own summary of these permissions before anything is granted." })
12711
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentText, { variant: "footnote", children: "You\u2019ll sign in at login.microsoftonline.com and see Microsoft\u2019s own summary of these permissions before anything is granted." })
12712
12712
  ] })
12713
12713
  ] }) });
12714
12714
  }
@@ -15321,7 +15321,7 @@ function ConnectedWorkspaceList({
15321
15321
  else void openWorkspace(workspace.external_id, { name: workspace.name });
15322
15322
  };
15323
15323
  const createDisabledReason = list.canCreateProjects === false ? react.PROJECT_CREATION_DENIED_REASON : void 0;
15324
- if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading workspaces..." });
15324
+ if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.LoadingIndicator, { message: "Loading workspaces..." });
15325
15325
  if (list.error) {
15326
15326
  return /* @__PURE__ */ jsxRuntime.jsx(
15327
15327
  chunkH6K7EWL2_cjs.HomeLoadError,
@@ -15394,7 +15394,7 @@ function ConnectedWorkspaceList({
15394
15394
  workspaceState
15395
15395
  }
15396
15396
  ) })
15397
- ) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkH6K7EWL2_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
15397
+ ) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkH6K7EWL2_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
15398
15398
  WorkspaceTableView,
15399
15399
  {
15400
15400
  list,
@@ -15636,7 +15636,7 @@ function ProjectsListPage({
15636
15636
  }
15637
15637
  ),
15638
15638
  /* @__PURE__ */ jsxRuntime.jsx(
15639
- chunkTPNLYQD2_cjs.Toolbar,
15639
+ chunkPV5A5SAC_cjs.Toolbar,
15640
15640
  {
15641
15641
  search,
15642
15642
  onSearch: setSearch,
@@ -16056,7 +16056,7 @@ var COMPACT_BELOW = 132;
16056
16056
  var NO_DOCUMENTS = [];
16057
16057
  function useFilesWorkspace() {
16058
16058
  const { workspaceId, userId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
16059
- const { members, role } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
16059
+ const { members, role } = chunkQWSAJNQE_cjs.useConnectedWorkspaceRole();
16060
16060
  const { data: workspaces } = react.useWorkspaces({ enabled: live });
16061
16061
  const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
16062
16062
  return {
@@ -16816,7 +16816,7 @@ function ProjectChronology({
16816
16816
  })),
16817
16817
  [facts]
16818
16818
  );
16819
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: "h-[min(70dvh,640px)] overflow-hidden", "data-testid": testId, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: loading }) : /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsGanttPane, { items, testId: `${testId}-gantt`, labels: { ganttEmpty: empty } }) });
16819
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: "h-[min(70dvh,640px)] overflow-hidden", "data-testid": testId, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: loading }) : /* @__PURE__ */ jsxRuntime.jsx(chunkF72ZD5Q2_cjs.FactsGanttPane, { items, testId: `${testId}-gantt`, labels: { ganttEmpty: empty } }) });
16820
16820
  }
16821
16821
  function ProjectThreads({
16822
16822
  projectId,
@@ -17840,7 +17840,7 @@ function recentConversations(conversations) {
17840
17840
  return [...conversations].sort((a, b) => time(b.updated_at) - time(a.updated_at)).slice(0, RECENT_ROWS).map((c) => ({
17841
17841
  id: c.external_id,
17842
17842
  title: c.title?.trim() || "Untitled thread",
17843
- subtitle: c.status ? [chunkO3MRE2HL_cjs.STATUS_LABELS[chunkO3MRE2HL_cjs.asTaskStatus(c.status)], c.due_at ? `due ${shortDate(c.due_at)}` : null].filter(Boolean).join(" \xB7 ") : `${c.message_count} ${c.message_count === 1 ? "message" : "messages"}`,
17843
+ subtitle: c.status ? [chunkGUV63FUC_cjs.STATUS_LABELS[chunkGUV63FUC_cjs.asTaskStatus(c.status)], c.due_at ? `due ${shortDate(c.due_at)}` : null].filter(Boolean).join(" \xB7 ") : `${c.message_count} ${c.message_count === 1 ? "message" : "messages"}`,
17844
17844
  time: timeAndDate(c.updated_at)
17845
17845
  }));
17846
17846
  }
@@ -21598,7 +21598,7 @@ function EventEditorDialog({
21598
21598
  const { notify: notify18, runtimeConfig } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
21599
21599
  const attachmentDocuments = documents.map((document2) => ({
21600
21600
  doc_id: document2.external_id,
21601
- title: chunkUZVXVTTB_cjs.toWorkflowFieldDocument(document2).title,
21601
+ title: chunkQWSAJNQE_cjs.toWorkflowFieldDocument(document2).title,
21602
21602
  url: chunk725OETK3_cjs.buildDeepLinkUrl(
21603
21603
  { workspaceId: workspaceId ?? void 0, documentId: document2.external_id },
21604
21604
  runtimeConfig.deploymentDomain
@@ -24117,9 +24117,9 @@ function ConnectedTagEntity({
24117
24117
  onEditClick();
24118
24118
  }
24119
24119
  };
24120
- const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunkTPNLYQD2_cjs.EntityTooltip, { children: [
24120
+ const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunkPV5A5SAC_cjs.EntityTooltip, { children: [
24121
24121
  /* @__PURE__ */ jsxRuntime.jsx(
24122
- chunkTPNLYQD2_cjs.EntityTooltipHeader,
24122
+ chunkPV5A5SAC_cjs.EntityTooltipHeader,
24123
24123
  {
24124
24124
  lead: /* @__PURE__ */ jsxRuntime.jsx(
24125
24125
  "span",
@@ -26598,7 +26598,7 @@ function useBatchCompleteToasts() {
26598
26598
  }
26599
26599
  }, AI_FIELDS_NOTICE_WINDOW_MS);
26600
26600
  } else if (message.batch_type === "entity_extract") {
26601
- say(`${chunkTPNLYQD2_cjs.entitiesPhrase()} extracted from ${chunkTPNLYQD2_cjs.documentCount(docIds.length)}`, "success", {
26601
+ say(`${chunkPV5A5SAC_cjs.entitiesPhrase()} extracted from ${chunkPV5A5SAC_cjs.documentCount(docIds.length)}`, "success", {
26602
26602
  ...openTags && { action: { label: "View", onClick: openTags } }
26603
26603
  });
26604
26604
  } else if (message.batch_type === "upload") {
@@ -28344,7 +28344,7 @@ function ConnectedFilesPage({
28344
28344
  const deleteDocuments = react.useDeleteDocuments();
28345
28345
  const isDocumentsPending = isLoading && documents.length === 0;
28346
28346
  const { workspaceId, userId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
28347
- const { role, members } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
28347
+ const { role, members } = chunkQWSAJNQE_cjs.useConnectedWorkspaceRole();
28348
28348
  const { data: workspaces } = react.useWorkspaces({ enabled: live });
28349
28349
  const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
28350
28350
  const isMember = role != null;
@@ -28759,7 +28759,7 @@ function ConnectedFilesPage({
28759
28759
  viewMode === "grid" ? (
28760
28760
  // ‹ n / N › over the table's displayed rows; a step opens the document.
28761
28761
  /* @__PURE__ */ jsxRuntime.jsx(
28762
- chunkTPNLYQD2_cjs.GridRowNavigator,
28762
+ chunkPV5A5SAC_cjs.GridRowNavigator,
28763
28763
  {
28764
28764
  gridApi,
28765
28765
  selectedId: viewingDocumentId ?? selectedDocumentIds[0] ?? null,
@@ -29004,6 +29004,870 @@ function ConnectedGridView(props) {
29004
29004
  );
29005
29005
  return /* @__PURE__ */ jsxRuntime.jsx(chunkLKK52DEY_cjs.GridView, { ...props, gridState, onGridStateChange });
29006
29006
  }
29007
+ function useEmailSyncTrigger() {
29008
+ const arbi = react.useArbi();
29009
+ const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
29010
+ const triggerSync = react.useTriggerMailboxSync();
29011
+ const runSync = React9.useCallback(
29012
+ async ({
29013
+ vendorKey,
29014
+ workspaceExtId,
29015
+ workspaceLabel = "the workspace"
29016
+ }) => {
29017
+ await arbi.connectors.bridgeTokens({ vendor: vendorKey });
29018
+ if (workspaceExtId) {
29019
+ await arbi.workspaces.open(workspaceExtId).catch(() => {
29020
+ });
29021
+ }
29022
+ triggerSync.mutate(
29023
+ { vendorKey, workspaceExtId },
29024
+ {
29025
+ onSuccess: (res) => {
29026
+ const n = res?.estimated_count;
29027
+ if (n === 0) {
29028
+ notify18("You\u2019re up to date \u2014 no new emails to sync.", "success");
29029
+ } else if (n != null && n > 0) {
29030
+ notify18(
29031
+ `Fetching ${n} new email${n === 1 ? "" : "s"} to ${workspaceLabel}.`,
29032
+ "success"
29033
+ );
29034
+ } else {
29035
+ notify18("Sync started \u2014 fetching new emails\u2026", "success");
29036
+ }
29037
+ },
29038
+ onError: (err) => {
29039
+ if (react.connectorErrorStatus(err) === 425) {
29040
+ notify18("Still preparing your session \u2014 please try Sync now again.", "error");
29041
+ } else if (react.connectorErrorStatus(err) === 409) {
29042
+ notify18("Reconnect needed \u2014 your account needs to be re-authorized.", "error");
29043
+ } else if (react.connectorErrorStatus(err) === 404) {
29044
+ notify18("Email sync is not enabled for this connector yet.", "error");
29045
+ } else {
29046
+ notify18("Could not start sync. Please try again.", "error");
29047
+ }
29048
+ }
29049
+ }
29050
+ );
29051
+ },
29052
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- triggerSync.mutate is a stable TanStack Query reference
29053
+ [arbi, notify18, triggerSync.mutate]
29054
+ );
29055
+ return { runSync, isPending: triggerSync.isPending };
29056
+ }
29057
+ function useImportHandoff(running, processed) {
29058
+ const [lastRunCount, setLastRunCount] = React9.useState(null);
29059
+ const seenWhileRunning = React9.useRef(null);
29060
+ React9.useEffect(() => {
29061
+ if (running) {
29062
+ setLastRunCount(null);
29063
+ if (typeof processed === "number") seenWhileRunning.current = processed;
29064
+ return;
29065
+ }
29066
+ if (seenWhileRunning.current !== null) {
29067
+ setLastRunCount(seenWhileRunning.current);
29068
+ seenWhileRunning.current = null;
29069
+ }
29070
+ }, [running, processed]);
29071
+ return {
29072
+ lastRunCount,
29073
+ dismiss: () => setLastRunCount(null)
29074
+ };
29075
+ }
29076
+ function ImportHandoff({
29077
+ count: count2,
29078
+ noun,
29079
+ onDismiss,
29080
+ onViewProgress,
29081
+ "data-testid": testId
29082
+ }) {
29083
+ if (count2 <= 0) return null;
29084
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-start justify-between gap-3", "data-testid": testId, children: [
29085
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-[34px] text-sm leading-snug text-muted-foreground", children: [
29086
+ "Imported ",
29087
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: count2.toLocaleString() }),
29088
+ " ",
29089
+ count2 === 1 ? noun : `${noun}s`,
29090
+ " \xB7 indexing in the background"
29091
+ ] }),
29092
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
29093
+ onViewProgress && /* @__PURE__ */ jsxRuntime.jsxs(
29094
+ ui.Button,
29095
+ {
29096
+ variant: "outline",
29097
+ size: "sm",
29098
+ className: "h-7 gap-1.5",
29099
+ onClick: onViewProgress,
29100
+ "data-testid": testId ? `${testId}-view` : void 0,
29101
+ children: [
29102
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClockFading, { className: "h-3.5 w-3.5" }),
29103
+ "View progress"
29104
+ ]
29105
+ }
29106
+ ),
29107
+ /* @__PURE__ */ jsxRuntime.jsx(
29108
+ ui.Button,
29109
+ {
29110
+ variant: "ghost",
29111
+ size: "sm",
29112
+ className: "h-7 px-2 text-muted-foreground",
29113
+ onClick: onDismiss,
29114
+ "aria-label": "Dismiss import summary",
29115
+ "data-testid": testId ? `${testId}-dismiss` : void 0,
29116
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
29117
+ }
29118
+ )
29119
+ ] })
29120
+ ] });
29121
+ }
29122
+ var PROVIDER_FAMILIES = [
29123
+ { key: "microsoft", label: "Microsoft", vendors: ["microsoft"] },
29124
+ { key: "google", label: "Google", vendors: ["gmail"] }
29125
+ ];
29126
+ function VendorGlyph({ catalog }) {
29127
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.VendorLogo, { vendorKey: catalog.vendor_key, className: "h-7 w-7" });
29128
+ }
29129
+ function mailboxProductName(catalog) {
29130
+ if (catalog.vendor_key === "microsoft") return "Outlook";
29131
+ if (catalog.vendor_key === "gmail") return "Gmail";
29132
+ return catalog.display_name;
29133
+ }
29134
+ function EmailProviderRow({
29135
+ catalog,
29136
+ userConnector,
29137
+ workspaceExtId,
29138
+ workspaceName,
29139
+ onViewProgress,
29140
+ onNeedsReconnectChange
29141
+ }) {
29142
+ const [settingsOpen, setSettingsOpen] = React9.useState(false);
29143
+ const { runSync, isPending: syncPending } = useEmailSyncTrigger();
29144
+ const cancelSync = react.useCancelMailboxSync();
29145
+ const arbi = react.useArbi();
29146
+ const isConnected = !!userConnector?.is_connected;
29147
+ const thisSync = userConnector?.syncs?.find((s) => s.workspace_ext_id === workspaceExtId);
29148
+ const syncingHere = isConnected && !!thisSync && thisSync.enabled;
29149
+ const [tokensBridged, setTokensBridged] = React9.useState(false);
29150
+ React9.useEffect(() => {
29151
+ if (!isConnected) {
29152
+ setTokensBridged(false);
29153
+ return;
29154
+ }
29155
+ let cancelled = false;
29156
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key, autoSyncWorkspaceExtId: workspaceExtId }).finally(() => {
29157
+ if (!cancelled) setTokensBridged(true);
29158
+ });
29159
+ return () => {
29160
+ cancelled = true;
29161
+ };
29162
+ }, [isConnected, arbi, catalog.vendor_key, workspaceExtId]);
29163
+ const { data: mailboxFolders, error: foldersError } = react.useMailboxFolders(
29164
+ catalog.vendor_key,
29165
+ isConnected && tokensBridged
29166
+ );
29167
+ const needsReconnect = isConnected && !!foldersError;
29168
+ React9.useEffect(() => {
29169
+ onNeedsReconnectChange(catalog.vendor_key, needsReconnect);
29170
+ }, [needsReconnect, catalog.vendor_key, onNeedsReconnectChange]);
29171
+ const { data: progress, refetch: refetchProgress } = react.useMailboxSyncProgress(
29172
+ catalog.vendor_key,
29173
+ workspaceExtId,
29174
+ syncingHere
29175
+ );
29176
+ const running = !!progress?.running;
29177
+ const { lastRunCount, dismiss: dismissHandoff } = useImportHandoff(running, progress?.processed);
29178
+ react.useRefreshConnectorsOnRunEnd(running);
29179
+ const busy = syncPending;
29180
+ const kickProgressPolling = () => {
29181
+ [500, 1400, 2800].forEach((ms) => window.setTimeout(() => void refetchProgress(), ms));
29182
+ };
29183
+ const syncNow = () => {
29184
+ void runSync({ vendorKey: catalog.vendor_key, workspaceExtId, workspaceLabel: workspaceName });
29185
+ kickProgressPolling();
29186
+ };
29187
+ const stopSync = () => cancelSync.mutate(
29188
+ { vendorKey: catalog.vendor_key, workspaceExtId },
29189
+ { onSettled: () => void refetchProgress() }
29190
+ );
29191
+ const emailNoun = (n) => n === 1 ? "email" : "emails";
29192
+ const syncedCount = thisSync?.synced_count ?? 0;
29193
+ return /* @__PURE__ */ jsxRuntime.jsxs(
29194
+ chunkWALADS2S_cjs.ImportRow,
29195
+ {
29196
+ testId: `email-provider-row-${catalog.vendor_key}`,
29197
+ logo: /* @__PURE__ */ jsxRuntime.jsx(VendorGlyph, { catalog }),
29198
+ name: mailboxProductName(catalog),
29199
+ actions: (
29200
+ // Connecting AND reconnecting are owned by the family header, so a
29201
+ // not-connected or needs-reconnect row shows no button of its own.
29202
+ !isConnected || needsReconnect ? null : /* @__PURE__ */ jsxRuntime.jsx(
29203
+ chunkWALADS2S_cjs.ImportRunActions,
29204
+ {
29205
+ isRunning: running,
29206
+ isStopping: cancelSync.isPending,
29207
+ isBusy: busy,
29208
+ onImport: syncingHere ? syncNow : () => setSettingsOpen(true),
29209
+ onStop: stopSync,
29210
+ onSettings: () => setSettingsOpen(true),
29211
+ settingsLabel: `${mailboxProductName(catalog)} sync settings`,
29212
+ stopButton: { testId: `email-stop-${catalog.vendor_key}` }
29213
+ }
29214
+ )
29215
+ ),
29216
+ children: [
29217
+ isConnected && !needsReconnect && !running && /* @__PURE__ */ jsxRuntime.jsxs(
29218
+ chunkWALADS2S_cjs.ImportSummary,
29219
+ {
29220
+ aside: /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.ImportAside, { children: thisSync && thisSync.folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
29221
+ chunkWALADS2S_cjs.FolderSummary,
29222
+ {
29223
+ names: thisSync.folders.map(
29224
+ (id) => mailboxFolders?.find((f) => f.id === id)?.name
29225
+ ),
29226
+ testId: `email-folders-${catalog.vendor_key}`
29227
+ }
29228
+ ) }),
29229
+ children: [
29230
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
29231
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: syncedCount.toLocaleString() }),
29232
+ " ",
29233
+ emailNoun(syncedCount),
29234
+ " in this workspace"
29235
+ ] }),
29236
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `email-last-sync-${catalog.vendor_key}`, children: [
29237
+ thisSync?.last_sync_at ? `Last synced ${ui.formatRelativeTime(thisSync.last_sync_at, { style: "compact" })}` : "Not synced yet",
29238
+ thisSync?.backfill_since ? ` \xB7 Backfill: since ${new Date(thisSync.backfill_since).toLocaleDateString()}` : thisSync?.backfill_window != null && ` \xB7 Backfill: ${windowLabel(thisSync.backfill_window)}`
29239
+ ] })
29240
+ ]
29241
+ }
29242
+ ),
29243
+ running && /* @__PURE__ */ jsxRuntime.jsx(
29244
+ chunkWALADS2S_cjs.ImportProgress,
29245
+ {
29246
+ processed: progress?.processed ?? 0,
29247
+ total: progress?.total,
29248
+ noun: "emails",
29249
+ testId: `email-progress-${catalog.vendor_key}`
29250
+ }
29251
+ ),
29252
+ !running && lastRunCount !== null && /* @__PURE__ */ jsxRuntime.jsx(
29253
+ ImportHandoff,
29254
+ {
29255
+ count: lastRunCount,
29256
+ noun: "email",
29257
+ onDismiss: dismissHandoff,
29258
+ onViewProgress,
29259
+ "data-testid": `email-handoff-${catalog.vendor_key}`
29260
+ }
29261
+ ),
29262
+ /* @__PURE__ */ jsxRuntime.jsx(
29263
+ ConnectedMailboxSyncDialog,
29264
+ {
29265
+ catalog,
29266
+ userConnector,
29267
+ open: settingsOpen,
29268
+ onOpenChange: setSettingsOpen,
29269
+ lockedWorkspaceExtId: workspaceExtId
29270
+ }
29271
+ )
29272
+ ]
29273
+ }
29274
+ );
29275
+ }
29276
+ function EmailImportPanel({
29277
+ workspaceExtId,
29278
+ workspaceName,
29279
+ onViewProgress,
29280
+ microsoftExtra,
29281
+ googleExtra
29282
+ }) {
29283
+ const arbi = react.useArbi();
29284
+ const { confirm, notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
29285
+ const { data: catalog = [] } = react.useConnectorCatalog();
29286
+ const { data: myConnectors = [] } = react.useMyConnectors();
29287
+ const disconnect = react.useDisconnectConnector();
29288
+ const isVendorVisible = react.useConnectorVendorVisibility();
29289
+ const [reconnectByVendor, setReconnectByVendor] = React9.useState({});
29290
+ const handleNeedsReconnectChange = React9.useCallback((vendorKey, needs) => {
29291
+ setReconnectByVendor(
29292
+ (prev) => prev[vendorKey] === needs ? prev : { ...prev, [vendorKey]: needs }
29293
+ );
29294
+ }, []);
29295
+ const mailboxCatalog = catalog.filter(
29296
+ (c) => react.isMailboxSyncVendor(c.vendor_key) && isVendorVisible(c.vendor_key)
29297
+ );
29298
+ const connectedByVendor = Object.fromEntries(myConnectors.map((uc) => [uc.vendor_key, uc]));
29299
+ const byVendor = Object.fromEntries(mailboxCatalog.map((c) => [c.vendor_key, c]));
29300
+ const connectFamily = async (vendorKey) => {
29301
+ try {
29302
+ window.location.href = await arbi.connectors.authorize(
29303
+ vendorKey,
29304
+ react.connectorReturnTo("accounts")
29305
+ );
29306
+ } catch {
29307
+ notify18("Could not start the connection. Please try again.", "error");
29308
+ }
29309
+ };
29310
+ const reconnectFamily = async (vendorKey) => {
29311
+ try {
29312
+ await disconnect.mutateAsync({ vendorKey });
29313
+ } catch {
29314
+ }
29315
+ try {
29316
+ window.location.href = await arbi.connectors.authorize(
29317
+ vendorKey,
29318
+ react.connectorReturnTo("accounts")
29319
+ );
29320
+ } catch {
29321
+ notify18("Could not start reconnection. Please try again.", "error");
29322
+ }
29323
+ };
29324
+ const extraByFamily = {
29325
+ microsoft: isVendorVisible("microsoft") ? microsoftExtra : null,
29326
+ google: isVendorVisible("gmail") ? googleExtra : null
29327
+ };
29328
+ const disconnectFamily = React9.useCallback(
29329
+ async (family, connectVendor, identity) => {
29330
+ const who = identity ? `${identity} will be disconnected.` : "This account will be disconnected.";
29331
+ const ok = await confirm({
29332
+ message: `${who} Documents already imported stay in the workspace, but nothing further will sync until you connect again.`,
29333
+ title: `Disconnect ${family.label}?`
29334
+ });
29335
+ if (!ok) return;
29336
+ await disconnect.mutateAsync({ vendorKey: connectVendor });
29337
+ if (connectVendor === "microsoft") {
29338
+ for (const spVendor of react.SHAREPOINT_VENDORS) {
29339
+ if (connectedByVendor[spVendor]) {
29340
+ await disconnect.mutateAsync({ vendorKey: spVendor }).catch(() => {
29341
+ });
29342
+ }
29343
+ }
29344
+ }
29345
+ notify18(`Disconnected ${family.label}`, "success");
29346
+ },
29347
+ [confirm, disconnect, connectedByVendor, notify18]
29348
+ );
29349
+ const groups = PROVIDER_FAMILIES.map((family) => {
29350
+ const entries = family.vendors.map((v) => byVendor[v]).filter(Boolean);
29351
+ const extra = extraByFamily[family.key] ?? null;
29352
+ const connectVendor = family.vendors[0];
29353
+ const connectUc = connectedByVendor[connectVendor];
29354
+ const connected = !!connectUc?.is_connected;
29355
+ const identity = family.vendors.map((v) => connectedByVendor[v]).find((uc) => uc?.is_connected && uc?.vendor_user_identity)?.vendor_user_identity;
29356
+ const mailboxNeedsReconnect = family.vendors.some((v) => reconnectByVendor[v]);
29357
+ const needsReconnect = connected && (react.isDriveSyncVendor(connectVendor) && !!connectUc?.drive_needs_reconsent || mailboxNeedsReconnect);
29358
+ return { family, entries, extra, identity, connectVendor, connected, needsReconnect };
29359
+ }).filter((g) => g.entries.length > 0 || g.extra);
29360
+ if (groups.length === 0) return null;
29361
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.ImportPanel, { "data-testid": "email-import-panel", children: groups.map(
29362
+ ({ family, entries, extra, identity, connectVendor, connected, needsReconnect }) => /* @__PURE__ */ jsxRuntime.jsx(
29363
+ chunkWALADS2S_cjs.ImportFamilySection,
29364
+ {
29365
+ label: family.label,
29366
+ identity,
29367
+ action: !connected ? "connect" : needsReconnect ? "reconnect" : "disconnect",
29368
+ isActionPending: disconnect.isPending,
29369
+ onAction: () => void (!connected ? connectFamily(connectVendor) : needsReconnect ? reconnectFamily(connectVendor) : disconnectFamily(family, connectVendor, identity)),
29370
+ testId: `import-family-${family.key}`,
29371
+ actionButton: !connected ? { testId: `import-family-connect-${family.key}` } : needsReconnect ? { testId: `import-family-reconnect-${family.key}` } : { testId: `import-family-disconnect-${family.key}` },
29372
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWALADS2S_cjs.ImportList, { children: [
29373
+ entries.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(
29374
+ EmailProviderRow,
29375
+ {
29376
+ catalog: entry,
29377
+ userConnector: connectedByVendor[entry.vendor_key],
29378
+ workspaceExtId,
29379
+ workspaceName,
29380
+ onViewProgress,
29381
+ onNeedsReconnectChange: handleNeedsReconnectChange
29382
+ },
29383
+ entry.vendor_key
29384
+ )),
29385
+ extra
29386
+ ] })
29387
+ },
29388
+ family.key
29389
+ )
29390
+ ) });
29391
+ }
29392
+ function useDriveSyncTrigger() {
29393
+ const arbi = react.useArbi();
29394
+ const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
29395
+ const triggerSync = react.useTriggerDriveSync();
29396
+ const runSync = React9.useCallback(
29397
+ async ({
29398
+ vendorKey,
29399
+ workspaceExtId,
29400
+ workspaceLabel = "the workspace"
29401
+ }) => {
29402
+ await arbi.connectors.bridgeTokens({ vendor: vendorKey });
29403
+ if (workspaceExtId) {
29404
+ await arbi.workspaces.open(workspaceExtId).catch(() => {
29405
+ });
29406
+ }
29407
+ triggerSync.mutate(
29408
+ { vendorKey },
29409
+ {
29410
+ onSuccess: (res) => {
29411
+ const n = res?.estimated_count;
29412
+ if (n === 0) {
29413
+ notify18("You\u2019re up to date \u2014 no new documents to sync.", "success");
29414
+ } else if (n != null && n > 0) {
29415
+ notify18(
29416
+ `Fetching ${n} new document${n === 1 ? "" : "s"} to ${workspaceLabel}.`,
29417
+ "success"
29418
+ );
29419
+ } else {
29420
+ notify18("Sync started \u2014 fetching new documents\u2026", "success");
29421
+ }
29422
+ },
29423
+ onError: (err) => {
29424
+ if (react.connectorErrorStatus(err) === 425) {
29425
+ notify18("Still preparing your session \u2014 please try Sync now again.", "error");
29426
+ } else if (react.connectorErrorStatus(err) === 409) {
29427
+ notify18("Reconnect needed \u2014 your account needs to be re-authorized.", "error");
29428
+ } else if (react.connectorErrorStatus(err) === 404) {
29429
+ notify18("Drive sync is not enabled for this connector yet.", "error");
29430
+ } else {
29431
+ notify18("Could not start sync. Please try again.", "error");
29432
+ }
29433
+ }
29434
+ }
29435
+ );
29436
+ },
29437
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- triggerSync.mutate is a stable TanStack Query reference
29438
+ [arbi, notify18, triggerSync.mutate]
29439
+ );
29440
+ return { runSync, isPending: triggerSync.isPending };
29441
+ }
29442
+ var DRIVE_PRODUCT = {
29443
+ microsoft: { name: "OneDrive", glyph: "onedrive" },
29444
+ gmail: { name: "Google Drive", glyph: "googledrive" },
29445
+ microsoft_sharepoint: { name: "SharePoint", glyph: "sharepoint" },
29446
+ box: { name: "Box", glyph: "box" },
29447
+ dropbox: { name: "Dropbox", glyph: "dropbox" },
29448
+ onenote: { name: "OneNote", glyph: "onenote" },
29449
+ clio: { name: "Clio", glyph: "clio" }
29450
+ };
29451
+ function driveProduct(vendorKey) {
29452
+ return DRIVE_PRODUCT[vendorKey] ?? { name: "Drive", glyph: "onedrive" };
29453
+ }
29454
+ function VendorGlyph2({ catalog }) {
29455
+ return /* @__PURE__ */ jsxRuntime.jsx(
29456
+ chunkWALADS2S_cjs.VendorLogo,
29457
+ {
29458
+ vendorKey: catalog.vendor_key,
29459
+ product: driveProduct(catalog.vendor_key).glyph,
29460
+ className: "h-7 w-7"
29461
+ }
29462
+ );
29463
+ }
29464
+ function OneDriveProviderRow({
29465
+ catalog,
29466
+ userConnector,
29467
+ workspaceExtId,
29468
+ workspaceName,
29469
+ onViewProgress
29470
+ }) {
29471
+ const [settingsOpen, setSettingsOpen] = React9.useState(false);
29472
+ const { runSync, isPending: syncPending } = useDriveSyncTrigger();
29473
+ const cancelSync = react.useCancelDriveSync();
29474
+ const arbi = react.useArbi();
29475
+ const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
29476
+ const isConnected = !!userConnector?.is_connected;
29477
+ const product = driveProduct(catalog.vendor_key);
29478
+ const status = userConnector?.drive_sync_status ?? null;
29479
+ const configuredHere = status != null && userConnector?.drive_sync_workspace_ext_id === workspaceExtId;
29480
+ const folderCount = userConnector?.drive_sync_folders?.length ?? 0;
29481
+ const needsReconsent = isConnected && !!userConnector?.drive_needs_reconsent;
29482
+ const [tokensBridged, setTokensBridged] = React9.useState(false);
29483
+ React9.useEffect(() => {
29484
+ if (!isConnected) {
29485
+ setTokensBridged(false);
29486
+ return;
29487
+ }
29488
+ let cancelled = false;
29489
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key, autoSyncWorkspaceExtId: workspaceExtId }).finally(() => {
29490
+ if (!cancelled) setTokensBridged(true);
29491
+ });
29492
+ return () => {
29493
+ cancelled = true;
29494
+ };
29495
+ }, [isConnected, arbi, catalog.vendor_key, workspaceExtId]);
29496
+ const { error: foldersError } = react.useDriveFolders(
29497
+ catalog.vendor_key,
29498
+ isConnected && tokensBridged && !needsReconsent
29499
+ );
29500
+ const needsReconnect = needsReconsent || isConnected && react.connectorErrorStatus(foldersError) === 409;
29501
+ const { data: progress, refetch: refetchProgress } = react.useDriveSyncProgress(
29502
+ catalog.vendor_key,
29503
+ configuredHere && !needsReconnect
29504
+ );
29505
+ const running = !!progress?.running;
29506
+ const { lastRunCount, dismiss: dismissHandoff } = useImportHandoff(running, progress?.processed);
29507
+ react.useRefreshConnectorsOnRunEnd(running);
29508
+ const { data: estimate, refetch: refetchEstimate } = react.useDriveSyncEstimate(
29509
+ catalog.vendor_key,
29510
+ configuredHere && tokensBridged && !needsReconnect && !running
29511
+ );
29512
+ const lastSummaryRef = React9.useRef(null);
29513
+ const baselinedRef = React9.useRef(false);
29514
+ React9.useEffect(() => {
29515
+ if (progress === void 0) return;
29516
+ const s = progress.summary;
29517
+ const finishedAt = s?.finished_at ?? null;
29518
+ if (!baselinedRef.current) {
29519
+ baselinedRef.current = true;
29520
+ lastSummaryRef.current = finishedAt;
29521
+ return;
29522
+ }
29523
+ if (!s?.finished_at || lastSummaryRef.current === s.finished_at) return;
29524
+ lastSummaryRef.current = s.finished_at;
29525
+ const total = s.attempted || s.ingested;
29526
+ const importedMsg = `Imported ${s.ingested} of ${total} document${total === 1 ? "" : "s"} from ${product.name}.`;
29527
+ const skipped = s.skipped ?? [];
29528
+ if (skipped.length === 0) {
29529
+ notify18(importedMsg, "success");
29530
+ } else {
29531
+ notify18(`${importedMsg} ${skipped.length} couldn\u2019t be imported:`, "warning", {
29532
+ duration: 12e3,
29533
+ description: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-1 max-h-56 space-y-0.5 overflow-y-auto pr-1 text-xs", children: skipped.map((f, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "break-all", children: [
29534
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: f.name }),
29535
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
29536
+ " \u2014 ",
29537
+ f.reason
29538
+ ] })
29539
+ ] }, i)) })
29540
+ });
29541
+ }
29542
+ void refetchEstimate();
29543
+ }, [progress, refetchEstimate, product.name, notify18]);
29544
+ const pendingCount = estimate?.estimated_count;
29545
+ const busy = syncPending;
29546
+ const ownsAuth = catalog.vendor_key === "microsoft_sharepoint";
29547
+ const [reauthPending, setReauthPending] = React9.useState(false);
29548
+ const reconnectSelf = async () => {
29549
+ setReauthPending(true);
29550
+ try {
29551
+ window.location.href = await arbi.connectors.authorize(
29552
+ catalog.vendor_key,
29553
+ react.connectorReturnTo("accounts")
29554
+ );
29555
+ } catch {
29556
+ setReauthPending(false);
29557
+ notify18("Could not start reconnection. Please try again.", "error");
29558
+ }
29559
+ };
29560
+ const kickProgressPolling = () => {
29561
+ [500, 1400, 2800].forEach((ms) => window.setTimeout(() => void refetchProgress(), ms));
29562
+ };
29563
+ const syncNow = () => {
29564
+ void runSync({
29565
+ vendorKey: catalog.vendor_key,
29566
+ workspaceExtId,
29567
+ workspaceLabel: workspaceName
29568
+ });
29569
+ kickProgressPolling();
29570
+ [1500, 4e3].forEach((ms) => window.setTimeout(() => void refetchEstimate(), ms));
29571
+ };
29572
+ const stopSync = () => cancelSync.mutate(
29573
+ { vendorKey: catalog.vendor_key },
29574
+ { onSettled: () => void refetchProgress() }
29575
+ );
29576
+ const driveNoun = (n) => n === 1 ? "document" : "documents";
29577
+ const showRunActions = isConnected && !needsReconnect;
29578
+ const reconnectAction = ownsAuth && needsReconnect ? /* @__PURE__ */ jsxRuntime.jsx(
29579
+ chunkWALADS2S_cjs.ImportActionButton,
29580
+ {
29581
+ onClick: () => void reconnectSelf(),
29582
+ disabled: reauthPending,
29583
+ "data-testid": `onedrive-reconnect-${catalog.vendor_key}`,
29584
+ children: reauthPending ? "Reconnecting\u2026" : "Reconnect"
29585
+ }
29586
+ ) : null;
29587
+ return /* @__PURE__ */ jsxRuntime.jsxs(
29588
+ chunkWALADS2S_cjs.ImportRow,
29589
+ {
29590
+ testId: `onedrive-provider-row-${catalog.vendor_key}`,
29591
+ logo: /* @__PURE__ */ jsxRuntime.jsx(VendorGlyph2, { catalog }),
29592
+ name: product.name,
29593
+ actions: (
29594
+ // OneDrive/Google Drive: connecting AND reconnecting are owned by the family header.
29595
+ // SharePoint (ownsAuth) is a separate grant, so its row renders its OWN Reconnect (D1).
29596
+ showRunActions ? (
29597
+ // Until folders are configured here (or when nothing new is pending), Import now
29598
+ // stays disabled; the gear opens the folder picker.
29599
+ /* @__PURE__ */ jsxRuntime.jsx(
29600
+ chunkWALADS2S_cjs.ImportRunActions,
29601
+ {
29602
+ isRunning: running,
29603
+ isStopping: cancelSync.isPending,
29604
+ isBusy: busy,
29605
+ importDisabled: !configuredHere || pendingCount === 0,
29606
+ importTitle: !configuredHere ? `Choose ${product.name} folders in settings first` : pendingCount === 0 ? "No new documents to import" : void 0,
29607
+ onImport: syncNow,
29608
+ onStop: stopSync,
29609
+ onSettings: () => setSettingsOpen(true),
29610
+ settingsLabel: `${product.name} import settings`,
29611
+ importButton: { testId: `onedrive-sync-${catalog.vendor_key}` },
29612
+ settingsButton: { testId: `onedrive-settings-${catalog.vendor_key}` },
29613
+ stopButton: { testId: `onedrive-stop-${catalog.vendor_key}` }
29614
+ }
29615
+ )
29616
+ ) : reconnectAction
29617
+ ),
29618
+ children: [
29619
+ ownsAuth && needsReconnect && /* @__PURE__ */ jsxRuntime.jsxs(chunkWALADS2S_cjs.ImportHint, { "data-testid": `onedrive-reconnect-hint-${catalog.vendor_key}`, children: [
29620
+ "Couldn\u2019t reach SharePoint. Click ",
29621
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Reconnect" }),
29622
+ " \u2014 if it keeps happening, log out and back in to refresh the connection."
29623
+ ] }),
29624
+ configuredHere && !needsReconnect && !running && /* @__PURE__ */ jsxRuntime.jsxs(
29625
+ chunkWALADS2S_cjs.ImportSummary,
29626
+ {
29627
+ className: "mt-2",
29628
+ aside: typeof pendingCount === "number" ? /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.ImportAside, { className: "max-w-none shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": `drive-pending-${catalog.vendor_key}`, children: pendingCount > 0 ? `${pendingCount.toLocaleString()} new ${driveNoun(pendingCount)} to sync` : "No new documents to sync" }) }) : void 0,
29629
+ children: [
29630
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
29631
+ "Syncing ",
29632
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: folderCount }),
29633
+ " folder",
29634
+ folderCount === 1 ? "" : "s",
29635
+ " into this workspace"
29636
+ ] }),
29637
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": `drive-last-sync-${catalog.vendor_key}`, children: userConnector?.drive_last_sync_at ? `Last synced ${ui.formatRelativeTime(userConnector.drive_last_sync_at, { style: "compact" })}` : "Not synced yet" })
29638
+ ]
29639
+ }
29640
+ ),
29641
+ isConnected && !needsReconnect && !running && !configuredHere && /* @__PURE__ */ jsxRuntime.jsxs(
29642
+ "button",
29643
+ {
29644
+ type: "button",
29645
+ className: "ml-[34px] mt-2 text-left text-sm leading-snug text-muted-foreground hover:text-foreground pointer-coarse:min-h-11",
29646
+ onClick: () => setSettingsOpen(true),
29647
+ "data-testid": `onedrive-choose-folders-${catalog.vendor_key}`,
29648
+ children: [
29649
+ "Choose folders in ",
29650
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "underline", children: "settings" }),
29651
+ " to start syncing"
29652
+ ]
29653
+ }
29654
+ ),
29655
+ running && /* @__PURE__ */ jsxRuntime.jsx(
29656
+ chunkWALADS2S_cjs.ImportProgress,
29657
+ {
29658
+ processed: progress?.processed ?? 0,
29659
+ total: progress?.total,
29660
+ noun: "documents",
29661
+ testId: `onedrive-progress-${catalog.vendor_key}`
29662
+ }
29663
+ ),
29664
+ !running && lastRunCount !== null && /* @__PURE__ */ jsxRuntime.jsx(
29665
+ ImportHandoff,
29666
+ {
29667
+ count: lastRunCount,
29668
+ noun: "document",
29669
+ onDismiss: dismissHandoff,
29670
+ onViewProgress,
29671
+ "data-testid": `onedrive-handoff-${catalog.vendor_key}`
29672
+ }
29673
+ ),
29674
+ /* @__PURE__ */ jsxRuntime.jsx(
29675
+ ConnectedDriveSyncDialog,
29676
+ {
29677
+ catalog,
29678
+ userConnector,
29679
+ open: settingsOpen,
29680
+ onOpenChange: setSettingsOpen,
29681
+ lockedWorkspaceExtId: workspaceExtId,
29682
+ onEnabled: () => void refetchEstimate()
29683
+ }
29684
+ )
29685
+ ]
29686
+ }
29687
+ );
29688
+ }
29689
+ function SharePointEnableRow({
29690
+ catalog,
29691
+ sharePointAdminUrl
29692
+ }) {
29693
+ const arbi = react.useArbi();
29694
+ const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
29695
+ const [pending, setPending] = React9.useState(false);
29696
+ const product = driveProduct(catalog.vendor_key);
29697
+ const enable = async () => {
29698
+ setPending(true);
29699
+ try {
29700
+ window.location.href = await arbi.connectors.authorize(
29701
+ catalog.vendor_key,
29702
+ react.connectorReturnTo("accounts")
29703
+ );
29704
+ } catch {
29705
+ setPending(false);
29706
+ notify18("Could not start the connection. Please try again.", "error");
29707
+ }
29708
+ };
29709
+ const copyAdminLink = async () => {
29710
+ const link = sharePointAdminUrl;
29711
+ if (!link) return;
29712
+ try {
29713
+ await navigator.clipboard.writeText(link);
29714
+ notify18("Approval link copied \u2014 send it to your Microsoft admin.", "success");
29715
+ } catch {
29716
+ notify18(`Copy this link for your Microsoft admin: ${link}`, "info");
29717
+ }
29718
+ };
29719
+ return /* @__PURE__ */ jsxRuntime.jsx(
29720
+ chunkWALADS2S_cjs.ImportRow,
29721
+ {
29722
+ testId: `onedrive-provider-row-${catalog.vendor_key}`,
29723
+ logo: /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.VendorLogo, { vendorKey: catalog.vendor_key, product: product.glyph, className: "h-7 w-7" }),
29724
+ name: product.name,
29725
+ actions: /* @__PURE__ */ jsxRuntime.jsx(
29726
+ chunkWALADS2S_cjs.ImportActionButton,
29727
+ {
29728
+ onClick: () => void enable(),
29729
+ disabled: pending,
29730
+ "data-testid": `onedrive-enable-${catalog.vendor_key}`,
29731
+ children: pending ? "Enabling\u2026" : `Enable ${product.name}`
29732
+ }
29733
+ ),
29734
+ children: sharePointAdminUrl && /* @__PURE__ */ jsxRuntime.jsxs(chunkWALADS2S_cjs.ImportHint, { children: [
29735
+ "Does your organization require admin approval?",
29736
+ " ",
29737
+ /* @__PURE__ */ jsxRuntime.jsx(
29738
+ "button",
29739
+ {
29740
+ type: "button",
29741
+ className: "underline hover:text-foreground",
29742
+ onClick: () => void copyAdminLink(),
29743
+ "data-testid": "sharepoint-copy-admin-link",
29744
+ children: "Copy the approval link"
29745
+ }
29746
+ ),
29747
+ " ",
29748
+ "and send it to your Microsoft admin \u2014 they won't need an ARBI account."
29749
+ ] })
29750
+ }
29751
+ );
29752
+ }
29753
+ function DriveImportPanel({
29754
+ workspaceExtId,
29755
+ workspaceName,
29756
+ onViewProgress,
29757
+ only,
29758
+ sharePointAdminUrl
29759
+ }) {
29760
+ const { data: catalog = [] } = react.useConnectorCatalog();
29761
+ const { data: myConnectors = [] } = react.useMyConnectors();
29762
+ const driveCatalog = catalog.filter(
29763
+ (c) => react.isDriveSyncVendor(c.vendor_key) && (!only || c.vendor_key === only)
29764
+ );
29765
+ if (driveCatalog.length === 0) return null;
29766
+ const connectedByVendor = Object.fromEntries(myConnectors.map((uc) => [uc.vendor_key, uc]));
29767
+ const microsoftConnected = !!connectedByVendor["microsoft"]?.is_connected;
29768
+ const rows = driveCatalog.map((entry) => {
29769
+ const uc = connectedByVendor[entry.vendor_key];
29770
+ if (entry.vendor_key === "microsoft_sharepoint" && !uc) {
29771
+ if (microsoftConnected) {
29772
+ return /* @__PURE__ */ jsxRuntime.jsx(
29773
+ SharePointEnableRow,
29774
+ {
29775
+ catalog: entry,
29776
+ sharePointAdminUrl
29777
+ },
29778
+ entry.vendor_key
29779
+ );
29780
+ }
29781
+ const product = driveProduct(entry.vendor_key);
29782
+ return /* @__PURE__ */ jsxRuntime.jsx(
29783
+ chunkWALADS2S_cjs.ImportRow,
29784
+ {
29785
+ testId: `onedrive-provider-row-${entry.vendor_key}`,
29786
+ logo: /* @__PURE__ */ jsxRuntime.jsx(
29787
+ chunkWALADS2S_cjs.VendorLogo,
29788
+ {
29789
+ vendorKey: entry.vendor_key,
29790
+ product: product.glyph,
29791
+ className: "h-7 w-7"
29792
+ }
29793
+ ),
29794
+ name: product.name
29795
+ },
29796
+ entry.vendor_key
29797
+ );
29798
+ }
29799
+ return /* @__PURE__ */ jsxRuntime.jsx(
29800
+ OneDriveProviderRow,
29801
+ {
29802
+ catalog: entry,
29803
+ userConnector: uc,
29804
+ workspaceExtId,
29805
+ workspaceName,
29806
+ onViewProgress
29807
+ },
29808
+ entry.vendor_key
29809
+ );
29810
+ }).filter(Boolean);
29811
+ if (rows.length === 0) return null;
29812
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.ImportList, { "data-testid": "onedrive-import-panel", children: rows });
29813
+ }
29814
+ function useHasAccountsImport() {
29815
+ const isVendorVisible = react.useConnectorVendorVisibility();
29816
+ return isVendorVisible("microsoft") || isVendorVisible("gmail");
29817
+ }
29818
+ function ConnectedAccountsImport({
29819
+ workspaceExtId,
29820
+ workspaceName,
29821
+ onViewProgress,
29822
+ sharePointAdminUrl
29823
+ }) {
29824
+ const isVendorVisible = react.useConnectorVendorVisibility();
29825
+ if (!isVendorVisible("microsoft") && !isVendorVisible("gmail")) return null;
29826
+ return /* @__PURE__ */ jsxRuntime.jsx(
29827
+ EmailImportPanel,
29828
+ {
29829
+ workspaceExtId,
29830
+ workspaceName,
29831
+ onViewProgress,
29832
+ microsoftExtra: (
29833
+ // Two drive products ride Microsoft: OneDrive (the `microsoft` grant) and SharePoint
29834
+ // (its own grant, behind its own visibility toggle).
29835
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-border", "data-testid": "upload-source-onedrive", children: [
29836
+ /* @__PURE__ */ jsxRuntime.jsx(
29837
+ DriveImportPanel,
29838
+ {
29839
+ workspaceExtId,
29840
+ workspaceName,
29841
+ onViewProgress,
29842
+ sharePointAdminUrl,
29843
+ only: "microsoft"
29844
+ }
29845
+ ),
29846
+ isVendorVisible("microsoft_sharepoint") && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "upload-source-sharepoint", children: /* @__PURE__ */ jsxRuntime.jsx(
29847
+ DriveImportPanel,
29848
+ {
29849
+ workspaceExtId,
29850
+ workspaceName,
29851
+ onViewProgress,
29852
+ sharePointAdminUrl,
29853
+ only: "microsoft_sharepoint"
29854
+ }
29855
+ ) })
29856
+ ] })
29857
+ ),
29858
+ googleExtra: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "upload-source-googledrive", children: /* @__PURE__ */ jsxRuntime.jsx(
29859
+ DriveImportPanel,
29860
+ {
29861
+ workspaceExtId,
29862
+ workspaceName,
29863
+ onViewProgress,
29864
+ sharePointAdminUrl,
29865
+ only: "gmail"
29866
+ }
29867
+ ) })
29868
+ }
29869
+ );
29870
+ }
29007
29871
  var UNTITLED = "Untitled";
29008
29872
  function useDatabaseCellSources(databases) {
29009
29873
  const workspaceId = react.useArbiSessionState((state) => state.workspaceId);
@@ -30833,7 +31697,7 @@ function ConnectedConfigForm({ availableModels, ...rest }) {
30833
31697
  ({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedModelSelector, { value, onValueChange: onChange, className: "w-full" }),
30834
31698
  []
30835
31699
  );
30836
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConfigForm, { ...rest, renderModelSelect: hasModels ? renderModelSelect : void 0 });
31700
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConfigForm, { ...rest, renderModelSelect: hasModels ? renderModelSelect : void 0 });
30837
31701
  }
30838
31702
  function ConnectedAgentConfigForm({ agentExtId, agentName, onSaved }) {
30839
31703
  const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
@@ -30950,7 +31814,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
30950
31814
  }, [name, selectedWorkspaces, role, createAgent, addWorkspaceUsers, arbi, notify18]);
30951
31815
  if (editAgent) {
30952
31816
  return /* @__PURE__ */ jsxRuntime.jsx(
30953
- chunkO3MRE2HL_cjs.AgentEditView,
31817
+ chunkGUV63FUC_cjs.AgentEditView,
30954
31818
  {
30955
31819
  agentName: editAgent.name,
30956
31820
  config: /* @__PURE__ */ jsxRuntime.jsx(
@@ -30966,7 +31830,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
30966
31830
  }
30967
31831
  if (view === "main") {
30968
31832
  return /* @__PURE__ */ jsxRuntime.jsx(
30969
- chunkO3MRE2HL_cjs.AgentMainView,
31833
+ chunkGUV63FUC_cjs.AgentMainView,
30970
31834
  {
30971
31835
  onConnectExternal: () => setView("connect"),
30972
31836
  config: mainAgent ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -30982,11 +31846,11 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
30982
31846
  }
30983
31847
  if (result) {
30984
31848
  return /* @__PURE__ */ jsxRuntime.jsx(
30985
- chunkO3MRE2HL_cjs.AgentCreatedView,
31849
+ chunkGUV63FUC_cjs.AgentCreatedView,
30986
31850
  {
30987
31851
  email: result.email,
30988
31852
  signingKey: result.signingKey,
30989
- instructions: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentConnectInstructions, { email: result.email, signingKey: result.signingKey }),
31853
+ instructions: /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AgentConnectInstructions, { email: result.email, signingKey: result.signingKey }),
30990
31854
  config: /* @__PURE__ */ jsxRuntime.jsx(ConnectedAgentConfigForm, { agentExtId: result.extId, agentName: result.name }),
30991
31855
  isConfigOpen: configOpen,
30992
31856
  onToggleConfig: () => setConfigOpen((v) => !v),
@@ -30995,7 +31859,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
30995
31859
  );
30996
31860
  }
30997
31861
  return /* @__PURE__ */ jsxRuntime.jsx(
30998
- chunkO3MRE2HL_cjs.AgentCreateView,
31862
+ chunkGUV63FUC_cjs.AgentCreateView,
30999
31863
  {
31000
31864
  name,
31001
31865
  onNameChange: setName,
@@ -32679,14 +33543,14 @@ var referencesOf = (inputs) => {
32679
33543
  return value?.documents ?? [];
32680
33544
  };
32681
33545
  var PROMPT_BINDINGS = {
32682
- [chunkO3MRE2HL_cjs.GENERATE_IMAGE_ID]: {
33546
+ [chunkGUV63FUC_cjs.GENERATE_IMAGE_ID]: {
32683
33547
  attachScope: false,
32684
33548
  tools: (inputs) => {
32685
33549
  const aspectRatio = typeof inputs.aspect_ratio === "string" ? inputs.aspect_ratio : "";
32686
33550
  return {
32687
33551
  retrieval_chunk: browser.buildRetrievalChunkTool([]),
32688
33552
  retrieval_full_context: browser.buildRetrievalFullContextTool(referencesOf(inputs)),
32689
- ...aspectRatio && aspectRatio !== chunkO3MRE2HL_cjs.IMAGE_ASPECT_AUTO ? {
33553
+ ...aspectRatio && aspectRatio !== chunkGUV63FUC_cjs.IMAGE_ASPECT_AUTO ? {
32690
33554
  image_generation: {
32691
33555
  name: "image_generation",
32692
33556
  description: "image generation",
@@ -32722,7 +33586,7 @@ function useWorkflowTasks() {
32722
33586
  );
32723
33587
  const create4 = React9.useCallback(
32724
33588
  async (ctx, forceWorkflow = false) => {
32725
- const request = chunkO3MRE2HL_cjs.taskComposerToCreateRequest(
33589
+ const request = chunkGUV63FUC_cjs.taskComposerToCreateRequest(
32726
33590
  { ...ctx, documentTitles, plan: ctx.plan ?? null },
32727
33591
  activeWorkspaceId ?? void 0,
32728
33592
  forceWorkflow
@@ -32764,7 +33628,7 @@ function useWorkflowTasks() {
32764
33628
  );
32765
33629
  const update = React9.useCallback(
32766
33630
  async (task, ctx) => {
32767
- const patch = chunkO3MRE2HL_cjs.taskComposerToUpdateRequest({ ...ctx, plan: ctx.plan ?? null });
33631
+ const patch = chunkGUV63FUC_cjs.taskComposerToUpdateRequest({ ...ctx, plan: ctx.plan ?? null });
32768
33632
  if (task.is_owner === false) delete patch.shared;
32769
33633
  await updateConversation.mutateAsync({ conversationId: task.external_id, patch });
32770
33634
  },
@@ -32772,7 +33636,7 @@ function useWorkflowTasks() {
32772
33636
  );
32773
33637
  const updateWorkflow = React9.useCallback(
32774
33638
  async (workflow, ctx) => {
32775
- const patch = chunkO3MRE2HL_cjs.composerToWorkflowUpdate({ ...ctx, documentTitles, plan: ctx.plan ?? null });
33639
+ const patch = chunkGUV63FUC_cjs.composerToWorkflowUpdate({ ...ctx, documentTitles, plan: ctx.plan ?? null });
32776
33640
  if (workflow.is_owner === false) delete patch.shared;
32777
33641
  const workspaceId = workflow.workspace_ext_id ?? activeWorkspaceId;
32778
33642
  const updated = await updateWorkflowMutation.mutateAsync({
@@ -32802,7 +33666,7 @@ var text = (inputs, name) => {
32802
33666
  function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
32803
33667
  const { data: documents = [] } = react.useDocuments();
32804
33668
  const { data: workspaceTags = [] } = react.useTags();
32805
- const tags = React9.useMemo(() => chunk2QDNQM63_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
33669
+ const tags = React9.useMemo(() => chunkT5BCPKU3_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
32806
33670
  const createTag = react.useCreateTag();
32807
33671
  const updateTag = react.useUpdateTag();
32808
33672
  const generate = react.useGenerateDocTags();
@@ -32813,8 +33677,8 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
32813
33677
  const annotate = React9.useCallback(
32814
33678
  async ({ inputs, scope }) => {
32815
33679
  const description = text(inputs, "description");
32816
- const name = text(inputs, "name") || chunkO3MRE2HL_cjs.deriveAnnotationName(description);
32817
- const matching = chunk2QDNQM63_cjs.matchWorkflowScope(documents, scope);
33680
+ const name = text(inputs, "name") || chunkGUV63FUC_cjs.deriveAnnotationName(description);
33681
+ const matching = chunkT5BCPKU3_cjs.matchWorkflowScope(documents, scope);
32818
33682
  if (!name || !description || matching.length === 0) return;
32819
33683
  try {
32820
33684
  const existing = tags.find((t) => t.name.toLowerCase() === name.toLowerCase());
@@ -32857,9 +33721,9 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
32857
33721
  async (launch) => {
32858
33722
  const { workflow, inputs, scope, agentId } = launch;
32859
33723
  if (workflow.run.kind === "operation") {
32860
- if (workflow.id === chunkO3MRE2HL_cjs.ANNOTATE_ID) {
33724
+ if (workflow.id === chunkGUV63FUC_cjs.ANNOTATE_ID) {
32861
33725
  await annotate(launch);
32862
- chunkO3MRE2HL_cjs.recordWorkflowUse(workflow.id);
33726
+ chunkGUV63FUC_cjs.recordWorkflowUse(workflow.id);
32863
33727
  return;
32864
33728
  }
32865
33729
  throw new Error(`No host handler for workflow "${workflow.id}"`);
@@ -32869,7 +33733,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
32869
33733
  );
32870
33734
  const prompt = chunk76L6LOP3_cjs.composeWorkflowPrompt(workflow, inputs, { documentTitles });
32871
33735
  if (!prompt) return;
32872
- chunkO3MRE2HL_cjs.recordWorkflowUse(workflow.id);
33736
+ chunkGUV63FUC_cjs.recordWorkflowUse(workflow.id);
32873
33737
  if (agentId) {
32874
33738
  try {
32875
33739
  const created = await createTask({
@@ -32914,7 +33778,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
32914
33778
  const binding = PROMPT_BINDINGS[workflow.id];
32915
33779
  if (!inPlace) openNewConversation();
32916
33780
  if (binding?.attachScope !== false && !chunk76L6LOP3_cjs.isEmptyWorkflowScope(scope)) {
32917
- const ids = chunk2QDNQM63_cjs.matchWorkflowScope(documents, scope).map((d) => d.external_id);
33781
+ const ids = chunkT5BCPKU3_cjs.matchWorkflowScope(documents, scope).map((d) => d.external_id);
32918
33782
  if (ids.length > 0) {
32919
33783
  session.setConversationDocuments(
32920
33784
  inPlace ? session.getState().conversationId ?? "new" : "new",
@@ -32949,30 +33813,30 @@ function ConnectedWorkflowStart({
32949
33813
  const onLaunch = useLaunchWorkflow({ landing });
32950
33814
  const { openUpload } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
32951
33815
  const { data: workspaceTags = [] } = react.useTags();
32952
- const tags = React9.useMemo(() => chunk2QDNQM63_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
33816
+ const tags = React9.useMemo(() => chunkT5BCPKU3_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
32953
33817
  const fieldPlaceholder = React9.useCallback(
32954
33818
  (field, inputs, workflow) => {
32955
- if (workflow.id !== chunkO3MRE2HL_cjs.ANNOTATE_ID || field.name !== "name") return void 0;
32956
- const derived = chunkO3MRE2HL_cjs.deriveAnnotationName(String(inputs.description ?? ""));
33819
+ if (workflow.id !== chunkGUV63FUC_cjs.ANNOTATE_ID || field.name !== "name") return void 0;
33820
+ const derived = chunkGUV63FUC_cjs.deriveAnnotationName(String(inputs.description ?? ""));
32957
33821
  return derived ? `Otherwise \u201C${derived}\u201D` : "Taken from the description";
32958
33822
  },
32959
33823
  []
32960
33824
  );
32961
33825
  return /* @__PURE__ */ jsxRuntime.jsx(
32962
- chunkUZVXVTTB_cjs.ConnectedWorkflowLauncher,
33826
+ chunkQWSAJNQE_cjs.ConnectedWorkflowLauncher,
32963
33827
  {
32964
33828
  ...rest,
32965
33829
  workflows,
32966
33830
  onLaunch,
32967
- renderIcon: chunkO3MRE2HL_cjs.renderWorkflowIcon,
33831
+ renderIcon: chunkGUV63FUC_cjs.renderWorkflowIcon,
32968
33832
  onAddFiles: openUpload,
32969
33833
  agentLabels: AGENT_LABELS,
32970
33834
  addFilesAction,
32971
33835
  fieldPlaceholder,
32972
- submitLabel: ({ workflow, matchedCount }) => workflow.id === chunkO3MRE2HL_cjs.ANNOTATE_ID && matchedCount !== null ? `Annotate ${matchedCount} document${matchedCount !== 1 ? "s" : ""}` : void 0,
33836
+ submitLabel: ({ workflow, matchedCount }) => workflow.id === chunkGUV63FUC_cjs.ANNOTATE_ID && matchedCount !== null ? `Annotate ${matchedCount} document${matchedCount !== 1 ? "s" : ""}` : void 0,
32973
33837
  renderNotice: ({ workflow, inputs }) => {
32974
- if (workflow.id !== chunkO3MRE2HL_cjs.ANNOTATE_ID) return null;
32975
- const name = String(inputs.name ?? "").trim() || chunkO3MRE2HL_cjs.deriveAnnotationName(String(inputs.description ?? ""));
33838
+ if (workflow.id !== chunkGUV63FUC_cjs.ANNOTATE_ID) return null;
33839
+ const name = String(inputs.name ?? "").trim() || chunkGUV63FUC_cjs.deriveAnnotationName(String(inputs.description ?? ""));
32976
33840
  const existing = name ? tags.find((t) => t.name.toLowerCase() === name.toLowerCase()) : void 0;
32977
33841
  if (!existing) return null;
32978
33842
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -33003,25 +33867,25 @@ function useSkillsEnabled() {
33003
33867
  // src/connection/workflows/useWorkflowDefinitions.ts
33004
33868
  function useWorkflowDefinitions() {
33005
33869
  const { data: listings } = react.useSkills();
33006
- const usage = chunkO3MRE2HL_cjs.useWorkflowUsage();
33870
+ const usage = chunkGUV63FUC_cjs.useWorkflowUsage();
33007
33871
  const skillsEnabled = useSkillsEnabled();
33008
33872
  return React9.useMemo(() => {
33009
33873
  const { host: builtins, skills: fromServer } = chunk76L6LOP3_cjs.mergeSkillWorkflows(
33010
- chunkO3MRE2HL_cjs.WEB_WORKFLOWS,
33874
+ chunkGUV63FUC_cjs.WEB_WORKFLOWS,
33011
33875
  listings ?? []
33012
33876
  );
33013
33877
  const all = [...builtins, ...fromServer];
33014
33878
  const byId = new Map(all.map((w) => [w.id, w]));
33015
- const pinned = chunkO3MRE2HL_cjs.DASHBOARD_PINNED.flatMap((id) => {
33879
+ const pinned = chunkGUV63FUC_cjs.DASHBOARD_PINNED.flatMap((id) => {
33016
33880
  const w = byId.get(id);
33017
33881
  return w ? [w] : [];
33018
33882
  });
33019
33883
  return {
33020
33884
  skills: all,
33021
33885
  skillsEnabled,
33022
- start: skillsEnabled ? [...builtins, ...chunkO3MRE2HL_cjs.sortByRecentUse(fromServer, usage)] : [],
33023
- dashboard: [...pinned, ...chunkO3MRE2HL_cjs.DASHBOARD_OPERATIONS],
33024
- forTasks: [chunkO3MRE2HL_cjs.CUSTOM_TASK, ...all.filter((w) => w.schedulable), chunkO3MRE2HL_cjs.REMIND_TASK]
33886
+ start: skillsEnabled ? [...builtins, ...chunkGUV63FUC_cjs.sortByRecentUse(fromServer, usage)] : [],
33887
+ dashboard: [...pinned, ...chunkGUV63FUC_cjs.DASHBOARD_OPERATIONS],
33888
+ forTasks: [chunkGUV63FUC_cjs.CUSTOM_TASK, ...all.filter((w) => w.schedulable), chunkGUV63FUC_cjs.REMIND_TASK]
33025
33889
  };
33026
33890
  }, [listings, usage, skillsEnabled]);
33027
33891
  }
@@ -33043,7 +33907,7 @@ function resolveLaunchInputs(workflow, request) {
33043
33907
  function useWorkflowLaunch() {
33044
33908
  const { skills } = useWorkflowDefinitions();
33045
33909
  const launch = React9.useCallback(
33046
- (workflowId, options2 = {}) => chunkO3MRE2HL_cjs.openWorkflowLaunch({ workflowId, ...options2 }),
33910
+ (workflowId, options2 = {}) => chunkGUV63FUC_cjs.openWorkflowLaunch({ workflowId, ...options2 }),
33047
33911
  []
33048
33912
  );
33049
33913
  const itemsFor = React9.useCallback(
@@ -33072,8 +33936,8 @@ function useWorkflowLaunch() {
33072
33936
  return { launch, itemsFor, scopeItemsFor };
33073
33937
  }
33074
33938
  function Inner() {
33075
- const request = chunkO3MRE2HL_cjs.useWorkflowLaunchRequest();
33076
- const close = chunkO3MRE2HL_cjs.closeWorkflowLaunch;
33939
+ const request = chunkGUV63FUC_cjs.useWorkflowLaunchRequest();
33940
+ const close = chunkGUV63FUC_cjs.closeWorkflowLaunch;
33077
33941
  const { skills } = useWorkflowDefinitions();
33078
33942
  const run = useLaunchWorkflow({ landing: request?.landing });
33079
33943
  const workflow = skills.find((w) => w.id === request?.workflowId);
@@ -33111,7 +33975,7 @@ function Inner() {
33111
33975
  );
33112
33976
  }
33113
33977
  function WorkflowLaunchHost() {
33114
- return chunkO3MRE2HL_cjs.useWorkflowLaunchRequest() ? /* @__PURE__ */ jsxRuntime.jsx(Inner, {}) : null;
33978
+ return chunkGUV63FUC_cjs.useWorkflowLaunchRequest() ? /* @__PURE__ */ jsxRuntime.jsx(Inner, {}) : null;
33115
33979
  }
33116
33980
  function isNeedsConfirmationDetail(detail) {
33117
33981
  return typeof detail === "object" && detail !== null && detail.needs_confirmation === "resource_private";
@@ -33640,7 +34504,7 @@ var ConversationEntity = React9.memo(function ConversationEntity2({
33640
34504
  );
33641
34505
  const icon2 = /* @__PURE__ */ jsxRuntime.jsx(ui.ThreadVisibilityIcon, { shared: isShared, className: `${iconSizeClass} shrink-0` });
33642
34506
  return /* @__PURE__ */ jsxRuntime.jsx(
33643
- chunkO3MRE2HL_cjs.EntityChip,
34507
+ chunkGUV63FUC_cjs.EntityChip,
33644
34508
  {
33645
34509
  variant,
33646
34510
  icon: icon2,
@@ -33662,7 +34526,7 @@ function WorkflowRunStatusCell({ conversation }) {
33662
34526
  });
33663
34527
  const { data: members = [] } = react.useWorkspaceUsers();
33664
34528
  const me = react.useArbiSession().user?.external_id;
33665
- const steps = chunkO3MRE2HL_cjs.fromPlanSteps(conversation.plan?.steps ?? []);
34529
+ const steps = chunkGUV63FUC_cjs.fromPlanSteps(conversation.plan?.steps ?? []);
33666
34530
  const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
33667
34531
  const nameOf = (id) => {
33668
34532
  if (id === me) return "you";
@@ -33670,7 +34534,7 @@ function WorkflowRunStatusCell({ conversation }) {
33670
34534
  return person ? ui.getUserDisplayName(person) : void 0;
33671
34535
  };
33672
34536
  return /* @__PURE__ */ jsxRuntime.jsx(
33673
- chunkO3MRE2HL_cjs.WorkflowRunStatus,
34537
+ chunkGUV63FUC_cjs.WorkflowRunStatus,
33674
34538
  {
33675
34539
  steps,
33676
34540
  states,
@@ -33704,7 +34568,7 @@ function ConversationStatusCell({ conversation }) {
33704
34568
  if (conversation.plan?.steps?.length && !isLiveGenerating)
33705
34569
  return /* @__PURE__ */ jsxRuntime.jsx(WorkflowRunStatusCell, { conversation });
33706
34570
  return /* @__PURE__ */ jsxRuntime.jsx(
33707
- chunkO3MRE2HL_cjs.ThreadStatusLine,
34571
+ chunkGUV63FUC_cjs.ThreadStatusLine,
33708
34572
  {
33709
34573
  state: threadStateOf(conversation, isLiveGenerating),
33710
34574
  className: "h-full",
@@ -34036,16 +34900,16 @@ function useConnectedThreadActivity(conversationId) {
34036
34900
  const openWorkflow = chunkB3NYBMDR_cjs.useOpenWorkflow();
34037
34901
  const workspaceExtId = react.useArbiSessionState((s) => s.workspaceId);
34038
34902
  const task = conversations.find((c) => c.external_id === conversationId);
34039
- const latestMessageAt = chunkO3MRE2HL_cjs.latestMessageTime(messageHistory);
34903
+ const latestMessageAt = chunkGUV63FUC_cjs.latestMessageTime(messageHistory);
34040
34904
  const events = (activity.data ?? []).filter(
34041
- (event) => !chunkO3MRE2HL_cjs.isSupersededStop(event, latestMessageAt)
34905
+ (event) => !chunkGUV63FUC_cjs.isSupersededStop(event, latestMessageAt)
34042
34906
  );
34043
34907
  const personName = (extId) => {
34044
34908
  const person = members.find((m) => m.user.external_id === extId)?.user;
34045
34909
  return person ? ui.getUserDisplayName(person) : "someone";
34046
34910
  };
34047
- const planSteps = chunkO3MRE2HL_cjs.fromPlanSteps(task?.plan?.steps ?? []);
34048
- const entries = chunkO3MRE2HL_cjs.compactThreadActivity(events, (id) => planSteps.find((s) => s.id === id)?.title);
34911
+ const planSteps = chunkGUV63FUC_cjs.fromPlanSteps(task?.plan?.steps ?? []);
34912
+ const entries = chunkGUV63FUC_cjs.compactThreadActivity(events, (id) => planSteps.find((s) => s.id === id)?.title);
34049
34913
  const items = entries.map(({ event, label, recipients }) => {
34050
34914
  const messageActivity = [
34051
34915
  "created",
@@ -34071,7 +34935,7 @@ function useConnectedThreadActivity(conversationId) {
34071
34935
  const messageId = sourceMessage ?? [...messageHistory].reverse().find((message) => Date.parse(message.created_at ?? "") <= Date.parse(event.created_at))?.external_id ?? messageHistory[0]?.external_id;
34072
34936
  const doc = docId ? docs.find((d) => d.external_id === docId) : void 0;
34073
34937
  const mailDraftId = event.kind === "notified" && event.detail?.event === "mail_draft_ready" && typeof event.detail?.mail_id === "string" ? event.detail.mail_id : void 0;
34074
- const missed = event.kind === "notified" && recipients.length ? chunkO3MRE2HL_cjs.unnotifiedMentions(
34938
+ const missed = event.kind === "notified" && recipients.length ? chunkGUV63FUC_cjs.unnotifiedMentions(
34075
34939
  messageHistory.find((message) => message.external_id === sourceMessage)?.mentions,
34076
34940
  recipients,
34077
34941
  event.actor_ext_id
@@ -34086,7 +34950,7 @@ function useConnectedThreadActivity(conversationId) {
34086
34950
  step: typeof event.detail?.step === "string" ? event.detail.step : void 0,
34087
34951
  createdAt: event.created_at,
34088
34952
  card: callDetail ? /* @__PURE__ */ jsxRuntime.jsx(
34089
- chunk6AJJJ5HR_cjs.ThreadCallLogCard,
34953
+ chunk5R256EMF_cjs.ThreadCallLogCard,
34090
34954
  {
34091
34955
  detail: callDetail,
34092
34956
  name: personName,
@@ -34094,7 +34958,7 @@ function useConnectedThreadActivity(conversationId) {
34094
34958
  time: ui.formatRelativeTime(event.created_at, { style: "short" })
34095
34959
  }
34096
34960
  ) : recordingCall ? /* @__PURE__ */ jsxRuntime.jsx(
34097
- chunk6AJJJ5HR_cjs.RecordingCard,
34961
+ chunk5R256EMF_cjs.RecordingCard,
34098
34962
  {
34099
34963
  callExtId: recordingCall,
34100
34964
  recordingExtId: recordingId,
@@ -34104,7 +34968,7 @@ function useConnectedThreadActivity(conversationId) {
34104
34968
  ) : void 0,
34105
34969
  docId,
34106
34970
  docTitle: doc ? ui.getDocumentTitle(doc) : void 0,
34107
- label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ? chunkO3MRE2HL_cjs.notifiedLabel(recipients.map(personName), missed.map(personName)) : label,
34971
+ label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ? chunkGUV63FUC_cjs.notifiedLabel(recipients.map(personName), missed.map(personName)) : label,
34108
34972
  description: [
34109
34973
  name,
34110
34974
  label,
@@ -34118,7 +34982,7 @@ function useConnectedThreadActivity(conversationId) {
34118
34982
  stepChip: eventStep ? stepChipOf(eventStep, event.kind, stepDocument) : void 0,
34119
34983
  // No avatar tooltip: the entry is already a button (or titled row) that carries the same
34120
34984
  // details, and a tooltip trigger inside it would be a nested <button>.
34121
- avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AssistantEntity, { variant: "icon", size: 20, showTooltip: false }) : member ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user: member, tooltip: false }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-4 text-muted-foreground" }),
34985
+ avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AssistantEntity, { variant: "icon", size: 20, showTooltip: false }) : member ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user: member, tooltip: false }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-4 text-muted-foreground" }),
34122
34986
  time: ui.formatRelativeTime(event.created_at, { style: "short" }),
34123
34987
  exactTime: ui.formatFriendlyDate(event.created_at),
34124
34988
  onOpenDocument: docId && doc ? () => openDocument(docId) : void 0,
@@ -34167,7 +35031,7 @@ function useConnectedThreadActivity(conversationId) {
34167
35031
  onSelect: () => navigateToConversation(source)
34168
35032
  });
34169
35033
  }
34170
- const links = chunkO3MRE2HL_cjs.linkedRunsFromActivity(activity.data);
35034
+ const links = chunkGUV63FUC_cjs.linkedRunsFromActivity(activity.data);
34171
35035
  const threadName = (id, workflowId) => conversations.find((c) => c.external_id === id)?.title || workflows.find((w) => w.external_id === workflowId)?.name || "Linked thread";
34172
35036
  const signals = links.raised.map((raised) => ({
34173
35037
  step: raised.step,
@@ -34182,7 +35046,7 @@ function useConnectedThreadActivity(conversationId) {
34182
35046
  if (links.startedBy) {
34183
35047
  const { conversationId: parentId, step, signal } = links.startedBy;
34184
35048
  const parent = conversations.find((c) => c.external_id === parentId);
34185
- const parentSteps = chunkO3MRE2HL_cjs.fromPlanSteps(parent?.plan?.steps ?? []);
35049
+ const parentSteps = chunkGUV63FUC_cjs.fromPlanSteps(parent?.plan?.steps ?? []);
34186
35050
  startedBy = {
34187
35051
  stepTitle: parentSteps.find((s) => s.id === step)?.title ?? step ?? "a step",
34188
35052
  threadTitle: parent?.title || "another thread",
@@ -34215,7 +35079,7 @@ function ConnectedThreadTaskBar({
34215
35079
  const person = members.find((m) => m.user.external_id === id)?.user;
34216
35080
  return person ? ui.getUserDisplayName(person) : void 0;
34217
35081
  };
34218
- const steps = chunkO3MRE2HL_cjs.fromPlanSteps(task?.plan?.steps ?? []);
35082
+ const steps = chunkGUV63FUC_cjs.fromPlanSteps(task?.plan?.steps ?? []);
34219
35083
  const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
34220
35084
  const runInputs = task?.skill_inputs ?? {};
34221
35085
  const stepCall = (body) => actOnStep.mutateAsync({ conversationId, body });
@@ -34241,7 +35105,7 @@ function ConnectedThreadTaskBar({
34241
35105
  task?.plan?.steps?.length ? (
34242
35106
  // A workflow run: its named steps, with what happened in the thread under each.
34243
35107
  /* @__PURE__ */ jsxRuntime.jsx(
34244
- chunkO3MRE2HL_cjs.WorkflowThreadStrip,
35108
+ chunkGUV63FUC_cjs.WorkflowThreadStrip,
34245
35109
  {
34246
35110
  steps,
34247
35111
  states,
@@ -34268,7 +35132,7 @@ function ConnectedThreadTaskBar({
34268
35132
  renderStepAction: (step, phase) => (
34269
35133
  // A signer or a draft's person acts on their step even on a thread they cannot edit.
34270
35134
  canEdit || phase === "waiting" || phase === "done" ? /* @__PURE__ */ jsxRuntime.jsx(
34271
- chunkO3MRE2HL_cjs.WorkflowStepAction,
35135
+ chunkGUV63FUC_cjs.WorkflowStepAction,
34272
35136
  {
34273
35137
  step,
34274
35138
  phase,
@@ -34289,8 +35153,8 @@ function ConnectedThreadTaskBar({
34289
35153
  }
34290
35154
  )
34291
35155
  ) : items.length || startedBy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
34292
- startedBy && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.WorkflowThreadStartedBy, { origin: startedBy }),
34293
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.TaskFlow, { items: items.filter((item) => !item.step) })
35156
+ startedBy && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.WorkflowThreadStartedBy, { origin: startedBy }),
35157
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.TaskFlow, { items: items.filter((item) => !item.step) })
34294
35158
  ] }) : (
34295
35159
  // Ordinary chats record no activity events, so an empty ribbon says nothing rather than
34296
35160
  // "No recorded activity yet" while the answer and its steps are right there in the thread.
@@ -34324,7 +35188,7 @@ function ConnectedThreadTaskBar({
34324
35188
  ) }),
34325
35189
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
34326
35190
  /* @__PURE__ */ jsxRuntime.jsx(
34327
- chunkTPNLYQD2_cjs.ThreadFollowMenuItem,
35191
+ chunkPV5A5SAC_cjs.ThreadFollowMenuItem,
34328
35192
  {
34329
35193
  following: follow.following,
34330
35194
  onFollowingChange: (on) => (
@@ -34489,7 +35353,7 @@ function ConnectedTaskComposer({
34489
35353
  const { tasks: allTasks } = react.useWorkItems();
34490
35354
  const { data: documents = [] } = react.useDocuments();
34491
35355
  const { create: create4, update, updateWorkflow, isPending } = useWorkflowTasks();
34492
- const scopeSource = chunkUZVXVTTB_cjs.useConnectedWorkflowScopeSource();
35356
+ const scopeSource = chunkQWSAJNQE_cjs.useConnectedWorkflowScopeSource();
34493
35357
  const activeWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
34494
35358
  const activeWorkspace = React9.useMemo(
34495
35359
  () => workspaces.find((w) => w.external_id === activeWorkspaceId) ?? null,
@@ -34506,7 +35370,7 @@ function ConnectedTaskComposer({
34506
35370
  const label = (t) => t.title?.trim() || "Untitled task";
34507
35371
  if (isWorkflow) return allTasks.map((t) => ({ id: t.external_id, name: label(t) }));
34508
35372
  const subject = task ?? { external_id: "__new__" };
34509
- return chunkO3MRE2HL_cjs.moveTargets(
35373
+ return chunkGUV63FUC_cjs.moveTargets(
34510
35374
  [...allTasks.filter((t) => t.external_id !== subject.external_id), subject],
34511
35375
  subject
34512
35376
  ).map((t) => ({ id: t.external_id, name: label(t) }));
@@ -34521,33 +35385,33 @@ function ConnectedTaskComposer({
34521
35385
  );
34522
35386
  const initialValues = React9.useMemo(() => {
34523
35387
  const ids = {
34524
- customWorkflowId: chunkO3MRE2HL_cjs.CUSTOM_TASK_ID,
34525
- reminderWorkflowId: chunkO3MRE2HL_cjs.REMIND_TASK_ID,
35388
+ customWorkflowId: chunkGUV63FUC_cjs.CUSTOM_TASK_ID,
35389
+ reminderWorkflowId: chunkGUV63FUC_cjs.REMIND_TASK_ID,
34526
35390
  definitions: forTasks
34527
35391
  };
34528
35392
  const base = launchWorkflow ? {
34529
- ...chunkO3MRE2HL_cjs.workflowToComposerValues(launchWorkflow, ids),
35393
+ ...chunkGUV63FUC_cjs.workflowToComposerValues(launchWorkflow, ids),
34530
35394
  when: "once",
34531
35395
  runAt: "",
34532
35396
  rrule: "",
34533
35397
  eventKind: "",
34534
35398
  afterTaskId: "",
34535
35399
  name: ""
34536
- } : editingWorkflow ? chunkO3MRE2HL_cjs.workflowToComposerValues(editingWorkflow, ids) : task ? chunkO3MRE2HL_cjs.taskToComposerValues(task, ids) : isWorkflow ? {
35400
+ } : editingWorkflow ? chunkGUV63FUC_cjs.workflowToComposerValues(editingWorkflow, ids) : task ? chunkGUV63FUC_cjs.taskToComposerValues(task, ids) : isWorkflow ? {
34537
35401
  // Run now is the default start; scheduling is the fallback in the same field.
34538
35402
  assignee: "agent",
34539
- workflowId: initialWorkflowId ?? chunkO3MRE2HL_cjs.CUSTOM_TASK_ID,
35403
+ workflowId: initialWorkflowId ?? chunkGUV63FUC_cjs.CUSTOM_TASK_ID,
34540
35404
  when: startLater ? "once" : "now",
34541
35405
  ...initialPrompt ? {
34542
35406
  inputs: {
34543
- [initialWorkflowId === chunkO3MRE2HL_cjs.REMIND_TASK_ID ? "message" : "instruction"]: initialPrompt
35407
+ [initialWorkflowId === chunkGUV63FUC_cjs.REMIND_TASK_ID ? "message" : "instruction"]: initialPrompt
34544
35408
  }
34545
35409
  } : {},
34546
35410
  // A scheduled run needs an agent: the owner's Assistant unless another is picked.
34547
35411
  ...startLater && defaultAgentId ? { agentId: defaultAgentId } : {}
34548
35412
  } : initialAgentExtId ? (
34549
35413
  // Assigning an agent means agentic work: the free instruction, and tell me when done.
34550
- { agentId: initialAgentExtId, workflowId: chunkO3MRE2HL_cjs.CUSTOM_TASK_ID, notifyOnComplete: true }
35414
+ { agentId: initialAgentExtId, workflowId: chunkGUV63FUC_cjs.CUSTOM_TASK_ID, notifyOnComplete: true }
34551
35415
  ) : {};
34552
35416
  return {
34553
35417
  timezone: chunkQUMUAJ2P_cjs.detectTimeZone(),
@@ -34608,7 +35472,7 @@ function ConnectedTaskComposer({
34608
35472
  const ctx = {
34609
35473
  workflow: chosen,
34610
35474
  values: submitted,
34611
- plan: chosen.id === chunkO3MRE2HL_cjs.CUSTOM_TASK_ID ? plan : null
35475
+ plan: chosen.id === chunkGUV63FUC_cjs.CUSTOM_TASK_ID ? plan : null
34612
35476
  };
34613
35477
  try {
34614
35478
  if (isWorkflow && editingWorkflow && !options2?.runOnce) {
@@ -34644,7 +35508,7 @@ function ConnectedTaskComposer({
34644
35508
  }
34645
35509
  };
34646
35510
  return /* @__PURE__ */ jsxRuntime.jsx(
34647
- chunkO3MRE2HL_cjs.TaskComposer,
35511
+ chunkGUV63FUC_cjs.TaskComposer,
34648
35512
  {
34649
35513
  open,
34650
35514
  onOpenChange,
@@ -34658,15 +35522,15 @@ function ConnectedTaskComposer({
34658
35522
  tasks: taskOptions,
34659
35523
  initialValues,
34660
35524
  timezones,
34661
- eventOptions: chunkO3MRE2HL_cjs.AUTOMATION_EVENTS,
35525
+ eventOptions: chunkGUV63FUC_cjs.AUTOMATION_EVENTS,
34662
35526
  eventWorkflowOptions: workspaceAutomations.filter((item) => item.external_id !== editingWorkflow?.external_id).map((item) => ({ id: item.external_id, label: item.name })),
34663
35527
  isPending,
34664
35528
  planDrafting: planWork.isPending,
34665
35529
  hasPlan: plan !== null,
34666
- renderIcon: chunkO3MRE2HL_cjs.renderWorkflowIcon,
35530
+ renderIcon: chunkGUV63FUC_cjs.renderWorkflowIcon,
34667
35531
  scopeSource,
34668
35532
  renderDocuments: (field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
34669
- chunkUZVXVTTB_cjs.ConnectedWorkflowDocumentsField,
35533
+ chunkQWSAJNQE_cjs.ConnectedWorkflowDocumentsField,
34670
35534
  {
34671
35535
  field,
34672
35536
  value,
@@ -34697,8 +35561,8 @@ function ConnectedTaskComposer({
34697
35561
  ...plan ? { addAndStart: "Approve plan and start", addAndSchedule: "Approve plan and schedule" } : {}
34698
35562
  },
34699
35563
  onSubmit: submit,
34700
- goal: (values) => values.workflowId === chunkO3MRE2HL_cjs.CUSTOM_TASK_ID ? /* @__PURE__ */ jsxRuntime.jsx(
34701
- chunkO3MRE2HL_cjs.TaskPlan,
35564
+ goal: (values) => values.workflowId === chunkGUV63FUC_cjs.CUSTOM_TASK_ID ? /* @__PURE__ */ jsxRuntime.jsx(
35565
+ chunkGUV63FUC_cjs.TaskPlan,
34702
35566
  {
34703
35567
  plan,
34704
35568
  onChange: setPlan,
@@ -34898,7 +35762,7 @@ function ConnectedTaskStartDialog({
34898
35762
  };
34899
35763
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
34900
35764
  /* @__PURE__ */ jsxRuntime.jsx(
34901
- chunkO3MRE2HL_cjs.TaskStartDialog,
35765
+ chunkGUV63FUC_cjs.TaskStartDialog,
34902
35766
  {
34903
35767
  open: open && !later,
34904
35768
  onOpenChange: (next) => {
@@ -34930,7 +35794,7 @@ function ConnectedTaskStartDialog({
34930
35794
  kind: "workflow",
34931
35795
  startLater: true,
34932
35796
  initialPrompt: later.prompt,
34933
- initialWorkflowId: later.todo ? chunkO3MRE2HL_cjs.REMIND_TASK_ID : void 0,
35797
+ initialWorkflowId: later.todo ? chunkGUV63FUC_cjs.REMIND_TASK_ID : void 0,
34934
35798
  initialShared: later.shared,
34935
35799
  launchWorkflow: later.workflow
34936
35800
  }
@@ -34944,7 +35808,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
34944
35808
  const [later, setLater] = React9.useState(null);
34945
35809
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
34946
35810
  /* @__PURE__ */ jsxRuntime.jsx(
34947
- chunkO3MRE2HL_cjs.ThreadLauncher,
35811
+ chunkGUV63FUC_cjs.ThreadLauncher,
34948
35812
  {
34949
35813
  workflows: task.workflows,
34950
35814
  people: task.people,
@@ -34981,7 +35845,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
34981
35845
  kind: "workflow",
34982
35846
  startLater: true,
34983
35847
  initialPrompt: later.prompt,
34984
- initialWorkflowId: later.todo ? chunkO3MRE2HL_cjs.REMIND_TASK_ID : void 0,
35848
+ initialWorkflowId: later.todo ? chunkGUV63FUC_cjs.REMIND_TASK_ID : void 0,
34985
35849
  initialShared: later.shared,
34986
35850
  launchWorkflow: later.workflow
34987
35851
  }
@@ -35010,13 +35874,13 @@ function ConnectedNewThreadDialog({
35010
35874
  });
35011
35875
  const parentOptions = React9.useMemo(() => {
35012
35876
  const leaf = { external_id: "__new__" };
35013
- return chunkO3MRE2HL_cjs.moveTargets([...tasks, leaf], leaf).map((t) => ({
35877
+ return chunkGUV63FUC_cjs.moveTargets([...tasks, leaf], leaf).map((t) => ({
35014
35878
  id: t.external_id,
35015
35879
  name: t.title?.trim() || "Untitled task"
35016
35880
  }));
35017
35881
  }, [tasks]);
35018
35882
  const submit = async (values) => {
35019
- const request = chunkO3MRE2HL_cjs.newThreadToRequest(values);
35883
+ const request = chunkGUV63FUC_cjs.newThreadToRequest(values);
35020
35884
  try {
35021
35885
  if (!workspaceId) throw new Error("Open a workspace to add a task.");
35022
35886
  if (!request.startAssistant && request.todo) {
@@ -35057,7 +35921,7 @@ function ConnectedNewThreadDialog({
35057
35921
  }
35058
35922
  };
35059
35923
  return /* @__PURE__ */ jsxRuntime.jsx(
35060
- chunkO3MRE2HL_cjs.NewThreadDialog,
35924
+ chunkGUV63FUC_cjs.NewThreadDialog,
35061
35925
  {
35062
35926
  open,
35063
35927
  onOpenChange,
@@ -35092,7 +35956,7 @@ function useRenderTaskPerson() {
35092
35956
  return React9.useCallback(
35093
35957
  (person) => {
35094
35958
  const user = person.id ? byId.get(person.id) : void 0;
35095
- return user ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user, variant: "pill" }) : /* @__PURE__ */ jsxRuntime.jsx(chunk2QDNQM63_cjs.PersonPill, { person });
35959
+ return user ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user, variant: "pill" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkT5BCPKU3_cjs.PersonPill, { person });
35096
35960
  },
35097
35961
  [byId]
35098
35962
  );
@@ -35115,7 +35979,7 @@ function ConnectedConversationStart() {
35115
35979
  const browse = openSkillsBrowser ? [
35116
35980
  {
35117
35981
  id: "browse-all",
35118
- iconNode: chunkO3MRE2HL_cjs.renderWorkflowIcon("library"),
35982
+ iconNode: chunkGUV63FUC_cjs.renderWorkflowIcon("library"),
35119
35983
  title: "Browse all",
35120
35984
  description: "See every skill, make a copy, add your own",
35121
35985
  onSelect: () => openSkillsBrowser(),
@@ -35277,7 +36141,7 @@ function getToolParams(detail) {
35277
36141
  return params;
35278
36142
  }
35279
36143
  function StepModelIcon({ modelName, tag }) {
35280
- const cfg = tag === "Premium" ? null : chunkO3MRE2HL_cjs.getModelIcon(modelName, tag);
36144
+ const cfg = tag === "Premium" ? null : chunkGUV63FUC_cjs.getModelIcon(modelName, tag);
35281
36145
  if (tag !== "Premium" && !cfg) return null;
35282
36146
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
35283
36147
  /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: tag === "Premium" ? /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: modelName ?? void 0, size: 11 }) : cfg && /* @__PURE__ */ jsxRuntime.jsx(cfg.icon, { className: cfg.className, style: { width: 11, height: 11 } }) }) }),
@@ -35392,15 +36256,15 @@ var AgentStepsComponent = ({
35392
36256
  const lastStepIndex = mergedSteps[mergedSteps.length - 1].index;
35393
36257
  const renderRow = (step, depth, isLastInList) => {
35394
36258
  const i = posByIndex.get(step.index);
35395
- const presentation = chunkO3MRE2HL_cjs.getAgentStepPresentation(step, docInfo);
36259
+ const presentation = chunkGUV63FUC_cjs.getAgentStepPresentation(step, docInfo);
35396
36260
  const { tool, Icon } = presentation;
35397
36261
  const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
35398
- const accent = chunkO3MRE2HL_cjs.stepAccent(step, tool);
36262
+ const accent = chunkGUV63FUC_cjs.stepAccent(step, tool);
35399
36263
  const duration = stepDurations[i];
35400
36264
  const isLastStep = step.index === lastStepIndex;
35401
36265
  const isActive = step.index === currentStepIndex;
35402
36266
  const tier = step.step === "goal" ? step.model_recommendation : null;
35403
- const TierIcon = tier ? chunkO3MRE2HL_cjs.MODEL_TIER_ICON_MAP[tier] : null;
36267
+ const TierIcon = tier ? chunkGUV63FUC_cjs.MODEL_TIER_ICON_MAP[tier] : null;
35404
36268
  const useLiveDuration = isLastStep && liveTimer != null && step.t != null;
35405
36269
  const durationNode = useLiveDuration ? /* @__PURE__ */ jsxRuntime.jsx(
35406
36270
  MessageLiveSeconds,
@@ -35424,7 +36288,7 @@ var AgentStepsComponent = ({
35424
36288
  })) : null;
35425
36289
  const folded = childrenByParent.get(step.index);
35426
36290
  return /* @__PURE__ */ jsxRuntime.jsxs(
35427
- chunkO3MRE2HL_cjs.StepRow,
36291
+ chunkGUV63FUC_cjs.StepRow,
35428
36292
  {
35429
36293
  index: step.index,
35430
36294
  number: displayNumber.get(step.index) ?? String(i + 1),
@@ -35438,7 +36302,7 @@ var AgentStepsComponent = ({
35438
36302
  titleTestId: isActive ? "agent-expanded-current-step-description" : void 0,
35439
36303
  badge: TierIcon ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
35440
36304
  /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center self-center", children: /* @__PURE__ */ jsxRuntime.jsx(TierIcon, { size: 12, className: accent.fg, "aria-hidden": true }) }) }),
35441
- /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkO3MRE2HL_cjs.MODEL_TIER_LABELS[tier] ?? tier })
36305
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkGUV63FUC_cjs.MODEL_TIER_LABELS[tier] ?? tier })
35442
36306
  ] }) : void 0,
35443
36307
  meta: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35444
36308
  isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(StepModelIcon, { modelName: step.usage?.model, tag: getModelTag(step.usage?.model) }),
@@ -35453,14 +36317,14 @@ var AgentStepsComponent = ({
35453
36317
  summary && !isActive && (step.narration ? (
35454
36318
  /* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
35455
36319
  Tool summaries stay plain text: one-line headlines where a clamp matters. */
35456
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
35457
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
35458
- details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepDetail, { index: step.index, children: d }, di)),
35459
- showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
35460
- toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
35461
- criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.GoalCriteria, { criteria: criteriaView }),
36320
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
36321
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
36322
+ details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepDetail, { index: step.index, children: d }, di)),
36323
+ showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
36324
+ toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
36325
+ criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.GoalCriteria, { criteria: criteriaView }),
35462
36326
  folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
35463
- chunkO3MRE2HL_cjs.SubStepGroup,
36327
+ chunkGUV63FUC_cjs.SubStepGroup,
35464
36328
  {
35465
36329
  parentIndex: step.index,
35466
36330
  summary: summariseSubSteps(folded),
@@ -35486,7 +36350,7 @@ var AgentStepsComponent = ({
35486
36350
  leftParts.push(`${browser.formatTokens(totalInputTokens)} in`);
35487
36351
  if (totalOutputTokens > 0) leftParts.push(`${browser.formatTokens(totalOutputTokens)} out`);
35488
36352
  summaryNode = /* @__PURE__ */ jsxRuntime.jsx(
35489
- chunkO3MRE2HL_cjs.StepTraceSummary,
36353
+ chunkGUV63FUC_cjs.StepTraceSummary,
35490
36354
  {
35491
36355
  left: leftParts.join(" \xB7 "),
35492
36356
  isNearBudget: browser.isNearAiUsageBudget(contextUsage),
@@ -35494,7 +36358,7 @@ var AgentStepsComponent = ({
35494
36358
  }
35495
36359
  );
35496
36360
  }
35497
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row2, i) => {
36361
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row2, i) => {
35498
36362
  if (row2.lane) {
35499
36363
  return /* @__PURE__ */ jsxRuntime.jsx(
35500
36364
  LaneBinding,
@@ -35531,7 +36395,7 @@ function LaneBinding({
35531
36395
  const running = !closed && isStreaming;
35532
36396
  const latest = inner[inner.length - 1];
35533
36397
  return /* @__PURE__ */ jsxRuntime.jsx(
35534
- chunkO3MRE2HL_cjs.SubAgentLane,
36398
+ chunkGUV63FUC_cjs.SubAgentLane,
35535
36399
  {
35536
36400
  handle,
35537
36401
  number,
@@ -35654,7 +36518,7 @@ function AgentBarShell({
35654
36518
  }, [isStepsExpanded, steps]);
35655
36519
  const visibleStepCount = React9.useMemo(() => browser.topLevelAgentSteps(steps ?? []).length, [steps]);
35656
36520
  return /* @__PURE__ */ jsxRuntime.jsx(
35657
- chunkO3MRE2HL_cjs.AgentBar,
36521
+ chunkGUV63FUC_cjs.AgentBar,
35658
36522
  {
35659
36523
  className,
35660
36524
  testId,
@@ -35710,7 +36574,7 @@ function AgentControlBar({
35710
36574
  const isPaused = controlState === "paused" || controlState === "resuming";
35711
36575
  const steps = agentSteps ?? [];
35712
36576
  const currentStep = browser.getCurrentStep(steps);
35713
- const currentPresentation = chunkO3MRE2HL_cjs.getCurrentAgentStepPresentation(steps);
36577
+ const currentPresentation = chunkGUV63FUC_cjs.getCurrentAgentStepPresentation(steps);
35714
36578
  const CurrentStepIcon = currentPresentation?.Icon;
35715
36579
  const stepLabel2 = currentPresentation?.description ?? "Agent working\u2026";
35716
36580
  const runningLanes = browser.extractSubagentLanes(steps).filter((l) => l.status === "running");
@@ -35727,7 +36591,7 @@ function AgentControlBar({
35727
36591
  }
35728
36592
  );
35729
36593
  const status = /* @__PURE__ */ jsxRuntime.jsx(
35730
- chunkO3MRE2HL_cjs.AgentBarStatus,
36594
+ chunkGUV63FUC_cjs.AgentBarStatus,
35731
36595
  {
35732
36596
  state: showState ? controlState : void 0,
35733
36597
  stateLabel: STATE_LABEL[controlState],
@@ -35769,7 +36633,7 @@ function AgentControlBar({
35769
36633
  ];
35770
36634
  const controls = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35771
36635
  onStop && /* @__PURE__ */ jsxRuntime.jsx(
35772
- chunkO3MRE2HL_cjs.AgentBarIconButton,
36636
+ chunkGUV63FUC_cjs.AgentBarIconButton,
35773
36637
  {
35774
36638
  onClick: onStop,
35775
36639
  title: "Stop",
@@ -35778,22 +36642,22 @@ function AgentControlBar({
35778
36642
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "h-3 w-3", fill: "currentColor" })
35779
36643
  }
35780
36644
  ),
35781
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentBarMenu, { items: menuItems })
36645
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AgentBarMenu, { items: menuItems })
35782
36646
  ] });
35783
36647
  const displayedQueuedMessages = (transientQueuedMessages ?? []).filter(
35784
36648
  (message) => !message.serverId || !queuedMessages.some((queued) => queued.external_id === message.serverId)
35785
36649
  );
35786
36650
  const queuedNotes = displayedQueuedMessages.filter((message) => message.content);
35787
- const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.AgentBarNotes, { children: [
36651
+ const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.AgentBarNotes, { children: [
35788
36652
  queuedNotes.map((message, index) => /* @__PURE__ */ jsxRuntime.jsx(
35789
- chunkO3MRE2HL_cjs.AgentBarQueuedNote,
36653
+ chunkGUV63FUC_cjs.AgentBarQueuedNote,
35790
36654
  {
35791
36655
  text: message.content ?? "",
35792
36656
  isAcknowledged: message.acknowledged
35793
36657
  },
35794
36658
  index
35795
36659
  )),
35796
- probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentBarProbeAnswer, { answer: probeAnswer.answer })
36660
+ probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AgentBarProbeAnswer, { answer: probeAnswer.answer })
35797
36661
  ] }) : null;
35798
36662
  return /* @__PURE__ */ jsxRuntime.jsx(
35799
36663
  AgentBarShell,
@@ -35850,7 +36714,7 @@ function RunningSubagentsRoster({
35850
36714
  if (leafId) selectThread(leafId);
35851
36715
  };
35852
36716
  return /* @__PURE__ */ jsxRuntime.jsx(
35853
- chunkO3MRE2HL_cjs.SubagentRoster,
36717
+ chunkGUV63FUC_cjs.SubagentRoster,
35854
36718
  {
35855
36719
  lanes: rosterLanes,
35856
36720
  className,
@@ -35974,7 +36838,7 @@ function useOpenChunk() {
35974
36838
  const meta = chunk.metadata;
35975
36839
  if (!meta?.doc_ext_id) return;
35976
36840
  const listed = documents?.find((d) => d.external_id === meta.doc_ext_id);
35977
- openDocument(chunkYD3RN2FY_cjs.citedVersionRef(meta.doc_ext_id, meta.doc_version, listed?.current_version), {
36841
+ openDocument(chunkF72ZD5Q2_cjs.citedVersionRef(meta.doc_ext_id, meta.doc_version, listed?.current_version), {
35978
36842
  page: meta.page_number ?? void 0,
35979
36843
  passageId: meta.chunk_ext_id ?? void 0
35980
36844
  });
@@ -36592,7 +37456,7 @@ function WorkflowStepMessage({
36592
37456
  const { conversations } = react.useConversationItems();
36593
37457
  const activity = react.useConversationActivity(conversationId ?? void 0, { live: true });
36594
37458
  const plan = conversations.find((c) => c.external_id === conversationId)?.plan;
36595
- const steps = chunkO3MRE2HL_cjs.fromPlanSteps(plan?.steps ?? []);
37459
+ const steps = chunkGUV63FUC_cjs.fromPlanSteps(plan?.steps ?? []);
36596
37460
  const found = steps.find((s) => s.id === step);
36597
37461
  const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
36598
37462
  const { data: documents = [] } = react.useDocuments();
@@ -36764,7 +37628,7 @@ var MessageComponent = ({
36764
37628
  const isQueuedAnswer = !isUser && message.status === "queued" && !isGenerating;
36765
37629
  const isAwaitingAnswer = (isGenerating || isRunningOnServer) && !isStopped && !!message.pendingUserInput;
36766
37630
  const showWorkingIndicator = (isGenerating || isRunningOnServer) && !isQueuedAnswer && !responseContent.trim() && !linkedArtifact && !isAwaitingAnswer;
36767
- const workingStepLabel = showWorkingIndicator ? chunkO3MRE2HL_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
37631
+ const workingStepLabel = showWorkingIndicator ? chunkGUV63FUC_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
36768
37632
  const workingStepStart = showWorkingIndicator ? browser.getCurrentStep(message.agentSteps ?? [])?.t ?? 0 : 0;
36769
37633
  const showEmptyAnswer = !isUser && !isGenerating && !isRunningOnServer && !isFailed && !isStopped && !responseContent.trim() && !linkedArtifact;
36770
37634
  const isEmptyStopped = isStopped && !responseContent.trim();
@@ -36784,7 +37648,7 @@ var MessageComponent = ({
36784
37648
  else session.setDraft(retry.question.content);
36785
37649
  };
36786
37650
  const factData = React9.useMemo(
36787
- () => chunkYD3RN2FY_cjs.buildFactCitations(responseContent, activeCitations, citationData),
37651
+ () => chunkF72ZD5Q2_cjs.buildFactCitations(responseContent, activeCitations, citationData),
36788
37652
  [responseContent, activeCitations, citationData]
36789
37653
  );
36790
37654
  const factText = factData.text;
@@ -36887,7 +37751,7 @@ var MessageComponent = ({
36887
37751
  notify18("Cannot create fact: no workspace open", "error");
36888
37752
  return;
36889
37753
  }
36890
- const chronology = chunkYD3RN2FY_cjs.chronologyFactBodies(factText, factData.citations);
37754
+ const chronology = chunkF72ZD5Q2_cjs.chronologyFactBodies(factText, factData.citations);
36891
37755
  try {
36892
37756
  if (chronology) {
36893
37757
  await createFacts.mutateAsync({ facts: chronology });
@@ -36929,7 +37793,7 @@ var MessageComponent = ({
36929
37793
  const statusLabel = isFailed ? "Response failed" : isStopped ? "Stopped" : finalElapsedSeconds >= 0.05 ? `Answered in ${finalElapsedSeconds.toFixed(1)}s` : "Complete";
36930
37794
  const timeLabel = ui.formatFriendlyDate(message.created_at || "");
36931
37795
  const messageId = message.external_id;
36932
- const transcriptRuns = chunk6AJJJ5HR_cjs.useTranscriptRuns();
37796
+ const transcriptRuns = chunk5R256EMF_cjs.useTranscriptRuns();
36933
37797
  const messageRole = isUser ? "user" : "assistant";
36934
37798
  const menuItems = [
36935
37799
  ...isUser ? [
@@ -37068,7 +37932,7 @@ var MessageComponent = ({
37068
37932
  },
37069
37933
  "data-testid": `message-model-${messageId}`,
37070
37934
  children: /* @__PURE__ */ jsxRuntime.jsx(
37071
- chunkO3MRE2HL_cjs.AssistantEntity,
37935
+ chunkGUV63FUC_cjs.AssistantEntity,
37072
37936
  {
37073
37937
  name: modelDisplayName,
37074
37938
  modelName,
@@ -37137,7 +38001,7 @@ var MessageComponent = ({
37137
38001
  const speakerName = speaker ? ui.getUserDisplayName(speaker) : null;
37138
38002
  const isMe = transcriptSegment.speaker_ext_id === currentUser?.external_id;
37139
38003
  return /* @__PURE__ */ jsxRuntime.jsx(
37140
- chunk6AJJJ5HR_cjs.TranscriptEntry,
38004
+ chunk5R256EMF_cjs.TranscriptEntry,
37141
38005
  {
37142
38006
  speakerId: transcriptSegment.speaker_ext_id,
37143
38007
  speakerName: isMe ? "Me" : speakerName || "Former member",
@@ -37181,7 +38045,7 @@ var MessageComponent = ({
37181
38045
  // Stays the ARBI identity while streaming: the model name arrives
37182
38046
  // with the first step that reports one and would swap the author
37183
38047
  // mid-answer. The model is shown in the footer once settled.
37184
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AssistantEntity, { size: 16, pillSize: "sm" })
38048
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.AssistantEntity, { size: 16, pillSize: "sm" })
37185
38049
  ),
37186
38050
  timeLabel,
37187
38051
  isSettled: settledForHeader,
@@ -37646,7 +38510,7 @@ function ConnectedMessageList({ messages }) {
37646
38510
  start: virtualItem.start,
37647
38511
  messageId: entry.id,
37648
38512
  setSize: transcript.length,
37649
- children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
38513
+ children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
37650
38514
  "button",
37651
38515
  {
37652
38516
  className: "mt-1 hover:underline text-primary",
@@ -37698,6 +38562,763 @@ function ConnectedMessageList({ messages }) {
37698
38562
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadsPreview, { open: previewOpen, onOpenChange: setPreviewOpen })
37699
38563
  ] });
37700
38564
  }
38565
+ function ThreadSearch({ children, ResultsBoundary = chunkTM2D4XT4_cjs.ErrorBoundary }) {
38566
+ const [query, setQuery] = React9.useState("");
38567
+ const [submitted, setSubmitted] = React9.useState("");
38568
+ const selectedWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
38569
+ const { notify: notify18, openConversation } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
38570
+ const search = react.useConversationSearch();
38571
+ const isSearching = search.isPending;
38572
+ const groups = React9.useMemo(
38573
+ () => search.isError ? [] : (search.data?.results ?? []).map((g) => ({
38574
+ id: g.conversation_ext_id,
38575
+ title: g.title,
38576
+ matches: g.messages.map((m) => ({
38577
+ id: m.message_ext_id,
38578
+ role: m.role,
38579
+ score: m.score,
38580
+ snippet: m.snippet
38581
+ }))
38582
+ })),
38583
+ [search.data, search.isError]
38584
+ );
38585
+ const handleSearch = React9.useCallback(() => {
38586
+ const q = query.trim();
38587
+ if (!q || !selectedWorkspaceId || isSearching) return;
38588
+ setSubmitted(q);
38589
+ search.mutate(
38590
+ { query: q, search_mode: "hybrid", limit: 20 },
38591
+ {
38592
+ onError: (err) => {
38593
+ console.error("Conversation search failed", err);
38594
+ notify18("Conversation search failed", "error");
38595
+ }
38596
+ }
38597
+ );
38598
+ }, [query, selectedWorkspaceId, isSearching, search, notify18]);
38599
+ const clearSearch = React9.useCallback(() => {
38600
+ setQuery("");
38601
+ setSubmitted("");
38602
+ }, []);
38603
+ const openHit = React9.useCallback(
38604
+ (conversationId, messageId) => {
38605
+ openConversation(conversationId, messageId ? { messageId } : void 0);
38606
+ },
38607
+ [openConversation]
38608
+ );
38609
+ return /* @__PURE__ */ jsxRuntime.jsx(
38610
+ chunkDWWRLKEZ_cjs.ConversationSearchView,
38611
+ {
38612
+ query,
38613
+ onQueryChange: setQuery,
38614
+ onSubmit: handleSearch,
38615
+ canSubmit: !!query.trim() && !!selectedWorkspaceId && !isSearching,
38616
+ isSearching,
38617
+ submittedQuery: submitted,
38618
+ groups,
38619
+ onOpenConversation: openHit,
38620
+ onClear: clearSearch,
38621
+ ResultsBoundary,
38622
+ children
38623
+ }
38624
+ );
38625
+ }
38626
+ var DEFAULT_THREAD_VISIBILITY = { me: null, workspace: null };
38627
+ var relativeTime2 = (iso) => ui.formatRelativeTime(iso, { style: "short" });
38628
+ var LIST_LABELS = {
38629
+ emptyTitle: "Nothing here yet",
38630
+ emptyMessage: "Use New: just type what you need, or fill in an owner and a due date. You always decide when a thread is done.",
38631
+ untitled: `Untitled ${ui.getEntityLabel("CONVERSATION").toLowerCase()}`,
38632
+ noMatches: `No ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} match.`,
38633
+ selectAll: "Select all"
38634
+ };
38635
+ var RENAME_DIALOG = { testId: "rename-conversation-modal" };
38636
+ function useStableRecencyOrder(rows) {
38637
+ const orderRef = React9.useRef([]);
38638
+ return React9.useMemo(() => {
38639
+ const byRecency = [...rows].sort(
38640
+ (a, b) => new Date(b.updated_at || b.created_at || 0).getTime() - new Date(a.updated_at || a.created_at || 0).getTime()
38641
+ );
38642
+ const present = new Set(byRecency.map((r) => r.external_id));
38643
+ const known = new Set(orderRef.current);
38644
+ const added = byRecency.map((r) => r.external_id).filter((id) => !known.has(id));
38645
+ orderRef.current = [...added, ...orderRef.current.filter((id) => present.has(id))];
38646
+ const byId = new Map(byRecency.map((r) => [r.external_id, r]));
38647
+ return orderRef.current.flatMap((id) => byId.get(id) ?? []);
38648
+ }, [rows]);
38649
+ }
38650
+ function ConnectedThreadsPage({
38651
+ showHeader = true,
38652
+ search = false,
38653
+ ResultsBoundary,
38654
+ focusLauncher,
38655
+ layout = "list",
38656
+ workflowActions
38657
+ }) {
38658
+ const mode = layout === "inbox" ? "tasks" : "threads";
38659
+ const { confirm, notify: notify18, openConversation, openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
38660
+ const { conversations: all, isLoading } = react.useConversationItems();
38661
+ const [doneFilter] = react.useTransientView("threads.done", "exclude");
38662
+ const [visibilityFilters] = react.useTransientView("threads.visibility", DEFAULT_THREAD_VISIBILITY);
38663
+ const [meetingFilter] = react.useTransientView("threads.meetings", null);
38664
+ const [topbarFilterQuery, setTopbarFilterQuery] = react.useTransientView("topbar.filter", "");
38665
+ const currentUserExtId = react.useArbiSession().user?.external_id;
38666
+ const listed = React9.useMemo(
38667
+ () => all.filter((c) => mode === "threads" || c.status != null),
38668
+ [all, mode]
38669
+ );
38670
+ const tasks = useStableRecencyOrder(listed);
38671
+ const updateConversation = react.useUpdateConversation();
38672
+ const deleteConversation = react.useDeleteConversation();
38673
+ const people = useTaskPeople();
38674
+ const renderPerson = useRenderTaskPerson();
38675
+ const canEditShared = react.useCanEditShared();
38676
+ const isWorkspaceOwner = react.useIsWorkspaceOwner();
38677
+ const { data: agents = [] } = react.useAgents();
38678
+ const { data: workflows = [] } = react.useWorkflows();
38679
+ const agentNames = React9.useMemo(
38680
+ () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
38681
+ [agents]
38682
+ );
38683
+ const workflowNames = React9.useMemo(
38684
+ () => Object.fromEntries(workflows.map((w) => [w.external_id, w.name])),
38685
+ [workflows]
38686
+ );
38687
+ const runConversation = react.useRunConversation();
38688
+ const [busyId, setBusyId] = React9.useState(null);
38689
+ const [editorOpen, setEditorOpen] = React9.useState(false);
38690
+ const [editing, setEditing] = React9.useState(null);
38691
+ const [startOpen, setStartOpen] = React9.useState(false);
38692
+ const [parentForNew, setParentForNew] = React9.useState(void 0);
38693
+ const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && workflowNames[task.workflow_ext_id] || "Untitled task";
38694
+ const openCreate = () => {
38695
+ setParentForNew(void 0);
38696
+ setStartOpen(true);
38697
+ };
38698
+ const openAddSubtask = (parent) => {
38699
+ setParentForNew(parent.external_id);
38700
+ setStartOpen(true);
38701
+ };
38702
+ const [renaming, setRenaming] = React9.useState(null);
38703
+ const [newTitle, setNewTitle] = React9.useState("");
38704
+ const [isExportOpen, setIsExportOpen] = React9.useState(false);
38705
+ const [exportRows, setExportRows] = React9.useState([]);
38706
+ const openEdit = (task) => {
38707
+ if (mode === "threads" || !task.status) {
38708
+ setRenaming(task);
38709
+ setNewTitle(task.title ?? "");
38710
+ return;
38711
+ }
38712
+ setEditing(task);
38713
+ setEditorOpen(true);
38714
+ };
38715
+ const act = async (task, action, success, failure) => {
38716
+ setBusyId(task.external_id);
38717
+ try {
38718
+ await action();
38719
+ if (success) notify18(success, "success");
38720
+ } catch (error) {
38721
+ notify18(
38722
+ error instanceof browser.ArbiApiError && error.detail ? `${failure}: ${error.detail}` : failure,
38723
+ "error"
38724
+ );
38725
+ } finally {
38726
+ setBusyId(null);
38727
+ }
38728
+ };
38729
+ const patch = (task, body) => updateConversation.mutateAsync({ conversationId: task.external_id, patch: body });
38730
+ const setStatus = (task, status, success) => act(task, () => patch(task, { status }), success, "Failed to update task");
38731
+ const handleToggleShared = (task, shouldShare) => act(
38732
+ task,
38733
+ () => patch(task, { shared: shouldShare }),
38734
+ shouldShare ? `Shared \u201C${nameOf(task)}\u201D with the workspace` : `Made \u201C${nameOf(task)}\u201D private`,
38735
+ "Failed to change who can see the task"
38736
+ );
38737
+ const handleMove = (task, parentId) => act(
38738
+ task,
38739
+ () => patch(task, { parent_conversation_ext_id: parentId }),
38740
+ parentId ? `Moved \u201C${nameOf(task)}\u201D` : `Moved \u201C${nameOf(task)}\u201D to the top level`,
38741
+ "Failed to move task"
38742
+ );
38743
+ const handleDelete = async (task) => {
38744
+ const subtasks = tasks.filter((t) => t.parent_conversation_ext_id === task.external_id).length;
38745
+ const confirmed = await confirm({
38746
+ message: `Delete \u201C${nameOf(task)}\u201D? This can't be undone from here.${subtasks ? ` Its ${subtasks === 1 ? "sub-task stays" : `${subtasks} sub-tasks stay`} and ${subtasks === 1 ? "moves" : "move"} to the top level.` : ""}`,
38747
+ title: "Delete task"
38748
+ });
38749
+ if (!confirmed) return;
38750
+ await act(
38751
+ task,
38752
+ () => deleteConversation.mutateAsync(task.external_id),
38753
+ `Deleted \u201C${nameOf(task)}\u201D`,
38754
+ "Failed to delete task"
38755
+ );
38756
+ };
38757
+ const forEach = async (rows, one, done) => {
38758
+ let failed = 0;
38759
+ for (const task of rows) {
38760
+ try {
38761
+ await one(task);
38762
+ } catch {
38763
+ failed += 1;
38764
+ }
38765
+ }
38766
+ notify18(
38767
+ failed ? `${failed} of ${rows.length} could not be changed: you may not be allowed to change them` : done,
38768
+ failed ? "error" : "success"
38769
+ );
38770
+ };
38771
+ const handleMarkDoneMany = (rows) => forEach(rows, (task) => patch(task, { status: "done" }), `Marked ${rows.length} done`);
38772
+ const handleDeleteMany = async (rows) => {
38773
+ const named = rows.slice(0, 3).map((task) => `"${nameOf(task)}"`).join(", ");
38774
+ const more = rows.length - 3;
38775
+ const confirmed = await confirm({
38776
+ message: `Delete ${more > 0 ? `${named} and ${more} more` : named}? This cannot be undone.`,
38777
+ title: `Delete ${rows.length} item${rows.length === 1 ? "" : "s"}`
38778
+ });
38779
+ if (!confirmed) return;
38780
+ await forEach(
38781
+ rows,
38782
+ (task) => deleteConversation.mutateAsync(task.external_id),
38783
+ `Deleted ${rows.length}`
38784
+ );
38785
+ };
38786
+ const handleSaveRename = React9.useCallback(() => {
38787
+ if (!renaming || !newTitle.trim()) return;
38788
+ updateConversation.mutate(
38789
+ { conversationId: renaming.external_id, patch: { title: newTitle.trim() } },
38790
+ {
38791
+ onSuccess: () => {
38792
+ notify18("Conversation renamed successfully", "success");
38793
+ setRenaming(null);
38794
+ setNewTitle("");
38795
+ },
38796
+ onError: (error) => {
38797
+ console.error("Failed to rename conversation:", error);
38798
+ notify18("Failed to rename conversation", "error");
38799
+ }
38800
+ }
38801
+ );
38802
+ }, [renaming, newTitle, updateConversation, notify18]);
38803
+ const handleBulkShare = async (rows) => {
38804
+ const unshared = rows.filter((c) => !c.is_shared);
38805
+ if (unshared.length === 0) {
38806
+ await confirm({
38807
+ message: "All selected conversations are already shared",
38808
+ title: "Info",
38809
+ kind: "alert"
38810
+ });
38811
+ return;
38812
+ }
38813
+ const noun = ui.getEntityLabel("CONVERSATION", unshared.length > 1 ? "PLURAL" : "SINGULAR");
38814
+ const confirmed = await confirm({
38815
+ message: `Are you sure you want to share ${unshared.length} ${noun.toLowerCase()} with everyone in the current ${ui.getEntityLabel("WORKSPACE").toLowerCase()}? You can make them private again later.`,
38816
+ title: `Share ${ui.getEntityLabel("CONVERSATION", "PLURAL")}`
38817
+ });
38818
+ if (!confirmed) return;
38819
+ try {
38820
+ await Promise.all(
38821
+ unshared.map(
38822
+ (c) => updateConversation.mutateAsync({ conversationId: c.external_id, patch: { shared: true } })
38823
+ )
38824
+ );
38825
+ notify18(`${unshared.length} ${noun.toLowerCase()} shared successfully`, "success");
38826
+ } catch (error) {
38827
+ console.error("Failed to share conversations:", error);
38828
+ notify18("Failed to share some conversations", "error");
38829
+ }
38830
+ };
38831
+ const { data: workspaceDocs } = react.useDocuments();
38832
+ const outputsByTask = React9.useMemo(() => {
38833
+ const out = {};
38834
+ for (const [conversationId, docs] of Object.entries(
38835
+ chunkDWWRLKEZ_cjs.groupOutputsByConversation(workspaceDocs ?? [])
38836
+ )) {
38837
+ out[conversationId] = docs.map((d) => ({
38838
+ id: d.external_id,
38839
+ name: ui.getDocumentTitle(d, d.external_id)
38840
+ }));
38841
+ }
38842
+ return out;
38843
+ }, [workspaceDocs]);
38844
+ const handleOpenOutput = (documentId) => openDocument(documentId);
38845
+ const handleGrantAccess = (task) => act(
38846
+ task,
38847
+ () => runConversation.mutateAsync(task.external_id),
38848
+ `Running \u201C${nameOf(task)}\u201D`,
38849
+ "Failed to run task"
38850
+ );
38851
+ const threadLabels = useThreadLabels(canEditShared);
38852
+ const selectionActions = (selected, isCompact) => {
38853
+ const mine = selected.every((c) => c.created_by_ext_id === currentUserExtId);
38854
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
38855
+ mode === "threads" && selected.every((row2) => row2.is_owner || row2.is_shared && canEditShared) && selected.some((row2) => row2.status !== "done") && !selected.some((row2) => row2.in_progress || row2.status === "generating") && /* @__PURE__ */ jsxRuntime.jsx(
38856
+ chunkV4ISCZJ7_cjs.SelectionBarAction,
38857
+ {
38858
+ icon: lucideReact.CheckCheck,
38859
+ label: "Mark Done",
38860
+ onClick: () => void handleMarkDoneMany(selected),
38861
+ isCompact,
38862
+ testId: "threads-bulk-done"
38863
+ }
38864
+ ),
38865
+ threadLabels.renderBulkLabels(selected, isCompact),
38866
+ mine && selected.some((c) => !c.is_shared) && /* @__PURE__ */ jsxRuntime.jsx(
38867
+ ui.VisibilityToggle,
38868
+ {
38869
+ items: selected,
38870
+ onToggle: () => void handleBulkShare(selected),
38871
+ disablePrivate: true,
38872
+ showLabel: false,
38873
+ tooltipInactive: "Share all with workspace members",
38874
+ tooltipMixed: "Share all with workspace members (some already shared)",
38875
+ "data-testid": "bulk-shared-toggle"
38876
+ }
38877
+ ),
38878
+ /* @__PURE__ */ jsxRuntime.jsx(
38879
+ chunkV4ISCZJ7_cjs.SelectionBarAction,
38880
+ {
38881
+ icon: lucideReact.FolderUp,
38882
+ label: "Export",
38883
+ onClick: () => {
38884
+ setExportRows(selected);
38885
+ setIsExportOpen(true);
38886
+ },
38887
+ isCompact,
38888
+ tooltip: `Export the selected ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} to another ${ui.getEntityLabel("WORKSPACE").toLowerCase()}`,
38889
+ testId: "export-chats-button"
38890
+ }
38891
+ ),
38892
+ mode === "threads" && selected.every((row2) => row2.is_owner || isWorkspaceOwner) && /* @__PURE__ */ jsxRuntime.jsx(
38893
+ chunkV4ISCZJ7_cjs.SelectionBarAction,
38894
+ {
38895
+ icon: lucideReact.Trash2,
38896
+ label: "Delete",
38897
+ className: "text-red-text hover:bg-red-bg hover:text-red-text",
38898
+ onClick: () => void handleDeleteMany(selected),
38899
+ isCompact,
38900
+ testId: "threads-bulk-delete"
38901
+ }
38902
+ )
38903
+ ] });
38904
+ };
38905
+ const page = /* @__PURE__ */ jsxRuntime.jsxs(
38906
+ "div",
38907
+ {
38908
+ className: "flex h-full min-h-0 flex-col",
38909
+ "data-testid": mode === "tasks" ? "tasks-page" : "threads-page",
38910
+ children: [
38911
+ /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex min-h-0 flex-1 flex-col bg-background", children: mode === "threads" ? /* @__PURE__ */ jsxRuntime.jsx(
38912
+ chunkGUV63FUC_cjs.ConversationListView,
38913
+ {
38914
+ showHeader,
38915
+ conversations: tasks,
38916
+ doneFilter,
38917
+ visibilityFilters,
38918
+ meetingFilter,
38919
+ renderThread: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
38920
+ ConversationEntity,
38921
+ {
38922
+ conversation: row2,
38923
+ showRePrefix: false,
38924
+ labelMaxWidth: "max-w-full",
38925
+ className: "w-full max-w-full [&_.truncate]:line-clamp-2 [&_.truncate]:whitespace-normal [&_.truncate]:break-words [&_.truncate]:text-left",
38926
+ "data-testid": `thread-open-${row2.external_id}`
38927
+ }
38928
+ ),
38929
+ renderLabels: threadLabels.renderLabels,
38930
+ labelText: threadLabels.labelText,
38931
+ renderBy: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
38932
+ chunkGUV63FUC_cjs.ConversationTurnSpeaker,
38933
+ {
38934
+ variant: "icon",
38935
+ role: row2.last_message_role,
38936
+ actor: row2.last_message_actor,
38937
+ currentUserId: currentUserExtId,
38938
+ colorClass: row2.last_message_actor ? ui.getUserAvatarColor(row2.last_message_actor.external_id) : void 0
38939
+ }
38940
+ ),
38941
+ renderStatus: (row2) => /* @__PURE__ */ jsxRuntime.jsx(ConversationStatusCell, { conversation: row2 }),
38942
+ isLoading,
38943
+ filterText: topbarFilterQuery ?? "",
38944
+ formatDate: relativeTime2,
38945
+ onOpen: (c) => openConversation(c.external_id),
38946
+ onRename: openEdit,
38947
+ onDelete: handleDelete,
38948
+ canEditShared,
38949
+ isWorkspaceOwner,
38950
+ selectionActions,
38951
+ footer: /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadLauncher, { autoFocus: focusLauncher })
38952
+ }
38953
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
38954
+ chunkGUV63FUC_cjs.TaskInbox,
38955
+ {
38956
+ tasks,
38957
+ isLoading,
38958
+ ...workflowActions,
38959
+ onCreate: openCreate,
38960
+ filterText: topbarFilterQuery ?? "",
38961
+ labels: LIST_LABELS,
38962
+ gridId: "conversation-list-grid-v4",
38963
+ onFilterTextChange: (text2) => setTopbarFilterQuery(text2),
38964
+ outputsByTask,
38965
+ onOpenActivity: (task) => openConversation(task.external_id),
38966
+ formatRelative: relativeTime2,
38967
+ onOpenOutput: handleOpenOutput,
38968
+ busyId,
38969
+ formatDate: ui.formatFriendlyDate,
38970
+ onOpenThread: (conversationId) => openConversation(conversationId),
38971
+ onMarkDone: (task) => setStatus(task, "done", `Marked \u201C${nameOf(task)}\u201D done`),
38972
+ onReopen: (task) => setStatus(task, "todo", `Reopened \u201C${nameOf(task)}\u201D`),
38973
+ people,
38974
+ agentNames,
38975
+ workflowNames,
38976
+ canEditShared,
38977
+ isWorkspaceOwner,
38978
+ renderPerson,
38979
+ onToggleShared: handleToggleShared,
38980
+ onEdit: openEdit,
38981
+ onDelete: handleDelete,
38982
+ onAddSubtask: openAddSubtask,
38983
+ onMove: handleMove,
38984
+ onMarkDoneMany: handleMarkDoneMany,
38985
+ onDeleteMany: handleDeleteMany,
38986
+ onGrantAccess: handleGrantAccess,
38987
+ selectionActions
38988
+ }
38989
+ ) }),
38990
+ /* @__PURE__ */ jsxRuntime.jsx(
38991
+ ConnectedTaskStartDialog,
38992
+ {
38993
+ open: startOpen,
38994
+ onOpenChange: setStartOpen,
38995
+ initialParentId: parentForNew
38996
+ }
38997
+ ),
38998
+ /* @__PURE__ */ jsxRuntime.jsx(ConnectedTaskComposer, { open: editorOpen, onOpenChange: setEditorOpen, task: editing }),
38999
+ /* @__PURE__ */ jsxRuntime.jsx(
39000
+ ConnectedExportDialog,
39001
+ {
39002
+ open: isExportOpen,
39003
+ onOpenChange: setIsExportOpen,
39004
+ items: exportRows.map((c) => ({ extId: c.external_id, label: nameOf(c) })),
39005
+ entityType: "CONVERSATION",
39006
+ testId: "export-chats-modal"
39007
+ }
39008
+ ),
39009
+ /* @__PURE__ */ jsxRuntime.jsx(
39010
+ chunkFEVJA4BP_cjs.RenameDialog,
39011
+ {
39012
+ open: !!renaming,
39013
+ onClose: () => {
39014
+ setRenaming(null);
39015
+ setNewTitle("");
39016
+ },
39017
+ title: `Rename ${ui.getEntityLabel("CONVERSATION")}`,
39018
+ labels: { description: "Rename the conversation title" },
39019
+ fieldLabel: `${ui.getEntityLabel("CONVERSATION")} Title`,
39020
+ placeholder: "Enter title",
39021
+ value: newTitle,
39022
+ onChange: setNewTitle,
39023
+ onSave: handleSaveRename,
39024
+ canSave: !!newTitle.trim(),
39025
+ dialogTestId: RENAME_DIALOG.testId
39026
+ }
39027
+ )
39028
+ ]
39029
+ }
39030
+ );
39031
+ return search ? /* @__PURE__ */ jsxRuntime.jsx(ThreadSearch, { ResultsBoundary, children: page }) : page;
39032
+ }
39033
+ function ConnectedFilterDropdown({
39034
+ stateKey,
39035
+ ...props
39036
+ }) {
39037
+ const [open, setOpen] = react.useTransientView(`filter.dropdown.${stateKey}`, false);
39038
+ return /* @__PURE__ */ jsxRuntime.jsx(
39039
+ chunkAQPZ4QMV_cjs.TriStateFilterMenu,
39040
+ {
39041
+ ...props,
39042
+ testId: `${stateKey}-filter-button`,
39043
+ open,
39044
+ onOpenChange: setOpen
39045
+ }
39046
+ );
39047
+ }
39048
+ function SearchSparkleIcon({ className }) {
39049
+ return /* @__PURE__ */ jsxRuntime.jsxs(
39050
+ "svg",
39051
+ {
39052
+ viewBox: "0 0 24 24",
39053
+ fill: "none",
39054
+ stroke: "currentColor",
39055
+ strokeWidth: "2",
39056
+ strokeLinecap: "round",
39057
+ strokeLinejoin: "round",
39058
+ "aria-hidden": "true",
39059
+ className,
39060
+ children: [
39061
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "10.5", cy: "10.5", r: "7.5" }),
39062
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m21 21-5.2-5.2" }),
39063
+ /* @__PURE__ */ jsxRuntime.jsx(
39064
+ "path",
39065
+ {
39066
+ d: "M10.5 6.8c.35 2.1 1.6 3.35 3.7 3.7-2.1.35-3.35 1.6-3.7 3.7-.35-2.1-1.6-3.35-3.7-3.7 2.1-.35 3.35-1.6 3.7-3.7Z",
39067
+ fill: "currentColor",
39068
+ strokeWidth: "1"
39069
+ }
39070
+ )
39071
+ ]
39072
+ }
39073
+ );
39074
+ }
39075
+ function SemanticSearchButton({ active, onClick }) {
39076
+ return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
39077
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
39078
+ ui.Button,
39079
+ {
39080
+ type: "button",
39081
+ variant: "ghost",
39082
+ size: "icon",
39083
+ onClick,
39084
+ "aria-label": "Semantic search",
39085
+ "aria-pressed": active,
39086
+ "data-testid": "semantic-search-button",
39087
+ className: active ? "bg-muted text-primary" : "text-muted-foreground hover:text-foreground",
39088
+ children: /* @__PURE__ */ jsxRuntime.jsx(SearchSparkleIcon, { className: "size-5" })
39089
+ }
39090
+ ) }),
39091
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Semantic search" }) })
39092
+ ] });
39093
+ }
39094
+ var DEFAULT_THREAD_VISIBILITY2 = { me: null, workspace: null };
39095
+ function ConnectedConversationPage({
39096
+ renderComposerAccessory,
39097
+ ResultsBoundary,
39098
+ onGoToDocuments,
39099
+ modelSelector,
39100
+ composerAccessory,
39101
+ composerTools,
39102
+ ConversationThread: ConversationThread2
39103
+ }) {
39104
+ const session = react.useArbiSessionStore();
39105
+ const { openFiles } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
39106
+ React9.useEffect(() => () => session.setActiveCitationKey(null), [session]);
39107
+ const { isInChat, setActiveTab } = useThreadTabs();
39108
+ const [doneFilter, setDoneFilter] = react.useTransientView(
39109
+ "threads.done",
39110
+ "exclude"
39111
+ );
39112
+ const [visibilityFilters, setVisibilityFilters] = react.useTransientView(
39113
+ "threads.visibility",
39114
+ DEFAULT_THREAD_VISIBILITY2
39115
+ );
39116
+ const [meetingFilter, setMeetingFilter] = react.useTransientView(
39117
+ "threads.meetings",
39118
+ null
39119
+ );
39120
+ const [threadFilter, setThreadFilter] = react.useTransientView("topbar.filter", "");
39121
+ const { data: userSettings } = react.useUserSettings();
39122
+ const isDeveloper = userSettings?.developer === true;
39123
+ const showPaMode = userSettings?.show_pa_mode ?? false;
39124
+ const searchEnabled = userSettings?.show_conversation_search === true;
39125
+ const [semanticSearchOpen, setSemanticSearchOpen] = React9.useState(false);
39126
+ const handleSelectSource = (source) => {
39127
+ if (source === "internet") {
39128
+ setUrlDialogOpen(true);
39129
+ return;
39130
+ }
39131
+ chunkB3NYBMDR_cjs.openDialog("upload", { tab: "upload", source });
39132
+ };
39133
+ const handleGoToDocuments = () => {
39134
+ chunkB3NYBMDR_cjs.closeDialog("conversationDocuments");
39135
+ if (onGoToDocuments) onGoToDocuments();
39136
+ else openFiles();
39137
+ };
39138
+ const handleStatusClick = () => {
39139
+ chunkB3NYBMDR_cjs.openDialog("conversationDocuments");
39140
+ };
39141
+ const currentConversationId = react.useArbiSessionState((state) => state.conversationId);
39142
+ const { conversations: taskItems } = react.useConversationItems();
39143
+ const conversations = taskItems;
39144
+ const workspaceId = react.useArbiSessionState((state) => state.workspaceId);
39145
+ const { data: workspaces = [] } = react.useWorkspaces();
39146
+ const workspace = workspaces.find((item) => item.external_id === workspaceId);
39147
+ const workspaceRole = react.useWorkspaceRole();
39148
+ const isGuest = workspaceRole === "guest";
39149
+ const canUpload = workspaceRole !== null && !isGuest;
39150
+ const [urlDialogOpen, setUrlDialogOpen] = React9.useState(false);
39151
+ const [focusLauncher, setFocusLauncher] = React9.useState(false);
39152
+ React9.useEffect(() => {
39153
+ if (isInChat) setFocusLauncher(false);
39154
+ }, [isInChat]);
39155
+ const uploadUrls = useAddFromUrls({
39156
+ onZipFiles: (files) => chunkB3NYBMDR_cjs.openDialog("upload", { tab: "upload", files, source: "computer" })
39157
+ });
39158
+ const uploadDisabledReason = isGuest ? "Guests cannot upload documents in this workspace" : "You cannot upload to this workspace";
39159
+ const { data: allWorkspaceDocuments = [] } = react.useDocuments();
39160
+ const { data: conversationDocuments } = react.useConversationDocuments();
39161
+ const pinnedDocumentId = react.useArbiSessionState((state) => state.pinnedDocumentId);
39162
+ const pinnedRef = artifacts.parseVersionRef(pinnedDocumentId);
39163
+ const pinnedDocument = conversationDocuments?.find((d) => d.external_id === pinnedRef.docId) ?? allWorkspaceDocuments?.find((d) => d.external_id === pinnedRef.docId);
39164
+ const pinnedTitle = pinnedDocument ? `${ui.getDocumentTitle(pinnedDocument)}${pinnedRef.version ? ` (version ${pinnedRef.version})` : ""}` : null;
39165
+ const startNewChat = (asPaChat) => {
39166
+ session.clearConversationError(currentConversationId || "new");
39167
+ session.startNewConversation();
39168
+ session.openThreadTab(null);
39169
+ session.setPaMode(true);
39170
+ };
39171
+ const threadFilterDropdown = /* @__PURE__ */ jsxRuntime.jsx(
39172
+ ConnectedFilterDropdown,
39173
+ {
39174
+ stateKey: "threads",
39175
+ filterStates: /* @__PURE__ */ new Map([
39176
+ ["done", doneFilter],
39177
+ ["me", visibilityFilters.me],
39178
+ ["workspace", visibilityFilters.workspace],
39179
+ ["meeting", meetingFilter]
39180
+ ]),
39181
+ onFiltersChange: (filters) => {
39182
+ setDoneFilter(filters.get("done") ?? null);
39183
+ setMeetingFilter(filters.get("meeting") ?? null);
39184
+ setVisibilityFilters({
39185
+ me: filters.get("me") ?? null,
39186
+ workspace: filters.get("workspace") ?? null
39187
+ });
39188
+ },
39189
+ options: [
39190
+ {
39191
+ id: "me",
39192
+ label: "Only Me",
39193
+ count: conversations.filter((thread) => !thread.is_shared).length
39194
+ },
39195
+ {
39196
+ id: "workspace",
39197
+ label: "Workspace",
39198
+ count: conversations.filter((thread) => thread.is_shared).length
39199
+ },
39200
+ {
39201
+ id: "meeting",
39202
+ label: "Meetings",
39203
+ count: conversations.filter((thread) => !!thread.meeting_call_ext_id).length
39204
+ },
39205
+ {
39206
+ id: "done",
39207
+ label: "Done",
39208
+ count: conversations.filter((thread) => thread.status === "done").length
39209
+ }
39210
+ ],
39211
+ hasExternalActiveState: Boolean(threadFilter.trim()),
39212
+ renderChevron: true,
39213
+ disableHoverOpen: true,
39214
+ align: "start"
39215
+ }
39216
+ );
39217
+ const threadFilterBox = /* @__PURE__ */ jsxRuntime.jsx(
39218
+ chunk2EI7NCUA_cjs.FilterInput,
39219
+ {
39220
+ filter: threadFilterDropdown,
39221
+ borderless: true,
39222
+ value: threadFilter,
39223
+ onChange: setThreadFilter,
39224
+ fields: ["text"],
39225
+ onFieldsChange: () => {
39226
+ },
39227
+ hideFieldPicker: true,
39228
+ ariaLabel: "Filter threads",
39229
+ labels: doneFilter === "exclude" ? { placeholder: "Done hidden" } : void 0,
39230
+ className: "w-44 max-w-[40vw]"
39231
+ }
39232
+ );
39233
+ const { data: workspaceTags = [] } = react.useTags();
39234
+ const historyCount = chunkGUV63FUC_cjs.filterConversationRows(
39235
+ conversations,
39236
+ threadFilter,
39237
+ (row2) => workspaceTags.filter((tag) => row2.label_ext_ids?.includes(tag.external_id)).map((tag) => tag.name).join(" "),
39238
+ doneFilter,
39239
+ visibilityFilters,
39240
+ meetingFilter
39241
+ ).length;
39242
+ const historyFiltered = Boolean(threadFilter.trim()) || doneFilter !== null || meetingFilter !== null || Object.values(visibilityFilters).some(Boolean);
39243
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39244
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ConversationRoot, { children: [
39245
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ConversationHeader, { children: [
39246
+ /* @__PURE__ */ jsxRuntime.jsx(
39247
+ ConnectedThreadTabs,
39248
+ {
39249
+ historyCount,
39250
+ historyFiltered,
39251
+ historyActions: threadFilterBox,
39252
+ rightContent: (isCompact) => /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ConversationHeaderActions, { children: [
39253
+ searchEnabled && /* @__PURE__ */ jsxRuntime.jsx(
39254
+ SemanticSearchButton,
39255
+ {
39256
+ active: semanticSearchOpen && !isInChat,
39257
+ onClick: () => {
39258
+ if (isInChat) {
39259
+ setActiveTab("history");
39260
+ setSemanticSearchOpen(true);
39261
+ } else {
39262
+ setSemanticSearchOpen((open) => !open);
39263
+ }
39264
+ }
39265
+ }
39266
+ ),
39267
+ isInChat && /* @__PURE__ */ jsxRuntime.jsx(chunk5R256EMF_cjs.ConnectedConversationCallActions, {}),
39268
+ isInChat && /* @__PURE__ */ jsxRuntime.jsx(
39269
+ chunkDWWRLKEZ_cjs.NewChatButton,
39270
+ {
39271
+ entityLabel: "Task",
39272
+ labels: { newEntity: () => "New Task" },
39273
+ isCompact,
39274
+ onClick: () => {
39275
+ setFocusLauncher(true);
39276
+ setActiveTab("history");
39277
+ }
39278
+ }
39279
+ ),
39280
+ showPaMode && /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.NewPaChatButton, { isCompact, onClick: () => startNewChat() })
39281
+ ] })
39282
+ }
39283
+ ),
39284
+ isInChat && /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadTaskBar, { conversationId: currentConversationId })
39285
+ ] }),
39286
+ isInChat && /* @__PURE__ */ jsxRuntime.jsx(
39287
+ ConversationThread2,
39288
+ {
39289
+ modelSelector,
39290
+ composerAccessory: renderComposerAccessory ? renderComposerAccessory({
39291
+ documents: conversationDocuments || [],
39292
+ pinnedTitle,
39293
+ onStatusClick: handleStatusClick,
39294
+ onSelectSource: handleSelectSource,
39295
+ onAddFromSources: handleGoToDocuments,
39296
+ canUpload,
39297
+ uploadDisabledReason
39298
+ }) : composerAccessory,
39299
+ composerTools: composerTools !== void 0 ? composerTools : isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(
39300
+ chunkDWWRLKEZ_cjs.ConversationSettingsButton,
39301
+ {
39302
+ label: `${ui.getEntityLabel("CONVERSATION")} Settings`,
39303
+ onClick: () => chunkB3NYBMDR_cjs.openDialog("conversationSettings")
39304
+ }
39305
+ )
39306
+ }
39307
+ ),
39308
+ !isInChat && /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationHistoryPane, { children: searchEnabled && semanticSearchOpen ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadsPage, { showHeader: false, search: true, ResultsBoundary }) : /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadsPage, { showHeader: false, focusLauncher }) })
39309
+ ] }),
39310
+ /* @__PURE__ */ jsxRuntime.jsx(
39311
+ chunkWALADS2S_cjs.UrlInputDialog,
39312
+ {
39313
+ open: urlDialogOpen,
39314
+ onOpenChange: setUrlDialogOpen,
39315
+ onUrlsSubmit: uploadUrls,
39316
+ titleWorkspaceName: workspace?.name,
39317
+ titleIcon: workspace && /* @__PURE__ */ jsxRuntime.jsx(ConnectedWorkspaceEntity, { workspace, size: 24, variant: "icon" })
39318
+ }
39319
+ )
39320
+ ] });
39321
+ }
37701
39322
  function useStartRequestedDraft(enabled = true) {
37702
39323
  const session = react.useArbiSessionStore();
37703
39324
  chunkB3NYBMDR_cjs.useIntentRequest(
@@ -38288,7 +39909,7 @@ function useThreadScroll({
38288
39909
  scrollToBottom
38289
39910
  };
38290
39911
  }
38291
- function ConnectedConversation({
39912
+ function ConversationThread({
38292
39913
  modelSelector,
38293
39914
  composerAccessory,
38294
39915
  composerTools
@@ -38388,7 +40009,7 @@ function ConnectedConversation({
38388
40009
  const isGuest = react.useWorkspaceRole() === "guest";
38389
40010
  const meetingReadOnly = isGuest && !!currentTask?.meeting_call_ext_id;
38390
40011
  const meetingCallExtId = currentTask?.meeting_call_ext_id ?? null;
38391
- const threadMessages = chunk6AJJJ5HR_cjs.useMeetingThreadMessages(meetingCallExtId, messageHistory);
40012
+ const threadMessages = chunk5R256EMF_cjs.useMeetingThreadMessages(meetingCallExtId, messageHistory);
38392
40013
  const [firstTurnPrompt, setFirstTurnPrompt] = React9.useState(null);
38393
40014
  const currentUserExtId = react.useArbiSession().user?.external_id ?? "";
38394
40015
  const pendingFirstTurn = React9.useMemo(
@@ -38436,7 +40057,7 @@ function ConnectedConversation({
38436
40057
  return shownThreadMessages.slice(0, editIndex);
38437
40058
  }, [shownThreadMessages, editingMessageId]);
38438
40059
  const transcriptRunInfo = React9.useMemo(
38439
- () => chunk6AJJJ5HR_cjs.threadTranscriptRuns(meetingCallExtId ? visibleMessages : []),
40060
+ () => chunk5R256EMF_cjs.threadTranscriptRuns(meetingCallExtId ? visibleMessages : []),
38440
40061
  [meetingCallExtId, visibleMessages]
38441
40062
  );
38442
40063
  const threadLines = React9.useMemo(
@@ -38451,7 +40072,7 @@ function ConnectedConversation({
38451
40072
  }),
38452
40073
  [threadMessages]
38453
40074
  );
38454
- const provisionalSpeakers = chunk6AJJJ5HR_cjs.useProvisionalSpeakers(meetingCallExtId, threadLines);
40075
+ const provisionalSpeakers = chunk5R256EMF_cjs.useProvisionalSpeakers(meetingCallExtId, threadLines);
38455
40076
  const showProvisional = !!meetingCallExtId && meetingView !== "chat";
38456
40077
  const latestContextUsage = React9.useMemo(() => {
38457
40078
  const messages = messageHistory;
@@ -38541,7 +40162,7 @@ function ConnectedConversation({
38541
40162
  }, [isGenerating]);
38542
40163
  const slashWorkflows = useSlashSkillWorkflows({ landing: "current-chat" });
38543
40164
  const composerSkills = React9.useMemo(
38544
- () => ({ builtin: chunkO3MRE2HL_cjs.BUILTIN_SKILLS, openFor: slashWorkflows.openFor }),
40165
+ () => ({ builtin: chunkGUV63FUC_cjs.BUILTIN_SKILLS, openFor: slashWorkflows.openFor }),
38545
40166
  [slashWorkflows.openFor]
38546
40167
  );
38547
40168
  const browseSkills = React9.useMemo(
@@ -38590,7 +40211,7 @@ function ConnectedConversation({
38590
40211
  useStartRequestedDraft();
38591
40212
  const orphanedMessage = react.getOrphanedLastMessage(messageHistory, isGenerating, assistantMode);
38592
40213
  return /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ConversationBody, { children: [
38593
- /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationMain, { "data-testid": `conversation-${currentConversationId}`, children: threadsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationLoading, {}) : messageHistory.length > 0 || isBranching ? /* @__PURE__ */ jsxRuntime.jsx(AskAgainContext.Provider, { value: handleAskAgain, children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6AJJJ5HR_cjs.TranscriptRunsContext.Provider, { value: transcriptRunInfo, children: [
40214
+ /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationMain, { "data-testid": `conversation-${currentConversationId}`, children: threadsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationLoading, {}) : messageHistory.length > 0 || isBranching ? /* @__PURE__ */ jsxRuntime.jsx(AskAgainContext.Provider, { value: handleAskAgain, children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5R256EMF_cjs.TranscriptRunsContext.Provider, { value: transcriptRunInfo, children: [
38594
40215
  meetingCallExtId && transcriptLineCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
38595
40216
  chunkNXHETIOB_cjs.ConversationFilter,
38596
40217
  {
@@ -38609,14 +40230,14 @@ function ConnectedConversation({
38609
40230
  }
38610
40231
  ) }),
38611
40232
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: visibleMessages }),
38612
- showProvisional && /* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
40233
+ showProvisional && /* @__PURE__ */ jsxRuntime.jsx(chunk5R256EMF_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
38613
40234
  ] }) }) : meetingCallExtId ? (
38614
40235
  // A meeting thread with nothing yet: call-aware, not the upload prompt.
38615
40236
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
38616
- /* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.CallConversationEmpty, { callExtId: meetingCallExtId }),
38617
- /* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
40237
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5R256EMF_cjs.CallConversationEmpty, { callExtId: meetingCallExtId }),
40238
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5R256EMF_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
38618
40239
  ] })
38619
- ) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: pendingFirstTurn }) : /* @__PURE__ */ jsxRuntime.jsx(
40240
+ ) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: pendingFirstTurn }) : /* @__PURE__ */ jsxRuntime.jsx(
38620
40241
  ConnectedConversationEmpty,
38621
40242
  {
38622
40243
  hasDocuments: allWorkspaceDocuments.length > 0,
@@ -38744,6 +40365,33 @@ function ConnectedConversation({
38744
40365
  slashWorkflows.launcher
38745
40366
  ] });
38746
40367
  }
40368
+ function ConnectedConversation({
40369
+ layout = "thread",
40370
+ page,
40371
+ conversationId,
40372
+ ...props
40373
+ }) {
40374
+ const session = react.useArbiSessionStore();
40375
+ React9.useEffect(() => {
40376
+ if (conversationId === void 0) return;
40377
+ if (layout === "page") {
40378
+ const tabId = conversationId ?? "new";
40379
+ if (session.getState().activeThreadTabId !== tabId) session.openThreadTab(conversationId);
40380
+ } else if (session.getState().conversationId !== conversationId) {
40381
+ session.setConversationId(conversationId);
40382
+ }
40383
+ }, [conversationId, layout, session]);
40384
+ return layout === "page" ? /* @__PURE__ */ jsxRuntime.jsx(
40385
+ ConnectedConversationPage,
40386
+ {
40387
+ ...page,
40388
+ modelSelector: props.modelSelector,
40389
+ composerAccessory: props.composerAccessory,
40390
+ composerTools: props.composerTools,
40391
+ ConversationThread
40392
+ }
40393
+ ) : /* @__PURE__ */ jsxRuntime.jsx(ConversationThread, { ...props });
40394
+ }
38747
40395
  function ConnectedCompactConversation() {
38748
40396
  const containerRef = React9.useRef(null);
38749
40397
  const inputRef = React9.useRef(null);
@@ -40476,7 +42124,7 @@ function SsoResendVerificationButton({
40476
42124
  onClick: async () => handleResendEmailVerification(),
40477
42125
  disabled: loading || disabled,
40478
42126
  "aria-label": "Resend verification email",
40479
- children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTPNLYQD2_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
42127
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkPV5A5SAC_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
40480
42128
  "Didn't get a verification email? ",
40481
42129
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Resend" })
40482
42130
  ] })
@@ -41370,27 +43018,27 @@ function ConnectedOAuthConsentPage({
41370
43018
  oauthErrorRedirect(params.redirectUri, params.state, "access_denied");
41371
43019
  }
41372
43020
  if (error && !params) {
41373
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentMessage, { tone: "error", title: "Invalid Request", children: error }) });
43021
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentMessage, { tone: "error", title: "Invalid Request", children: error }) });
41374
43022
  }
41375
43023
  if (!params) {
41376
43024
  return null;
41377
43025
  }
41378
43026
  if (clientInfo?.isLocalAgentFlow) {
41379
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentMessage, { tone: "warning", title: "Close this tab", children: "This tab opened alongside the correct authorization page. Please close this tab and complete the connection in the other tab that opened at the same time." }) });
43027
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentMessage, { tone: "warning", title: "Close this tab", children: "This tab opened alongside the correct authorization page. Please close this tab and complete the connection in the other tab that opened at the same time." }) });
41380
43028
  }
41381
43029
  if (!isAuthenticated2) {
41382
43030
  return null;
41383
43031
  }
41384
43032
  if (callbackUrl) {
41385
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { size: "md", children: [
41386
- /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClipboardList, {}), title: "Almost there", children: [
43033
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentCard, { size: "md", children: [
43034
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClipboardList, {}), title: "Almost there", children: [
41387
43035
  "A new tab has opened to complete the connection. If it succeeded, you can close this page. If you see a connection error there, paste the URL below into Claude Cowork \u2014",
41388
43036
  " ",
41389
43037
  copied ? "it's already copied to your clipboard." : "copy it first."
41390
43038
  ] }),
41391
- /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentSection, { title: "Callback URL", children: [
41392
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.CopyableUrl, { url: callbackUrl, copied, onCopy: handleCopy }),
41393
- /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentText, { variant: "hint", children: [
43039
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentSection, { title: "Callback URL", children: [
43040
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.CopyableUrl, { url: callbackUrl, copied, onCopy: handleCopy }),
43041
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentText, { variant: "hint", children: [
41394
43042
  "In Claude Code, paste the URL at the prompt that says",
41395
43043
  " ",
41396
43044
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-foreground", children: '"paste the full redirect URL here"' }),
@@ -41399,17 +43047,17 @@ function ConnectedOAuthConsentPage({
41399
43047
  ] })
41400
43048
  ] }) });
41401
43049
  }
41402
- return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { children: [
41403
- /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, {}), title: `Connect to ${appName}`, children: [
41404
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: clientInfo?.name ?? params.clientId }),
43050
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentCard, { children: [
43051
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkGUV63FUC_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, {}), title: `Connect to ${appName}`, children: [
43052
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentStrong, { children: clientInfo?.name ?? params.clientId }),
41405
43053
  " is requesting access to your ",
41406
43054
  appName,
41407
43055
  " workspace."
41408
43056
  ] }),
41409
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentSection, { title: "This will allow", children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPermissionList, { items: permissions }) }),
41410
- error && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "error", children: error }),
41411
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentActions, { isLoading: loading, onDeny: handleDeny, onAllow: handleAllow }),
41412
- /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentFootnote, { children: footnote })
43057
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentSection, { title: "This will allow", children: /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentPermissionList, { items: permissions }) }),
43058
+ error && /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentNotice, { tone: "error", children: error }),
43059
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentActions, { isLoading: loading, onDeny: handleDeny, onAllow: handleAllow }),
43060
+ /* @__PURE__ */ jsxRuntime.jsx(chunkGUV63FUC_cjs.ConsentFootnote, { children: footnote })
41413
43061
  ] }) });
41414
43062
  }
41415
43063
  function ConnectedSharedFilesPage({
@@ -41506,474 +43154,6 @@ function ConnectedAccountAccessBadge() {
41506
43154
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-w-xs text-sm", align: "end", children: explanation })
41507
43155
  ] });
41508
43156
  }
41509
- function ThreadSearch({ children, ResultsBoundary = chunkTM2D4XT4_cjs.ErrorBoundary }) {
41510
- const [query, setQuery] = React9.useState("");
41511
- const [submitted, setSubmitted] = React9.useState("");
41512
- const selectedWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
41513
- const { notify: notify18, openConversation } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
41514
- const search = react.useConversationSearch();
41515
- const isSearching = search.isPending;
41516
- const groups = React9.useMemo(
41517
- () => search.isError ? [] : (search.data?.results ?? []).map((g) => ({
41518
- id: g.conversation_ext_id,
41519
- title: g.title,
41520
- matches: g.messages.map((m) => ({
41521
- id: m.message_ext_id,
41522
- role: m.role,
41523
- score: m.score,
41524
- snippet: m.snippet
41525
- }))
41526
- })),
41527
- [search.data, search.isError]
41528
- );
41529
- const handleSearch = React9.useCallback(() => {
41530
- const q = query.trim();
41531
- if (!q || !selectedWorkspaceId || isSearching) return;
41532
- setSubmitted(q);
41533
- search.mutate(
41534
- { query: q, search_mode: "hybrid", limit: 20 },
41535
- {
41536
- onError: (err) => {
41537
- console.error("Conversation search failed", err);
41538
- notify18("Conversation search failed", "error");
41539
- }
41540
- }
41541
- );
41542
- }, [query, selectedWorkspaceId, isSearching, search, notify18]);
41543
- const clearSearch = React9.useCallback(() => {
41544
- setQuery("");
41545
- setSubmitted("");
41546
- }, []);
41547
- const openHit = React9.useCallback(
41548
- (conversationId, messageId) => {
41549
- openConversation(conversationId, messageId ? { messageId } : void 0);
41550
- },
41551
- [openConversation]
41552
- );
41553
- return /* @__PURE__ */ jsxRuntime.jsx(
41554
- chunkDWWRLKEZ_cjs.ConversationSearchView,
41555
- {
41556
- query,
41557
- onQueryChange: setQuery,
41558
- onSubmit: handleSearch,
41559
- canSubmit: !!query.trim() && !!selectedWorkspaceId && !isSearching,
41560
- isSearching,
41561
- submittedQuery: submitted,
41562
- groups,
41563
- onOpenConversation: openHit,
41564
- onClear: clearSearch,
41565
- ResultsBoundary,
41566
- children
41567
- }
41568
- );
41569
- }
41570
- var DEFAULT_THREAD_VISIBILITY = { me: null, workspace: null };
41571
- var relativeTime2 = (iso) => ui.formatRelativeTime(iso, { style: "short" });
41572
- var LIST_LABELS = {
41573
- emptyTitle: "Nothing here yet",
41574
- emptyMessage: "Use New: just type what you need, or fill in an owner and a due date. You always decide when a thread is done.",
41575
- untitled: `Untitled ${ui.getEntityLabel("CONVERSATION").toLowerCase()}`,
41576
- noMatches: `No ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} match.`,
41577
- selectAll: "Select all"
41578
- };
41579
- var RENAME_DIALOG = { testId: "rename-conversation-modal" };
41580
- function useStableRecencyOrder(rows) {
41581
- const orderRef = React9.useRef([]);
41582
- return React9.useMemo(() => {
41583
- const byRecency = [...rows].sort(
41584
- (a, b) => new Date(b.updated_at || b.created_at || 0).getTime() - new Date(a.updated_at || a.created_at || 0).getTime()
41585
- );
41586
- const present = new Set(byRecency.map((r) => r.external_id));
41587
- const known = new Set(orderRef.current);
41588
- const added = byRecency.map((r) => r.external_id).filter((id) => !known.has(id));
41589
- orderRef.current = [...added, ...orderRef.current.filter((id) => present.has(id))];
41590
- const byId = new Map(byRecency.map((r) => [r.external_id, r]));
41591
- return orderRef.current.flatMap((id) => byId.get(id) ?? []);
41592
- }, [rows]);
41593
- }
41594
- function ConnectedThreadsPage({
41595
- showHeader = true,
41596
- search = false,
41597
- ResultsBoundary,
41598
- focusLauncher,
41599
- layout = "list",
41600
- workflowActions
41601
- }) {
41602
- const mode = layout === "inbox" ? "tasks" : "threads";
41603
- const { confirm, notify: notify18, openConversation, openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
41604
- const { conversations: all, isLoading } = react.useConversationItems();
41605
- const [doneFilter] = react.useTransientView("threads.done", "exclude");
41606
- const [visibilityFilters] = react.useTransientView("threads.visibility", DEFAULT_THREAD_VISIBILITY);
41607
- const [meetingFilter] = react.useTransientView("threads.meetings", null);
41608
- const [topbarFilterQuery, setTopbarFilterQuery] = react.useTransientView("topbar.filter", "");
41609
- const currentUserExtId = react.useArbiSession().user?.external_id;
41610
- const listed = React9.useMemo(
41611
- () => all.filter((c) => mode === "threads" || c.status != null),
41612
- [all, mode]
41613
- );
41614
- const tasks = useStableRecencyOrder(listed);
41615
- const updateConversation = react.useUpdateConversation();
41616
- const deleteConversation = react.useDeleteConversation();
41617
- const people = useTaskPeople();
41618
- const renderPerson = useRenderTaskPerson();
41619
- const canEditShared = react.useCanEditShared();
41620
- const isWorkspaceOwner = react.useIsWorkspaceOwner();
41621
- const { data: agents = [] } = react.useAgents();
41622
- const { data: workflows = [] } = react.useWorkflows();
41623
- const agentNames = React9.useMemo(
41624
- () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
41625
- [agents]
41626
- );
41627
- const workflowNames = React9.useMemo(
41628
- () => Object.fromEntries(workflows.map((w) => [w.external_id, w.name])),
41629
- [workflows]
41630
- );
41631
- const runConversation = react.useRunConversation();
41632
- const [busyId, setBusyId] = React9.useState(null);
41633
- const [editorOpen, setEditorOpen] = React9.useState(false);
41634
- const [editing, setEditing] = React9.useState(null);
41635
- const [startOpen, setStartOpen] = React9.useState(false);
41636
- const [parentForNew, setParentForNew] = React9.useState(void 0);
41637
- const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && workflowNames[task.workflow_ext_id] || "Untitled task";
41638
- const openCreate = () => {
41639
- setParentForNew(void 0);
41640
- setStartOpen(true);
41641
- };
41642
- const openAddSubtask = (parent) => {
41643
- setParentForNew(parent.external_id);
41644
- setStartOpen(true);
41645
- };
41646
- const [renaming, setRenaming] = React9.useState(null);
41647
- const [newTitle, setNewTitle] = React9.useState("");
41648
- const [isExportOpen, setIsExportOpen] = React9.useState(false);
41649
- const [exportRows, setExportRows] = React9.useState([]);
41650
- const openEdit = (task) => {
41651
- if (mode === "threads" || !task.status) {
41652
- setRenaming(task);
41653
- setNewTitle(task.title ?? "");
41654
- return;
41655
- }
41656
- setEditing(task);
41657
- setEditorOpen(true);
41658
- };
41659
- const act = async (task, action, success, failure) => {
41660
- setBusyId(task.external_id);
41661
- try {
41662
- await action();
41663
- if (success) notify18(success, "success");
41664
- } catch (error) {
41665
- notify18(
41666
- error instanceof browser.ArbiApiError && error.detail ? `${failure}: ${error.detail}` : failure,
41667
- "error"
41668
- );
41669
- } finally {
41670
- setBusyId(null);
41671
- }
41672
- };
41673
- const patch = (task, body) => updateConversation.mutateAsync({ conversationId: task.external_id, patch: body });
41674
- const setStatus = (task, status, success) => act(task, () => patch(task, { status }), success, "Failed to update task");
41675
- const handleToggleShared = (task, shouldShare) => act(
41676
- task,
41677
- () => patch(task, { shared: shouldShare }),
41678
- shouldShare ? `Shared \u201C${nameOf(task)}\u201D with the workspace` : `Made \u201C${nameOf(task)}\u201D private`,
41679
- "Failed to change who can see the task"
41680
- );
41681
- const handleMove = (task, parentId) => act(
41682
- task,
41683
- () => patch(task, { parent_conversation_ext_id: parentId }),
41684
- parentId ? `Moved \u201C${nameOf(task)}\u201D` : `Moved \u201C${nameOf(task)}\u201D to the top level`,
41685
- "Failed to move task"
41686
- );
41687
- const handleDelete = async (task) => {
41688
- const subtasks = tasks.filter((t) => t.parent_conversation_ext_id === task.external_id).length;
41689
- const confirmed = await confirm({
41690
- message: `Delete \u201C${nameOf(task)}\u201D? This can't be undone from here.${subtasks ? ` Its ${subtasks === 1 ? "sub-task stays" : `${subtasks} sub-tasks stay`} and ${subtasks === 1 ? "moves" : "move"} to the top level.` : ""}`,
41691
- title: "Delete task"
41692
- });
41693
- if (!confirmed) return;
41694
- await act(
41695
- task,
41696
- () => deleteConversation.mutateAsync(task.external_id),
41697
- `Deleted \u201C${nameOf(task)}\u201D`,
41698
- "Failed to delete task"
41699
- );
41700
- };
41701
- const forEach = async (rows, one, done) => {
41702
- let failed = 0;
41703
- for (const task of rows) {
41704
- try {
41705
- await one(task);
41706
- } catch {
41707
- failed += 1;
41708
- }
41709
- }
41710
- notify18(
41711
- failed ? `${failed} of ${rows.length} could not be changed: you may not be allowed to change them` : done,
41712
- failed ? "error" : "success"
41713
- );
41714
- };
41715
- const handleMarkDoneMany = (rows) => forEach(rows, (task) => patch(task, { status: "done" }), `Marked ${rows.length} done`);
41716
- const handleDeleteMany = async (rows) => {
41717
- const named = rows.slice(0, 3).map((task) => `"${nameOf(task)}"`).join(", ");
41718
- const more = rows.length - 3;
41719
- const confirmed = await confirm({
41720
- message: `Delete ${more > 0 ? `${named} and ${more} more` : named}? This cannot be undone.`,
41721
- title: `Delete ${rows.length} item${rows.length === 1 ? "" : "s"}`
41722
- });
41723
- if (!confirmed) return;
41724
- await forEach(
41725
- rows,
41726
- (task) => deleteConversation.mutateAsync(task.external_id),
41727
- `Deleted ${rows.length}`
41728
- );
41729
- };
41730
- const handleSaveRename = React9.useCallback(() => {
41731
- if (!renaming || !newTitle.trim()) return;
41732
- updateConversation.mutate(
41733
- { conversationId: renaming.external_id, patch: { title: newTitle.trim() } },
41734
- {
41735
- onSuccess: () => {
41736
- notify18("Conversation renamed successfully", "success");
41737
- setRenaming(null);
41738
- setNewTitle("");
41739
- },
41740
- onError: (error) => {
41741
- console.error("Failed to rename conversation:", error);
41742
- notify18("Failed to rename conversation", "error");
41743
- }
41744
- }
41745
- );
41746
- }, [renaming, newTitle, updateConversation, notify18]);
41747
- const handleBulkShare = async (rows) => {
41748
- const unshared = rows.filter((c) => !c.is_shared);
41749
- if (unshared.length === 0) {
41750
- await confirm({
41751
- message: "All selected conversations are already shared",
41752
- title: "Info",
41753
- kind: "alert"
41754
- });
41755
- return;
41756
- }
41757
- const noun = ui.getEntityLabel("CONVERSATION", unshared.length > 1 ? "PLURAL" : "SINGULAR");
41758
- const confirmed = await confirm({
41759
- message: `Are you sure you want to share ${unshared.length} ${noun.toLowerCase()} with everyone in the current ${ui.getEntityLabel("WORKSPACE").toLowerCase()}? You can make them private again later.`,
41760
- title: `Share ${ui.getEntityLabel("CONVERSATION", "PLURAL")}`
41761
- });
41762
- if (!confirmed) return;
41763
- try {
41764
- await Promise.all(
41765
- unshared.map(
41766
- (c) => updateConversation.mutateAsync({ conversationId: c.external_id, patch: { shared: true } })
41767
- )
41768
- );
41769
- notify18(`${unshared.length} ${noun.toLowerCase()} shared successfully`, "success");
41770
- } catch (error) {
41771
- console.error("Failed to share conversations:", error);
41772
- notify18("Failed to share some conversations", "error");
41773
- }
41774
- };
41775
- const { data: workspaceDocs } = react.useDocuments();
41776
- const outputsByTask = React9.useMemo(() => {
41777
- const out = {};
41778
- for (const [conversationId, docs] of Object.entries(
41779
- chunkDWWRLKEZ_cjs.groupOutputsByConversation(workspaceDocs ?? [])
41780
- )) {
41781
- out[conversationId] = docs.map((d) => ({
41782
- id: d.external_id,
41783
- name: ui.getDocumentTitle(d, d.external_id)
41784
- }));
41785
- }
41786
- return out;
41787
- }, [workspaceDocs]);
41788
- const handleOpenOutput = (documentId) => openDocument(documentId);
41789
- const handleGrantAccess = (task) => act(
41790
- task,
41791
- () => runConversation.mutateAsync(task.external_id),
41792
- `Running \u201C${nameOf(task)}\u201D`,
41793
- "Failed to run task"
41794
- );
41795
- const threadLabels = useThreadLabels(canEditShared);
41796
- const selectionActions = (selected, isCompact) => {
41797
- const mine = selected.every((c) => c.created_by_ext_id === currentUserExtId);
41798
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
41799
- mode === "threads" && selected.every((row2) => row2.is_owner || row2.is_shared && canEditShared) && selected.some((row2) => row2.status !== "done") && !selected.some((row2) => row2.in_progress || row2.status === "generating") && /* @__PURE__ */ jsxRuntime.jsx(
41800
- chunkV4ISCZJ7_cjs.SelectionBarAction,
41801
- {
41802
- icon: lucideReact.CheckCheck,
41803
- label: "Mark Done",
41804
- onClick: () => void handleMarkDoneMany(selected),
41805
- isCompact,
41806
- testId: "threads-bulk-done"
41807
- }
41808
- ),
41809
- threadLabels.renderBulkLabels(selected, isCompact),
41810
- mine && selected.some((c) => !c.is_shared) && /* @__PURE__ */ jsxRuntime.jsx(
41811
- ui.VisibilityToggle,
41812
- {
41813
- items: selected,
41814
- onToggle: () => void handleBulkShare(selected),
41815
- disablePrivate: true,
41816
- showLabel: false,
41817
- tooltipInactive: "Share all with workspace members",
41818
- tooltipMixed: "Share all with workspace members (some already shared)",
41819
- "data-testid": "bulk-shared-toggle"
41820
- }
41821
- ),
41822
- /* @__PURE__ */ jsxRuntime.jsx(
41823
- chunkV4ISCZJ7_cjs.SelectionBarAction,
41824
- {
41825
- icon: lucideReact.FolderUp,
41826
- label: "Export",
41827
- onClick: () => {
41828
- setExportRows(selected);
41829
- setIsExportOpen(true);
41830
- },
41831
- isCompact,
41832
- tooltip: `Export the selected ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} to another ${ui.getEntityLabel("WORKSPACE").toLowerCase()}`,
41833
- testId: "export-chats-button"
41834
- }
41835
- ),
41836
- mode === "threads" && selected.every((row2) => row2.is_owner || isWorkspaceOwner) && /* @__PURE__ */ jsxRuntime.jsx(
41837
- chunkV4ISCZJ7_cjs.SelectionBarAction,
41838
- {
41839
- icon: lucideReact.Trash2,
41840
- label: "Delete",
41841
- className: "text-red-text hover:bg-red-bg hover:text-red-text",
41842
- onClick: () => void handleDeleteMany(selected),
41843
- isCompact,
41844
- testId: "threads-bulk-delete"
41845
- }
41846
- )
41847
- ] });
41848
- };
41849
- const page = /* @__PURE__ */ jsxRuntime.jsxs(
41850
- "div",
41851
- {
41852
- className: "flex h-full min-h-0 flex-col",
41853
- "data-testid": mode === "tasks" ? "tasks-page" : "threads-page",
41854
- children: [
41855
- /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex min-h-0 flex-1 flex-col bg-background", children: mode === "threads" ? /* @__PURE__ */ jsxRuntime.jsx(
41856
- chunkO3MRE2HL_cjs.ConversationListView,
41857
- {
41858
- showHeader,
41859
- conversations: tasks,
41860
- doneFilter,
41861
- visibilityFilters,
41862
- meetingFilter,
41863
- renderThread: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
41864
- ConversationEntity,
41865
- {
41866
- conversation: row2,
41867
- showRePrefix: false,
41868
- labelMaxWidth: "max-w-full",
41869
- className: "w-full max-w-full [&_.truncate]:line-clamp-2 [&_.truncate]:whitespace-normal [&_.truncate]:break-words [&_.truncate]:text-left",
41870
- "data-testid": `thread-open-${row2.external_id}`
41871
- }
41872
- ),
41873
- renderLabels: threadLabels.renderLabels,
41874
- labelText: threadLabels.labelText,
41875
- renderBy: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
41876
- chunkO3MRE2HL_cjs.ConversationTurnSpeaker,
41877
- {
41878
- variant: "icon",
41879
- role: row2.last_message_role,
41880
- actor: row2.last_message_actor,
41881
- currentUserId: currentUserExtId,
41882
- colorClass: row2.last_message_actor ? ui.getUserAvatarColor(row2.last_message_actor.external_id) : void 0
41883
- }
41884
- ),
41885
- renderStatus: (row2) => /* @__PURE__ */ jsxRuntime.jsx(ConversationStatusCell, { conversation: row2 }),
41886
- isLoading,
41887
- filterText: topbarFilterQuery ?? "",
41888
- formatDate: relativeTime2,
41889
- onOpen: (c) => openConversation(c.external_id),
41890
- onRename: openEdit,
41891
- onDelete: handleDelete,
41892
- canEditShared,
41893
- isWorkspaceOwner,
41894
- selectionActions,
41895
- footer: /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadLauncher, { autoFocus: focusLauncher })
41896
- }
41897
- ) : /* @__PURE__ */ jsxRuntime.jsx(
41898
- chunkO3MRE2HL_cjs.TaskInbox,
41899
- {
41900
- tasks,
41901
- isLoading,
41902
- ...workflowActions,
41903
- onCreate: openCreate,
41904
- filterText: topbarFilterQuery ?? "",
41905
- labels: LIST_LABELS,
41906
- gridId: "conversation-list-grid-v4",
41907
- onFilterTextChange: (text2) => setTopbarFilterQuery(text2),
41908
- outputsByTask,
41909
- onOpenActivity: (task) => openConversation(task.external_id),
41910
- formatRelative: relativeTime2,
41911
- onOpenOutput: handleOpenOutput,
41912
- busyId,
41913
- formatDate: ui.formatFriendlyDate,
41914
- onOpenThread: (conversationId) => openConversation(conversationId),
41915
- onMarkDone: (task) => setStatus(task, "done", `Marked \u201C${nameOf(task)}\u201D done`),
41916
- onReopen: (task) => setStatus(task, "todo", `Reopened \u201C${nameOf(task)}\u201D`),
41917
- people,
41918
- agentNames,
41919
- workflowNames,
41920
- canEditShared,
41921
- isWorkspaceOwner,
41922
- renderPerson,
41923
- onToggleShared: handleToggleShared,
41924
- onEdit: openEdit,
41925
- onDelete: handleDelete,
41926
- onAddSubtask: openAddSubtask,
41927
- onMove: handleMove,
41928
- onMarkDoneMany: handleMarkDoneMany,
41929
- onDeleteMany: handleDeleteMany,
41930
- onGrantAccess: handleGrantAccess,
41931
- selectionActions
41932
- }
41933
- ) }),
41934
- /* @__PURE__ */ jsxRuntime.jsx(
41935
- ConnectedTaskStartDialog,
41936
- {
41937
- open: startOpen,
41938
- onOpenChange: setStartOpen,
41939
- initialParentId: parentForNew
41940
- }
41941
- ),
41942
- /* @__PURE__ */ jsxRuntime.jsx(ConnectedTaskComposer, { open: editorOpen, onOpenChange: setEditorOpen, task: editing }),
41943
- /* @__PURE__ */ jsxRuntime.jsx(
41944
- ConnectedExportDialog,
41945
- {
41946
- open: isExportOpen,
41947
- onOpenChange: setIsExportOpen,
41948
- items: exportRows.map((c) => ({ extId: c.external_id, label: nameOf(c) })),
41949
- entityType: "CONVERSATION",
41950
- testId: "export-chats-modal"
41951
- }
41952
- ),
41953
- /* @__PURE__ */ jsxRuntime.jsx(
41954
- chunkFEVJA4BP_cjs.RenameDialog,
41955
- {
41956
- open: !!renaming,
41957
- onClose: () => {
41958
- setRenaming(null);
41959
- setNewTitle("");
41960
- },
41961
- title: `Rename ${ui.getEntityLabel("CONVERSATION")}`,
41962
- labels: { description: "Rename the conversation title" },
41963
- fieldLabel: `${ui.getEntityLabel("CONVERSATION")} Title`,
41964
- placeholder: "Enter title",
41965
- value: newTitle,
41966
- onChange: setNewTitle,
41967
- onSave: handleSaveRename,
41968
- canSave: !!newTitle.trim(),
41969
- dialogTestId: RENAME_DIALOG.testId
41970
- }
41971
- )
41972
- ]
41973
- }
41974
- );
41975
- return search ? /* @__PURE__ */ jsxRuntime.jsx(ThreadSearch, { ResultsBoundary, children: page }) : page;
41976
- }
41977
43157
  function useSessionPanelMode(panelId, defaultMode = "docked", isOpen = true) {
41978
43158
  const panelModes = react.useArbiSessionState((s) => s.shell.panels.modes);
41979
43159
  const setPanelModeStore = react.useArbiSessionStore().setPanelMode;
@@ -42173,10 +43353,10 @@ function useContextualHints() {
42173
43353
  const session = react.useArbiSessionStore();
42174
43354
  const { data: userSettings } = react.useUserSettings();
42175
43355
  const updateUserSettings = react.useUpdateUserSettings();
42176
- const [sessionOverride] = react.useTransientView(chunkTPNLYQD2_cjs.TIPS_VISIBILITY_OVERRIDE, null);
42177
- const setShowHints = (value) => chunkTPNLYQD2_cjs.setHintsSessionOverride(session, value);
43356
+ const [sessionOverride] = react.useTransientView(chunkPV5A5SAC_cjs.TIPS_VISIBILITY_OVERRIDE, null);
43357
+ const setShowHints = (value) => chunkPV5A5SAC_cjs.setHintsSessionOverride(session, value);
42178
43358
  const setShowHintsPersisted = (value) => {
42179
- chunkTPNLYQD2_cjs.setHintsSessionOverride(session, null);
43359
+ chunkPV5A5SAC_cjs.setHintsSessionOverride(session, null);
42180
43360
  updateUserSettings.mutate({ show_hints: value });
42181
43361
  };
42182
43362
  return {
@@ -42275,43 +43455,43 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
42275
43455
  });
42276
43456
  Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
42277
43457
  enumerable: true,
42278
- get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowDocumentsField; }
43458
+ get: function () { return chunkQWSAJNQE_cjs.ConnectedWorkflowDocumentsField; }
42279
43459
  });
42280
43460
  Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
42281
43461
  enumerable: true,
42282
- get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowLauncher; }
43462
+ get: function () { return chunkQWSAJNQE_cjs.ConnectedWorkflowLauncher; }
42283
43463
  });
42284
43464
  Object.defineProperty(exports, "ConnectedWorkflowsTable", {
42285
43465
  enumerable: true,
42286
- get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowsTable; }
43466
+ get: function () { return chunkQWSAJNQE_cjs.ConnectedWorkflowsTable; }
42287
43467
  });
42288
43468
  Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
42289
43469
  enumerable: true,
42290
- get: function () { return chunkUZVXVTTB_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
43470
+ get: function () { return chunkQWSAJNQE_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
42291
43471
  });
42292
43472
  Object.defineProperty(exports, "toWorkflowFieldDocument", {
42293
43473
  enumerable: true,
42294
- get: function () { return chunkUZVXVTTB_cjs.toWorkflowFieldDocument; }
43474
+ get: function () { return chunkQWSAJNQE_cjs.toWorkflowFieldDocument; }
42295
43475
  });
42296
43476
  Object.defineProperty(exports, "useConnectedAgentOptions", {
42297
43477
  enumerable: true,
42298
- get: function () { return chunkUZVXVTTB_cjs.useConnectedAgentOptions; }
43478
+ get: function () { return chunkQWSAJNQE_cjs.useConnectedAgentOptions; }
42299
43479
  });
42300
43480
  Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
42301
43481
  enumerable: true,
42302
- get: function () { return chunkUZVXVTTB_cjs.useConnectedWorkflowScopeSource; }
43482
+ get: function () { return chunkQWSAJNQE_cjs.useConnectedWorkflowScopeSource; }
42303
43483
  });
42304
43484
  Object.defineProperty(exports, "useConnectedWorkspaceRole", {
42305
43485
  enumerable: true,
42306
- get: function () { return chunkUZVXVTTB_cjs.useConnectedWorkspaceRole; }
43486
+ get: function () { return chunkQWSAJNQE_cjs.useConnectedWorkspaceRole; }
42307
43487
  });
42308
43488
  Object.defineProperty(exports, "useDocxCommentTarget", {
42309
43489
  enumerable: true,
42310
- get: function () { return chunkUZVXVTTB_cjs.useDocxCommentTarget; }
43490
+ get: function () { return chunkQWSAJNQE_cjs.useDocxCommentTarget; }
42311
43491
  });
42312
43492
  Object.defineProperty(exports, "useNativeDocxSupport", {
42313
43493
  enumerable: true,
42314
- get: function () { return chunkUZVXVTTB_cjs.useNativeDocxSupport; }
43494
+ get: function () { return chunkQWSAJNQE_cjs.useNativeDocxSupport; }
42315
43495
  });
42316
43496
  Object.defineProperty(exports, "ConnectedDocumentToolsProvider", {
42317
43497
  enumerable: true,
@@ -42375,7 +43555,7 @@ Object.defineProperty(exports, "useViewerStreamingDocument", {
42375
43555
  });
42376
43556
  Object.defineProperty(exports, "useMeetingThreadMessages", {
42377
43557
  enumerable: true,
42378
- get: function () { return chunk6AJJJ5HR_cjs.useMeetingThreadMessages; }
43558
+ get: function () { return chunk5R256EMF_cjs.useMeetingThreadMessages; }
42379
43559
  });
42380
43560
  Object.defineProperty(exports, "isListedDocument", {
42381
43561
  enumerable: true,
@@ -42446,6 +43626,7 @@ exports.ChatAttachmentList = ChatAttachmentList;
42446
43626
  exports.ConnectedAccountAccessBadge = ConnectedAccountAccessBadge;
42447
43627
  exports.ConnectedAccountCluster = ConnectedAccountCluster;
42448
43628
  exports.ConnectedAccountSettings = ConnectedAccountSettings;
43629
+ exports.ConnectedAccountsImport = ConnectedAccountsImport;
42449
43630
  exports.ConnectedAddContacts = ConnectedAddContacts;
42450
43631
  exports.ConnectedAgentChat = ConnectedAgentChat;
42451
43632
  exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
@@ -42483,6 +43664,7 @@ exports.ConnectedFieldsManager = ConnectedFieldsManager;
42483
43664
  exports.ConnectedFilesBulkActions = ConnectedFilesBulkActions;
42484
43665
  exports.ConnectedFilesExplorer = ConnectedFilesExplorer;
42485
43666
  exports.ConnectedFilesPage = ConnectedFilesPage;
43667
+ exports.ConnectedFilterDropdown = ConnectedFilterDropdown;
42486
43668
  exports.ConnectedForgotPassword = ConnectedForgotPassword;
42487
43669
  exports.ConnectedGlobalDialogs = ConnectedGlobalDialogs;
42488
43670
  exports.ConnectedGrantWorkspaceAccessDialog = ConnectedGrantWorkspaceAccessDialog;
@@ -42745,6 +43927,7 @@ exports.useFilesDialogs = useFilesDialogs;
42745
43927
  exports.useFilesGridStates = useFilesGridStates;
42746
43928
  exports.useFilesPrefs = useFilesPrefs;
42747
43929
  exports.useFilesStore = useFilesStore;
43930
+ exports.useHasAccountsImport = useHasAccountsImport;
42748
43931
  exports.useLaunchWorkflow = useLaunchWorkflow;
42749
43932
  exports.useMemberLookup = useMemberLookup;
42750
43933
  exports.useMessengerRows = useMessengerRows;