@arbidocs/blocks 0.5.128 → 0.5.130

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 (179) hide show
  1. package/dist/{ConnectedCallDock-XJOYVVAH.cjs → ConnectedCallDock-CJ7RWP5B.cjs} +11 -11
  2. package/dist/{ConnectedCallDock-XJOYVVAH.cjs.map → ConnectedCallDock-CJ7RWP5B.cjs.map} +1 -1
  3. package/dist/{ConnectedCallRoom-CUDYAPQK.cjs → ConnectedCallRoom-JPJCXP6X.cjs} +11 -11
  4. package/dist/{ConnectedCallRoom-CUDYAPQK.cjs.map → ConnectedCallRoom-JPJCXP6X.cjs.map} +1 -1
  5. package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs → ConnectedNativeDocxComparison-5TZAIR4V.cjs} +9 -9
  6. package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs.map → ConnectedNativeDocxComparison-5TZAIR4V.cjs.map} +1 -1
  7. package/dist/{ConnectedPresentation-SI3L77J4.cjs → ConnectedPresentation-SEUUNFUA.cjs} +12 -12
  8. package/dist/{ConnectedPresentation-SI3L77J4.cjs.map → ConnectedPresentation-SEUUNFUA.cjs.map} +1 -1
  9. package/dist/{ConnectedSlidesTab-E76OVY34.cjs → ConnectedSlidesTab-3ATAKNSJ.cjs} +12 -12
  10. package/dist/{ConnectedSlidesTab-E76OVY34.cjs.map → ConnectedSlidesTab-3ATAKNSJ.cjs.map} +1 -1
  11. package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs → ConnectedStreamedWordArtifact-BKPOMQ6G.cjs} +9 -9
  12. package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map → ConnectedStreamedWordArtifact-BKPOMQ6G.cjs.map} +1 -1
  13. package/dist/{FilesViewerDialog-C7XHGK36.cjs → FilesViewerDialog-EFRMXIM5.cjs} +20 -20
  14. package/dist/{FilesViewerDialog-C7XHGK36.cjs.map → FilesViewerDialog-EFRMXIM5.cjs.map} +1 -1
  15. package/dist/{StreamedArtifactEditor-7KJ2HLLU.cjs → StreamedArtifactEditor-RSPUSZ2B.cjs} +5 -5
  16. package/dist/{StreamedArtifactEditor-7KJ2HLLU.cjs.map → StreamedArtifactEditor-RSPUSZ2B.cjs.map} +1 -1
  17. package/dist/{WorkspaceTableView-3XYAV4BV.cjs → WorkspaceTableView-QPROJRCF.cjs} +5 -5
  18. package/dist/{WorkspaceTableView-3XYAV4BV.cjs.map → WorkspaceTableView-QPROJRCF.cjs.map} +1 -1
  19. package/dist/agents/index.cjs +361 -361
  20. package/dist/agents/workflows/StepParts.d.ts +3 -0
  21. package/dist/agents/workflows/StepParts.js +20 -3
  22. package/dist/agents/workflows/StepParts.js.map +2 -2
  23. package/dist/agents/workflows/WorkflowStepAction.js +14 -3
  24. package/dist/agents/workflows/WorkflowStepAction.js.map +2 -2
  25. package/dist/agents/workflows/planSteps.js +6 -1
  26. package/dist/agents/workflows/planSteps.js.map +2 -2
  27. package/dist/agents/workflows/workflow.d.ts +11 -2
  28. package/dist/agents/workflows/workflow.js +16 -1
  29. package/dist/agents/workflows/workflow.js.map +2 -2
  30. package/dist/{ai-IEIR7SC2.cjs → ai-4XJ2VFNS.cjs} +23 -23
  31. package/dist/ai-4XJ2VFNS.cjs.map +1 -0
  32. package/dist/artifacts/VersionTimeline.d.ts +5 -1
  33. package/dist/artifacts/VersionTimeline.js +15 -0
  34. package/dist/artifacts/VersionTimeline.js.map +2 -2
  35. package/dist/artifacts/index.cjs +24 -24
  36. package/dist/calls/index.cjs +2 -2
  37. package/dist/chat/index.cjs +58 -58
  38. package/dist/{chunk-XF355M7O.cjs → chunk-2Z25MUAY.cjs} +17 -17
  39. package/dist/{chunk-XF355M7O.cjs.map → chunk-2Z25MUAY.cjs.map} +1 -1
  40. package/dist/{chunk-7JLJH5CW.cjs → chunk-5A6T4W46.cjs} +7 -7
  41. package/dist/{chunk-7JLJH5CW.cjs.map → chunk-5A6T4W46.cjs.map} +1 -1
  42. package/dist/{chunk-QG2U2JGX.cjs → chunk-7LEN65YI.cjs} +9 -9
  43. package/dist/{chunk-QG2U2JGX.cjs.map → chunk-7LEN65YI.cjs.map} +1 -1
  44. package/dist/{chunk-IDCD5TEZ.cjs → chunk-A6GBPE5E.cjs} +18 -18
  45. package/dist/{chunk-IDCD5TEZ.cjs.map → chunk-A6GBPE5E.cjs.map} +1 -1
  46. package/dist/{chunk-MMSHIIKG.cjs → chunk-AFXLRO6E.cjs} +4 -4
  47. package/dist/{chunk-MMSHIIKG.cjs.map → chunk-AFXLRO6E.cjs.map} +1 -1
  48. package/dist/{chunk-KNGZZC4O.cjs → chunk-B3BZ6MNI.cjs} +6 -6
  49. package/dist/{chunk-KNGZZC4O.cjs.map → chunk-B3BZ6MNI.cjs.map} +1 -1
  50. package/dist/{chunk-WAV762GP.cjs → chunk-DBN6GBRQ.cjs} +6 -6
  51. package/dist/{chunk-WAV762GP.cjs.map → chunk-DBN6GBRQ.cjs.map} +1 -1
  52. package/dist/{chunk-QGVOT7E4.cjs → chunk-EQTZQD66.cjs} +8 -8
  53. package/dist/{chunk-QGVOT7E4.cjs.map → chunk-EQTZQD66.cjs.map} +1 -1
  54. package/dist/{chunk-M2FOXGJU.cjs → chunk-F6CEPWIF.cjs} +7 -7
  55. package/dist/{chunk-M2FOXGJU.cjs.map → chunk-F6CEPWIF.cjs.map} +1 -1
  56. package/dist/{chunk-VWBYE3XY.cjs → chunk-FQRJCAT2.cjs} +6 -6
  57. package/dist/{chunk-VWBYE3XY.cjs.map → chunk-FQRJCAT2.cjs.map} +1 -1
  58. package/dist/{chunk-E3L5DB5F.cjs → chunk-GEZB3OEC.cjs} +4 -4
  59. package/dist/{chunk-E3L5DB5F.cjs.map → chunk-GEZB3OEC.cjs.map} +1 -1
  60. package/dist/{chunk-YP5EBGLU.cjs → chunk-GOQV6NOK.cjs} +73 -73
  61. package/dist/{chunk-YP5EBGLU.cjs.map → chunk-GOQV6NOK.cjs.map} +1 -1
  62. package/dist/{chunk-XCKHOXRP.cjs → chunk-H4ID6S4P.cjs} +6 -6
  63. package/dist/{chunk-XCKHOXRP.cjs.map → chunk-H4ID6S4P.cjs.map} +1 -1
  64. package/dist/{chunk-UFT22LAB.cjs → chunk-HBUHOCWF.cjs} +16 -16
  65. package/dist/{chunk-UFT22LAB.cjs.map → chunk-HBUHOCWF.cjs.map} +1 -1
  66. package/dist/{chunk-ZQNTYINE.cjs → chunk-HORAMB52.cjs} +91 -31
  67. package/dist/chunk-HORAMB52.cjs.map +1 -0
  68. package/dist/{chunk-3IH55CDE.cjs → chunk-IZBAWZTB.cjs} +16 -2
  69. package/dist/chunk-IZBAWZTB.cjs.map +1 -0
  70. package/dist/{chunk-QRAQZTJE.cjs → chunk-JN5YMHGI.cjs} +18 -3
  71. package/dist/chunk-JN5YMHGI.cjs.map +1 -0
  72. package/dist/{chunk-IZJ5L246.cjs → chunk-KWHGYHRC.cjs} +5 -5
  73. package/dist/{chunk-IZJ5L246.cjs.map → chunk-KWHGYHRC.cjs.map} +1 -1
  74. package/dist/{chunk-EG7EJFUE.cjs → chunk-MHIG6GGS.cjs} +17 -2
  75. package/dist/chunk-MHIG6GGS.cjs.map +1 -0
  76. package/dist/{chunk-IWMHQTVL.cjs → chunk-MI3N3ZOT.cjs} +80 -70
  77. package/dist/chunk-MI3N3ZOT.cjs.map +1 -0
  78. package/dist/{chunk-7NLO7ASW.cjs → chunk-MXGXKUSW.cjs} +17 -17
  79. package/dist/{chunk-7NLO7ASW.cjs.map → chunk-MXGXKUSW.cjs.map} +1 -1
  80. package/dist/{chunk-ZCU72Q76.cjs → chunk-NM7RWZ4E.cjs} +10 -10
  81. package/dist/{chunk-ZCU72Q76.cjs.map → chunk-NM7RWZ4E.cjs.map} +1 -1
  82. package/dist/{chunk-CQQQIZU4.cjs → chunk-OD6NGGL3.cjs} +133 -106
  83. package/dist/chunk-OD6NGGL3.cjs.map +1 -0
  84. package/dist/{chunk-TP5PGWIO.cjs → chunk-QFXOTJ6G.cjs} +20 -15
  85. package/dist/chunk-QFXOTJ6G.cjs.map +1 -0
  86. package/dist/{chunk-7L4X6QN2.cjs → chunk-QXMPATG6.cjs} +8 -8
  87. package/dist/{chunk-7L4X6QN2.cjs.map → chunk-QXMPATG6.cjs.map} +1 -1
  88. package/dist/{chunk-WXUU3COI.cjs → chunk-SUOHAB7N.cjs} +11 -11
  89. package/dist/{chunk-WXUU3COI.cjs.map → chunk-SUOHAB7N.cjs.map} +1 -1
  90. package/dist/{chunk-NTDQQLDD.cjs → chunk-TDA6KESI.cjs} +4 -4
  91. package/dist/{chunk-NTDQQLDD.cjs.map → chunk-TDA6KESI.cjs.map} +1 -1
  92. package/dist/{chunk-VLQCLQAS.cjs → chunk-TZYB22FM.cjs} +7 -7
  93. package/dist/{chunk-VLQCLQAS.cjs.map → chunk-TZYB22FM.cjs.map} +1 -1
  94. package/dist/{chunk-HSLPFBK2.cjs → chunk-VL7ZX4KQ.cjs} +6 -6
  95. package/dist/{chunk-HSLPFBK2.cjs.map → chunk-VL7ZX4KQ.cjs.map} +1 -1
  96. package/dist/{chunk-2F57IO7S.cjs → chunk-XCW6OY7E.cjs} +27 -27
  97. package/dist/{chunk-2F57IO7S.cjs.map → chunk-XCW6OY7E.cjs.map} +1 -1
  98. package/dist/{chunk-NG2EE7HR.cjs → chunk-YWHUWIHP.cjs} +9 -9
  99. package/dist/{chunk-NG2EE7HR.cjs.map → chunk-YWHUWIHP.cjs.map} +1 -1
  100. package/dist/connect/docx.cjs +12 -12
  101. package/dist/connect/index.cjs +1272 -520
  102. package/dist/connect/index.cjs.map +1 -1
  103. package/dist/connect/index.d.ts +2 -0
  104. package/dist/connect/index.js +12 -0
  105. package/dist/connect/index.js.map +2 -2
  106. package/dist/connect/viewer.cjs +9 -9
  107. package/dist/connection/ConnectedWorkflowBuilder.d.ts +12 -0
  108. package/dist/connection/ConnectedWorkflowBuilder.js +6 -1
  109. package/dist/connection/ConnectedWorkflowBuilder.js.map +2 -2
  110. package/dist/connection/assistant/AssistantDrafts.d.ts +21 -0
  111. package/dist/connection/assistant/AssistantDrafts.js +158 -0
  112. package/dist/connection/assistant/AssistantDrafts.js.map +7 -0
  113. package/dist/connection/assistant/AssistantPlan.d.ts +16 -0
  114. package/dist/connection/assistant/AssistantPlan.js +72 -0
  115. package/dist/connection/assistant/AssistantPlan.js.map +7 -0
  116. package/dist/connection/assistant/AssistantStatusPanel.d.ts +28 -0
  117. package/dist/connection/assistant/AssistantStatusPanel.js +206 -0
  118. package/dist/connection/assistant/AssistantStatusPanel.js.map +7 -0
  119. package/dist/connection/assistant/ConnectedAssistantPage.d.ts +39 -0
  120. package/dist/connection/assistant/ConnectedAssistantPage.js +377 -0
  121. package/dist/connection/assistant/ConnectedAssistantPage.js.map +7 -0
  122. package/dist/connection/billing/AddAddonDialog.d.ts +2 -2
  123. package/dist/connection/billing/AddAddonDialog.js.map +1 -1
  124. package/dist/connection/billing/ConnectedQuotaDialog.d.ts +1 -1
  125. package/dist/connection/billing/ConnectedQuotaDialog.js.map +1 -1
  126. package/dist/connection/billing/MonthlySpendCap.js +1 -1
  127. package/dist/connection/billing/MonthlySpendCap.js.map +1 -1
  128. package/dist/connection/billing/ProjectBilling.js.map +1 -1
  129. package/dist/connection/billing/ProjectPurchaseOptions.js +1 -1
  130. package/dist/connection/billing/ProjectPurchaseOptions.js.map +1 -1
  131. package/dist/connection/billing/ProjectUsageCard.js +1 -1
  132. package/dist/connection/billing/ProjectUsageCard.js.map +1 -1
  133. package/dist/connection/billing/ReduceAddonDialog.d.ts +1 -1
  134. package/dist/connection/billing/ReduceAddonDialog.js.map +1 -1
  135. package/dist/connection/billing/StripeCheckoutModal.d.ts +1 -1
  136. package/dist/connection/billing/StripeCheckoutModal.js.map +1 -1
  137. package/dist/connection/billing/addon-pricing.d.ts +4 -4
  138. package/dist/connection/billing/addon-pricing.js.map +1 -1
  139. package/dist/connection/billing/plan-constants.d.ts +3 -3
  140. package/dist/connection/billing/plan-constants.js +2 -2
  141. package/dist/connection/billing/plan-constants.js.map +1 -1
  142. package/dist/connection/billing/plan-pricing.d.ts +2 -2
  143. package/dist/connection/billing/plan-pricing.js.map +1 -1
  144. package/dist/connection/billing/useAddonPurchase.d.ts +1 -1
  145. package/dist/connection/billing/useAddonPurchase.js.map +1 -1
  146. package/dist/connection/conversation/AgentSteps.js +19 -2
  147. package/dist/connection/conversation/AgentSteps.js.map +2 -2
  148. package/dist/connection/viewer/ConnectedDocumentViewer.js +22 -2
  149. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  150. package/dist/connection/viewer/useDocumentVersionRestore.d.ts +14 -0
  151. package/dist/connection/viewer/useDocumentVersionRestore.js +48 -0
  152. package/dist/connection/viewer/useDocumentVersionRestore.js.map +7 -0
  153. package/dist/connection/viewer/useViewerTabs.d.ts +1 -1
  154. package/dist/connection/viewer/useViewerTabs.js +6 -3
  155. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  156. package/dist/document-tools/VersionSnapshotBar.d.ts +4 -1
  157. package/dist/document-tools/VersionSnapshotBar.js +14 -0
  158. package/dist/document-tools/VersionSnapshotBar.js.map +2 -2
  159. package/dist/document-tools/index.cjs +13 -13
  160. package/dist/embed/index.cjs +19 -19
  161. package/dist/index.cjs +470 -470
  162. package/dist/office/index.cjs +5 -5
  163. package/dist/studio/index.cjs +14 -14
  164. package/dist/styles.css +1 -1
  165. package/dist/workflow-canvas/TriggerInspector.d.ts +7 -0
  166. package/dist/workflow-canvas/TriggerInspector.js +56 -0
  167. package/dist/workflow-canvas/TriggerInspector.js.map +2 -2
  168. package/dist/workflow-canvas/index.cjs +137 -76
  169. package/dist/workflow-canvas/index.cjs.map +1 -1
  170. package/node_modules/@arbidocs/coedit/package.json +1 -1
  171. package/package.json +5 -5
  172. package/dist/ai-IEIR7SC2.cjs.map +0 -1
  173. package/dist/chunk-3IH55CDE.cjs.map +0 -1
  174. package/dist/chunk-CQQQIZU4.cjs.map +0 -1
  175. package/dist/chunk-EG7EJFUE.cjs.map +0 -1
  176. package/dist/chunk-IWMHQTVL.cjs.map +0 -1
  177. package/dist/chunk-QRAQZTJE.cjs.map +0 -1
  178. package/dist/chunk-TP5PGWIO.cjs.map +0 -1
  179. package/dist/chunk-ZQNTYINE.cjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkXCKHOXRP_cjs = require('../chunk-XCKHOXRP.cjs');
4
+ var chunkH4ID6S4P_cjs = require('../chunk-H4ID6S4P.cjs');
5
5
  var chunkKLMNCBLY_cjs = require('../chunk-KLMNCBLY.cjs');
6
- var chunkKNGZZC4O_cjs = require('../chunk-KNGZZC4O.cjs');
6
+ var chunkB3BZ6MNI_cjs = require('../chunk-B3BZ6MNI.cjs');
7
7
  var chunk5SKHK3BG_cjs = require('../chunk-5SKHK3BG.cjs');
8
- var chunkIDCD5TEZ_cjs = require('../chunk-IDCD5TEZ.cjs');
8
+ var chunkA6GBPE5E_cjs = require('../chunk-A6GBPE5E.cjs');
9
9
  var chunkJHDCDEXY_cjs = require('../chunk-JHDCDEXY.cjs');
10
- var chunkM2FOXGJU_cjs = require('../chunk-M2FOXGJU.cjs');
10
+ var chunkF6CEPWIF_cjs = require('../chunk-F6CEPWIF.cjs');
11
11
  var chunk5F4DCIHS_cjs = require('../chunk-5F4DCIHS.cjs');
12
12
  require('../chunk-CT3SLXB7.cjs');
13
13
  require('../chunk-DEXUL3T6.cjs');
@@ -19,10 +19,10 @@ require('../chunk-MCXS6X37.cjs');
19
19
  require('../chunk-KQF7POTG.cjs');
20
20
  var chunk75BNMCUX_cjs = require('../chunk-75BNMCUX.cjs');
21
21
  require('../chunk-IN6ILI5A.cjs');
22
- require('../chunk-HSLPFBK2.cjs');
22
+ require('../chunk-VL7ZX4KQ.cjs');
23
23
  require('../chunk-FX3K6LNZ.cjs');
24
- require('../chunk-QGVOT7E4.cjs');
25
- require('../chunk-QRAQZTJE.cjs');
24
+ require('../chunk-EQTZQD66.cjs');
25
+ require('../chunk-JN5YMHGI.cjs');
26
26
  require('../chunk-UDSHVNU3.cjs');
27
27
  require('../chunk-IPSHAMO2.cjs');
28
28
  var chunkZBP4ZSAJ_cjs = require('../chunk-ZBP4ZSAJ.cjs');
@@ -37,7 +37,7 @@ require('../chunk-PLIF5CUV.cjs');
37
37
 
38
38
  Object.defineProperty(exports, "AssistantToaster", {
39
39
  enumerable: true,
40
- get: function () { return chunkXCKHOXRP_cjs.AssistantToaster; }
40
+ get: function () { return chunkH4ID6S4P_cjs.AssistantToaster; }
41
41
  });
42
42
  Object.defineProperty(exports, "ComposerAccessories", {
43
43
  enumerable: true,
@@ -181,15 +181,15 @@ Object.defineProperty(exports, "useDismissibleCard", {
181
181
  });
182
182
  Object.defineProperty(exports, "AssistantDock", {
183
183
  enumerable: true,
184
- get: function () { return chunkKNGZZC4O_cjs.AssistantDock; }
184
+ get: function () { return chunkB3BZ6MNI_cjs.AssistantDock; }
185
185
  });
186
186
  Object.defineProperty(exports, "AssistantDockToggle", {
187
187
  enumerable: true,
188
- get: function () { return chunkKNGZZC4O_cjs.AssistantDockToggle; }
188
+ get: function () { return chunkB3BZ6MNI_cjs.AssistantDockToggle; }
189
189
  });
190
190
  Object.defineProperty(exports, "useAssistantDock", {
191
191
  enumerable: true,
192
- get: function () { return chunkKNGZZC4O_cjs.useAssistantDock; }
192
+ get: function () { return chunkB3BZ6MNI_cjs.useAssistantDock; }
193
193
  });
194
194
  Object.defineProperty(exports, "useOpenCitation", {
195
195
  enumerable: true,
@@ -197,75 +197,75 @@ Object.defineProperty(exports, "useOpenCitation", {
197
197
  });
198
198
  Object.defineProperty(exports, "AssistantModeToggle", {
199
199
  enumerable: true,
200
- get: function () { return chunkIDCD5TEZ_cjs.AssistantModeToggle; }
200
+ get: function () { return chunkA6GBPE5E_cjs.AssistantModeToggle; }
201
201
  });
202
202
  Object.defineProperty(exports, "ChatDocuments", {
203
203
  enumerable: true,
204
- get: function () { return chunkIDCD5TEZ_cjs.ChatDocuments; }
204
+ get: function () { return chunkA6GBPE5E_cjs.ChatDocuments; }
205
205
  });
206
206
  Object.defineProperty(exports, "ChatMessageContent", {
207
207
  enumerable: true,
208
- get: function () { return chunkIDCD5TEZ_cjs.ChatMessageContent; }
208
+ get: function () { return chunkA6GBPE5E_cjs.ChatMessageContent; }
209
209
  });
210
210
  Object.defineProperty(exports, "ChatPage", {
211
211
  enumerable: true,
212
- get: function () { return chunkIDCD5TEZ_cjs.ChatPage; }
212
+ get: function () { return chunkA6GBPE5E_cjs.ChatPage; }
213
213
  });
214
214
  Object.defineProperty(exports, "ChatThreadList", {
215
215
  enumerable: true,
216
- get: function () { return chunkIDCD5TEZ_cjs.ChatThreadList; }
216
+ get: function () { return chunkA6GBPE5E_cjs.ChatThreadList; }
217
217
  });
218
218
  Object.defineProperty(exports, "ChatThreadSelect", {
219
219
  enumerable: true,
220
- get: function () { return chunkIDCD5TEZ_cjs.ChatThreadSelect; }
220
+ get: function () { return chunkA6GBPE5E_cjs.ChatThreadSelect; }
221
221
  });
222
222
  Object.defineProperty(exports, "CitationMark", {
223
223
  enumerable: true,
224
- get: function () { return chunkIDCD5TEZ_cjs.CitationMark; }
224
+ get: function () { return chunkA6GBPE5E_cjs.CitationMark; }
225
225
  });
226
226
  Object.defineProperty(exports, "ContextChip", {
227
227
  enumerable: true,
228
- get: function () { return chunkIDCD5TEZ_cjs.ContextChip; }
228
+ get: function () { return chunkA6GBPE5E_cjs.ContextChip; }
229
229
  });
230
230
  Object.defineProperty(exports, "ConversationEmpty", {
231
231
  enumerable: true,
232
- get: function () { return chunkIDCD5TEZ_cjs.ConversationEmpty; }
232
+ get: function () { return chunkA6GBPE5E_cjs.ConversationEmpty; }
233
233
  });
234
234
  Object.defineProperty(exports, "DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS", {
235
235
  enumerable: true,
236
- get: function () { return chunkIDCD5TEZ_cjs.DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS; }
236
+ get: function () { return chunkA6GBPE5E_cjs.DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS; }
237
237
  });
238
238
  Object.defineProperty(exports, "DEFAULT_CHAT_PAGE_LABELS", {
239
239
  enumerable: true,
240
- get: function () { return chunkIDCD5TEZ_cjs.DEFAULT_CHAT_PAGE_LABELS; }
240
+ get: function () { return chunkA6GBPE5E_cjs.DEFAULT_CHAT_PAGE_LABELS; }
241
241
  });
242
242
  Object.defineProperty(exports, "DEFAULT_CONVERSATION_EMPTY_LABELS", {
243
243
  enumerable: true,
244
- get: function () { return chunkIDCD5TEZ_cjs.DEFAULT_CONVERSATION_EMPTY_LABELS; }
244
+ get: function () { return chunkA6GBPE5E_cjs.DEFAULT_CONVERSATION_EMPTY_LABELS; }
245
245
  });
246
246
  Object.defineProperty(exports, "DEFAULT_MESSAGE_ALERT_LABELS", {
247
247
  enumerable: true,
248
- get: function () { return chunkIDCD5TEZ_cjs.DEFAULT_MESSAGE_ALERT_LABELS; }
248
+ get: function () { return chunkA6GBPE5E_cjs.DEFAULT_MESSAGE_ALERT_LABELS; }
249
249
  });
250
250
  Object.defineProperty(exports, "MessageAlert", {
251
251
  enumerable: true,
252
- get: function () { return chunkIDCD5TEZ_cjs.MessageAlert; }
252
+ get: function () { return chunkA6GBPE5E_cjs.MessageAlert; }
253
253
  });
254
254
  Object.defineProperty(exports, "useChatSurface", {
255
255
  enumerable: true,
256
- get: function () { return chunkIDCD5TEZ_cjs.useChatSurface; }
256
+ get: function () { return chunkA6GBPE5E_cjs.useChatSurface; }
257
257
  });
258
258
  Object.defineProperty(exports, "useControlledThread", {
259
259
  enumerable: true,
260
- get: function () { return chunkIDCD5TEZ_cjs.useControlledThread; }
260
+ get: function () { return chunkA6GBPE5E_cjs.useControlledThread; }
261
261
  });
262
262
  Object.defineProperty(exports, "useRegisterEmbeddedChat", {
263
263
  enumerable: true,
264
- get: function () { return chunkIDCD5TEZ_cjs.useRegisterEmbeddedChat; }
264
+ get: function () { return chunkA6GBPE5E_cjs.useRegisterEmbeddedChat; }
265
265
  });
266
266
  Object.defineProperty(exports, "useStartRequestedConversation", {
267
267
  enumerable: true,
268
- get: function () { return chunkIDCD5TEZ_cjs.useStartRequestedConversation; }
268
+ get: function () { return chunkA6GBPE5E_cjs.useStartRequestedConversation; }
269
269
  });
270
270
  Object.defineProperty(exports, "BranchControls", {
271
271
  enumerable: true,
@@ -417,119 +417,119 @@ Object.defineProperty(exports, "useRecipientDraft", {
417
417
  });
418
418
  Object.defineProperty(exports, "Composer", {
419
419
  enumerable: true,
420
- get: function () { return chunkM2FOXGJU_cjs.Composer; }
420
+ get: function () { return chunkF6CEPWIF_cjs.Composer; }
421
421
  });
422
422
  Object.defineProperty(exports, "ComposerContainer", {
423
423
  enumerable: true,
424
- get: function () { return chunkM2FOXGJU_cjs.ComposerContainer; }
424
+ get: function () { return chunkF6CEPWIF_cjs.ComposerContainer; }
425
425
  });
426
426
  Object.defineProperty(exports, "ComposerDock", {
427
427
  enumerable: true,
428
- get: function () { return chunkM2FOXGJU_cjs.ComposerDock; }
428
+ get: function () { return chunkF6CEPWIF_cjs.ComposerDock; }
429
429
  });
430
430
  Object.defineProperty(exports, "ComposerSend", {
431
431
  enumerable: true,
432
- get: function () { return chunkM2FOXGJU_cjs.ComposerSend; }
432
+ get: function () { return chunkF6CEPWIF_cjs.ComposerSend; }
433
433
  });
434
434
  Object.defineProperty(exports, "ComposerVoiceButton", {
435
435
  enumerable: true,
436
- get: function () { return chunkM2FOXGJU_cjs.ComposerVoiceButton; }
436
+ get: function () { return chunkF6CEPWIF_cjs.ComposerVoiceButton; }
437
437
  });
438
438
  Object.defineProperty(exports, "DEFAULT_COMPOSER_LABELS", {
439
439
  enumerable: true,
440
- get: function () { return chunkM2FOXGJU_cjs.DEFAULT_COMPOSER_LABELS; }
440
+ get: function () { return chunkF6CEPWIF_cjs.DEFAULT_COMPOSER_LABELS; }
441
441
  });
442
442
  Object.defineProperty(exports, "DEFAULT_MESSAGE_LABELS", {
443
443
  enumerable: true,
444
- get: function () { return chunkM2FOXGJU_cjs.DEFAULT_MESSAGE_LABELS; }
444
+ get: function () { return chunkF6CEPWIF_cjs.DEFAULT_MESSAGE_LABELS; }
445
445
  });
446
446
  Object.defineProperty(exports, "DEFAULT_MESSAGE_LIST_LABELS", {
447
447
  enumerable: true,
448
- get: function () { return chunkM2FOXGJU_cjs.DEFAULT_MESSAGE_LIST_LABELS; }
448
+ get: function () { return chunkF6CEPWIF_cjs.DEFAULT_MESSAGE_LIST_LABELS; }
449
449
  });
450
450
  Object.defineProperty(exports, "DEFAULT_WORKFLOW_STEP_CHIP_LABELS", {
451
451
  enumerable: true,
452
- get: function () { return chunkM2FOXGJU_cjs.DEFAULT_WORKFLOW_STEP_CHIP_LABELS; }
452
+ get: function () { return chunkF6CEPWIF_cjs.DEFAULT_WORKFLOW_STEP_CHIP_LABELS; }
453
453
  });
454
454
  Object.defineProperty(exports, "Message", {
455
455
  enumerable: true,
456
- get: function () { return chunkM2FOXGJU_cjs.Message; }
456
+ get: function () { return chunkF6CEPWIF_cjs.Message; }
457
457
  });
458
458
  Object.defineProperty(exports, "MessageActionButton", {
459
459
  enumerable: true,
460
- get: function () { return chunkM2FOXGJU_cjs.MessageActionButton; }
460
+ get: function () { return chunkF6CEPWIF_cjs.MessageActionButton; }
461
461
  });
462
462
  Object.defineProperty(exports, "MessageActionMenu", {
463
463
  enumerable: true,
464
- get: function () { return chunkM2FOXGJU_cjs.MessageActionMenu; }
464
+ get: function () { return chunkF6CEPWIF_cjs.MessageActionMenu; }
465
465
  });
466
466
  Object.defineProperty(exports, "MessageAuthor", {
467
467
  enumerable: true,
468
- get: function () { return chunkM2FOXGJU_cjs.MessageAuthor; }
468
+ get: function () { return chunkF6CEPWIF_cjs.MessageAuthor; }
469
469
  });
470
470
  Object.defineProperty(exports, "MessageBody", {
471
471
  enumerable: true,
472
- get: function () { return chunkM2FOXGJU_cjs.MessageBody; }
472
+ get: function () { return chunkF6CEPWIF_cjs.MessageBody; }
473
473
  });
474
474
  Object.defineProperty(exports, "MessageBubble", {
475
475
  enumerable: true,
476
- get: function () { return chunkM2FOXGJU_cjs.MessageBubble; }
476
+ get: function () { return chunkF6CEPWIF_cjs.MessageBubble; }
477
477
  });
478
478
  Object.defineProperty(exports, "MessageByline", {
479
479
  enumerable: true,
480
- get: function () { return chunkM2FOXGJU_cjs.MessageByline; }
480
+ get: function () { return chunkF6CEPWIF_cjs.MessageByline; }
481
481
  });
482
482
  Object.defineProperty(exports, "MessageContent", {
483
483
  enumerable: true,
484
- get: function () { return chunkM2FOXGJU_cjs.MessageContent; }
484
+ get: function () { return chunkF6CEPWIF_cjs.MessageContent; }
485
485
  });
486
486
  Object.defineProperty(exports, "MessageFooter", {
487
487
  enumerable: true,
488
- get: function () { return chunkM2FOXGJU_cjs.MessageFooter; }
488
+ get: function () { return chunkF6CEPWIF_cjs.MessageFooter; }
489
489
  });
490
490
  Object.defineProperty(exports, "MessageList", {
491
491
  enumerable: true,
492
- get: function () { return chunkM2FOXGJU_cjs.MessageList; }
492
+ get: function () { return chunkF6CEPWIF_cjs.MessageList; }
493
493
  });
494
494
  Object.defineProperty(exports, "MessageListEmpty", {
495
495
  enumerable: true,
496
- get: function () { return chunkM2FOXGJU_cjs.MessageListEmpty; }
496
+ get: function () { return chunkF6CEPWIF_cjs.MessageListEmpty; }
497
497
  });
498
498
  Object.defineProperty(exports, "MessageListRoot", {
499
499
  enumerable: true,
500
- get: function () { return chunkM2FOXGJU_cjs.MessageListRoot; }
500
+ get: function () { return chunkF6CEPWIF_cjs.MessageListRoot; }
501
501
  });
502
502
  Object.defineProperty(exports, "MessageNarration", {
503
503
  enumerable: true,
504
- get: function () { return chunkM2FOXGJU_cjs.MessageNarration; }
504
+ get: function () { return chunkF6CEPWIF_cjs.MessageNarration; }
505
505
  });
506
506
  Object.defineProperty(exports, "MessageRoot", {
507
507
  enumerable: true,
508
- get: function () { return chunkM2FOXGJU_cjs.MessageRoot; }
508
+ get: function () { return chunkF6CEPWIF_cjs.MessageRoot; }
509
509
  });
510
510
  Object.defineProperty(exports, "MessageSubagentBadge", {
511
511
  enumerable: true,
512
- get: function () { return chunkM2FOXGJU_cjs.MessageSubagentBadge; }
512
+ get: function () { return chunkF6CEPWIF_cjs.MessageSubagentBadge; }
513
513
  });
514
514
  Object.defineProperty(exports, "ScrollToBottom", {
515
515
  enumerable: true,
516
- get: function () { return chunkM2FOXGJU_cjs.ScrollToBottom; }
516
+ get: function () { return chunkF6CEPWIF_cjs.ScrollToBottom; }
517
517
  });
518
518
  Object.defineProperty(exports, "WorkflowStepChip", {
519
519
  enumerable: true,
520
- get: function () { return chunkM2FOXGJU_cjs.WorkflowStepChip; }
520
+ get: function () { return chunkF6CEPWIF_cjs.WorkflowStepChip; }
521
521
  });
522
522
  Object.defineProperty(exports, "toSpeakableText", {
523
523
  enumerable: true,
524
- get: function () { return chunkM2FOXGJU_cjs.toSpeakableText; }
524
+ get: function () { return chunkF6CEPWIF_cjs.toSpeakableText; }
525
525
  });
526
526
  Object.defineProperty(exports, "useMentionAutocomplete", {
527
527
  enumerable: true,
528
- get: function () { return chunkM2FOXGJU_cjs.useMentionAutocomplete; }
528
+ get: function () { return chunkF6CEPWIF_cjs.useMentionAutocomplete; }
529
529
  });
530
530
  Object.defineProperty(exports, "useStreamAnnouncement", {
531
531
  enumerable: true,
532
- get: function () { return chunkM2FOXGJU_cjs.useStreamAnnouncement; }
532
+ get: function () { return chunkF6CEPWIF_cjs.useStreamAnnouncement; }
533
533
  });
534
534
  Object.defineProperty(exports, "DEFAULT_SLASH_MENU_LABELS", {
535
535
  enumerable: true,
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunk2F57IO7S_cjs = require('./chunk-2F57IO7S.cjs');
5
- var chunkUFT22LAB_cjs = require('./chunk-UFT22LAB.cjs');
6
- var chunk7JLJH5CW_cjs = require('./chunk-7JLJH5CW.cjs');
4
+ var chunkXCW6OY7E_cjs = require('./chunk-XCW6OY7E.cjs');
5
+ var chunkHBUHOCWF_cjs = require('./chunk-HBUHOCWF.cjs');
6
+ var chunk5A6T4W46_cjs = require('./chunk-5A6T4W46.cjs');
7
7
  var chunk5F4DCIHS_cjs = require('./chunk-5F4DCIHS.cjs');
8
- var chunkQRAQZTJE_cjs = require('./chunk-QRAQZTJE.cjs');
8
+ var chunkJN5YMHGI_cjs = require('./chunk-JN5YMHGI.cjs');
9
9
  var react$1 = require('react');
10
10
  var react = require('@arbidocs/react');
11
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -16,10 +16,10 @@ function parseTypedSkill(draft) {
16
16
  return m ? { slug: m[1].toLowerCase(), text: (m[2] ?? "").trim() } : null;
17
17
  }
18
18
  function canOpenSkill(workflow, skillsEnabled) {
19
- return workflow.run.kind === "prompt" && (skillsEnabled || chunk7JLJH5CW_cjs.isSkillPackWorkflow(workflow));
19
+ return workflow.run.kind === "prompt" && (skillsEnabled || chunk5A6T4W46_cjs.isSkillPackWorkflow(workflow));
20
20
  }
21
21
  function useSlashSkillWorkflows({ landing, send }) {
22
- const { skills, skillsEnabled } = chunkUFT22LAB_cjs.useWorkflowDefinitions();
22
+ const { skills, skillsEnabled } = chunkHBUHOCWF_cjs.useWorkflowDefinitions();
23
23
  const { commands } = react.useBuiltinCommands();
24
24
  const [active, setActive] = react$1.useState(null);
25
25
  const open = react$1.useCallback(
@@ -63,11 +63,11 @@ function useSlashSkillWorkflows({ landing, send }) {
63
63
  const launcher = react$1.useMemo(() => {
64
64
  if (active === null) return null;
65
65
  const initialInputsFor = (workflow) => {
66
- const field = chunkQRAQZTJE_cjs.promptFieldName(workflow);
66
+ const field = chunkJN5YMHGI_cjs.promptFieldName(workflow);
67
67
  return field && active.text ? { [field]: active.text } : void 0;
68
68
  };
69
69
  return /* @__PURE__ */ jsxRuntime.jsx(
70
- chunk2F57IO7S_cjs.ConnectedWorkflowStart,
70
+ chunkXCW6OY7E_cjs.ConnectedWorkflowStart,
71
71
  {
72
72
  workflows: skills,
73
73
  showTiles: false,
@@ -83,11 +83,11 @@ function useSlashSkillWorkflows({ landing, send }) {
83
83
  }
84
84
  var NO_SKILLS = [];
85
85
  function useSlashMenuItems(builtinSkills = NO_SKILLS) {
86
- const hostSkills = chunkUFT22LAB_cjs.useHostSkills();
87
- const listings = chunkUFT22LAB_cjs.useUsableSkillListings(hostSkills);
88
- const skillsEnabled = chunkUFT22LAB_cjs.useSkillsEnabled();
86
+ const hostSkills = chunkHBUHOCWF_cjs.useHostSkills();
87
+ const listings = chunkHBUHOCWF_cjs.useUsableSkillListings(hostSkills);
88
+ const skillsEnabled = chunkHBUHOCWF_cjs.useSkillsEnabled();
89
89
  const { commands } = react.useBuiltinCommands();
90
- const builtins = chunkUFT22LAB_cjs.useNamedWorkflows(builtinSkills);
90
+ const builtins = chunkHBUHOCWF_cjs.useNamedWorkflows(builtinSkills);
91
91
  const items = react$1.useMemo(() => {
92
92
  const packSlugs = new Set(hostSkills.map((w) => w.id));
93
93
  return chunk5F4DCIHS_cjs.buildSlashItems(
@@ -98,7 +98,7 @@ function useSlashMenuItems(builtinSkills = NO_SKILLS) {
98
98
  kind: "command"
99
99
  })),
100
100
  [
101
- ...hostSkills.map(chunkUFT22LAB_cjs.hostSkillItem),
101
+ ...hostSkills.map(chunkHBUHOCWF_cjs.hostSkillItem),
102
102
  ...skillsEnabled ? skillItems(
103
103
  builtins.filter((w) => !packSlugs.has(w.id)),
104
104
  listings
@@ -106,7 +106,7 @@ function useSlashMenuItems(builtinSkills = NO_SKILLS) {
106
106
  ]
107
107
  );
108
108
  }, [commands, hostSkills, listings, skillsEnabled, builtins]);
109
- return { items, canBrowseSkills: chunkUFT22LAB_cjs.useCanBrowseSkills() };
109
+ return { items, canBrowseSkills: chunkHBUHOCWF_cjs.useCanBrowseSkills() };
110
110
  }
111
111
  function useSlashItems(text, builtinSkills = NO_SKILLS) {
112
112
  const { items, canBrowseSkills } = useSlashMenuItems(builtinSkills);
@@ -123,7 +123,7 @@ function useSlashItems(text, builtinSkills = NO_SKILLS) {
123
123
  };
124
124
  }
125
125
  function skillItems(builtinSkills, listings) {
126
- const { host, skills } = chunkQRAQZTJE_cjs.mergeSkillWorkflows([...builtinSkills], listings);
126
+ const { host, skills } = chunkJN5YMHGI_cjs.mergeSkillWorkflows([...builtinSkills], listings);
127
127
  const listing = new Map(listings.map((s) => [s.slug, s]));
128
128
  return [
129
129
  ...host.map((w) => ({
@@ -150,5 +150,5 @@ exports.parseTypedSkill = parseTypedSkill;
150
150
  exports.useSlashItems = useSlashItems;
151
151
  exports.useSlashMenuItems = useSlashMenuItems;
152
152
  exports.useSlashSkillWorkflows = useSlashSkillWorkflows;
153
- //# sourceMappingURL=chunk-XF355M7O.cjs.map
154
- //# sourceMappingURL=chunk-XF355M7O.cjs.map
153
+ //# sourceMappingURL=chunk-2Z25MUAY.cjs.map
154
+ //# sourceMappingURL=chunk-2Z25MUAY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/connection/workflows/useSlashSkillWorkflows.tsx","../src/connection/conversation/useSlashItems.ts"],"names":["isSkillPackWorkflow","useWorkflowDefinitions","useBuiltinCommands","useState","useCallback","useMemo","promptFieldName","jsx","ConnectedWorkflowStart","useHostSkills","useUsableSkillListings","useSkillsEnabled","useNamedWorkflows","buildSlashItems","hostSkillItem","useCanBrowseSkills","parseSlashTokenInProgress","filterSlashItems","mergeSkillWorkflows"],"mappings":";;;;;;;;;;;AAiCA,IAAM,WAAA,GAAc,qDAAA;AAGb,SAAS,gBAAgB,KAAA,EAAsD;AACpF,EAAA,MAAM,CAAA,GAAI,WAAA,CAAY,IAAA,CAAK,KAAK,CAAA;AAChC,EAAA,OAAO,CAAA,GAAI,EAAE,IAAA,EAAM,CAAA,CAAE,CAAC,CAAA,CAAE,WAAA,EAAY,EAAG,IAAA,EAAA,CAAO,EAAE,CAAC,CAAA,IAAK,EAAA,EAAI,IAAA,IAAO,GAAI,IAAA;AACvE;AAMO,SAAS,YAAA,CAAa,UAA8B,aAAA,EAAiC;AAC1F,EAAA,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KAAqB;AAClC,MAAA,MAAM,CAAA,GAAI,OAAA,CAAQ,GAAA,CAAI,CAAA,CAAE,EAAE,CAAA;AAC1B,MAAA,OAAO;AAAA,QACL,MAAM,CAAA,CAAE,EAAA;AAAA,QACR,WAAA,EAAa,GAAG,WAAA,KAAgB,CAAA,CAAE,UAAU,CAAA,CAAE,EAAA,GAAK,EAAE,KAAA,GAAQ,EAAA,CAAA;AAAA,QAC7D,OAAA,EAAS,GAAG,QAAA,IAAY,EAAA;AAAA,QACxB,UAAA,EAAY,CAAA,EAAG,UAAA,KAAe,QAAA,GAAW,QAAA,GAAW,MAAA;AAAA,QACpD,IAAA,EAAM;AAAA,OACR;AAAA,IACF,CAAC;AAAA,GACH;AACF","file":"chunk-XF355M7O.cjs","sourcesContent":["/**\n * Slash skills are launched prompt-first, through the one workflow launcher.\n *\n * A skill (or a prompt-style built-in such as Deep research) is run WITH a prompt, so it never\n * just executes:\n * - picking it in the slash menu opens its form (the prompt field first, focused, required);\n * - typing `/slug` and pressing Enter opens the same form with the field empty;\n * - typing `/slug some text` and pressing Enter opens it with the text already in the field.\n * The rule is the same for any recognised skill slug as the FIRST token of the draft; a backend\n * command (`/goal`, `/compact`, ...) is never a skill and is sent as typed. Nothing is sent from\n * the composer until the user starts it in the form. Without skills enabled (`show_skills`) this\n * applies to the host's skill packs only (`host.workflows.skillPacks`): the menu lists no other\n * skills and any other `/text` is sent as typed.\n *\n * The run lands where the surface says (`landing`), through the one launch handler. A chat that\n * is not the session's conversation (`ChatPage`, the document ask) passes `send`: the composed\n * prompt then goes to its own send, as a typed message would.\n */\n\nimport { useCallback, useMemo, useState, type ReactNode } from 'react'\nimport { promptFieldName } from '../../agents/workflows/workflow'\nimport { isSkillPackWorkflow } from '../../agents/workflows/skillPack'\nimport { type SlashMenuItem } from '../../chat/SlashMenu'\nimport {\n type WorkflowDefinition,\n type WorkflowInputs,\n type WorkflowLanding,\n} from '../../agents/workflows/types'\nimport { useBuiltinCommands } from '@arbidocs/react'\nimport { ConnectedWorkflowStart } from './ConnectedWorkflowStart'\nimport { useWorkflowDefinitions } from './useWorkflowDefinitions'\n\n/** `/slug` or `/slug rest of the line`: the first token and the text after it. */\nconst TYPED_SKILL = /^\\s*\\/([a-zA-Z0-9][a-zA-Z0-9_-]*)(?:\\s+([\\s\\S]*))?$/\n\n/** What the typed draft names: its slug (lower-cased) and the text after it (trimmed). */\nexport function parseTypedSkill(draft: string): { slug: string; text: string } | null {\n const m = TYPED_SKILL.exec(draft)\n return m ? { slug: m[1].toLowerCase(), text: (m[2] ?? '').trim() } : null\n}\n\n/**\n * Whether a skill opens its form from a menu (the `/` menus, the command palette): a prompt skill,\n * and with skills switched off (`show_skills`) only the host's packs. The one gate both share.\n */\nexport function canOpenSkill(workflow: WorkflowDefinition, skillsEnabled: boolean): boolean {\n return workflow.run.kind === 'prompt' && (skillsEnabled || isSkillPackWorkflow(workflow))\n}\n\nexport interface UseSlashSkillWorkflowsOptions {\n landing: WorkflowLanding\n /** Where the composed prompt goes, for a chat that is not the session's conversation. */\n send?: (prompt: string) => void\n}\n\nexport function useSlashSkillWorkflows({ landing, send }: UseSlashSkillWorkflowsOptions): {\n /** Opens the launcher for a picked menu item. True when it did (the caller then clears the draft). */\n openFor: (item: SlashMenuItem) => boolean\n /**\n * Opens the launcher for a typed `/slug text` draft, text pre-filled. True when the draft names\n * a skill (the caller then clears the draft and sends nothing).\n */\n openForDraft: (draft: string) => boolean\n /**\n * Opens the launcher for a skill by id (a surface listing the skills itself, the command\n * palette). True when it is a skill this person may run here.\n */\n openSkill: (id: string) => boolean\n /** The skills this person may open here: the host's packs, and the rest with `show_skills`. */\n openable: WorkflowDefinition[]\n /** Render once, anywhere in the surface that hosts the slash menu. */\n launcher: ReactNode\n} {\n const { skills, skillsEnabled } = useWorkflowDefinitions()\n const { commands } = useBuiltinCommands()\n const [active, setActive] = useState<{ id: string; text: string } | null>(null)\n\n // Stable while the lists are, so a surface can memoise what it builds on them.\n const open = useCallback(\n (workflow: WorkflowDefinition | undefined, text: string): boolean => {\n if (!workflow || !canOpenSkill(workflow, skillsEnabled)) return false\n setActive({ id: workflow.id, text })\n return true\n },\n [skillsEnabled]\n )\n\n const openFor = useCallback(\n (item: SlashMenuItem): boolean =>\n item.kind === 'skill' &&\n open(\n skills.find((w) => w.id === item.name),\n ''\n ),\n [open, skills]\n )\n\n const openSkill = useCallback(\n (id: string): boolean =>\n open(\n skills.find((w) => w.id === id),\n ''\n ),\n [open, skills]\n )\n\n const openable = useMemo(\n () => skills.filter((w) => canOpenSkill(w, skillsEnabled)),\n [skills, skillsEnabled]\n )\n\n const openForDraft = useCallback(\n (draft: string): boolean => {\n const typed = parseTypedSkill(draft)\n if (!typed) return false\n // A backend command wins a name collision, as in the menu: it is sent as typed.\n if (commands.some((c) => c.name.toLowerCase() === typed.slug)) return false\n return open(\n skills.find((w) => w.id.toLowerCase() === typed.slug),\n typed.text\n )\n },\n [open, skills, commands]\n )\n\n // Mounted only while a workflow is open: the ask bar lives in every page's topbar, so the\n // launcher's data hooks (files, agents, tasks) must not run until it is needed.\n const launcher = useMemo(() => {\n if (active === null) return null\n const initialInputsFor = (\n workflow: WorkflowDefinition\n ): Partial<WorkflowInputs> | undefined => {\n const field = promptFieldName(workflow)\n return field && active.text ? { [field]: active.text } : undefined\n }\n return (\n <ConnectedWorkflowStart\n workflows={skills}\n showTiles={false}\n landing={landing}\n send={send}\n activeId={active.id}\n onActiveIdChange={(id) => id === null && setActive(null)}\n initialInputsFor={initialInputsFor}\n />\n )\n }, [active, skills, landing, send])\n\n return { openFor, openForDraft, openSkill, openable, launcher }\n}\n","/**\n * The slash menu's data, in one place for every surface that hosts it (the chat composers, the\n * workspace ask bar, the document ask and `ChatPage`): the backend's built-in commands, the host's\n * skill packs and the user's skills, filtered by the slash token in progress. Commands and the\n * user's skills are typed `/<slug>` and dispatched by the backend; a skill opens its form\n * (`useSlashSkillWorkflows`).\n */\n\nimport { useMemo } from 'react'\nimport { useBuiltinCommands } from '@arbidocs/react'\nimport type { SlashMenuItem } from '../../chat/SlashMenu'\nimport { buildSlashItems, filterSlashItems, parseSlashToken } from '../../chat/slash-menu-helpers'\nimport { mergeSkillWorkflows } from '../../agents/workflows/workflow'\nimport type { WorkflowDefinition } from '../../agents/workflows/types'\nimport { useCanBrowseSkills, useSkillsEnabled } from '../workflows/useSkillsEnabled'\nimport { hostSkillItem, useHostSkills } from '../workflows/useHostSkills'\nimport { useUsableSkillListings } from '../workflows/useWorkflowDefinitions'\nimport { useNamedWorkflows } from '../workflows/useNamedWorkflows'\n\nconst NO_SKILLS: ReadonlyArray<WorkflowDefinition> = []\n\n/**\n * Every row of the menu, unfiltered: commands, then the host's packs (always: the host offers\n * them), then, for skills users (`show_skills`), the built-in skills and the user's own.\n *\n * @param builtinSkills The built-in skills to offer (prompt workflows offered as `/slug`), for a\n * surface that can open their form; default none.\n */\nexport function useSlashMenuItems(builtinSkills: ReadonlyArray<WorkflowDefinition> = NO_SKILLS): {\n items: SlashMenuItem[]\n /** The menu's \"Browse all\" footer opens the Skills browser: skills users, never guests. */\n canBrowseSkills: boolean\n} {\n const hostSkills = useHostSkills()\n const listings = useUsableSkillListings(hostSkills)\n const skillsEnabled = useSkillsEnabled()\n const { commands } = useBuiltinCommands()\n const builtins = useNamedWorkflows(builtinSkills)\n const items = useMemo<SlashMenuItem[]>(() => {\n const packSlugs = new Set(hostSkills.map((w) => w.id))\n return buildSlashItems(\n commands.map((c) => ({\n name: c.name,\n description: c.description,\n argHint: c.arg_hint,\n kind: 'command' as const,\n })),\n [\n ...hostSkills.map(hostSkillItem),\n ...(skillsEnabled\n ? skillItems(\n builtins.filter((w) => !packSlugs.has(w.id)),\n listings\n )\n : []),\n ]\n )\n }, [commands, hostSkills, listings, skillsEnabled, builtins])\n return { items, canBrowseSkills: useCanBrowseSkills() }\n}\n\n/**\n * @param text The draft.\n * @param builtinSkills The built-in skills (prompt workflows offered as `/slug`).\n */\nexport function useSlashItems(\n text: string,\n builtinSkills: ReadonlyArray<WorkflowDefinition> = NO_SKILLS\n) {\n const { items, canBrowseSkills } = useSlashMenuItems(builtinSkills)\n const slashToken = parseSlashToken(text)\n const filteredItems = useMemo(\n () => (slashToken !== null ? filterSlashItems(items, slashToken) : []),\n [items, slashToken]\n )\n return {\n slashToken,\n filteredItems,\n isOpen: slashToken !== null && filteredItems.length > 0,\n canBrowseSkills,\n }\n}\n\ntype SkillListings = ReturnType<typeof useUsableSkillListings>\n\n/**\n * Built-in skills share the list and the `/slug` path; a same-slug skill of the user's own shadows\n * the built-in, as on the backend.\n */\nfunction skillItems(\n builtinSkills: ReadonlyArray<WorkflowDefinition>,\n listings: SkillListings\n): SlashMenuItem[] {\n const { host, skills } = mergeSkillWorkflows([...builtinSkills], listings)\n const listing = new Map(listings.map((s) => [s.slug, s]))\n return [\n ...host.map((w): SlashMenuItem => ({\n name: w.id,\n description: w.description,\n argHint: w.inputs[0]?.label ?? '',\n visibility: 'global',\n kind: 'skill',\n })),\n ...skills.map((w): SlashMenuItem => {\n const s = listing.get(w.id)\n return {\n name: w.id,\n description: s?.description || (w.title !== w.id ? w.title : ''),\n argHint: s?.arg_hint ?? '',\n visibility: s?.visibility === 'global' ? 'global' : 'mine',\n kind: 'skill',\n }\n }),\n ]\n}\n"]}
1
+ {"version":3,"sources":["../src/connection/workflows/useSlashSkillWorkflows.tsx","../src/connection/conversation/useSlashItems.ts"],"names":["isSkillPackWorkflow","useWorkflowDefinitions","useBuiltinCommands","useState","useCallback","useMemo","promptFieldName","jsx","ConnectedWorkflowStart","useHostSkills","useUsableSkillListings","useSkillsEnabled","useNamedWorkflows","buildSlashItems","hostSkillItem","useCanBrowseSkills","parseSlashTokenInProgress","filterSlashItems","mergeSkillWorkflows"],"mappings":";;;;;;;;;;;AAiCA,IAAM,WAAA,GAAc,qDAAA;AAGb,SAAS,gBAAgB,KAAA,EAAsD;AACpF,EAAA,MAAM,CAAA,GAAI,WAAA,CAAY,IAAA,CAAK,KAAK,CAAA;AAChC,EAAA,OA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AA,CAAE,WAAA;AAAA,MACf,OAAA,EAAS,CAAA,CAAE,MAAA,CAAO,CAAC,GAAG,KAAA,IAAS,EAAA;AAAA,MAC/B,UAAA,EAAY,QAAA;AAAA,MACZ,IAAA,EAAM;AAAA,KACR,CAAE,CAAA;AAAA,IACF,GAAG,MAAA,CAAO,GAAA,CAAI,CAAC,CAAA,KAAqB;AAClC,MAAA,MAAM,CAAA,GAAI,OAAA,CAAQ,GAAA,CAAI,CAAA,CAAE,EAAE,CAAA;AAC1B,MAAA,OAAO;AAAA,QACL,MAAM,CAAA,CAAE,EAAA;AAAA,QACR,WAAA,EAAa,GAAG,WAAA,KAAgB,CAAA,CAAE,UAAU,CAAA,CAAE,EAAA,GAAK,EAAE,KAAA,GAAQ,EAAA,CAAA;AAAA,QAC7D,OAAA,EAAS,GAAG,QAAA,IAAY,EAAA;AAAA,QACxB,UAAA,EAAY,CAAA,EAAG,UAAA,KAAe,QAAA,GAAW,QAAA,GAAW,MAAA;AAAA,QACpD,IAAA,EAAM;AAAA,OACR;AAAA,IACF,CAAC;AAAA,GACH;AACF","file":"chunk-2Z25MUAY.cjs","sourcesContent":["/**\n * Slash skills are launched prompt-first, through the one workflow launcher.\n *\n * A skill (or a prompt-style built-in such as Deep research) is run WITH a prompt, so it never\n * just executes:\n * - picking it in the slash menu opens its form (the prompt field first, focused, required);\n * - typing `/slug` and pressing Enter opens the same form with the field empty;\n * - typing `/slug some text` and pressing Enter opens it with the text already in the field.\n * The rule is the same for any recognised skill slug as the FIRST token of the draft; a backend\n * command (`/goal`, `/compact`, ...) is never a skill and is sent as typed. Nothing is sent from\n * the composer until the user starts it in the form. Without skills enabled (`show_skills`) this\n * applies to the host's skill packs only (`host.workflows.skillPacks`): the menu lists no other\n * skills and any other `/text` is sent as typed.\n *\n * The run lands where the surface says (`landing`), through the one launch handler. A chat that\n * is not the session's conversation (`ChatPage`, the document ask) passes `send`: the composed\n * prompt then goes to its own send, as a typed message would.\n */\n\nimport { useCallback, useMemo, useState, type ReactNode } from 'react'\nimport { promptFieldName } from '../../agents/workflows/workflow'\nimport { isSkillPackWorkflow } from '../../agents/workflows/skillPack'\nimport { type SlashMenuItem } from '../../chat/SlashMenu'\nimport {\n type WorkflowDefinition,\n type WorkflowInputs,\n type WorkflowLanding,\n} from '../../agents/workflows/types'\nimport { useBuiltinCommands } from '@arbidocs/react'\nimport { ConnectedWorkflowStart } from './ConnectedWorkflowStart'\nimport { useWorkflowDefinitions } from './useWorkflowDefinitions'\n\n/** `/slug` or `/slug rest of the line`: the first token and the text after it. */\nconst TYPED_SKILL = /^\\s*\\/([a-zA-Z0-9][a-zA-Z0-9_-]*)(?:\\s+([\\s\\S]*))?$/\n\n/** What the typed draft names: its slug (lower-cased) and the text after it (trimmed). */\nexport function parseTypedSkill(draft: string): { slug: string; text: string } | null {\n const m = TYPED_SKILL.exec(draft)\n return m ? { slug: m[1].toLowerCase(), text: (m[2] ?? '').trim() } : null\n}\n\n/**\n * Whether a skill opens its form from a menu (the `/` menus, the command palette): a prompt skill,\n * and with skills switched off (`show_skills`) only the host's packs. The one gate both share.\n */\nexport function canOpenSkill(workflow: WorkflowDefinition, skillsEnabled: boolean): boolean {\n return workflow.run.kind === 'prompt' && (skillsEnabled || isSkillPackWorkflow(workflow))\n}\n\nexport interface UseSlashSkillWorkflowsOptions {\n landing: WorkflowLanding\n /** Where the composed prompt goes, for a chat that is not the session's conversation. */\n send?: (prompt: string) => void\n}\n\nexport function useSlashSkillWorkflows({ landing, send }: UseSlashSkillWorkflowsOptions): {\n /** Opens the launcher for a picked menu item. True when it did (the caller then clears the draft). */\n openFor: (item: SlashMenuItem) => boolean\n /**\n * Opens the launcher for a typed `/slug text` draft, text pre-filled. True when the draft names\n * a skill (the caller then clears the draft and sends nothing).\n */\n openForDraft: (draft: string) => boolean\n /**\n * Opens the launcher for a skill by id (a surface listing the skills itself, the command\n * palette). True when it is a skill this person may run here.\n */\n openSkill: (id: string) => boolean\n /** The skills this person may open here: the host's packs, and the rest with `show_skills`. */\n openable: WorkflowDefinition[]\n /** Render once, anywhere in the surface that hosts the slash menu. */\n launcher: ReactNode\n} {\n const { skills, skillsEnabled } = useWorkflowDefinitions()\n const { commands } = useBuiltinCommands()\n const [active, setActive] = useState<{ id: string; text: string } | null>(null)\n\n // Stable while the lists are, so a surface can memoise what it builds on them.\n const open = useCallback(\n (workflow: WorkflowDefinition | undefined, text: string): boolean => {\n if (!workflow || !canOpenSkill(workflow, skillsEnabled)) return false\n setActive({ id: workflow.id, text })\n return true\n },\n [skillsEnabled]\n )\n\n const openFor = useCallback(\n (item: SlashMenuItem): boolean =>\n item.kind === 'skill' &&\n open(\n skills.find((w) => w.id === item.name),\n ''\n ),\n [open, skills]\n )\n\n const openSkill = useCallback(\n (id: string): boolean =>\n open(\n skills.find((w) => w.id === id),\n ''\n ),\n [open, skills]\n )\n\n const openable = useMemo(\n () => skills.filter((w) => canOpenSkill(w, skillsEnabled)),\n [skills, skillsEnabled]\n )\n\n const openForDraft = useCallback(\n (draft: string): boolean => {\n const typed = parseTypedSkill(draft)\n if (!typed) return false\n // A backend command wins a name collision, as in the menu: it is sent as typed.\n if (commands.some((c) => c.name.toLowerCase() === typed.slug)) return false\n return open(\n skills.find((w) => w.id.toLowerCase() === typed.slug),\n typed.text\n )\n },\n [open, skills, commands]\n )\n\n // Mounted only while a workflow is open: the ask bar lives in every page's topbar, so the\n // launcher's data hooks (files, agents, tasks) must not run until it is needed.\n const launcher = useMemo(() => {\n if (active === null) return null\n const initialInputsFor = (\n workflow: WorkflowDefinition\n ): Partial<WorkflowInputs> | undefined => {\n const field = promptFieldName(workflow)\n return field && active.text ? { [field]: active.text } : undefined\n }\n return (\n <ConnectedWorkflowStart\n workflows={skills}\n showTiles={false}\n landing={landing}\n send={send}\n activeId={active.id}\n onActiveIdChange={(id) => id === null && setActive(null)}\n initialInputsFor={initialInputsFor}\n />\n )\n }, [active, skills, landing, send])\n\n return { openFor, openForDraft, openSkill, openable, launcher }\n}\n","/**\n * The slash menu's data, in one place for every surface that hosts it (the chat composers, the\n * workspace ask bar, the document ask and `ChatPage`): the backend's built-in commands, the host's\n * skill packs and the user's skills, filtered by the slash token in progress. Commands and the\n * user's skills are typed `/<slug>` and dispatched by the backend; a skill opens its form\n * (`useSlashSkillWorkflows`).\n */\n\nimport { useMemo } from 'react'\nimport { useBuiltinCommands } from '@arbidocs/react'\nimport type { SlashMenuItem } from '../../chat/SlashMenu'\nimport { buildSlashItems, filterSlashItems, parseSlashToken } from '../../chat/slash-menu-helpers'\nimport { mergeSkillWorkflows } from '../../agents/workflows/workflow'\nimport type { WorkflowDefinition } from '../../agents/workflows/types'\nimport { useCanBrowseSkills, useSkillsEnabled } from '../workflows/useSkillsEnabled'\nimport { hostSkillItem, useHostSkills } from '../workflows/useHostSkills'\nimport { useUsableSkillListings } from '../workflows/useWorkflowDefinitions'\nimport { useNamedWorkflows } from '../workflows/useNamedWorkflows'\n\nconst NO_SKILLS: ReadonlyArray<WorkflowDefinition> = []\n\n/**\n * Every row of the menu, unfiltered: commands, then the host's packs (always: the host offers\n * them), then, for skills users (`show_skills`), the built-in skills and the user's own.\n *\n * @param builtinSkills The built-in skills to offer (prompt workflows offered as `/slug`), for a\n * surface that can open their form; default none.\n */\nexport function useSlashMenuItems(builtinSkills: ReadonlyArray<WorkflowDefinition> = NO_SKILLS): {\n items: SlashMenuItem[]\n /** The menu's \"Browse all\" footer opens the Skills browser: skills users, never guests. */\n canBrowseSkills: boolean\n} {\n const hostSkills = useHostSkills()\n const listings = useUsableSkillListings(hostSkills)\n const skillsEnabled = useSkillsEnabled()\n const { commands } = useBuiltinCommands()\n const builtins = useNamedWorkflows(builtinSkills)\n const items = useMemo<SlashMenuItem[]>(() => {\n const packSlugs = new Set(hostSkills.map((w) => w.id))\n return buildSlashItems(\n commands.map((c) => ({\n name: c.name,\n description: c.description,\n argHint: c.arg_hint,\n kind: 'command' as const,\n })),\n [\n ...hostSkills.map(hostSkillItem),\n ...(skillsEnabled\n ? skillItems(\n builtins.filter((w) => !packSlugs.has(w.id)),\n listings\n )\n : []),\n ]\n )\n }, [commands, hostSkills, listings, skillsEnabled, builtins])\n return { items, canBrowseSkills: useCanBrowseSkills() }\n}\n\n/**\n * @param text The draft.\n * @param builtinSkills The built-in skills (prompt workflows offered as `/slug`).\n */\nexport function useSlashItems(\n text: string,\n builtinSkills: ReadonlyArray<WorkflowDefinition> = NO_SKILLS\n) {\n const { items, canBrowseSkills } = useSlashMenuItems(builtinSkills)\n const slashToken = parseSlashToken(text)\n const filteredItems = useMemo(\n () => (slashToken !== null ? filterSlashItems(items, slashToken) : []),\n [items, slashToken]\n )\n return {\n slashToken,\n filteredItems,\n isOpen: slashToken !== null && filteredItems.length > 0,\n canBrowseSkills,\n }\n}\n\ntype SkillListings = ReturnType<typeof useUsableSkillListings>\n\n/**\n * Built-in skills share the list and the `/slug` path; a same-slug skill of the user's own shadows\n * the built-in, as on the backend.\n */\nfunction skillItems(\n builtinSkills: ReadonlyArray<WorkflowDefinition>,\n listings: SkillListings\n): SlashMenuItem[] {\n const { host, skills } = mergeSkillWorkflows([...builtinSkills], listings)\n const listing = new Map(listings.map((s) => [s.slug, s]))\n return [\n ...host.map((w): SlashMenuItem => ({\n name: w.id,\n description: w.description,\n argHint: w.inputs[0]?.label ?? '',\n visibility: 'global',\n kind: 'skill',\n })),\n ...skills.map((w): SlashMenuItem => {\n const s = listing.get(w.id)\n return {\n name: w.id,\n description: s?.description || (w.title !== w.id ? w.title : ''),\n argHint: s?.arg_hint ?? '',\n visibility: s?.visibility === 'global' ? 'global' : 'mine',\n kind: 'skill',\n }\n }),\n ]\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkEVZH6Z5O_cjs = require('./chunk-EVZH6Z5O.cjs');
5
- var chunkQRAQZTJE_cjs = require('./chunk-QRAQZTJE.cjs');
5
+ var chunkJN5YMHGI_cjs = require('./chunk-JN5YMHGI.cjs');
6
6
  var lucideReact = require('lucide-react');
7
7
  var shell = require('@arbidocs/react/shell');
8
8
  var jsxRuntime = require('react/jsx-runtime');
@@ -22,7 +22,7 @@ function skillPackWorkflows(pack) {
22
22
  const cached = cache.get(pack);
23
23
  if (cached) return cached;
24
24
  const workflows = pack.skills.map((skill) => {
25
- const own = chunkQRAQZTJE_cjs.fieldsFromFrontmatter(skill.inputs);
25
+ const own = chunkJN5YMHGI_cjs.fieldsFromFrontmatter(skill.inputs);
26
26
  const placed = (name) => new RegExp(`\\{\\{\\s*${name}\\s*\\}\\}`).test(skill.instructions);
27
27
  const listed = own.filter((f) => f.name !== "request" && !placed(f.name));
28
28
  const request = own.find((f) => f.name === "request") ?? SKILL_PACK_REQUEST_FIELD;
@@ -405,7 +405,7 @@ function nameBuiltinWorkflows(workflows, copy) {
405
405
 
406
406
  // src/agents/workflows/catalogue/registry.ts
407
407
  var WORKFLOW_REGISTRY = [...BUILTIN_SKILLS, ...chunkEVZH6Z5O_cjs.WORD_WORKFLOWS];
408
- var WEB_WORKFLOWS = chunkQRAQZTJE_cjs.workflowsForHost(WORKFLOW_REGISTRY, "web");
408
+ var WEB_WORKFLOWS = chunkJN5YMHGI_cjs.workflowsForHost(WORKFLOW_REGISTRY, "web");
409
409
  var STORAGE_KEY = "arbi.workflow-usage.v1";
410
410
  var EMPTY = {};
411
411
  var cache2 = null;
@@ -536,7 +536,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
536
536
  }
537
537
  const typed = name?.trim();
538
538
  if (workflow.options?.agent === false) {
539
- const message = chunkQRAQZTJE_cjs.composeWorkflowPrompt(workflow, inputs, context);
539
+ const message = chunkJN5YMHGI_cjs.composeWorkflowPrompt(workflow, inputs, context);
540
540
  return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
541
541
  }
542
542
  const derived = typed || deriveWorkflowName(workflow, inputs);
@@ -550,7 +550,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
550
550
  }
551
551
  return {
552
552
  name: derived,
553
- prompt: chunkQRAQZTJE_cjs.composeWorkflowPrompt(workflow, inputs, context),
553
+ prompt: chunkJN5YMHGI_cjs.composeWorkflowPrompt(workflow, inputs, context),
554
554
  skill_ref: null,
555
555
  // The files a run is bound to travel in the saved inputs, whatever the template: the server binds
556
556
  // the run to the ids listed under any input's `documents`.
@@ -863,5 +863,5 @@ exports.useWorkflowUsage = useWorkflowUsage;
863
863
  exports.workflowTaskFields = workflowTaskFields;
864
864
  exports.workflowToComposerValues = workflowToComposerValues;
865
865
  exports.workflowWhen = workflowWhen;
866
- //# sourceMappingURL=chunk-7JLJH5CW.cjs.map
867
- //# sourceMappingURL=chunk-7JLJH5CW.cjs.map
866
+ //# sourceMappingURL=chunk-5A6T4W46.cjs.map
867
+ //# sourceMappingURL=chunk-5A6T4W46.cjs.map