@arbidocs/blocks 0.5.153 → 0.5.155

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 (263) hide show
  1. package/dist/{ConnectedNativeDocxComparison-244UIHSM.cjs → ConnectedNativeDocxComparison-2DAQX5GX.cjs} +8 -8
  2. package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs.map → ConnectedNativeDocxComparison-2DAQX5GX.cjs.map} +1 -1
  3. package/dist/{ConnectedPresentation-JUXIXKYN.cjs → ConnectedPresentation-J42JPUVR.cjs} +13 -13
  4. package/dist/{ConnectedPresentation-JUXIXKYN.cjs.map → ConnectedPresentation-J42JPUVR.cjs.map} +1 -1
  5. package/dist/{ConnectedSlidesTab-JA3VB66W.cjs → ConnectedSlidesTab-BYS7HFNK.cjs} +12 -12
  6. package/dist/{ConnectedSlidesTab-JA3VB66W.cjs.map → ConnectedSlidesTab-BYS7HFNK.cjs.map} +1 -1
  7. package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs → ConnectedStreamedWordArtifact-LTYB62VM.cjs} +8 -8
  8. package/dist/{ConnectedNativeDocxComparison-244UIHSM.cjs.map → ConnectedStreamedWordArtifact-LTYB62VM.cjs.map} +1 -1
  9. package/dist/{DocumentReviewCard-5W2QQWKA.cjs → DocumentReviewCard-5AP55NGZ.cjs} +4 -3
  10. package/dist/DocumentReviewCard-5AP55NGZ.cjs.map +1 -0
  11. package/dist/{FilesViewerDialog-63QUTG4L.cjs → FilesViewerDialog-SHWCE3UN.cjs} +21 -19
  12. package/dist/FilesViewerDialog-SHWCE3UN.cjs.map +1 -0
  13. package/dist/{RechartsRenderer-NU6WUZJS.cjs → RechartsRenderer-EPVL5QZA.cjs} +2 -2
  14. package/dist/{RechartsRenderer-NU6WUZJS.cjs.map → RechartsRenderer-EPVL5QZA.cjs.map} +1 -1
  15. package/dist/{SpotlightStrip-HXQFPAAL.cjs → SpotlightStrip-JE6MXUBT.cjs} +6 -6
  16. package/dist/{SpotlightStrip-HXQFPAAL.cjs.map → SpotlightStrip-JE6MXUBT.cjs.map} +1 -1
  17. package/dist/{WorkspaceTableView-2QP2HJLK.cjs → WorkspaceTableView-S4IBYQVF.cjs} +13 -11
  18. package/dist/WorkspaceTableView-S4IBYQVF.cjs.map +1 -0
  19. package/dist/agents/index.cjs +244 -243
  20. package/dist/agents/workflows/WorkflowLauncher.d.ts +3 -1
  21. package/dist/agents/workflows/WorkflowLauncher.js +2 -0
  22. package/dist/agents/workflows/WorkflowLauncher.js.map +2 -2
  23. package/dist/{ai-ODGRIL6Y.cjs → ai-QFY4LYQZ.cjs} +16 -16
  24. package/dist/ai-QFY4LYQZ.cjs.map +1 -0
  25. package/dist/calls/index.cjs +25 -24
  26. package/dist/calls/index.cjs.map +1 -1
  27. package/dist/{chunk-4I2PCP7O.cjs → chunk-2XOIULVN.cjs} +36 -35
  28. package/dist/chunk-2XOIULVN.cjs.map +1 -0
  29. package/dist/{chunk-D5DOK2AE.cjs → chunk-3SGFIDID.cjs} +10 -10
  30. package/dist/{chunk-D5DOK2AE.cjs.map → chunk-3SGFIDID.cjs.map} +1 -1
  31. package/dist/{chunk-WUM76MJU.cjs → chunk-4UDGCXUR.cjs} +7 -7
  32. package/dist/{chunk-WUM76MJU.cjs.map → chunk-4UDGCXUR.cjs.map} +1 -1
  33. package/dist/{chunk-LYKT336H.cjs → chunk-6I5HHWCD.cjs} +5 -5
  34. package/dist/{chunk-LYKT336H.cjs.map → chunk-6I5HHWCD.cjs.map} +1 -1
  35. package/dist/{chunk-KWJW5TMH.cjs → chunk-6OPDKROP.cjs} +4 -41
  36. package/dist/chunk-6OPDKROP.cjs.map +1 -0
  37. package/dist/{chunk-QWOPEBH2.cjs → chunk-6P4U63HO.cjs} +4 -4
  38. package/dist/{chunk-QWOPEBH2.cjs.map → chunk-6P4U63HO.cjs.map} +1 -1
  39. package/dist/chunk-74RUAGVD.cjs +1533 -0
  40. package/dist/chunk-74RUAGVD.cjs.map +1 -0
  41. package/dist/{chunk-QKCFV36K.cjs → chunk-7UPEFZCV.cjs} +9 -9
  42. package/dist/{chunk-QKCFV36K.cjs.map → chunk-7UPEFZCV.cjs.map} +1 -1
  43. package/dist/{chunk-DUNXLT63.cjs → chunk-AHUEBRLX.cjs} +2 -238
  44. package/dist/chunk-AHUEBRLX.cjs.map +1 -0
  45. package/dist/chunk-BH322H5B.cjs +594 -0
  46. package/dist/chunk-BH322H5B.cjs.map +1 -0
  47. package/dist/{chunk-AG6KAGAX.cjs → chunk-BTQ7IAOH.cjs} +4 -4
  48. package/dist/{chunk-AG6KAGAX.cjs.map → chunk-BTQ7IAOH.cjs.map} +1 -1
  49. package/dist/{chunk-FCT62ZPE.cjs → chunk-BZVK7JW5.cjs} +5 -5
  50. package/dist/{chunk-FCT62ZPE.cjs.map → chunk-BZVK7JW5.cjs.map} +1 -1
  51. package/dist/{chunk-HNLNRAEU.cjs → chunk-DSLMJ24E.cjs} +2 -261
  52. package/dist/chunk-DSLMJ24E.cjs.map +1 -0
  53. package/dist/chunk-DWRUGOTQ.cjs +35 -0
  54. package/dist/chunk-DWRUGOTQ.cjs.map +1 -0
  55. package/dist/{chunk-GAA222SK.cjs → chunk-EG3DPKXM.cjs} +5 -5
  56. package/dist/{chunk-GAA222SK.cjs.map → chunk-EG3DPKXM.cjs.map} +1 -1
  57. package/dist/{chunk-VSDD5TH5.cjs → chunk-G3MRW4WB.cjs} +10 -8
  58. package/dist/chunk-G3MRW4WB.cjs.map +1 -0
  59. package/dist/{chunk-TFRCNIUY.cjs → chunk-GF6AYAMI.cjs} +9 -9
  60. package/dist/{chunk-TFRCNIUY.cjs.map → chunk-GF6AYAMI.cjs.map} +1 -1
  61. package/dist/{chunk-4ZR4O5SP.cjs → chunk-GK3U3FWY.cjs} +60 -28
  62. package/dist/chunk-GK3U3FWY.cjs.map +1 -0
  63. package/dist/{chunk-3CJTO6RV.cjs → chunk-GXRD5OSU.cjs} +8 -8
  64. package/dist/{chunk-3CJTO6RV.cjs.map → chunk-GXRD5OSU.cjs.map} +1 -1
  65. package/dist/chunk-JWCVA4LC.cjs +248 -0
  66. package/dist/chunk-JWCVA4LC.cjs.map +1 -0
  67. package/dist/{chunk-UM3EWCDE.cjs → chunk-K5F2VNCX.cjs} +35 -10
  68. package/dist/chunk-K5F2VNCX.cjs.map +1 -0
  69. package/dist/chunk-KD66CBYO.cjs +44 -0
  70. package/dist/chunk-KD66CBYO.cjs.map +1 -0
  71. package/dist/chunk-LLVE5TST.cjs +318 -0
  72. package/dist/chunk-LLVE5TST.cjs.map +1 -0
  73. package/dist/{chunk-CVVQHFLR.cjs → chunk-OZJENXU3.cjs} +71 -649
  74. package/dist/chunk-OZJENXU3.cjs.map +1 -0
  75. package/dist/{chunk-JLNKD56X.cjs → chunk-QEH375MU.cjs} +4 -4
  76. package/dist/{chunk-JLNKD56X.cjs.map → chunk-QEH375MU.cjs.map} +1 -1
  77. package/dist/chunk-SGYURQ23.cjs +271 -0
  78. package/dist/chunk-SGYURQ23.cjs.map +1 -0
  79. package/dist/{chunk-A5SKK3CU.cjs → chunk-SLCH5JRI.cjs} +64 -35
  80. package/dist/chunk-SLCH5JRI.cjs.map +1 -0
  81. package/dist/chunk-T26UYA6Q.cjs +64 -0
  82. package/dist/chunk-T26UYA6Q.cjs.map +1 -0
  83. package/dist/{chunk-SMO4SPPB.cjs → chunk-TD5V5BZ3.cjs} +5 -5
  84. package/dist/{chunk-SMO4SPPB.cjs.map → chunk-TD5V5BZ3.cjs.map} +1 -1
  85. package/dist/{chunk-IXTDOPSB.cjs → chunk-TSAZWUPZ.cjs} +4 -4
  86. package/dist/{chunk-IXTDOPSB.cjs.map → chunk-TSAZWUPZ.cjs.map} +1 -1
  87. package/dist/{chunk-5DGNJ6VJ.cjs → chunk-UD3LPATQ.cjs} +6 -6
  88. package/dist/{chunk-5DGNJ6VJ.cjs.map → chunk-UD3LPATQ.cjs.map} +1 -1
  89. package/dist/{chunk-OF7KMG6R.cjs → chunk-UJHQ4DA4.cjs} +5 -5
  90. package/dist/{chunk-OF7KMG6R.cjs.map → chunk-UJHQ4DA4.cjs.map} +1 -1
  91. package/dist/{chunk-NUFZFWHZ.cjs → chunk-W5QSKW7T.cjs} +3 -29
  92. package/dist/chunk-W5QSKW7T.cjs.map +1 -0
  93. package/dist/{chunk-NNZFZYTI.cjs → chunk-WOVNXJK5.cjs} +4 -54
  94. package/dist/chunk-WOVNXJK5.cjs.map +1 -0
  95. package/dist/{chunk-E6BM5ENI.cjs → chunk-WRTEKOQP.cjs} +2 -309
  96. package/dist/chunk-WRTEKOQP.cjs.map +1 -0
  97. package/dist/{chunk-Z3N32LL4.cjs → chunk-Y2Z5UHHV.cjs} +29 -27
  98. package/dist/chunk-Y2Z5UHHV.cjs.map +1 -0
  99. package/dist/{chunk-KRQCUVH7.cjs → chunk-YSAUOJA7.cjs} +9 -3
  100. package/dist/chunk-YSAUOJA7.cjs.map +1 -0
  101. package/dist/components/gestures/usePointerGesture.d.ts +13 -1
  102. package/dist/components/gestures/usePointerGesture.js +33 -8
  103. package/dist/components/gestures/usePointerGesture.js.map +2 -2
  104. package/dist/connect/docx.cjs +11 -11
  105. package/dist/connect/index.cjs +1064 -2179
  106. package/dist/connect/index.cjs.map +1 -1
  107. package/dist/connect/index.d.ts +1 -0
  108. package/dist/connect/index.js +1 -0
  109. package/dist/connect/index.js.map +2 -2
  110. package/dist/connect/viewer.cjs +11 -9
  111. package/dist/connection/dashboards/DashboardPanel.d.ts +2 -0
  112. package/dist/connection/dashboards/DashboardPanel.js +4 -0
  113. package/dist/connection/dashboards/DashboardPanel.js.map +2 -2
  114. package/dist/connection/dashboards/index.d.ts +1 -1
  115. package/dist/connection/dashboards/index.js +2 -0
  116. package/dist/connection/dashboards/index.js.map +2 -2
  117. package/dist/connection/dashboards/templates.d.ts +10 -5
  118. package/dist/connection/dashboards/templates.js +7 -1
  119. package/dist/connection/dashboards/templates.js.map +2 -2
  120. package/dist/connection/export/ConnectedExportPanel.js +19 -78
  121. package/dist/connection/export/ConnectedExportPanel.js.map +2 -2
  122. package/dist/connection/export/transfer-targets.d.ts +66 -0
  123. package/dist/connection/export/transfer-targets.js +93 -0
  124. package/dist/connection/export/transfer-targets.js.map +7 -0
  125. package/dist/connection/export/transfer-text.js +5 -0
  126. package/dist/connection/export/transfer-text.js.map +2 -2
  127. package/dist/connection/live-blocks/ConnectedAgendaBlock.d.ts +13 -0
  128. package/dist/connection/live-blocks/ConnectedAgendaBlock.js +19 -0
  129. package/dist/connection/live-blocks/ConnectedAgendaBlock.js.map +7 -0
  130. package/dist/connection/live-blocks/ConnectedCarouselBlock.d.ts +7 -0
  131. package/dist/connection/live-blocks/ConnectedCarouselBlock.js +84 -0
  132. package/dist/connection/live-blocks/ConnectedCarouselBlock.js.map +7 -0
  133. package/dist/connection/live-blocks/ConnectedListBlock.d.ts +29 -0
  134. package/dist/connection/live-blocks/ConnectedListBlock.js +193 -0
  135. package/dist/connection/live-blocks/ConnectedListBlock.js.map +7 -0
  136. package/dist/connection/live-blocks/ConnectedStartBlock.d.ts +7 -0
  137. package/dist/connection/live-blocks/ConnectedStartBlock.js +16 -0
  138. package/dist/connection/live-blocks/ConnectedStartBlock.js.map +7 -0
  139. package/dist/connection/live-blocks/DashboardAgenda.d.ts +10 -0
  140. package/dist/connection/{workspace-dashboard → live-blocks}/DashboardAgenda.js +10 -2
  141. package/dist/connection/live-blocks/DashboardAgenda.js.map +7 -0
  142. package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js.map +1 -1
  143. package/dist/connection/live-blocks/LiveBlockRoot.d.ts +11 -0
  144. package/dist/connection/live-blocks/LiveBlockRoot.js +22 -0
  145. package/dist/connection/live-blocks/LiveBlockRoot.js.map +7 -0
  146. package/dist/connection/live-blocks/index.d.ts +5 -0
  147. package/dist/connection/live-blocks/index.js +20 -0
  148. package/dist/connection/live-blocks/index.js.map +7 -0
  149. package/dist/connection/{workspace-dashboard/dashboard-rows.d.ts → live-blocks/list-rows.d.ts} +22 -4
  150. package/dist/connection/{workspace-dashboard/dashboard-rows.js → live-blocks/list-rows.js} +13 -8
  151. package/dist/connection/live-blocks/list-rows.js.map +7 -0
  152. package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js.map +1 -1
  153. package/dist/connection/live-blocks/workspace-dashboard-blocks.d.ts +23 -0
  154. package/dist/connection/live-blocks/workspace-dashboard-blocks.js +58 -0
  155. package/dist/connection/live-blocks/workspace-dashboard-blocks.js.map +7 -0
  156. package/dist/connection/pages/BlockEditor.d.ts +3 -1
  157. package/dist/connection/pages/BlockEditor.js +18 -1
  158. package/dist/connection/pages/BlockEditor.js.map +2 -2
  159. package/dist/connection/pages/ConnectedPagesPage.d.ts +9 -5
  160. package/dist/connection/pages/ConnectedPagesPage.js +144 -48
  161. package/dist/connection/pages/ConnectedPagesPage.js.map +2 -2
  162. package/dist/connection/pages/EditablePageGrid.d.ts +25 -15
  163. package/dist/connection/pages/EditablePageGrid.js +145 -50
  164. package/dist/connection/pages/EditablePageGrid.js.map +2 -2
  165. package/dist/connection/pages/LiveBlockEditor.d.ts +30 -0
  166. package/dist/connection/pages/LiveBlockEditor.js +175 -0
  167. package/dist/connection/pages/LiveBlockEditor.js.map +7 -0
  168. package/dist/connection/pages/PageBlockView.d.ts +5 -3
  169. package/dist/connection/pages/PageBlockView.js +69 -4
  170. package/dist/connection/pages/PageBlockView.js.map +2 -2
  171. package/dist/connection/pages/PageGrid.d.ts +4 -3
  172. package/dist/connection/pages/PageGrid.js +4 -2
  173. package/dist/connection/pages/PageGrid.js.map +2 -2
  174. package/dist/connection/pages/PageTransferDialog.d.ts +38 -0
  175. package/dist/connection/pages/PageTransferDialog.js +219 -0
  176. package/dist/connection/pages/PageTransferDialog.js.map +7 -0
  177. package/dist/connection/pages/PageView.d.ts +6 -2
  178. package/dist/connection/pages/PageView.js +40 -15
  179. package/dist/connection/pages/PageView.js.map +2 -2
  180. package/dist/connection/pages/PagesList.d.ts +4 -3
  181. package/dist/connection/pages/PagesList.js.map +2 -2
  182. package/dist/connection/pages/grid-layout.d.ts +44 -12
  183. package/dist/connection/pages/grid-layout.js +71 -27
  184. package/dist/connection/pages/grid-layout.js.map +2 -2
  185. package/dist/connection/pages/index.d.ts +5 -2
  186. package/dist/connection/pages/index.js +40 -5
  187. package/dist/connection/pages/index.js.map +2 -2
  188. package/dist/connection/pages/labels.d.ts +3 -1
  189. package/dist/connection/pages/labels.js +7 -1
  190. package/dist/connection/pages/labels.js.map +2 -2
  191. package/dist/connection/pages/page-templates.d.ts +10 -0
  192. package/dist/connection/pages/page-templates.js +16 -0
  193. package/dist/connection/pages/page-templates.js.map +7 -0
  194. package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +2 -0
  195. package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
  196. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.d.ts +10 -7
  197. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js +31 -171
  198. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js.map +3 -3
  199. package/dist/dashboards/ChartRenderer.d.ts +5 -3
  200. package/dist/dashboards/ChartRenderer.js +29 -18
  201. package/dist/dashboards/ChartRenderer.js.map +2 -2
  202. package/dist/dashboards/PanelView.d.ts +6 -1
  203. package/dist/dashboards/PanelView.js +24 -7
  204. package/dist/dashboards/PanelView.js.map +2 -2
  205. package/dist/dashboards/RechartsRenderer.d.ts +2 -1
  206. package/dist/dashboards/RechartsRenderer.js.map +2 -2
  207. package/dist/dashboards/index.cjs +25 -21
  208. package/dist/embed/index.cjs +17 -15
  209. package/dist/home/FactsStrip.d.ts +3 -1
  210. package/dist/home/FactsStrip.js +3 -2
  211. package/dist/home/FactsStrip.js.map +2 -2
  212. package/dist/home/RecentList.d.ts +4 -2
  213. package/dist/home/RecentList.js +3 -2
  214. package/dist/home/RecentList.js.map +2 -2
  215. package/dist/home/StartTiles.d.ts +6 -1
  216. package/dist/home/StartTiles.js +55 -33
  217. package/dist/home/StartTiles.js.map +2 -2
  218. package/dist/home/index.cjs +62 -57
  219. package/dist/home/index.d.ts +1 -1
  220. package/dist/home/index.js +2 -1
  221. package/dist/home/index.js.map +2 -2
  222. package/dist/home/sections.d.ts +5 -0
  223. package/dist/home/sections.js +7 -0
  224. package/dist/home/sections.js.map +2 -2
  225. package/dist/index.cjs +326 -324
  226. package/dist/index.cjs.map +1 -1
  227. package/dist/pages/index.cjs +864 -155
  228. package/dist/pages/index.cjs.map +1 -1
  229. package/dist/settings/index.cjs +164 -163
  230. package/dist/shell/index.cjs +34 -33
  231. package/dist/studio/index.cjs +12 -12
  232. package/dist/styles.css +1 -1
  233. package/dist/workflow-canvas/index.cjs +24 -21
  234. package/dist/workflow-canvas/index.cjs.map +1 -1
  235. package/dist/workspaces/index.cjs +49 -47
  236. package/dist/workspaces/index.cjs.map +1 -1
  237. package/node_modules/@arbidocs/coedit/package.json +1 -1
  238. package/package.json +5 -5
  239. package/dist/DocumentReviewCard-5W2QQWKA.cjs.map +0 -1
  240. package/dist/FilesViewerDialog-63QUTG4L.cjs.map +0 -1
  241. package/dist/WorkspaceTableView-2QP2HJLK.cjs.map +0 -1
  242. package/dist/ai-ODGRIL6Y.cjs.map +0 -1
  243. package/dist/chunk-4I2PCP7O.cjs.map +0 -1
  244. package/dist/chunk-4ZR4O5SP.cjs.map +0 -1
  245. package/dist/chunk-A5SKK3CU.cjs.map +0 -1
  246. package/dist/chunk-CVVQHFLR.cjs.map +0 -1
  247. package/dist/chunk-DUNXLT63.cjs.map +0 -1
  248. package/dist/chunk-E6BM5ENI.cjs.map +0 -1
  249. package/dist/chunk-HNLNRAEU.cjs.map +0 -1
  250. package/dist/chunk-KRQCUVH7.cjs.map +0 -1
  251. package/dist/chunk-KWJW5TMH.cjs.map +0 -1
  252. package/dist/chunk-NNZFZYTI.cjs.map +0 -1
  253. package/dist/chunk-NUFZFWHZ.cjs.map +0 -1
  254. package/dist/chunk-UM3EWCDE.cjs.map +0 -1
  255. package/dist/chunk-VSDD5TH5.cjs.map +0 -1
  256. package/dist/chunk-Z3N32LL4.cjs.map +0 -1
  257. package/dist/connection/workspace-dashboard/DashboardAgenda.d.ts +0 -1
  258. package/dist/connection/workspace-dashboard/DashboardAgenda.js.map +0 -7
  259. package/dist/connection/workspace-dashboard/dashboard-rows.js.map +0 -7
  260. /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.d.ts +0 -0
  261. /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js +0 -0
  262. /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.d.ts +0 -0
  263. /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js +0 -0
@@ -0,0 +1,594 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var chunkM55XUF4L_cjs = require('./chunk-M55XUF4L.cjs');
5
+ var chunkCVPV4I7Z_cjs = require('./chunk-CVPV4I7Z.cjs');
6
+ var chunkPLIF5CUV_cjs = require('./chunk-PLIF5CUV.cjs');
7
+ var react = require('react');
8
+ var lucideReact = require('lucide-react');
9
+ var ui = require('@arbidocs/react/ui');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+ var shell = require('@arbidocs/react/shell');
12
+
13
+ // src/agents/tasks/taskLabels.ts
14
+ var TRIGGER_LABELS = {
15
+ one_time: "One-time",
16
+ recurring: "Recurring",
17
+ event: "Event",
18
+ after: "After a task",
19
+ on_demand: "On demand"
20
+ };
21
+ var STATUS_LABELS = {
22
+ todo: "To do",
23
+ generating: "Generating",
24
+ done: "Done",
25
+ chat: "Chat"
26
+ };
27
+ var STATUS_ORDER = ["generating", "todo", "done", "chat"];
28
+ var STATUS_TONE = {
29
+ todo: "neutral",
30
+ generating: "ai",
31
+ done: "success",
32
+ chat: "neutral"
33
+ };
34
+ function asTaskStatus(status) {
35
+ if (!status) return "chat";
36
+ return STATUS_ORDER.includes(status) ? status : "todo";
37
+ }
38
+ function goalProgress(task) {
39
+ const gs = task.goal_state;
40
+ if (!gs || gs.criteria_total == null) return null;
41
+ return { met: gs.criteria_met ?? 0, total: gs.criteria_total, done: gs.done === true };
42
+ }
43
+
44
+ // src/agents/tasks/taskRows.ts
45
+ var MAX_TASK_DEPTH = 5;
46
+ var ownerExtId = (task) => task.owner_ext_id || task.created_by_ext_id || null;
47
+ var isPlainTodo = (task) => !task.agent_ext_id && !task.has_agent_action && !task.skill_ref;
48
+ function indexTasks(tasks) {
49
+ const byId = new Map(tasks.map((t) => [t.external_id, t]));
50
+ const kids = /* @__PURE__ */ new Map();
51
+ const parentOf = /* @__PURE__ */ new Map();
52
+ for (const task of tasks) {
53
+ const parent = task.parent_conversation_ext_id;
54
+ if (parent && parent !== task.external_id && byId.has(parent)) {
55
+ parentOf.set(task.external_id, parent);
56
+ const list = kids.get(parent);
57
+ if (list) list.push(task);
58
+ else kids.set(parent, [task]);
59
+ }
60
+ }
61
+ return { byId, kids, parentOf };
62
+ }
63
+ function descendantIds(tree, id) {
64
+ const out = [];
65
+ const seen = /* @__PURE__ */ new Set([id]);
66
+ const stack = [id];
67
+ while (stack.length) {
68
+ for (const child of tree.kids.get(stack.pop()) ?? []) {
69
+ if (seen.has(child.external_id)) continue;
70
+ seen.add(child.external_id);
71
+ out.push(child.external_id);
72
+ stack.push(child.external_id);
73
+ }
74
+ }
75
+ return out;
76
+ }
77
+ function subtreeLevels(tree, id, seen = /* @__PURE__ */ new Set()) {
78
+ if (seen.has(id)) return 0;
79
+ const next = new Set(seen).add(id);
80
+ let deepest = 0;
81
+ for (const child of tree.kids.get(id) ?? []) {
82
+ deepest = Math.max(deepest, subtreeLevels(tree, child.external_id, next));
83
+ }
84
+ return 1 + deepest;
85
+ }
86
+ function levelOf(tree, id) {
87
+ let level = 1;
88
+ const seen = /* @__PURE__ */ new Set([id]);
89
+ for (let at = tree.parentOf.get(id); at && !seen.has(at); at = tree.parentOf.get(at)) {
90
+ seen.add(at);
91
+ level += 1;
92
+ }
93
+ return level;
94
+ }
95
+ function moveTargets(tasks, task) {
96
+ const tree = indexTasks(tasks);
97
+ const banned = /* @__PURE__ */ new Set([task.external_id, ...descendantIds(tree, task.external_id)]);
98
+ const height = subtreeLevels(tree, task.external_id);
99
+ return tasks.filter(
100
+ (t) => !banned.has(t.external_id) && levelOf(tree, t.external_id) + height <= MAX_TASK_DEPTH
101
+ );
102
+ }
103
+ var sameStats = (a, b) => a === b || a !== void 0 && b !== void 0 && a.done === b.done && a.total === b.total;
104
+ function buildTaskRows(tasks, filter, collapsed, compare, options = {}) {
105
+ const tree = indexTasks(tasks);
106
+ const { kids, parentOf } = tree;
107
+ const sorted = (list) => compare ? [...list].sort(compare) : list;
108
+ const query = options.query?.trim().toLowerCase() ?? "";
109
+ const titleOf = options.titleOf ?? ((t) => t.title ?? "");
110
+ let included = null;
111
+ let matched = null;
112
+ if (filter !== "all" || query) {
113
+ matched = /* @__PURE__ */ new Set();
114
+ included = /* @__PURE__ */ new Set();
115
+ for (const task of tasks) {
116
+ const statusOk = filter === "all" || asTaskStatus(task.status) === filter;
117
+ const textOk = !query || `${titleOf(task)} ${task.description ?? ""}`.toLowerCase().includes(query);
118
+ if (!statusOk || !textOk) continue;
119
+ matched.add(task.external_id);
120
+ for (let at = task.external_id; at && !included.has(at); at = parentOf.get(at)) {
121
+ included.add(at);
122
+ }
123
+ }
124
+ }
125
+ const shown = (list) => included ? list.filter((t) => included.has(t.external_id)) : list;
126
+ const build = (task, depth, seen) => {
127
+ const nextSeen = new Set(seen).add(task.external_id);
128
+ return {
129
+ task,
130
+ depth,
131
+ context: matched ? !matched.has(task.external_id) : false,
132
+ children: sorted(shown(kids.get(task.external_id) ?? [])).filter((child) => !nextSeen.has(child.external_id)).map((child) => build(child, depth + 1, nextSeen))
133
+ };
134
+ };
135
+ const sections = new Map([
136
+ ...STATUS_ORDER.map((s) => [s, []]),
137
+ ["sorted", []]
138
+ ]);
139
+ const sectionOf = (task) => compare ? "sorted" : asTaskStatus(task.status);
140
+ const roots = tasks.filter((t) => !parentOf.has(t.external_id));
141
+ for (const task of sorted(shown(roots))) {
142
+ sections.get(sectionOf(task))?.push(build(task, 0, /* @__PURE__ */ new Set()));
143
+ }
144
+ const cache = options.cache;
145
+ const used = /* @__PURE__ */ new Set();
146
+ const rows = [];
147
+ const walk = (node, parentId, setSize, posInSet) => {
148
+ const id = node.task.external_id;
149
+ const expanded = !collapsed.has(id);
150
+ const all = kids.get(id);
151
+ const childStats = all ? { done: all.filter((c) => asTaskStatus(c.status) === "done").length, total: all.length } : void 0;
152
+ let row = {
153
+ external_id: id,
154
+ task: node.task,
155
+ depth: node.depth,
156
+ childStats,
157
+ expanded,
158
+ parentId,
159
+ setSize,
160
+ posInSet,
161
+ context: node.context
162
+ };
163
+ const prev = cache?.get(id);
164
+ if (prev && prev.task === row.task && prev.depth === row.depth && prev.expanded === row.expanded && prev.parentId === row.parentId && prev.setSize === row.setSize && prev.posInSet === row.posInSet && prev.context === row.context && sameStats(prev.childStats, row.childStats)) {
165
+ row = prev;
166
+ }
167
+ used.add(id);
168
+ cache?.set(id, row);
169
+ rows.push(row);
170
+ if (expanded) {
171
+ node.children.forEach((child, i) => walk(child, id, node.children.length, i + 1));
172
+ }
173
+ };
174
+ const ordered = [...STATUS_ORDER, "sorted"].flatMap((s) => sections.get(s) ?? []);
175
+ ordered.forEach((node, i) => walk(node, null, ordered.length, i + 1));
176
+ if (cache) {
177
+ for (const id of [...cache.keys()]) if (!used.has(id)) cache.delete(id);
178
+ }
179
+ return rows;
180
+ }
181
+ var DEFAULT_PILL_SELECT_LABELS = {
182
+ search: "Search\u2026",
183
+ empty: "No match."
184
+ };
185
+ function PillSelect({
186
+ icon,
187
+ prefix,
188
+ value,
189
+ options,
190
+ onChange,
191
+ noneOption,
192
+ searchable = false,
193
+ disabled = false,
194
+ testId,
195
+ labels,
196
+ className
197
+ }) {
198
+ const l = { ...DEFAULT_PILL_SELECT_LABELS, ...labels };
199
+ const [open, setOpen] = react.useState(false);
200
+ const all = noneOption ? [noneOption, ...options] : options;
201
+ const chosen = all.find((o) => o.id === value);
202
+ const id = chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "pill-select" });
203
+ const choose = (next) => {
204
+ onChange(next);
205
+ setOpen(false);
206
+ };
207
+ return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { open, onOpenChange: setOpen, children: [
208
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
209
+ ui.EntityPill,
210
+ {
211
+ icon: chosen?.icon ?? icon,
212
+ label: `${prefix}: ${chosen?.label ?? ""}`.replace(/: $/, ""),
213
+ secondaryText: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-3", "aria-hidden": true }),
214
+ size: "sm",
215
+ disabled,
216
+ labelMaxWidth: "max-w-[220px]",
217
+ className: ui.cn("h-7 pointer-coarse:min-h-11", className),
218
+ "data-testid": id
219
+ }
220
+ ) }),
221
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { align: "start", className: "w-64 p-0", "data-testid": `${id}-list`, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Command, { children: [
222
+ searchable && /* @__PURE__ */ jsxRuntime.jsx(ui.CommandInput, { placeholder: l.search, "data-testid": `${id}-search` }),
223
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.CommandList, { children: [
224
+ /* @__PURE__ */ jsxRuntime.jsx(ui.CommandEmpty, { children: l.empty }),
225
+ all.map((o) => /* @__PURE__ */ jsxRuntime.jsxs(
226
+ ui.CommandItem,
227
+ {
228
+ value: `${o.label} ${o.description ?? ""}`,
229
+ onSelect: () => choose(o.id),
230
+ "data-testid": `${id}-option-${o.id || "none"}`,
231
+ children: [
232
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2 flex size-4 shrink-0 items-center justify-center", children: o.icon }),
233
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: o.label }),
234
+ o.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 shrink-0 text-xs text-muted-foreground", children: o.description }),
235
+ o.id === value && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "ml-2 size-4 shrink-0", "aria-hidden": true })
236
+ ]
237
+ },
238
+ o.id || "__none__"
239
+ ))
240
+ ] })
241
+ ] }) })
242
+ ] });
243
+ }
244
+ var DEFAULT_DUE_DATE_MENU_LABELS = {
245
+ today: "Today",
246
+ tomorrow: "Tomorrow",
247
+ nextMonday: "Next Monday",
248
+ inAWeek: "In a week",
249
+ pick: "Or pick a date and time",
250
+ clear: "Clear date"
251
+ };
252
+ var END_OF_DAY_HOUR = 17;
253
+ var pad = (n) => String(n).padStart(2, "0");
254
+ function toLocalInput(date) {
255
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;
256
+ }
257
+ function duePresets(now = /* @__PURE__ */ new Date()) {
258
+ const at = (daysAhead) => {
259
+ const d = new Date(now);
260
+ d.setDate(d.getDate() + daysAhead);
261
+ d.setHours(END_OF_DAY_HOUR, 0, 0, 0);
262
+ return d;
263
+ };
264
+ const untilMonday = (8 - now.getDay()) % 7 || 7;
265
+ const presets = [];
266
+ if (now.getHours() < END_OF_DAY_HOUR) presets.push({ id: "today", value: toLocalInput(at(0)) });
267
+ presets.push(
268
+ { id: "tomorrow", value: toLocalInput(at(1)) },
269
+ { id: "nextMonday", value: toLocalInput(at(untilMonday)) },
270
+ { id: "inAWeek", value: toLocalInput(at(7)) }
271
+ );
272
+ return presets;
273
+ }
274
+ function DueDateMenu({ value, onChange, id, label, labels }) {
275
+ const l = { ...DEFAULT_DUE_DATE_MENU_LABELS, ...labels };
276
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", "data-testid": `${id}-menu`, children: [
277
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: duePresets().map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
278
+ ui.Button,
279
+ {
280
+ type: "button",
281
+ variant: value === preset.value ? "secondary" : "outline",
282
+ size: "sm",
283
+ className: "h-8 pointer-coarse:h-11",
284
+ onClick: () => onChange(preset.value),
285
+ "data-testid": `${id}-preset-${preset.id}`,
286
+ children: l[preset.id]
287
+ },
288
+ preset.id
289
+ )) }),
290
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
291
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `${id}-input`, className: "sr-only", children: label }),
292
+ /* @__PURE__ */ jsxRuntime.jsx(
293
+ ui.Input,
294
+ {
295
+ id: `${id}-input`,
296
+ type: "datetime-local",
297
+ "aria-label": l.pick,
298
+ value,
299
+ onChange: (e) => onChange(e.target.value),
300
+ "data-testid": id
301
+ }
302
+ ),
303
+ value && /* @__PURE__ */ jsxRuntime.jsx(
304
+ ui.Button,
305
+ {
306
+ type: "button",
307
+ variant: "ghost",
308
+ size: "icon",
309
+ "aria-label": l.clear,
310
+ onClick: () => onChange(""),
311
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4", "aria-hidden": true })
312
+ }
313
+ )
314
+ ] })
315
+ ] });
316
+ }
317
+ var ARBI = shell.assistantCopy();
318
+ var DEFAULT_NEW_THREAD_DIALOG_LABELS = {
319
+ title: "New",
320
+ description: "Ask for anything, like a normal chat: the assistant gets on it. Add a due date if it matters.",
321
+ promptLabel: "What do you want to ask or get done?",
322
+ promptPlaceholder: "Ask a question, or describe what needs doing\u2026",
323
+ titleLabel: "Title",
324
+ titlePlaceholder: "Made from your prompt unless you write one",
325
+ visibility: "Shared with",
326
+ taskDetails: "Task details",
327
+ files: (count) => count === 0 ? "No files in this workspace yet: answers come from general knowledge." : `Can use the ${count} file${count === 1 ? "" : "s"} in this workspace.`,
328
+ taskDetailsHint: "Optional.",
329
+ due: "Due",
330
+ dueNone: "No date",
331
+ dueClear: "Clear date",
332
+ parentTask: "Part of",
333
+ parentTaskNone: "Nothing (top-level)",
334
+ search: "Search\u2026",
335
+ empty: "No match.",
336
+ cancel: "Cancel",
337
+ createTask: ARBI.startWith,
338
+ assistantStart: "Assistant starts on it now",
339
+ assistantStartHint: "Switch off to just keep track of it as a to-do.",
340
+ addTodo: "Add to-do",
341
+ saving: "Creating\u2026"
342
+ };
343
+ var GLYPH = "size-3.5 shrink-0";
344
+ function formatDue(local) {
345
+ const d = new Date(local);
346
+ if (Number.isNaN(d.getTime())) return local;
347
+ return d.toLocaleString(void 0, {
348
+ weekday: "short",
349
+ day: "numeric",
350
+ month: "short",
351
+ hour: "2-digit",
352
+ minute: "2-digit"
353
+ });
354
+ }
355
+ function NewThreadDialog({
356
+ open,
357
+ onOpenChange,
358
+ tasks = [],
359
+ initialValues,
360
+ fileCount,
361
+ isPending,
362
+ onSubmit,
363
+ labels,
364
+ testId
365
+ }) {
366
+ const assistant = shell.useAssistantCopy();
367
+ const l = {
368
+ ...DEFAULT_NEW_THREAD_DIALOG_LABELS,
369
+ createTask: assistant.startWith,
370
+ ...labels
371
+ };
372
+ const seed = react.useMemo(
373
+ () => ({ ...chunkM55XUF4L_cjs.EMPTY_NEW_THREAD, ...initialValues }),
374
+ // Seeded once per open.
375
+ // eslint-disable-next-line react-hooks/exhaustive-deps
376
+ [open]
377
+ );
378
+ const [values, setValues] = react.useState(seed);
379
+ const [detailsOpen, setDetailsOpen] = react.useState(chunkM55XUF4L_cjs.hasTaskFields(seed));
380
+ const [submitError, setSubmitError] = react.useState(null);
381
+ const id = chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "new-thread" });
382
+ const set = (key, value) => setValues((v) => ({ ...v, [key]: value }));
383
+ const canSubmit = values.prompt.trim() !== "" && !isPending;
384
+ const pillLabels = { search: l.search, empty: l.empty };
385
+ const taskOptions = tasks.map((t) => ({
386
+ id: t.id,
387
+ label: t.name,
388
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: GLYPH, "aria-hidden": true })
389
+ }));
390
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { modal: false, open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
391
+ ui.DialogContent,
392
+ {
393
+ presentation: "right",
394
+ onInteractOutside: (event) => event.preventDefault(),
395
+ className: "flex flex-col overflow-hidden p-0",
396
+ "data-testid": id,
397
+ children: [
398
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkCVPV4I7Z_cjs.ModalHeader, { children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: l.title }),
400
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "sr-only", children: l.description })
401
+ ] }),
402
+ /* @__PURE__ */ jsxRuntime.jsxs(
403
+ "form",
404
+ {
405
+ className: "flex min-h-0 flex-1 flex-col",
406
+ onSubmit: async (event) => {
407
+ event.preventDefault();
408
+ if (!canSubmit) return;
409
+ setSubmitError(null);
410
+ try {
411
+ await onSubmit(values);
412
+ setValues(chunkM55XUF4L_cjs.EMPTY_NEW_THREAD);
413
+ setDetailsOpen(false);
414
+ } catch (error) {
415
+ setSubmitError(error instanceof Error ? error.message : "Could not create the thread");
416
+ }
417
+ },
418
+ children: [
419
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 pb-4", children: [
420
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
421
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "new-thread-prompt", className: "sr-only", children: l.promptLabel }),
422
+ /* @__PURE__ */ jsxRuntime.jsx(
423
+ ui.Textarea,
424
+ {
425
+ id: "new-thread-prompt",
426
+ value: values.prompt,
427
+ placeholder: l.promptPlaceholder,
428
+ rows: 4,
429
+ onChange: (e) => set("prompt", e.target.value),
430
+ onKeyDown: (e) => {
431
+ if (e.key === "Enter" && (e.metaKey || e.ctrlKey) && canSubmit) onSubmit(values);
432
+ },
433
+ autoFocus: true,
434
+ className: "min-h-24 text-base",
435
+ "data-testid": `${id}-prompt`
436
+ }
437
+ ),
438
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-sm", "data-testid": `${id}-assistant`, children: [
439
+ /* @__PURE__ */ jsxRuntime.jsx(
440
+ ui.Switch,
441
+ {
442
+ checked: values.assistant,
443
+ onCheckedChange: (on) => set("assistant", on),
444
+ "data-testid": `${id}-assistant-switch`
445
+ }
446
+ ),
447
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: l.assistantStart }),
448
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: l.assistantStartHint })
449
+ ] }),
450
+ fileCount !== void 0 && values.assistant && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": `${id}-files`, children: l.files(fileCount) })
451
+ ] }),
452
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
453
+ ui.VisibilityToggle,
454
+ {
455
+ items: { shared: values.shared },
456
+ onToggle: (share) => set("shared", share),
457
+ label: l.visibility,
458
+ presentation: "select",
459
+ "data-testid": `${id}-visibility`
460
+ }
461
+ ) }),
462
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-3", children: [
463
+ /* @__PURE__ */ jsxRuntime.jsxs(
464
+ ui.Button,
465
+ {
466
+ type: "button",
467
+ variant: "ghost",
468
+ size: "sm",
469
+ className: "h-8 gap-1 self-start px-2 pointer-coarse:h-11",
470
+ onClick: () => setDetailsOpen((v) => !v),
471
+ "aria-expanded": detailsOpen,
472
+ "data-testid": `${id}-details-toggle`,
473
+ children: [
474
+ l.taskDetails,
475
+ /* @__PURE__ */ jsxRuntime.jsx(
476
+ lucideReact.ChevronDown,
477
+ {
478
+ className: ui.cn("size-3.5 transition-transform", detailsOpen && "rotate-180"),
479
+ "aria-hidden": true
480
+ }
481
+ )
482
+ ]
483
+ }
484
+ ),
485
+ detailsOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", "data-testid": `${id}-details`, children: [
486
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: l.taskDetailsHint }),
487
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
488
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
489
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
490
+ ui.EntityPill,
491
+ {
492
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarClock, { className: GLYPH, "aria-hidden": true }),
493
+ label: `${l.due}: ${values.dueAt ? formatDue(values.dueAt) : l.dueNone}`,
494
+ secondaryText: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-3", "aria-hidden": true }),
495
+ size: "sm",
496
+ className: "h-7 pointer-coarse:min-h-11",
497
+ "data-testid": `${id}-due-pill`
498
+ }
499
+ ) }),
500
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
501
+ DueDateMenu,
502
+ {
503
+ id: `${id}-due`,
504
+ label: l.due,
505
+ value: values.dueAt,
506
+ onChange: (v) => set("dueAt", v),
507
+ labels: { clear: l.dueClear }
508
+ }
509
+ ) })
510
+ ] }),
511
+ tasks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
512
+ PillSelect,
513
+ {
514
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: GLYPH, "aria-hidden": true }),
515
+ prefix: l.parentTask,
516
+ value: values.parentId,
517
+ options: taskOptions,
518
+ noneOption: { id: "", label: l.parentTaskNone },
519
+ onChange: (v) => set("parentId", v),
520
+ searchable: true,
521
+ labels: pillLabels,
522
+ testId: `${id}-parent`
523
+ }
524
+ )
525
+ ] }),
526
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "new-thread-title", className: "sr-only", children: l.titleLabel }),
527
+ /* @__PURE__ */ jsxRuntime.jsx(
528
+ ui.Input,
529
+ {
530
+ id: "new-thread-title",
531
+ value: values.title,
532
+ placeholder: l.titlePlaceholder,
533
+ onChange: (e) => set("title", e.target.value),
534
+ "data-testid": `${id}-title`
535
+ }
536
+ )
537
+ ] })
538
+ ] })
539
+ ] }),
540
+ submitError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-6 pb-2 text-sm text-destructive", children: submitError }),
541
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col-reverse gap-2 border-t border-border px-6 py-3 sm:flex-row sm:justify-end", children: [
542
+ /* @__PURE__ */ jsxRuntime.jsx(
543
+ ui.Button,
544
+ {
545
+ type: "button",
546
+ variant: "outline",
547
+ onClick: () => onOpenChange(false),
548
+ "data-testid": `${id}-cancel`,
549
+ className: "pointer-coarse:min-h-11",
550
+ children: l.cancel
551
+ }
552
+ ),
553
+ /* @__PURE__ */ jsxRuntime.jsxs(
554
+ ui.Button,
555
+ {
556
+ type: "submit",
557
+ disabled: !canSubmit,
558
+ "data-testid": `${id}-submit`,
559
+ className: "gap-1.5 pointer-coarse:min-h-11",
560
+ children: [
561
+ isPending && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
562
+ isPending ? l.saving : !values.assistant ? l.addTodo : l.createTask
563
+ ]
564
+ }
565
+ )
566
+ ] })
567
+ ]
568
+ }
569
+ )
570
+ ]
571
+ }
572
+ ) });
573
+ }
574
+
575
+ exports.DEFAULT_NEW_THREAD_DIALOG_LABELS = DEFAULT_NEW_THREAD_DIALOG_LABELS;
576
+ exports.DEFAULT_PILL_SELECT_LABELS = DEFAULT_PILL_SELECT_LABELS;
577
+ exports.DueDateMenu = DueDateMenu;
578
+ exports.MAX_TASK_DEPTH = MAX_TASK_DEPTH;
579
+ exports.NewThreadDialog = NewThreadDialog;
580
+ exports.PillSelect = PillSelect;
581
+ exports.STATUS_LABELS = STATUS_LABELS;
582
+ exports.STATUS_ORDER = STATUS_ORDER;
583
+ exports.STATUS_TONE = STATUS_TONE;
584
+ exports.TRIGGER_LABELS = TRIGGER_LABELS;
585
+ exports.asTaskStatus = asTaskStatus;
586
+ exports.buildTaskRows = buildTaskRows;
587
+ exports.descendantIds = descendantIds;
588
+ exports.goalProgress = goalProgress;
589
+ exports.indexTasks = indexTasks;
590
+ exports.isPlainTodo = isPlainTodo;
591
+ exports.moveTargets = moveTargets;
592
+ exports.ownerExtId = ownerExtId;
593
+ //# sourceMappingURL=chunk-BH322H5B.cjs.map
594
+ //# sourceMappingURL=chunk-BH322H5B.cjs.map