@mcp-b/react-components 0.63.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
  2. package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
  3. package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
  4. package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
  5. package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
  6. package/dist/CodeBlock-dt0L8md0.js +892 -0
  7. package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
  8. package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
  9. package/dist/ExecutionResult-CXnGcmM4.js +671 -0
  10. package/dist/FileTree-CjfzpN6X.js +968 -0
  11. package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
  12. package/dist/ManagerOffice-T79utm-P.js +2469 -0
  13. package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
  14. package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
  15. package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
  16. package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
  17. package/dist/SetupChecklist-DwscX3Bw.js +230 -0
  18. package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
  19. package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
  20. package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
  21. package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
  22. package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
  23. package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
  24. package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
  25. package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
  26. package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
  27. package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
  28. package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
  29. package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
  30. package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
  31. package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
  32. package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
  33. package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
  34. package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
  35. package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
  36. package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
  37. package/dist/assets/desktop/README.md +43 -0
  38. package/dist/assets/desktop/automations.svg +19 -0
  39. package/dist/assets/desktop/document.svg +24 -0
  40. package/dist/assets/desktop/folder.png +0 -0
  41. package/dist/assets/desktop/mail.svg +31 -0
  42. package/dist/assets/desktop/settings.svg +9 -0
  43. package/dist/assets/desktop/trash-full.svg +23 -0
  44. package/dist/assets/desktop/trash.svg +19 -0
  45. package/dist/attachment-preview-DeRqFjdz.js +68 -0
  46. package/dist/attempt-CySQHJsF.js +21 -0
  47. package/dist/command-search-1fjmCBBo.js +34 -0
  48. package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
  49. package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
  50. package/dist/components/agents-sdk/AgentActivity.js +78 -31
  51. package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
  52. package/dist/components/agents-sdk/AgentChat.js +1113 -386
  53. package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
  54. package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
  55. package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
  56. package/dist/components/agents-sdk/AgentComputer.js +8045 -0
  57. package/dist/components/agents-sdk/AgentEvent.js +164 -21
  58. package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
  59. package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
  60. package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
  61. package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
  62. package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
  63. package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
  64. package/dist/components/agents-sdk/BrowserReplay.js +298 -133
  65. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
  66. package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
  67. package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
  68. package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
  69. package/dist/components/agents-sdk/EmployeeApp.js +108 -46
  70. package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
  71. package/dist/components/agents-sdk/EmployeeChat.js +500 -99
  72. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
  73. package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
  74. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
  75. package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
  76. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
  77. package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
  78. package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
  79. package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
  80. package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
  81. package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
  82. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  83. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  84. package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
  85. package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
  86. package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
  87. package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
  88. package/dist/components/agents-sdk/McpServerIcon.js +57 -14
  89. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  90. package/dist/components/agents-sdk/McpServerPicker.js +542 -158
  91. package/dist/components/agents-sdk/ModelSelector.js +1151 -253
  92. package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
  93. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  94. package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
  95. package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
  96. package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
  97. package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
  98. package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
  99. package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
  100. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  101. package/dist/components/agents-sdk/ThinkChat.js +321 -132
  102. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  103. package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
  104. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  105. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
  106. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
  107. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
  108. package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
  109. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  110. package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
  111. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
  112. package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
  113. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
  114. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
  115. package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
  116. package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
  117. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
  118. package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
  119. package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
  120. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
  121. package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
  122. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  123. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
  124. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  125. package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
  126. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
  127. package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
  128. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
  129. package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
  130. package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
  131. package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
  132. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  133. package/dist/components/agents-sdk/Workspace.js +491 -166
  134. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  135. package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
  136. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  137. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
  138. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
  139. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
  140. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  141. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  142. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
  143. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
  144. package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
  145. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
  146. package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
  147. package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
  148. package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
  149. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
  150. package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
  151. package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
  152. package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
  153. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
  154. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
  155. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
  156. package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
  157. package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
  158. package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
  159. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
  160. package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
  161. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
  162. package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
  163. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  164. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  165. package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
  166. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
  167. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  168. package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
  169. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  170. package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
  171. package/dist/components/ai-sdk/Activity.js +768 -192
  172. package/dist/components/ai-sdk/AgentAttention.js +286 -58
  173. package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
  174. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  175. package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
  176. package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
  177. package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
  178. package/dist/components/ai-sdk/Approval.js +574 -172
  179. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  180. package/dist/components/ai-sdk/Artifact.js +535 -128
  181. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  182. package/dist/components/ai-sdk/ChainOfThought.js +404 -80
  183. package/dist/components/ai-sdk/Checkpoint.js +229 -45
  184. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  185. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  186. package/dist/components/ai-sdk/ComposerLink.js +216 -48
  187. package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
  188. package/dist/components/ai-sdk/Context.js +737 -178
  189. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  190. package/dist/components/ai-sdk/Conversation.js +305 -68
  191. package/dist/components/ai-sdk/ExpansionState.js +74 -15
  192. package/dist/components/ai-sdk/Goal.js +435 -116
  193. package/dist/components/ai-sdk/InlineCitation.js +313 -76
  194. package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
  195. package/dist/components/ai-sdk/Message.d.ts +1 -1
  196. package/dist/components/ai-sdk/Message.js +1010 -195
  197. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  198. package/dist/components/ai-sdk/MessageScroller.js +264 -46
  199. package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
  200. package/dist/components/ai-sdk/Plan.js +639 -128
  201. package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
  202. package/dist/components/ai-sdk/PromptInput.js +2735 -794
  203. package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
  204. package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
  205. package/dist/components/ai-sdk/Queue.js +792 -154
  206. package/dist/components/ai-sdk/Reasoning.js +268 -69
  207. package/dist/components/ai-sdk/Sources.js +226 -63
  208. package/dist/components/ai-sdk/Task.js +294 -71
  209. package/dist/components/ai-sdk/ToolApproval.js +126 -26
  210. package/dist/components/ai-sdk/ToolInvocation.js +112 -22
  211. package/dist/components/extension/ChatGptSignInScreen.js +1 -82
  212. package/dist/components/extension/CodexModelSelector.d.ts +1 -1
  213. package/dist/components/extension/CodexModelSelector.js +467 -146
  214. package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
  215. package/dist/components/extension/ConversationTabPicker.js +254 -76
  216. package/dist/components/extension/FirstRunSetup.d.ts +61 -35
  217. package/dist/components/extension/FirstRunSetup.js +3834 -1012
  218. package/dist/components/foundations/Accordion.js +186 -41
  219. package/dist/components/foundations/AlertDialog.js +425 -97
  220. package/dist/components/foundations/AppIcon.d.ts +13 -13
  221. package/dist/components/foundations/AppIcon.js +183 -34
  222. package/dist/components/foundations/Autocomplete.js +408 -89
  223. package/dist/components/foundations/Avatar.d.ts +100 -2
  224. package/dist/components/foundations/Avatar.js +204 -44
  225. package/dist/components/foundations/Button.js +64 -13
  226. package/dist/components/foundations/Card.js +357 -63
  227. package/dist/components/foundations/Checkbox.js +82 -17
  228. package/dist/components/foundations/CheckboxGroup.js +266 -58
  229. package/dist/components/foundations/Collapsible.d.ts +2 -1
  230. package/dist/components/foundations/Collapsible.js +129 -26
  231. package/dist/components/foundations/Combobox.js +408 -89
  232. package/dist/components/foundations/ContextMenu.d.ts +2 -2
  233. package/dist/components/foundations/ContextMenu.js +591 -117
  234. package/dist/components/foundations/DescriptionList.js +159 -28
  235. package/dist/components/foundations/Dialog.js +373 -89
  236. package/dist/components/foundations/EmptyState.js +86 -23
  237. package/dist/components/foundations/Favicon.d.ts +17 -0
  238. package/dist/components/foundations/Favicon.js +62 -0
  239. package/dist/components/foundations/Field.js +525 -108
  240. package/dist/components/foundations/Fieldset.js +115 -23
  241. package/dist/components/foundations/Form.js +38 -9
  242. package/dist/components/foundations/FormattedDate.d.ts +19 -5
  243. package/dist/components/foundations/FormattedDate.js +82 -12
  244. package/dist/components/foundations/IconButton.d.ts +1 -1
  245. package/dist/components/foundations/IconButton.js +114 -17
  246. package/dist/components/foundations/Input.js +38 -9
  247. package/dist/components/foundations/Kbd.js +55 -10
  248. package/dist/components/foundations/Label.js +56 -12
  249. package/dist/components/foundations/LinkButton.js +67 -15
  250. package/dist/components/foundations/Marker.js +138 -29
  251. package/dist/components/foundations/Menu.d.ts +1 -1
  252. package/dist/components/foundations/Menu.js +634 -136
  253. package/dist/components/foundations/Menubar.d.ts +2 -2
  254. package/dist/components/foundations/Menubar.js +685 -130
  255. package/dist/components/foundations/Meter.js +186 -41
  256. package/dist/components/foundations/NavigationMenu.js +426 -95
  257. package/dist/components/foundations/NumberField.js +223 -49
  258. package/dist/components/foundations/Popover.js +398 -88
  259. package/dist/components/foundations/PreviewCard.js +234 -53
  260. package/dist/components/foundations/Progress.js +117 -25
  261. package/dist/components/foundations/RadioGroup.d.ts +13 -5
  262. package/dist/components/foundations/RadioGroup.js +132 -25
  263. package/dist/components/foundations/ScrollArea.js +230 -51
  264. package/dist/components/foundations/SearchField.d.ts +8 -3
  265. package/dist/components/foundations/SearchField.js +129 -28
  266. package/dist/components/foundations/Select.js +648 -145
  267. package/dist/components/foundations/Separator.js +61 -12
  268. package/dist/components/foundations/Slider.js +260 -57
  269. package/dist/components/foundations/Stepper.d.ts +1 -1
  270. package/dist/components/foundations/Stepper.js +561 -127
  271. package/dist/components/foundations/Switch.js +82 -18
  272. package/dist/components/foundations/Tabs.d.ts +2 -2
  273. package/dist/components/foundations/Tabs.js +282 -53
  274. package/dist/components/foundations/Textarea.js +43 -9
  275. package/dist/components/foundations/ThemeProvider.js +138 -52
  276. package/dist/components/foundations/Toast.d.ts +10 -2
  277. package/dist/components/foundations/Toast.js +322 -75
  278. package/dist/components/foundations/Toggle.d.ts +5 -2
  279. package/dist/components/foundations/Toggle.js +51 -10
  280. package/dist/components/foundations/ToggleGroup.d.ts +3 -3
  281. package/dist/components/foundations/ToggleGroup.js +215 -59
  282. package/dist/components/foundations/Toolbar.js +249 -61
  283. package/dist/components/foundations/Tooltip.d.ts +3 -3
  284. package/dist/components/foundations/Tooltip.js +311 -55
  285. package/dist/components/foundations/TransitionSurface.js +43 -9
  286. package/dist/components/foundations/icons.d.ts +2 -2
  287. package/dist/components/foundations/icons.js +2 -2
  288. package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
  289. package/dist/components/general-purpose/ActionGuide.js +290 -64
  290. package/dist/components/general-purpose/AppFrame.js +72 -14
  291. package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
  292. package/dist/components/general-purpose/AppTopBar.js +349 -60
  293. package/dist/components/general-purpose/BrandLoading.js +37 -9
  294. package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
  295. package/dist/components/general-purpose/CommandPalette.js +271 -0
  296. package/dist/components/general-purpose/Commit.d.ts +1 -1
  297. package/dist/components/general-purpose/Commit.js +937 -167
  298. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  299. package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
  300. package/dist/components/general-purpose/FileTree.d.ts +20 -7
  301. package/dist/components/general-purpose/FileTree.js +1 -1
  302. package/dist/components/general-purpose/ListDetail.d.ts +84 -0
  303. package/dist/components/general-purpose/ListDetail.js +423 -0
  304. package/dist/components/general-purpose/NotificationPrompt.js +20 -11
  305. package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
  306. package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
  307. package/dist/components/general-purpose/PricingFAQ.js +53 -12
  308. package/dist/components/general-purpose/PricingPage.js +376 -139
  309. package/dist/components/general-purpose/PricingPlanCard.js +209 -84
  310. package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
  311. package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
  312. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  313. package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
  314. package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
  315. package/dist/components/general-purpose/ScreenStack.js +427 -0
  316. package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
  317. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  318. package/dist/components/general-purpose/StatusScreen.js +82 -24
  319. package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
  320. package/dist/components/general-purpose/SwipeActions.js +357 -0
  321. package/dist/components/general-purpose/Terminal.d.ts +22 -48
  322. package/dist/components/general-purpose/Terminal.js +320 -174
  323. package/dist/components/general-purpose/TestResults.js +975 -196
  324. package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
  325. package/dist/components/general-purpose/ThemeModeControl.js +66 -23
  326. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
  327. package/dist/components/general-purpose/WallpaperPicker.js +180 -0
  328. package/dist/components/general-purpose/WebPreview.d.ts +5 -7
  329. package/dist/components/general-purpose/WebPreview.js +770 -203
  330. package/dist/components/nanites/AgentConnection.js +323 -84
  331. package/dist/components/nanites/AgentToolDetail.js +233 -53
  332. package/dist/components/nanites/GithubMotionMark.js +37 -9
  333. package/dist/components/nanites/NaniteScene.js +535 -323
  334. package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
  335. package/dist/container-width-C43ccJ84.js +17 -0
  336. package/dist/context-Ddsp8HgD.js +43 -0
  337. package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
  338. package/dist/copy-button-DWBVJR6D.js +118 -0
  339. package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
  340. package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
  341. package/dist/icons-nLTnB9kd.js +470 -0
  342. package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
  343. package/dist/motion-CGM3i6lX.js +319 -0
  344. package/dist/motion-preferences-6qsDIDvH.js +13 -0
  345. package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
  346. package/dist/progress-ring-BO649JA9.js +79 -0
  347. package/dist/provider-logos-Ceu7iYFx.js +362 -0
  348. package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
  349. package/dist/styles/accessibility.css +26 -0
  350. package/dist/styles/accordion.css +0 -2
  351. package/dist/styles/activity.css +20 -12
  352. package/dist/styles/agent-attention.css +31 -10
  353. package/dist/styles/agent-chat.css +7 -6
  354. package/dist/styles/agent-computer-motion-reduction.css +118 -0
  355. package/dist/styles/agent-computer-motion.css +127 -0
  356. package/dist/styles/agent-computer-phone.css +942 -0
  357. package/dist/styles/agent-computer.css +1764 -0
  358. package/dist/styles/agent-connection.css +5 -5
  359. package/dist/styles/agent-screen-switcher.css +313 -0
  360. package/dist/styles/app-icon.css +34 -30
  361. package/dist/styles/app-top-bar.css +33 -18
  362. package/dist/styles/approval.css +3 -3
  363. package/dist/styles/artifact.css +1 -1
  364. package/dist/styles/attachment-preview.css +2 -4
  365. package/dist/styles/avatar.css +12 -14
  366. package/dist/styles/base-ui-motion.css +84 -18
  367. package/dist/styles/base-ui-motion.test.tsx +305 -0
  368. package/dist/styles/base.css +16 -12
  369. package/dist/styles/brand.test.ts +7 -20
  370. package/dist/styles/browser-control-overlay.css +1 -1
  371. package/dist/styles/browser-live-screen.css +2 -2
  372. package/dist/styles/browser-live-view.css +1 -1
  373. package/dist/styles/browser-replay.css +0 -8
  374. package/dist/styles/browser-run-panel.css +275 -37
  375. package/dist/styles/button.css +52 -9
  376. package/dist/styles/card.css +6 -5
  377. package/dist/styles/chain-of-thought.css +0 -10
  378. package/dist/styles/checkpoint.css +2 -2
  379. package/dist/styles/codex-model-selector.css +2 -2
  380. package/dist/styles/color-contrast.test.ts +18 -1
  381. package/dist/styles/command-palette.css +110 -0
  382. package/dist/styles/composer-link.css +11 -7
  383. package/dist/styles/composition-motion.css +3 -14
  384. package/dist/styles/context.css +2 -2
  385. package/dist/styles/conversation-tab-picker.css +7 -0
  386. package/dist/styles/conversation.css +8 -2
  387. package/dist/styles/dialog.css +2 -2
  388. package/dist/styles/employee-app.css +8 -2
  389. package/dist/styles/employee-chrome.css +4 -4
  390. package/dist/styles/execution-board.css +206 -114
  391. package/dist/styles/execution-result.css +2 -2
  392. package/dist/styles/field.css +187 -4
  393. package/dist/styles/file-tree.css +218 -40
  394. package/dist/styles/first-run-setup.css +914 -187
  395. package/dist/styles/github-motion-mark.css +0 -8
  396. package/dist/styles/index.css +145 -133
  397. package/dist/styles/inline-citation.css +5 -4
  398. package/dist/styles/list-detail.css +57 -0
  399. package/dist/styles/manager-office.css +6 -8
  400. package/dist/styles/manager-work.css +4 -2
  401. package/dist/styles/mcp-plugin-catalog.css +2 -2
  402. package/dist/styles/mcp-server-picker.css +3 -6
  403. package/dist/styles/media-preview-card.css +2 -2
  404. package/dist/styles/menu.css +0 -9
  405. package/dist/styles/menubar.css +18 -6
  406. package/dist/styles/message-scroller.css +47 -9
  407. package/dist/styles/message.css +3 -3
  408. package/dist/styles/model-selector.css +1 -1
  409. package/dist/styles/motion-reduction.css +39 -6
  410. package/dist/styles/pricing-page.css +1 -1
  411. package/dist/styles/prompt-input.css +29 -29
  412. package/dist/styles/queue.css +1 -1
  413. package/dist/styles/recipes.css +212 -28
  414. package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
  415. package/dist/styles/responsive-sidebar-shell.css +40 -43
  416. package/dist/styles/screen-stack.css +123 -0
  417. package/dist/styles/search-field.css +80 -3
  418. package/dist/styles/stepper.css +0 -10
  419. package/dist/styles/streamdown.css +2 -2
  420. package/dist/styles/subagent-run.css +9 -5
  421. package/dist/styles/swipe-actions.css +158 -0
  422. package/dist/styles/tabs.css +80 -23
  423. package/dist/styles/task.css +7 -1
  424. package/dist/styles/terminal.css +66 -78
  425. package/dist/styles/test-results.css +1 -19
  426. package/dist/styles/textarea.css +2 -1
  427. package/dist/styles/theme-mode-control.css +154 -26
  428. package/dist/styles/think-chat-tool-panels.css +1 -1
  429. package/dist/styles/think-execution-workbench.css +0 -9
  430. package/dist/styles/think-full-app.css +7 -1
  431. package/dist/styles/think-schedule.css +81 -54
  432. package/dist/styles/think-thread-picker.css +28 -37
  433. package/dist/styles/toast.css +11 -0
  434. package/dist/styles/toggle-group.css +0 -10
  435. package/dist/styles/toggle.css +13 -0
  436. package/dist/styles/tooltip.css +12 -0
  437. package/dist/styles/transition-surface.css +1 -0
  438. package/dist/styles/wallpaper-picker.css +224 -0
  439. package/dist/styles/web-preview.css +47 -18
  440. package/dist/styles/workspace-automation.css +116 -17
  441. package/dist/styles/workspace-concepts.css +1 -1
  442. package/dist/styles/workspace-desktop.css +124 -0
  443. package/dist/styles/workspace-entity-card.css +3 -1
  444. package/dist/styles/workspace-explorer.css +499 -5
  445. package/dist/utils/brand-marks.d.ts +13 -0
  446. package/dist/utils/brand-marks.js +14 -0
  447. package/dist/utils/desktop-artwork.d.ts +17 -0
  448. package/dist/utils/desktop-artwork.js +18 -0
  449. package/dist/utils/favicon.d.ts +6 -2
  450. package/dist/utils/favicon.js +16 -4
  451. package/dist/utils/structured-code.d.ts +1 -1
  452. package/dist/workspace-assets-DdtnBDU3.js +213 -0
  453. package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
  454. package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
  455. package/dist/workspace-delete-BOY6CMBf.js +183 -0
  456. package/dist/workspace-drag-B6hMXUNt.js +304 -0
  457. package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
  458. package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
  459. package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
  460. package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
  461. package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
  462. package/package.json +9 -3
  463. package/dist/Avatar-t1YRzdwB.d.ts +0 -101
  464. package/dist/CodeBlock-DYQdZUH6.js +0 -318
  465. package/dist/ExecutionResult-2fBkpIGN.js +0 -279
  466. package/dist/FileTree-CDLOD643.js +0 -323
  467. package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
  468. package/dist/SetupChecklist-B-iEta9v.js +0 -78
  469. package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
  470. package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
  471. package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
  472. package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
  473. package/dist/attachment-preview-1CXJvrmb.js +0 -25
  474. package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
  475. package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
  476. package/dist/copy-button-DbR932tF.js +0 -45
  477. package/dist/icons-GoybMAB2.js +0 -141
  478. package/dist/progress-ring-L2bbF0ji.js +0 -40
  479. package/dist/provider-logos-DWYY8wNz.js +0 -99
  480. package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
  481. package/dist/workspace-assets-F3r6XltC.js +0 -107
  482. package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
  483. package/dist/workspace-delete-CQvv1eDE.js +0 -81
  484. package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
@@ -1,25 +1,28 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { C as FileIcon, E as InfoIcon, K as QueueIcon, Q as SplitIcon, U as PlayIcon, Z as SpinnerIcon, d as CheckIcon, et as StopIcon, r as ArrowLeftIcon, u as CalendarIcon } from "../../icons-GoybMAB2.js";
2
+ import { $ as QueueIcon, M as InfoIcon, O as FileIcon, X as PlayIcon, at as SplitIcon, f as CalendarIcon, it as SpinnerIcon, p as CheckIcon, r as ArrowLeftIcon, st as StopIcon } from "../../icons-nLTnB9kd.js";
3
3
  import { Checkbox } from "../foundations/Checkbox.js";
4
4
  import { Field } from "../foundations/Field.js";
5
- import { a as formatErrorMessage, r as firstLine } from "../../format-CWaZEp5o.js";
5
+ import { a as formatErrorMessage, r as firstLine } from "../../format-DL7f2rqp.js";
6
+ import { Button } from "../foundations/Button.js";
6
7
  import { Form } from "../foundations/Form.js";
7
8
  import { IconButton } from "../foundations/IconButton.js";
8
- import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
9
+ import { r as useMergedRefs } from "../../merge-refs-DTX97mLp.js";
9
10
  import { Tabs } from "../foundations/Tabs.js";
10
- import { Input } from "../foundations/Input.js";
11
11
  import { EmptyState } from "../foundations/EmptyState.js";
12
+ import { Favicon } from "../foundations/Favicon.js";
13
+ import { Input } from "../foundations/Input.js";
12
14
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
13
15
  import { DescriptionList } from "../foundations/DescriptionList.js";
14
16
  import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
15
17
  import { a as executionResultSummary, n as executionErrorSummary } from "../../execution-result-DAuW4VWv.js";
16
- import { a as httpUrl, i as WorkspaceComposerLink, r as OutboundLink, t as FaviconMark } from "../../workspace-assets-F3r6XltC.js";
17
- import { t as ExecutionResult } from "../../ExecutionResult-2fBkpIGN.js";
18
+ import { i as httpUrl, n as OutboundLink, r as WorkspaceComposerLink } from "../../workspace-assets-DdtnBDU3.js";
19
+ import { t as ExecutionResult } from "../../ExecutionResult-CXnGcmM4.js";
18
20
  import { ExecutionBoard } from "./ExecutionBoard.js";
19
- import { n as useConceptEntry, t as WorkspaceConceptPanel } from "../../workspace-concept-panel-D8oEvR0n.js";
20
- import { t as WorkspaceDeleteControl } from "../../workspace-delete-CQvv1eDE.js";
21
- import { t as WorkspaceEntityCard } from "../../workspace-entity-card-B1aV-jBj.js";
21
+ import { n as useConceptEntry, t as WorkspaceConceptPanel } from "../../workspace-concept-panel-VkjvFCY_.js";
22
+ import { t as WorkspaceDeleteControl } from "../../workspace-delete-BOY6CMBf.js";
23
+ import { t as WorkspaceEntityCard } from "../../workspace-entity-card-9YcsNiqU.js";
22
24
  import { WorkspaceAutomationTable } from "./WorkspaceAutomationTable.js";
25
+ import { c } from "react/compiler-runtime";
23
26
  import * as React from "react";
24
27
  import { createElement } from "react";
25
28
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -78,57 +81,106 @@ function automationApps(graph) {
78
81
  for (const node of graph?.nodes ?? []) for (const link of node.links ?? []) {
79
82
  const href = httpUrl(link.href);
80
83
  if (!href) continue;
81
- const host = new URL(href).hostname;
82
- if (!apps.has(host)) apps.set(host, {
84
+ const url = new URL(href);
85
+ if (!url.username && !url.password && !apps.has(url.hostname)) apps.set(url.hostname, {
83
86
  ...link,
84
87
  href
85
88
  });
86
89
  }
87
90
  return [...apps.values()];
88
91
  }
89
- function AutomationApps({ apps, compact = false }) {
92
+ function AutomationApps(t0) {
93
+ const $ = c(7);
94
+ const { apps, compact: t1 } = t0;
95
+ const compact = t1 === void 0 ? false : t1;
90
96
  if (apps.length === 0) return null;
91
- return /* @__PURE__ */ jsx("div", {
92
- className: "workspace-automation-apps",
93
- "aria-label": "Apps used",
94
- children: apps.map((app) => /* @__PURE__ */ jsx(OutboundLink, {
95
- href: app.href,
96
- compact,
97
- title: compact ? app.label : void 0,
98
- children: app.label
99
- }, app.href))
100
- });
97
+ let t2;
98
+ if ($[0] !== apps || $[1] !== compact) {
99
+ let t3;
100
+ if ($[3] !== compact) {
101
+ t3 = (app) => /* @__PURE__ */ jsx(OutboundLink, {
102
+ href: app.href,
103
+ compact,
104
+ title: compact ? app.label : void 0,
105
+ children: app.label
106
+ }, app.href);
107
+ $[3] = compact;
108
+ $[4] = t3;
109
+ } else t3 = $[4];
110
+ t2 = apps.map(t3);
111
+ $[0] = apps;
112
+ $[1] = compact;
113
+ $[2] = t2;
114
+ } else t2 = $[2];
115
+ let t3;
116
+ if ($[5] !== t2) {
117
+ t3 = /* @__PURE__ */ jsx("nav", {
118
+ className: "workspace-automation-apps",
119
+ "aria-label": "Apps used",
120
+ children: t2
121
+ });
122
+ $[5] = t2;
123
+ $[6] = t3;
124
+ } else t3 = $[6];
125
+ return t3;
101
126
  }
102
127
  function missingRequiredInput(parameters, draft) {
103
128
  return parameters.some((parameter) => parameter.required && (draft[parameter.name] === void 0 || draft[parameter.name] === ""));
104
129
  }
105
130
  /** The automation's inputs, folded open while a required one is empty. Read-only without `setDraft`. */
106
- function RunOptions({ className, draft, parameters, setDraft }) {
107
- const [open, setOpen] = React.useState(() => missingRequiredInput(parameters, draft));
131
+ function RunOptions(t0) {
132
+ const $ = c(20);
133
+ const { className, draft, parameters, setDraft, initiallyOpen: t1, children } = t0;
134
+ const initiallyOpen = t1 === void 0 ? false : t1;
135
+ let t2;
136
+ if ($[0] !== draft || $[1] !== initiallyOpen || $[2] !== parameters) {
137
+ t2 = () => initiallyOpen || missingRequiredInput(parameters, draft);
138
+ $[0] = draft;
139
+ $[1] = initiallyOpen;
140
+ $[2] = parameters;
141
+ $[3] = t2;
142
+ } else t2 = $[3];
143
+ const [open, setOpen] = React.useState(t2);
108
144
  const fieldId = React.useId();
109
145
  const editing = setDraft != null;
110
- const visibleParameters = editing ? parameters : parameters.filter((parameter) => snapshotValue(parameter) !== "");
111
- return /* @__PURE__ */ jsxs("details", {
112
- className,
113
- open,
114
- onToggle: (event) => setOpen(event.currentTarget.open),
115
- children: [/* @__PURE__ */ jsx("summary", { children: "Run options" }), visibleParameters.length > 0 ? /* @__PURE__ */ jsx(DescriptionList.Root, {
146
+ let t3;
147
+ if ($[4] !== editing || $[5] !== parameters) {
148
+ t3 = editing ? parameters : parameters.filter(_temp);
149
+ $[4] = editing;
150
+ $[5] = parameters;
151
+ $[6] = t3;
152
+ } else t3 = $[6];
153
+ const visibleParameters = t3;
154
+ let t4;
155
+ let t5;
156
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
157
+ t4 = (event) => setOpen(event.currentTarget.open);
158
+ t5 = /* @__PURE__ */ jsx("summary", { children: "Run options" });
159
+ $[7] = t4;
160
+ $[8] = t5;
161
+ } else {
162
+ t4 = $[7];
163
+ t5 = $[8];
164
+ }
165
+ let t6;
166
+ if ($[9] !== draft || $[10] !== editing || $[11] !== fieldId || $[12] !== setDraft || $[13] !== visibleParameters) {
167
+ t6 = visibleParameters.length > 0 ? /* @__PURE__ */ jsx(DescriptionList.Root, {
116
168
  align: "start",
117
169
  variant: "divided",
118
- children: visibleParameters.map((parameter) => {
119
- const { name } = parameter;
170
+ children: visibleParameters.map((parameter_0) => {
171
+ const { name } = parameter_0;
120
172
  const id = `${fieldId}-${name}`;
121
- const help = [parameter.description, editing && parameter.required ? "Required." : void 0].filter(Boolean).join(" ");
122
- const href = parameter.type === "string" ? httpUrl(String(editing ? draft[name] ?? parameter.value : parameter.value)) : void 0;
173
+ const help = [parameter_0.description, editing && parameter_0.required ? "Required." : void 0].filter(Boolean).join(" ");
174
+ const href = parameter_0.type === "string" ? httpUrl(String(editing ? draft[name] ?? parameter_0.value : parameter_0.value)) : void 0;
123
175
  return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [
124
- /* @__PURE__ */ jsxs(DescriptionList.Term, { children: [href && !editing ? /* @__PURE__ */ jsx(FaviconMark, { href }) : null, editing && parameter.type !== "boolean" ? /* @__PURE__ */ jsx("label", {
176
+ /* @__PURE__ */ jsxs(DescriptionList.Term, { children: [href && !editing ? /* @__PURE__ */ jsx(Favicon, { href }) : null, editing && parameter_0.type !== "boolean" ? /* @__PURE__ */ jsx("label", {
125
177
  htmlFor: id,
126
- children: parameter.label
178
+ children: parameter_0.label
127
179
  }) : /* @__PURE__ */ jsx("span", {
128
- id: parameter.type === "boolean" ? id : void 0,
129
- children: parameter.label
180
+ id: parameter_0.type === "boolean" ? id : void 0,
181
+ children: parameter_0.label
130
182
  })] }),
131
- /* @__PURE__ */ jsx(DescriptionList.Details, { children: editing && parameter.type === "boolean" ? /* @__PURE__ */ jsx(Checkbox.Root, {
183
+ /* @__PURE__ */ jsx(DescriptionList.Details, { children: editing && parameter_0.type === "boolean" ? /* @__PURE__ */ jsx(Checkbox.Root, {
132
184
  checked: draft[name] === true,
133
185
  indeterminate: draft[name] === void 0,
134
186
  "aria-labelledby": id,
@@ -147,15 +199,15 @@ function RunOptions({ className, draft, parameters, setDraft }) {
147
199
  type: href ? "url" : void 0,
148
200
  value: String(draft[name] ?? ""),
149
201
  autoComplete: "off",
150
- inputMode: parameter.type === "number" ? "decimal" : void 0,
151
- onChange: (event) => {
152
- const { value } = event.currentTarget;
153
- setDraft((current) => ({
154
- ...current,
202
+ inputMode: parameter_0.type === "number" ? "decimal" : void 0,
203
+ onChange: (event_0) => {
204
+ const { value } = event_0.currentTarget;
205
+ setDraft((current_0) => ({
206
+ ...current_0,
155
207
  [name]: value
156
208
  }));
157
209
  }
158
- }) : snapshotValue(parameter) }),
210
+ }) : snapshotValue(parameter_0) }),
159
211
  help ? /* @__PURE__ */ jsx(DescriptionList.Details, {
160
212
  id: `${id}-description`,
161
213
  className: "workspace-automation-field__hint",
@@ -163,22 +215,74 @@ function RunOptions({ className, draft, parameters, setDraft }) {
163
215
  }) : null
164
216
  ] }, name);
165
217
  })
166
- }) : null]
167
- });
218
+ }) : null;
219
+ $[9] = draft;
220
+ $[10] = editing;
221
+ $[11] = fieldId;
222
+ $[12] = setDraft;
223
+ $[13] = visibleParameters;
224
+ $[14] = t6;
225
+ } else t6 = $[14];
226
+ let t7;
227
+ if ($[15] !== children || $[16] !== className || $[17] !== open || $[18] !== t6) {
228
+ t7 = /* @__PURE__ */ jsxs("details", {
229
+ className,
230
+ open,
231
+ onToggle: t4,
232
+ children: [
233
+ t5,
234
+ children,
235
+ t6
236
+ ]
237
+ });
238
+ $[15] = children;
239
+ $[16] = className;
240
+ $[17] = open;
241
+ $[18] = t6;
242
+ $[19] = t7;
243
+ } else t7 = $[19];
244
+ return t7;
168
245
  }
169
- function FileLinks({ files, onOpen }) {
170
- return /* @__PURE__ */ jsx("div", {
171
- className: "sigvelo-cluster",
172
- children: files.map((file) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
173
- value: file.path,
174
- label: file.label,
175
- onOpen: onOpen ? () => onOpen(file.path) : void 0
176
- }, file.path))
177
- });
246
+ function _temp(parameter) {
247
+ return snapshotValue(parameter) !== "";
178
248
  }
179
- function AutomationActions({ busy, canQuickRun, automation, onStop, running, source, stopping }) {
180
- return /* @__PURE__ */ jsxs(Fragment, { children: [
181
- running && source.onStop ? /* @__PURE__ */ jsx(IconButton, {
249
+ function FileLinks(t0) {
250
+ const $ = c(7);
251
+ const { files, onOpen } = t0;
252
+ let t1;
253
+ if ($[0] !== files || $[1] !== onOpen) {
254
+ let t2;
255
+ if ($[3] !== onOpen) {
256
+ t2 = (file) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
257
+ value: file.path,
258
+ label: file.label,
259
+ onOpen: onOpen ? () => onOpen(file.path) : void 0
260
+ }, file.path);
261
+ $[3] = onOpen;
262
+ $[4] = t2;
263
+ } else t2 = $[4];
264
+ t1 = files.map(t2);
265
+ $[0] = files;
266
+ $[1] = onOpen;
267
+ $[2] = t1;
268
+ } else t1 = $[2];
269
+ let t2;
270
+ if ($[5] !== t1) {
271
+ t2 = /* @__PURE__ */ jsx("div", {
272
+ className: "sigvelo-cluster",
273
+ children: t1
274
+ });
275
+ $[5] = t1;
276
+ $[6] = t2;
277
+ } else t2 = $[6];
278
+ return t2;
279
+ }
280
+ function AutomationActions(t0) {
281
+ const $ = c(19);
282
+ const { busy, canQuickRun, automation, onStop, running, source, stopping } = t0;
283
+ let t1;
284
+ if ($[0] !== automation || $[1] !== busy || $[2] !== canQuickRun || $[3] !== onStop || $[4] !== running || $[5] !== source.onRun || $[6] !== source.onStop || $[7] !== stopping) {
285
+ t1 = running && source.onStop ? /* @__PURE__ */ jsx(IconButton, {
182
286
  label: "Stop run",
183
287
  size: "xs",
184
288
  variant: "ghost",
@@ -195,8 +299,20 @@ function AutomationActions({ busy, canQuickRun, automation, onStop, running, sou
195
299
  color: "neutral",
196
300
  disabled: busy,
197
301
  children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
198
- }) : null,
199
- source.onSchedule && !source.onOpen ? /* @__PURE__ */ jsx(IconButton, {
302
+ }) : null;
303
+ $[0] = automation;
304
+ $[1] = busy;
305
+ $[2] = canQuickRun;
306
+ $[3] = onStop;
307
+ $[4] = running;
308
+ $[5] = source.onRun;
309
+ $[6] = source.onStop;
310
+ $[7] = stopping;
311
+ $[8] = t1;
312
+ } else t1 = $[8];
313
+ let t2;
314
+ if ($[9] !== automation || $[10] !== source) {
315
+ t2 = source.onSchedule && !source.onOpen ? /* @__PURE__ */ jsx(IconButton, {
200
316
  label: `Schedule ${automation.name}`,
201
317
  tooltip: "Schedule",
202
318
  size: "xs",
@@ -204,76 +320,201 @@ function AutomationActions({ busy, canQuickRun, automation, onStop, running, sou
204
320
  color: "neutral",
205
321
  onClick: () => source.onSchedule?.(automation.path),
206
322
  children: /* @__PURE__ */ jsx(CalendarIcon, {})
207
- }) : null,
208
- source.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
323
+ }) : null;
324
+ $[9] = automation;
325
+ $[10] = source;
326
+ $[11] = t2;
327
+ } else t2 = $[11];
328
+ let t3;
329
+ if ($[12] !== automation || $[13] !== source) {
330
+ t3 = source.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
209
331
  name: automation.name,
210
332
  onDelete: () => source.onDelete?.(automation.path)
211
- }) : null
212
- ] });
333
+ }) : null;
334
+ $[12] = automation;
335
+ $[13] = source;
336
+ $[14] = t3;
337
+ } else t3 = $[14];
338
+ let t4;
339
+ if ($[15] !== t1 || $[16] !== t2 || $[17] !== t3) {
340
+ t4 = /* @__PURE__ */ jsxs(Fragment, { children: [
341
+ t1,
342
+ t2,
343
+ t3
344
+ ] });
345
+ $[15] = t1;
346
+ $[16] = t2;
347
+ $[17] = t3;
348
+ $[18] = t4;
349
+ } else t4 = $[18];
350
+ return t4;
213
351
  }
214
352
  function automationFormKey(automation) {
215
353
  return `${automation.path}:${JSON.stringify(automation.parameters)}`;
216
354
  }
217
355
  function useAutomationSession(automation, source) {
356
+ const $ = c(41);
218
357
  const { path } = automation;
219
358
  const trace = source.trace?.path === path ? source.trace : void 0;
220
- const mutationKey = [
221
- ...source.queryOptions.queryKey,
222
- "run",
223
- path
224
- ];
225
- const runs = useMutationState({
226
- filters: {
227
- mutationKey,
228
- exact: true
229
- },
230
- select: (mutation) => mutation.state
231
- });
232
- const [draft, setDraft] = React.useState(() => draftFrom(runs.at(-1)?.variables ?? automation.parameters));
233
- const formKey = automationFormKey(automation);
359
+ let t0;
360
+ if ($[0] !== path || $[1] !== source.queryOptions.queryKey) {
361
+ t0 = [
362
+ ...source.queryOptions.queryKey,
363
+ "run",
364
+ path
365
+ ];
366
+ $[0] = path;
367
+ $[1] = source.queryOptions.queryKey;
368
+ $[2] = t0;
369
+ } else t0 = $[2];
370
+ const mutationKey = t0;
371
+ let t1;
372
+ if ($[3] !== mutationKey) {
373
+ t1 = {
374
+ filters: {
375
+ mutationKey,
376
+ exact: true
377
+ },
378
+ select: _temp2
379
+ };
380
+ $[3] = mutationKey;
381
+ $[4] = t1;
382
+ } else t1 = $[4];
383
+ const runs = useMutationState(t1);
384
+ let t2;
385
+ if ($[5] !== automation.parameters || $[6] !== runs) {
386
+ t2 = () => draftFrom(runs.at(-1)?.variables ?? automation.parameters);
387
+ $[5] = automation.parameters;
388
+ $[6] = runs;
389
+ $[7] = t2;
390
+ } else t2 = $[7];
391
+ const [draft, setDraft] = React.useState(t2);
392
+ let t3;
393
+ if ($[8] !== automation) {
394
+ t3 = automationFormKey(automation);
395
+ $[8] = automation;
396
+ $[9] = t3;
397
+ } else t3 = $[9];
398
+ const formKey = t3;
234
399
  const [seenFormKey, setSeenFormKey] = React.useState(formKey);
235
400
  if (formKey !== seenFormKey) {
236
401
  setSeenFormKey(formKey);
237
402
  setDraft(draftFrom(automation.parameters));
238
403
  }
239
- const runMutation = useMutation({
240
- mutationKey,
241
- onMutate: () => trace?.executionId,
242
- mutationFn: async (parameters) => {
404
+ let t4;
405
+ if ($[10] !== trace?.executionId) {
406
+ t4 = () => trace?.executionId;
407
+ $[10] = trace?.executionId;
408
+ $[11] = t4;
409
+ } else t4 = $[11];
410
+ let t5;
411
+ if ($[12] !== path || $[13] !== source) {
412
+ t5 = async (parameters) => {
243
413
  if (!source.onRun) throw new Error("Running is no longer available.");
244
414
  source.onOpen?.(path);
245
- const args = Object.fromEntries(parameters.flatMap(({ name, value }) => value === void 0 ? [] : [[name, value]]));
415
+ const args = Object.fromEntries(parameters.flatMap(_temp3));
246
416
  return source.onRun({
247
417
  path,
248
418
  args
249
419
  });
250
- }
251
- });
252
- const latestRun = runs.at(-1) ?? runMutation;
420
+ };
421
+ $[12] = path;
422
+ $[13] = source;
423
+ $[14] = t5;
424
+ } else t5 = $[14];
425
+ let t6;
426
+ if ($[15] !== mutationKey || $[16] !== t4 || $[17] !== t5) {
427
+ t6 = {
428
+ mutationKey,
429
+ onMutate: t4,
430
+ mutationFn: t5
431
+ };
432
+ $[15] = mutationKey;
433
+ $[16] = t4;
434
+ $[17] = t5;
435
+ $[18] = t6;
436
+ } else t6 = $[18];
437
+ const runMutation = useMutation(t6);
438
+ let t7;
439
+ if ($[19] !== runMutation || $[20] !== runs) {
440
+ t7 = runs.at(-1) ?? runMutation;
441
+ $[19] = runMutation;
442
+ $[20] = runs;
443
+ $[21] = t7;
444
+ } else t7 = $[21];
445
+ const latestRun = t7;
253
446
  const busy = runMutation.isPending || latestRun.status === "pending" || trace?.status === "running";
254
- const stopMutation = useMutation({
255
- onMutate: () => trace?.executionId,
256
- mutationFn: async () => trace ? source.onStop?.(trace.executionId) : void 0
257
- });
447
+ let t8;
448
+ if ($[22] !== trace?.executionId) {
449
+ t8 = () => trace?.executionId;
450
+ $[22] = trace?.executionId;
451
+ $[23] = t8;
452
+ } else t8 = $[23];
453
+ let t9;
454
+ if ($[24] !== source || $[25] !== trace) {
455
+ t9 = async () => trace ? source.onStop?.(trace.executionId) : void 0;
456
+ $[24] = source;
457
+ $[25] = trace;
458
+ $[26] = t9;
459
+ } else t9 = $[26];
460
+ let t10;
461
+ if ($[27] !== t8 || $[28] !== t9) {
462
+ t10 = {
463
+ onMutate: t8,
464
+ mutationFn: t9
465
+ };
466
+ $[27] = t8;
467
+ $[28] = t9;
468
+ $[29] = t10;
469
+ } else t10 = $[29];
470
+ const stopMutation = useMutation(t10);
258
471
  const superseded = trace !== void 0 && latestRun.status !== "pending" && trace.executionId !== latestRun.context && trace.executionId !== latestRun.data?.executionId;
259
472
  const error = (stopMutation.context === trace?.executionId ? stopMutation.error : null) ?? (superseded ? null : latestRun.error);
260
- return {
261
- trace,
262
- draft,
263
- setDraft,
264
- runMutation,
265
- stopMutation,
266
- busy,
267
- errorMessage: error ? executionErrorSummary(formatErrorMessage(error)) : "",
268
- outcome: !superseded && latestRun.status === "success" ? latestRun.data : void 0,
269
- runStatus: latestRun.status
270
- };
473
+ let t11;
474
+ if ($[30] !== error) {
475
+ t11 = error ? executionErrorSummary(formatErrorMessage(error)) : "";
476
+ $[30] = error;
477
+ $[31] = t11;
478
+ } else t11 = $[31];
479
+ const errorMessage = t11;
480
+ const outcome = !superseded && latestRun.status === "success" ? latestRun.data : void 0;
481
+ let t12;
482
+ if ($[32] !== busy || $[33] !== draft || $[34] !== errorMessage || $[35] !== latestRun.status || $[36] !== outcome || $[37] !== runMutation || $[38] !== stopMutation || $[39] !== trace) {
483
+ t12 = {
484
+ trace,
485
+ draft,
486
+ setDraft,
487
+ runMutation,
488
+ stopMutation,
489
+ busy,
490
+ errorMessage,
491
+ outcome,
492
+ runStatus: latestRun.status
493
+ };
494
+ $[32] = busy;
495
+ $[33] = draft;
496
+ $[34] = errorMessage;
497
+ $[35] = latestRun.status;
498
+ $[36] = outcome;
499
+ $[37] = runMutation;
500
+ $[38] = stopMutation;
501
+ $[39] = trace;
502
+ $[40] = t12;
503
+ } else t12 = $[40];
504
+ return t12;
505
+ }
506
+ function _temp3(t0) {
507
+ const { name, value } = t0;
508
+ return value === void 0 ? [] : [[name, value]];
509
+ }
510
+ function _temp2(mutation) {
511
+ return mutation.state;
271
512
  }
272
513
  function automationCardStatus(trace, busy, hasError, hasOutcome) {
273
514
  if (busy) return "Running";
274
- if (hasError) return "Failed";
275
515
  if (trace?.status === "aborted") return "Stopped";
276
516
  if (trace?.status === "interrupted") return "Interrupted";
517
+ if (hasError) return "Failed";
277
518
  return hasOutcome ? "Completed" : void 0;
278
519
  }
279
520
  /** What a card shows under its name, or null when it has nothing to show. */
@@ -297,9 +538,22 @@ function automationCardDetail(automation, { onOpen, onRun }, { trace, busy, erro
297
538
  meta
298
539
  } : null;
299
540
  }
300
- function AutomationCardDetail({ completed, error, apps, status, file, result, options, meta, automation, session: { busy, draft, setDraft }, onOpen }) {
301
- return /* @__PURE__ */ jsxs(Fragment, { children: [
302
- meta ? /* @__PURE__ */ jsxs("div", {
541
+ function AutomationCardDetail(t0) {
542
+ const $ = c(25);
543
+ const { completed, error, apps, status, file, result, options, meta, automation, session: t1, onOpen } = t0;
544
+ const { busy, draft, setDraft } = t1;
545
+ let t2;
546
+ if ($[0] !== busy || $[1] !== completed || $[2] !== error) {
547
+ t2 = busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : completed && !error ? /* @__PURE__ */ jsx(CheckIcon, {}) : null;
548
+ $[0] = busy;
549
+ $[1] = completed;
550
+ $[2] = error;
551
+ $[3] = t2;
552
+ } else t2 = $[3];
553
+ const mark = t2;
554
+ let t3;
555
+ if ($[4] !== apps || $[5] !== file || $[6] !== mark || $[7] !== meta || $[8] !== onOpen || $[9] !== status) {
556
+ t3 = meta ? /* @__PURE__ */ jsxs("div", {
303
557
  className: "workspace-automation-card__meta",
304
558
  children: [
305
559
  /* @__PURE__ */ jsx(AutomationApps, {
@@ -310,81 +564,256 @@ function AutomationCardDetail({ completed, error, apps, status, file, result, op
310
564
  className: "workspace-automation-status",
311
565
  role: "status",
312
566
  "aria-atomic": "true",
313
- children: [busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : completed && !error ? /* @__PURE__ */ jsx(CheckIcon, {}) : null, status]
567
+ children: [mark, status]
314
568
  }) : null,
315
569
  file ? /* @__PURE__ */ jsx(FileLinks, {
316
570
  files: [file],
317
571
  onOpen
318
572
  }) : null
319
573
  ]
320
- }) : null,
321
- result != null ? /* @__PURE__ */ jsx("p", {
574
+ }) : null;
575
+ $[4] = apps;
576
+ $[5] = file;
577
+ $[6] = mark;
578
+ $[7] = meta;
579
+ $[8] = onOpen;
580
+ $[9] = status;
581
+ $[10] = t3;
582
+ } else t3 = $[10];
583
+ let t4;
584
+ if ($[11] !== result) {
585
+ t4 = result != null ? /* @__PURE__ */ jsx("p", {
322
586
  className: "workspace-automation-card__summary sigvelo-truncate",
323
587
  children: firstLine(executionResultSummary(result))
324
- }) : null,
325
- options ? /* @__PURE__ */ jsx(RunOptions, {
588
+ }) : null;
589
+ $[11] = result;
590
+ $[12] = t4;
591
+ } else t4 = $[12];
592
+ let t5;
593
+ if ($[13] !== automation || $[14] !== draft || $[15] !== options || $[16] !== setDraft) {
594
+ t5 = options ? /* @__PURE__ */ jsx(RunOptions, {
326
595
  className: "workspace-automation-card__options",
327
596
  draft,
328
597
  parameters: automation.parameters,
329
598
  setDraft
330
- }, automationFormKey(automation)) : null,
331
- error ? /* @__PURE__ */ jsx(Field.Errors, { errors: [error] }) : null
332
- ] });
599
+ }, automationFormKey(automation)) : null;
600
+ $[13] = automation;
601
+ $[14] = draft;
602
+ $[15] = options;
603
+ $[16] = setDraft;
604
+ $[17] = t5;
605
+ } else t5 = $[17];
606
+ let t6;
607
+ if ($[18] !== error) {
608
+ t6 = error ? /* @__PURE__ */ jsx(Field.Errors, { errors: [error] }) : null;
609
+ $[18] = error;
610
+ $[19] = t6;
611
+ } else t6 = $[19];
612
+ let t7;
613
+ if ($[20] !== t3 || $[21] !== t4 || $[22] !== t5 || $[23] !== t6) {
614
+ t7 = /* @__PURE__ */ jsxs(Fragment, { children: [
615
+ t3,
616
+ t4,
617
+ t5,
618
+ t6
619
+ ] });
620
+ $[20] = t3;
621
+ $[21] = t4;
622
+ $[22] = t5;
623
+ $[23] = t6;
624
+ $[24] = t7;
625
+ } else t7 = $[24];
626
+ return t7;
333
627
  }
334
628
  /**
335
629
  * Library and inline card. The name opens the workbench; without one the card
336
630
  * runs in place, with its inputs folded under Run options.
337
631
  */
338
- function AutomationCard({ className, automation, source, ...props }) {
632
+ function AutomationCard(t0) {
633
+ const $ = c(52);
634
+ let automation;
635
+ let className;
636
+ let props;
637
+ let source;
638
+ if ($[0] !== t0) {
639
+ ({className, automation, source, ...props} = t0);
640
+ $[0] = t0;
641
+ $[1] = automation;
642
+ $[2] = className;
643
+ $[3] = props;
644
+ $[4] = source;
645
+ } else {
646
+ automation = $[1];
647
+ className = $[2];
648
+ props = $[3];
649
+ source = $[4];
650
+ }
339
651
  const session = useAutomationSession(automation, source);
340
652
  const { trace, draft, runMutation, stopMutation, busy } = session;
341
653
  const { onOpen, onRun } = source;
342
- const detail = automationCardDetail(automation, source, session);
343
- const card = /* @__PURE__ */ jsx(WorkspaceEntityCard, {
344
- ...props,
345
- "data-slot": "workspace-automation-card",
346
- className: cx("workspace-automation-card", className),
347
- icon: automation.icon ?? /* @__PURE__ */ jsx(QueueIcon, {}),
348
- name: automation.name,
349
- onOpen: onOpen ? () => onOpen(automation.path) : void 0,
350
- meta: automation.description,
351
- actions: /* @__PURE__ */ jsx(AutomationActions, {
654
+ let t1;
655
+ if ($[5] !== automation || $[6] !== session || $[7] !== source) {
656
+ t1 = automationCardDetail(automation, source, session);
657
+ $[5] = automation;
658
+ $[6] = session;
659
+ $[7] = source;
660
+ $[8] = t1;
661
+ } else t1 = $[8];
662
+ const detail = t1;
663
+ let t2;
664
+ if ($[9] !== className) {
665
+ t2 = cx("workspace-automation-card", className);
666
+ $[9] = className;
667
+ $[10] = t2;
668
+ } else t2 = $[10];
669
+ let t3;
670
+ if ($[11] !== automation.icon) {
671
+ t3 = automation.icon ?? /* @__PURE__ */ jsx(QueueIcon, {});
672
+ $[11] = automation.icon;
673
+ $[12] = t3;
674
+ } else t3 = $[12];
675
+ let t4;
676
+ if ($[13] !== automation.path || $[14] !== onOpen) {
677
+ t4 = onOpen ? () => onOpen(automation.path) : void 0;
678
+ $[13] = automation.path;
679
+ $[14] = onOpen;
680
+ $[15] = t4;
681
+ } else t4 = $[15];
682
+ let t5;
683
+ if ($[16] !== automation.parameters || $[17] !== draft || $[18] !== onOpen) {
684
+ t5 = !onOpen || !missingRequiredInput(automation.parameters, draft);
685
+ $[16] = automation.parameters;
686
+ $[17] = draft;
687
+ $[18] = onOpen;
688
+ $[19] = t5;
689
+ } else t5 = $[19];
690
+ let t6;
691
+ if ($[20] !== stopMutation) {
692
+ t6 = () => stopMutation.mutate();
693
+ $[20] = stopMutation;
694
+ $[21] = t6;
695
+ } else t6 = $[21];
696
+ const t7 = trace?.status === "running";
697
+ let t8;
698
+ if ($[22] !== automation || $[23] !== busy || $[24] !== source || $[25] !== stopMutation.isPending || $[26] !== t5 || $[27] !== t6 || $[28] !== t7) {
699
+ t8 = /* @__PURE__ */ jsx(AutomationActions, {
352
700
  busy,
353
- canQuickRun: !onOpen || !missingRequiredInput(automation.parameters, draft),
701
+ canQuickRun: t5,
354
702
  automation,
355
- onStop: () => stopMutation.mutate(),
356
- running: trace?.status === "running",
703
+ onStop: t6,
704
+ running: t7,
357
705
  source,
358
706
  stopping: stopMutation.isPending
359
- }),
360
- detail: detail ? /* @__PURE__ */ jsx(AutomationCardDetail, {
707
+ });
708
+ $[22] = automation;
709
+ $[23] = busy;
710
+ $[24] = source;
711
+ $[25] = stopMutation.isPending;
712
+ $[26] = t5;
713
+ $[27] = t6;
714
+ $[28] = t7;
715
+ $[29] = t8;
716
+ } else t8 = $[29];
717
+ let t9;
718
+ if ($[30] !== automation || $[31] !== detail || $[32] !== onOpen || $[33] !== session) {
719
+ t9 = detail ? /* @__PURE__ */ jsx(AutomationCardDetail, {
361
720
  ...detail,
362
721
  automation,
363
722
  session,
364
723
  onOpen
365
- }) : void 0
366
- });
367
- return onRun ? /* @__PURE__ */ jsx(Form, {
368
- noValidate: true,
369
- onSubmit: (event) => {
370
- event.preventDefault();
371
- if (!busy) {
372
- stopMutation.reset();
373
- runMutation.mutate(collectRunParameters(automation.parameters, draft));
374
- }
375
- },
376
- children: card
377
- }) : card;
724
+ }) : void 0;
725
+ $[30] = automation;
726
+ $[31] = detail;
727
+ $[32] = onOpen;
728
+ $[33] = session;
729
+ $[34] = t9;
730
+ } else t9 = $[34];
731
+ let t10;
732
+ if ($[35] !== automation.description || $[36] !== automation.name || $[37] !== props || $[38] !== t2 || $[39] !== t3 || $[40] !== t4 || $[41] !== t8 || $[42] !== t9) {
733
+ t10 = /* @__PURE__ */ jsx(WorkspaceEntityCard, {
734
+ ...props,
735
+ "data-slot": "workspace-automation-card",
736
+ className: t2,
737
+ icon: t3,
738
+ name: automation.name,
739
+ onOpen: t4,
740
+ meta: automation.description,
741
+ actions: t8,
742
+ detail: t9
743
+ });
744
+ $[35] = automation.description;
745
+ $[36] = automation.name;
746
+ $[37] = props;
747
+ $[38] = t2;
748
+ $[39] = t3;
749
+ $[40] = t4;
750
+ $[41] = t8;
751
+ $[42] = t9;
752
+ $[43] = t10;
753
+ } else t10 = $[43];
754
+ const card = t10;
755
+ let t11;
756
+ if ($[44] !== automation.parameters || $[45] !== busy || $[46] !== card || $[47] !== draft || $[48] !== onRun || $[49] !== runMutation || $[50] !== stopMutation) {
757
+ t11 = onRun ? /* @__PURE__ */ jsx(Form, {
758
+ noValidate: true,
759
+ onSubmit: (event) => {
760
+ event.preventDefault();
761
+ if (!busy) {
762
+ stopMutation.reset();
763
+ runMutation.mutate(collectRunParameters(automation.parameters, draft));
764
+ }
765
+ },
766
+ children: card
767
+ }) : card;
768
+ $[44] = automation.parameters;
769
+ $[45] = busy;
770
+ $[46] = card;
771
+ $[47] = draft;
772
+ $[48] = onRun;
773
+ $[49] = runMutation;
774
+ $[50] = stopMutation;
775
+ $[51] = t11;
776
+ } else t11 = $[51];
777
+ return t11;
378
778
  }
379
779
  /** Compact inline card for one queried automation. */
380
- function WorkspaceAutomationFile({ fallback = null, path, source, ...props }) {
780
+ function WorkspaceAutomationFile(t0) {
781
+ const $ = c(11);
782
+ let path;
783
+ let props;
784
+ let source;
785
+ let t1;
786
+ if ($[0] !== t0) {
787
+ ({fallback: t1, path, source, ...props} = t0);
788
+ $[0] = t0;
789
+ $[1] = path;
790
+ $[2] = props;
791
+ $[3] = source;
792
+ $[4] = t1;
793
+ } else {
794
+ path = $[1];
795
+ props = $[2];
796
+ source = $[3];
797
+ t1 = $[4];
798
+ }
799
+ const fallback = t1 === void 0 ? null : t1;
381
800
  const automation = useConceptEntry(source, path);
382
- return automation ? /* @__PURE__ */ createElement(AutomationCard, {
383
- ...props,
384
- key: `${hashKey(source.queryOptions.queryKey)}:${path}`,
385
- automation,
386
- source
387
- }) : fallback;
801
+ let t2;
802
+ if ($[5] !== automation || $[6] !== fallback || $[7] !== path || $[8] !== props || $[9] !== source) {
803
+ t2 = automation ? /* @__PURE__ */ createElement(AutomationCard, {
804
+ ...props,
805
+ key: `${hashKey(source.queryOptions.queryKey)}:${path}`,
806
+ automation,
807
+ source
808
+ }) : fallback;
809
+ $[5] = automation;
810
+ $[6] = fallback;
811
+ $[7] = path;
812
+ $[8] = props;
813
+ $[9] = source;
814
+ $[10] = t2;
815
+ } else t2 = $[10];
816
+ return t2;
388
817
  }
389
818
  /**
390
819
  * The library's entries: saved automations, plus the live table run and the
@@ -459,222 +888,677 @@ function selectedEntry(entries, source, selectedPath, selectedTrace) {
459
888
  * automation. A query failure with nothing loaded is an error, never an empty
460
889
  * library.
461
890
  */
462
- function WorkspaceAutomationsPanel({ className, source, selectedPath, selectedTrace, selectedGraph, onBack, ref, ...props }) {
463
- const entries = automationEntries(useQuery(source.queryOptions).data ?? [], source);
464
- const selected = selectedEntry(entries, source, selectedPath, selectedTrace);
891
+ function WorkspaceAutomationsPanel(t0) {
892
+ const $ = c(50);
893
+ let className;
894
+ let onBack;
895
+ let props;
896
+ let ref;
897
+ let selectedGraph;
898
+ let selectedPath;
899
+ let selectedTrace;
900
+ let source;
901
+ if ($[0] !== t0) {
902
+ ({className, source, selectedPath, selectedTrace, selectedGraph, onBack, ref, ...props} = t0);
903
+ $[0] = t0;
904
+ $[1] = className;
905
+ $[2] = onBack;
906
+ $[3] = props;
907
+ $[4] = ref;
908
+ $[5] = selectedGraph;
909
+ $[6] = selectedPath;
910
+ $[7] = selectedTrace;
911
+ $[8] = source;
912
+ } else {
913
+ className = $[1];
914
+ onBack = $[2];
915
+ props = $[3];
916
+ ref = $[4];
917
+ selectedGraph = $[5];
918
+ selectedPath = $[6];
919
+ selectedTrace = $[7];
920
+ source = $[8];
921
+ }
922
+ const query = useQuery(source.queryOptions);
923
+ let entries;
924
+ let t1;
925
+ if ($[9] !== query.data || $[10] !== selectedPath || $[11] !== selectedTrace || $[12] !== source) {
926
+ let t2;
927
+ if ($[15] !== query.data) {
928
+ t2 = query.data ?? [];
929
+ $[15] = query.data;
930
+ $[16] = t2;
931
+ } else t2 = $[16];
932
+ entries = automationEntries(t2, source);
933
+ t1 = selectedEntry(entries, source, selectedPath, selectedTrace);
934
+ $[9] = query.data;
935
+ $[10] = selectedPath;
936
+ $[11] = selectedTrace;
937
+ $[12] = source;
938
+ $[13] = entries;
939
+ $[14] = t1;
940
+ } else {
941
+ entries = $[13];
942
+ t1 = $[14];
943
+ }
944
+ const selected = t1;
465
945
  const panelRef = React.useRef(null);
466
946
  const focusedControl = React.useRef(null);
467
- const sourceKey = hashKey(source.queryOptions.queryKey);
947
+ let t2;
948
+ if ($[17] !== source.queryOptions.queryKey) {
949
+ t2 = hashKey(source.queryOptions.queryKey);
950
+ $[17] = source.queryOptions.queryKey;
951
+ $[18] = t2;
952
+ } else t2 = $[18];
953
+ const sourceKey = t2;
468
954
  const selectionKey = `${sourceKey}:${selectedPath ?? selected?.automation.path ?? ""}`;
469
- React.useLayoutEffect(() => {
470
- const previous = focusedControl.current;
471
- if (!previous || previous.isConnected) return;
472
- focusedControl.current = null;
473
- if (document.activeElement === document.body) panelRef.current?.focus({ preventScroll: true });
474
- }, [selectionKey]);
475
- const mergedPanelRef = React.useMemo(() => mergeRefs(ref, panelRef), [ref]);
476
- const panelProps = {
477
- ...props,
478
- ref: mergedPanelRef,
479
- tabIndex: props.tabIndex ?? -1,
480
- onFocusCapture: (event) => {
955
+ let t3;
956
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
957
+ t3 = () => {
958
+ const previous = focusedControl.current;
959
+ if (!previous || previous.isConnected) return;
960
+ focusedControl.current = null;
961
+ if (document.activeElement === document.body) panelRef.current?.focus({ preventScroll: true });
962
+ };
963
+ $[19] = t3;
964
+ } else t3 = $[19];
965
+ let t4;
966
+ if ($[20] !== selectionKey) {
967
+ t4 = [selectionKey];
968
+ $[20] = selectionKey;
969
+ $[21] = t4;
970
+ } else t4 = $[21];
971
+ React.useLayoutEffect(t3, t4);
972
+ const attachPanel = useMergedRefs(ref, panelRef);
973
+ const t5 = props.tabIndex ?? -1;
974
+ let t6;
975
+ let t7;
976
+ if ($[22] !== props) {
977
+ t6 = (event) => {
481
978
  focusedControl.current = event.target;
482
979
  props.onFocusCapture?.(event);
483
- },
484
- onBlurCapture: (event) => {
980
+ };
981
+ t7 = (event_0) => {
485
982
  focusedControl.current = null;
486
- props.onBlurCapture?.(event);
487
- }
488
- };
489
- if (selected) return /* @__PURE__ */ createElement(WorkspaceAutomationWorkbench, {
490
- ...panelProps,
491
- key: selectionKey,
492
- className,
493
- automation: {
494
- ...selected.automation,
495
- graph: selectedGraph ?? selected.automation.graph
496
- },
497
- source: selected.source,
498
- onBack
499
- });
500
- return /* @__PURE__ */ jsx(WorkspaceConceptPanel, {
501
- "data-slot": "workspace-automations-panel",
502
- className,
503
- ...panelProps,
504
- item: automationsWorkbenchItem,
505
- emptyDescription: "Ask your assistant to save an automation to find it here.",
506
- queryOptions: source.queryOptions,
507
- children: () => entries.map((entry) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(AutomationCard, {
508
- flat: true,
509
- ...entry
510
- }) }, entry.automation.path))
511
- }, sourceKey);
512
- }
513
- function WorkbenchResult({ trace, runnable, graph, busy, completed, errorMessage }) {
514
- if (completed) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
515
- className: "workspace-automation-status",
516
- children: [/* @__PURE__ */ jsx(CheckIcon, {}), busy ? "Previous result" : "Completed"]
517
- }), /* @__PURE__ */ jsx(ExecutionResult, { result: completed.result })] });
518
- const traceError = trace?.error ? executionErrorSummary(trace.error) : "";
519
- if (errorMessage || traceError) return /* @__PURE__ */ jsx(EmptyState, {
520
- icon: /* @__PURE__ */ jsx(InfoIcon, {}),
521
- title: "This run could not finish",
522
- description: traceError || errorMessage
523
- });
524
- if (trace?.status === "aborted" || trace?.status === "interrupted") return /* @__PURE__ */ jsx(EmptyState, {
525
- icon: /* @__PURE__ */ jsx(StopIcon, {}),
526
- title: trace.status === "aborted" ? "Run stopped" : "Run interrupted"
527
- });
528
- if (!graph && !runnable) return /* @__PURE__ */ jsx(EmptyState, {
529
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
530
- title: "Loading automation"
531
- });
532
- return busy ? /* @__PURE__ */ jsx(EmptyState, {
533
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
534
- title: "Running automation",
535
- description: "Follow the run in Steps."
536
- }) : /* @__PURE__ */ jsx(EmptyState, {
537
- icon: /* @__PURE__ */ jsx(PlayIcon, {}),
538
- title: "Not run yet",
539
- description: "Run this automation to see its results here."
540
- });
983
+ props.onBlurCapture?.(event_0);
984
+ };
985
+ $[22] = props;
986
+ $[23] = t6;
987
+ $[24] = t7;
988
+ } else {
989
+ t6 = $[23];
990
+ t7 = $[24];
991
+ }
992
+ let t8;
993
+ if ($[25] !== props || $[26] !== t5 || $[27] !== t6 || $[28] !== t7) {
994
+ t8 = {
995
+ ...props,
996
+ tabIndex: t5,
997
+ onFocusCapture: t6,
998
+ onBlurCapture: t7
999
+ };
1000
+ $[25] = props;
1001
+ $[26] = t5;
1002
+ $[27] = t6;
1003
+ $[28] = t7;
1004
+ $[29] = t8;
1005
+ } else t8 = $[29];
1006
+ const panelProps = t8;
1007
+ if (selected) {
1008
+ const t9 = selectedGraph ?? selected.automation.graph;
1009
+ let t10;
1010
+ if ($[30] !== selected.automation || $[31] !== t9) {
1011
+ t10 = {
1012
+ ...selected.automation,
1013
+ graph: t9
1014
+ };
1015
+ $[30] = selected.automation;
1016
+ $[31] = t9;
1017
+ $[32] = t10;
1018
+ } else t10 = $[32];
1019
+ let t11;
1020
+ if ($[33] !== attachPanel || $[34] !== className || $[35] !== onBack || $[36] !== panelProps || $[37] !== selected.source || $[38] !== selectionKey || $[39] !== t10) {
1021
+ t11 = /* @__PURE__ */ createElement(WorkspaceAutomationWorkbench, {
1022
+ ...panelProps,
1023
+ ref: attachPanel,
1024
+ key: selectionKey,
1025
+ className,
1026
+ automation: t10,
1027
+ source: selected.source,
1028
+ onBack
1029
+ });
1030
+ $[33] = attachPanel;
1031
+ $[34] = className;
1032
+ $[35] = onBack;
1033
+ $[36] = panelProps;
1034
+ $[37] = selected.source;
1035
+ $[38] = selectionKey;
1036
+ $[39] = t10;
1037
+ $[40] = t11;
1038
+ } else t11 = $[40];
1039
+ return t11;
1040
+ }
1041
+ let t9;
1042
+ if ($[41] !== entries) {
1043
+ t9 = () => entries.map(_temp4);
1044
+ $[41] = entries;
1045
+ $[42] = t9;
1046
+ } else t9 = $[42];
1047
+ let t10;
1048
+ if ($[43] !== attachPanel || $[44] !== className || $[45] !== panelProps || $[46] !== source.queryOptions || $[47] !== sourceKey || $[48] !== t9) {
1049
+ t10 = /* @__PURE__ */ jsx(WorkspaceConceptPanel, {
1050
+ "data-slot": "workspace-automations-panel",
1051
+ className,
1052
+ ...panelProps,
1053
+ ref: attachPanel,
1054
+ item: automationsWorkbenchItem,
1055
+ emptyDescription: "Ask your assistant to save an automation to find it here.",
1056
+ queryOptions: source.queryOptions,
1057
+ children: t9
1058
+ }, sourceKey);
1059
+ $[43] = attachPanel;
1060
+ $[44] = className;
1061
+ $[45] = panelProps;
1062
+ $[46] = source.queryOptions;
1063
+ $[47] = sourceKey;
1064
+ $[48] = t9;
1065
+ $[49] = t10;
1066
+ } else t10 = $[49];
1067
+ return t10;
541
1068
  }
542
- function WorkbenchRunAction({ automation, source, running, tableMode, busy, stopping, onStop, formId }) {
1069
+ function _temp4(entry) {
1070
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(AutomationCard, {
1071
+ flat: true,
1072
+ ...entry
1073
+ }) }, entry.automation.path);
1074
+ }
1075
+ function WorkbenchResult(t0) {
1076
+ const $ = c(18);
1077
+ const { trace, runnable, graph, busy, completed, errorMessage } = t0;
1078
+ if (completed) {
1079
+ let t1;
1080
+ if ($[0] !== busy) {
1081
+ t1 = busy ? /* @__PURE__ */ jsxs("p", {
1082
+ className: "workspace-automation-status",
1083
+ children: [/* @__PURE__ */ jsx(CheckIcon, {}), "Previous result"]
1084
+ }) : null;
1085
+ $[0] = busy;
1086
+ $[1] = t1;
1087
+ } else t1 = $[1];
1088
+ let t2;
1089
+ if ($[2] !== completed.result) {
1090
+ t2 = /* @__PURE__ */ jsx(ExecutionResult, { result: completed.result });
1091
+ $[2] = completed.result;
1092
+ $[3] = t2;
1093
+ } else t2 = $[3];
1094
+ let t3;
1095
+ if ($[4] !== t1 || $[5] !== t2) {
1096
+ t3 = /* @__PURE__ */ jsxs(Fragment, { children: [t1, t2] });
1097
+ $[4] = t1;
1098
+ $[5] = t2;
1099
+ $[6] = t3;
1100
+ } else t3 = $[6];
1101
+ return t3;
1102
+ }
1103
+ let t1;
1104
+ if ($[7] !== trace) {
1105
+ t1 = trace?.error ? executionErrorSummary(trace.error) : "";
1106
+ $[7] = trace;
1107
+ $[8] = t1;
1108
+ } else t1 = $[8];
1109
+ const traceError = t1;
1110
+ if (errorMessage || traceError) {
1111
+ let t2;
1112
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
1113
+ t2 = /* @__PURE__ */ jsx(InfoIcon, {});
1114
+ $[9] = t2;
1115
+ } else t2 = $[9];
1116
+ const t3 = traceError || errorMessage;
1117
+ let t4;
1118
+ if ($[10] !== t3) {
1119
+ t4 = /* @__PURE__ */ jsx(EmptyState, {
1120
+ icon: t2,
1121
+ title: "This run could not finish",
1122
+ description: t3
1123
+ });
1124
+ $[10] = t3;
1125
+ $[11] = t4;
1126
+ } else t4 = $[11];
1127
+ return t4;
1128
+ }
1129
+ if (trace?.status === "aborted" || trace?.status === "interrupted") {
1130
+ let t2;
1131
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1132
+ t2 = /* @__PURE__ */ jsx(StopIcon, {});
1133
+ $[12] = t2;
1134
+ } else t2 = $[12];
1135
+ const t3 = trace.status === "aborted" ? "Run stopped" : "Run interrupted";
1136
+ let t4;
1137
+ if ($[13] !== t3) {
1138
+ t4 = /* @__PURE__ */ jsx(EmptyState, {
1139
+ icon: t2,
1140
+ title: t3
1141
+ });
1142
+ $[13] = t3;
1143
+ $[14] = t4;
1144
+ } else t4 = $[14];
1145
+ return t4;
1146
+ }
1147
+ if (!graph && !runnable) {
1148
+ let t2;
1149
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1150
+ t2 = /* @__PURE__ */ jsx(EmptyState, {
1151
+ icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
1152
+ title: "Loading automation"
1153
+ });
1154
+ $[15] = t2;
1155
+ } else t2 = $[15];
1156
+ return t2;
1157
+ }
1158
+ let t2;
1159
+ if ($[16] !== busy) {
1160
+ t2 = busy ? /* @__PURE__ */ jsx(EmptyState, {
1161
+ icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
1162
+ title: "Running automation",
1163
+ description: "Follow the run in Steps."
1164
+ }) : /* @__PURE__ */ jsx(EmptyState, {
1165
+ icon: /* @__PURE__ */ jsx(PlayIcon, {}),
1166
+ title: "Not run yet",
1167
+ description: "Run this automation to see its results here."
1168
+ });
1169
+ $[16] = busy;
1170
+ $[17] = t2;
1171
+ } else t2 = $[17];
1172
+ return t2;
1173
+ }
1174
+ function WorkbenchRunAction(t0) {
1175
+ const $ = c(13);
1176
+ const { automation, source, running, tableMode, busy, stopping, onStop, formId } = t0;
543
1177
  if (tableMode) return null;
544
- if (running && source.onStop) return /* @__PURE__ */ jsx(AppTopBar.Button, {
545
- label: "Stop run",
546
- onClick: onStop,
547
- disabled: stopping,
548
- children: stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {})
549
- });
1178
+ if (running && source.onStop) {
1179
+ let t1;
1180
+ if ($[0] !== stopping) {
1181
+ t1 = stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {});
1182
+ $[0] = stopping;
1183
+ $[1] = t1;
1184
+ } else t1 = $[1];
1185
+ let t2;
1186
+ if ($[2] !== onStop || $[3] !== stopping || $[4] !== t1) {
1187
+ t2 = /* @__PURE__ */ jsx(AppTopBar.Button, {
1188
+ label: "Stop run",
1189
+ onClick: onStop,
1190
+ disabled: stopping,
1191
+ children: t1
1192
+ });
1193
+ $[2] = onStop;
1194
+ $[3] = stopping;
1195
+ $[4] = t1;
1196
+ $[5] = t2;
1197
+ } else t2 = $[5];
1198
+ return t2;
1199
+ }
550
1200
  if (!source.onRun) return null;
551
- return /* @__PURE__ */ jsx(AppTopBar.Button, {
552
- type: "submit",
553
- form: formId,
554
- label: `Run now: ${automation.name}`,
555
- disabled: busy,
556
- children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
557
- });
1201
+ const t1 = `Run now: ${automation.name}`;
1202
+ let t2;
1203
+ if ($[6] !== busy) {
1204
+ t2 = busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {});
1205
+ $[6] = busy;
1206
+ $[7] = t2;
1207
+ } else t2 = $[7];
1208
+ let t3;
1209
+ if ($[8] !== busy || $[9] !== formId || $[10] !== t1 || $[11] !== t2) {
1210
+ t3 = /* @__PURE__ */ jsxs(Button, {
1211
+ size: "sm",
1212
+ color: "neutral",
1213
+ type: "submit",
1214
+ form: formId,
1215
+ "aria-label": t1,
1216
+ disabled: busy,
1217
+ children: [t2, "Run"]
1218
+ });
1219
+ $[8] = busy;
1220
+ $[9] = formId;
1221
+ $[10] = t1;
1222
+ $[11] = t2;
1223
+ $[12] = t3;
1224
+ } else t3 = $[12];
1225
+ return t3;
558
1226
  }
559
- function WorkbenchHeader({ automation, source, running, tableRunning, onBack, tableMode, onToggleTable, busy, stopping, onStop, formId }) {
560
- return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
561
- label: "Automation controls",
562
- className: "workspace-concept-panel__header",
563
- title: automation.name,
564
- titleRender: (props) => /* @__PURE__ */ jsx("h2", {
565
- ...props,
566
- children: props.children
567
- }),
568
- leading: onBack ? /* @__PURE__ */ jsx(AppTopBar.Button, {
1227
+ function WorkbenchHeader(t0) {
1228
+ const $ = c(35);
1229
+ const { automation, source, running, tableRunning, onBack, tableMode, onToggleTable, busy, stopping, onStop, formId } = t0;
1230
+ let t1;
1231
+ if ($[0] !== onBack) {
1232
+ t1 = onBack ? /* @__PURE__ */ jsx(AppTopBar.Button, {
569
1233
  label: "Back to automations",
570
1234
  onClick: onBack,
571
1235
  children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
572
- }) : void 0,
573
- actions: /* @__PURE__ */ jsxs(Fragment, { children: [
574
- source.onRunTable ? /* @__PURE__ */ jsx(AppTopBar.Button, {
575
- label: tableMode ? "Single run" : "Run on a table",
576
- disabled: busy || tableRunning,
577
- onClick: onToggleTable,
578
- children: /* @__PURE__ */ jsx(QueueIcon, {})
579
- }) : null,
580
- source.onSchedule && !tableMode ? /* @__PURE__ */ jsx(AppTopBar.Button, {
581
- label: `Schedule ${automation.name}`,
582
- onClick: () => source.onSchedule?.(automation.path),
583
- children: /* @__PURE__ */ jsx(CalendarIcon, {})
584
- }) : null,
585
- /* @__PURE__ */ jsx(WorkbenchRunAction, {
586
- automation,
587
- source,
588
- running,
589
- tableMode,
590
- busy,
591
- stopping,
592
- onStop,
593
- formId
594
- })
595
- ] })
1236
+ }) : void 0;
1237
+ $[0] = onBack;
1238
+ $[1] = t1;
1239
+ } else t1 = $[1];
1240
+ let t2;
1241
+ if ($[2] !== automation.description || $[3] !== automation.name || $[4] !== automation.parameters) {
1242
+ t2 = automation.description && automation.parameters.length === 0 ? /* @__PURE__ */ jsx(AppTopBar.Button, {
1243
+ label: `About ${automation.name}`,
1244
+ tooltip: automation.description,
1245
+ children: /* @__PURE__ */ jsx(InfoIcon, {})
1246
+ }) : null;
1247
+ $[2] = automation.description;
1248
+ $[3] = automation.name;
1249
+ $[4] = automation.parameters;
1250
+ $[5] = t2;
1251
+ } else t2 = $[5];
1252
+ let t3;
1253
+ if ($[6] !== busy || $[7] !== onToggleTable || $[8] !== source.onRunTable || $[9] !== tableMode || $[10] !== tableRunning) {
1254
+ t3 = source.onRunTable ? /* @__PURE__ */ jsx(AppTopBar.Button, {
1255
+ label: tableMode ? "Single run" : "Run on a table",
1256
+ disabled: busy || tableRunning,
1257
+ onClick: onToggleTable,
1258
+ children: /* @__PURE__ */ jsx(QueueIcon, {})
1259
+ }) : null;
1260
+ $[6] = busy;
1261
+ $[7] = onToggleTable;
1262
+ $[8] = source.onRunTable;
1263
+ $[9] = tableMode;
1264
+ $[10] = tableRunning;
1265
+ $[11] = t3;
1266
+ } else t3 = $[11];
1267
+ let t4;
1268
+ if ($[12] !== automation.name || $[13] !== automation.path || $[14] !== source || $[15] !== tableMode) {
1269
+ t4 = source.onSchedule && !tableMode ? /* @__PURE__ */ jsx(AppTopBar.Button, {
1270
+ label: `Schedule ${automation.name}`,
1271
+ onClick: () => source.onSchedule?.(automation.path),
1272
+ children: /* @__PURE__ */ jsx(CalendarIcon, {})
1273
+ }) : null;
1274
+ $[12] = automation.name;
1275
+ $[13] = automation.path;
1276
+ $[14] = source;
1277
+ $[15] = tableMode;
1278
+ $[16] = t4;
1279
+ } else t4 = $[16];
1280
+ let t5;
1281
+ if ($[17] !== automation || $[18] !== busy || $[19] !== formId || $[20] !== onStop || $[21] !== running || $[22] !== source || $[23] !== stopping || $[24] !== tableMode) {
1282
+ t5 = /* @__PURE__ */ jsx(WorkbenchRunAction, {
1283
+ automation,
1284
+ source,
1285
+ running,
1286
+ tableMode,
1287
+ busy,
1288
+ stopping,
1289
+ onStop,
1290
+ formId
1291
+ });
1292
+ $[17] = automation;
1293
+ $[18] = busy;
1294
+ $[19] = formId;
1295
+ $[20] = onStop;
1296
+ $[21] = running;
1297
+ $[22] = source;
1298
+ $[23] = stopping;
1299
+ $[24] = tableMode;
1300
+ $[25] = t5;
1301
+ } else t5 = $[25];
1302
+ let t6;
1303
+ if ($[26] !== t2 || $[27] !== t3 || $[28] !== t4 || $[29] !== t5) {
1304
+ t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
1305
+ t2,
1306
+ t3,
1307
+ t4,
1308
+ t5
1309
+ ] });
1310
+ $[26] = t2;
1311
+ $[27] = t3;
1312
+ $[28] = t4;
1313
+ $[29] = t5;
1314
+ $[30] = t6;
1315
+ } else t6 = $[30];
1316
+ let t7;
1317
+ if ($[31] !== automation.name || $[32] !== t1 || $[33] !== t6) {
1318
+ t7 = /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
1319
+ label: "Automation controls",
1320
+ className: "workspace-concept-panel__header workspace-automation-workbench__header",
1321
+ title: automation.name,
1322
+ titleRender: _temp5,
1323
+ leading: t1,
1324
+ actions: t6
1325
+ });
1326
+ $[31] = automation.name;
1327
+ $[32] = t1;
1328
+ $[33] = t6;
1329
+ $[34] = t7;
1330
+ } else t7 = $[34];
1331
+ return t7;
1332
+ }
1333
+ function _temp5(props) {
1334
+ return /* @__PURE__ */ jsx("h2", {
1335
+ ...props,
1336
+ children: props.children
596
1337
  });
597
1338
  }
598
- function WorkbenchSingleRun({ automation, source, trace, graph, draft, setDraft, tab, setTab, busy, completed, errorMessage, outcome }) {
599
- return /* @__PURE__ */ jsxs("div", {
600
- className: "workspace-automation-workbench__content",
601
- children: [automation.parameters.length > 0 ? /* @__PURE__ */ jsx(RunOptions, {
1339
+ function WorkbenchSingleRun(t0) {
1340
+ const $ = c(52);
1341
+ const { automation, source, trace, graph, draft, setDraft, tab, setTab, busy, completed, errorMessage, outcome } = t0;
1342
+ const t1 = Boolean(errorMessage || trace?.error || trace?.status === "error");
1343
+ const t2 = outcome !== void 0 || trace?.status === "completed";
1344
+ let t3;
1345
+ if ($[0] !== busy || $[1] !== t1 || $[2] !== t2 || $[3] !== trace) {
1346
+ t3 = automationCardStatus(trace, busy, t1, t2);
1347
+ $[0] = busy;
1348
+ $[1] = t1;
1349
+ $[2] = t2;
1350
+ $[3] = trace;
1351
+ $[4] = t3;
1352
+ } else t3 = $[4];
1353
+ const status = t3;
1354
+ let t4;
1355
+ if ($[5] !== setTab) {
1356
+ t4 = (value) => setTab(String(value));
1357
+ $[5] = setTab;
1358
+ $[6] = t4;
1359
+ } else t4 = $[6];
1360
+ let t5;
1361
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
1362
+ t5 = /* @__PURE__ */ jsxs(Tabs.Tab, {
1363
+ value: "steps",
1364
+ className: "workspace-automation-workbench__tab",
1365
+ children: [/* @__PURE__ */ jsx(SplitIcon, {}), "Steps"]
1366
+ });
1367
+ $[7] = t5;
1368
+ } else t5 = $[7];
1369
+ let t6;
1370
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
1371
+ t6 = /* @__PURE__ */ jsxs(Tabs.List, {
1372
+ variant: "line",
1373
+ "aria-label": "Automation view",
1374
+ className: "workspace-automation-workbench__tab-list",
1375
+ children: [t5, /* @__PURE__ */ jsxs(Tabs.Tab, {
1376
+ value: "results",
1377
+ className: "workspace-automation-workbench__tab",
1378
+ children: [/* @__PURE__ */ jsx(FileIcon, {}), "Results"]
1379
+ })]
1380
+ });
1381
+ $[8] = t6;
1382
+ } else t6 = $[8];
1383
+ let t7;
1384
+ if ($[9] !== busy || $[10] !== status) {
1385
+ t7 = status ? /* @__PURE__ */ jsxs("span", {
1386
+ className: "workspace-automation-status workspace-automation-workbench__run-status",
1387
+ role: "status",
1388
+ "aria-atomic": "true",
1389
+ children: [busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : status === "Completed" ? /* @__PURE__ */ jsx(CheckIcon, {}) : null, status]
1390
+ }) : null;
1391
+ $[9] = busy;
1392
+ $[10] = status;
1393
+ $[11] = t7;
1394
+ } else t7 = $[11];
1395
+ let t8;
1396
+ if ($[12] !== t7) {
1397
+ t8 = /* @__PURE__ */ jsxs("div", {
1398
+ className: "workspace-automation-workbench__view-bar",
1399
+ children: [t6, t7]
1400
+ });
1401
+ $[12] = t7;
1402
+ $[13] = t8;
1403
+ } else t8 = $[13];
1404
+ const t9 = source.onRun != null;
1405
+ let t10;
1406
+ if ($[14] !== busy || $[15] !== completed || $[16] !== errorMessage || $[17] !== graph || $[18] !== t9 || $[19] !== trace) {
1407
+ t10 = /* @__PURE__ */ jsx(WorkbenchResult, {
1408
+ trace,
1409
+ runnable: t9,
1410
+ graph,
1411
+ busy,
1412
+ completed,
1413
+ errorMessage
1414
+ });
1415
+ $[14] = busy;
1416
+ $[15] = completed;
1417
+ $[16] = errorMessage;
1418
+ $[17] = graph;
1419
+ $[18] = t9;
1420
+ $[19] = trace;
1421
+ $[20] = t10;
1422
+ } else t10 = $[20];
1423
+ let t11;
1424
+ if ($[21] !== outcome || $[22] !== source.onOpen) {
1425
+ t11 = outcome?.files.length ? /* @__PURE__ */ jsx(FileLinks, {
1426
+ files: outcome.files,
1427
+ onOpen: source.onOpen
1428
+ }) : null;
1429
+ $[21] = outcome;
1430
+ $[22] = source.onOpen;
1431
+ $[23] = t11;
1432
+ } else t11 = $[23];
1433
+ let t12;
1434
+ if ($[24] !== automation.runs || $[25] !== source.onOpen) {
1435
+ t12 = automation.runs?.length ? /* @__PURE__ */ jsxs("details", {
1436
+ className: "workspace-automation-workbench__history",
1437
+ children: [/* @__PURE__ */ jsx("summary", { children: "Saved runs" }), /* @__PURE__ */ jsx(FileLinks, {
1438
+ files: automation.runs,
1439
+ onOpen: source.onOpen
1440
+ })]
1441
+ }) : null;
1442
+ $[24] = automation.runs;
1443
+ $[25] = source.onOpen;
1444
+ $[26] = t12;
1445
+ } else t12 = $[26];
1446
+ let t13;
1447
+ if ($[27] !== t10 || $[28] !== t11 || $[29] !== t12) {
1448
+ t13 = /* @__PURE__ */ jsxs(Tabs.Panel, {
1449
+ keepMounted: true,
1450
+ value: "results",
1451
+ className: "workspace-automation-workbench__results",
1452
+ children: [
1453
+ t10,
1454
+ t11,
1455
+ t12
1456
+ ]
1457
+ });
1458
+ $[27] = t10;
1459
+ $[28] = t11;
1460
+ $[29] = t12;
1461
+ $[30] = t13;
1462
+ } else t13 = $[30];
1463
+ let t14;
1464
+ if ($[31] !== graph || $[32] !== trace) {
1465
+ t14 = /* @__PURE__ */ jsx(Tabs.Panel, {
1466
+ keepMounted: true,
1467
+ value: "steps",
1468
+ className: "workspace-automation-workbench__steps",
1469
+ children: graph ? /* @__PURE__ */ jsx(ExecutionBoard, {
1470
+ className: "workspace-automation-workbench__board",
1471
+ graph,
1472
+ trace,
1473
+ showResults: false,
1474
+ "data-recipe": "fill-host"
1475
+ }) : /* @__PURE__ */ jsx(EmptyState, {
1476
+ icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
1477
+ title: "Loading automation steps"
1478
+ })
1479
+ });
1480
+ $[31] = graph;
1481
+ $[32] = trace;
1482
+ $[33] = t14;
1483
+ } else t14 = $[33];
1484
+ let t15;
1485
+ if ($[34] !== t13 || $[35] !== t14) {
1486
+ t15 = /* @__PURE__ */ jsxs(Tabs.Panels, { children: [t13, t14] });
1487
+ $[34] = t13;
1488
+ $[35] = t14;
1489
+ $[36] = t15;
1490
+ } else t15 = $[36];
1491
+ let t16;
1492
+ if ($[37] !== t15 || $[38] !== t4 || $[39] !== t8 || $[40] !== tab) {
1493
+ t16 = /* @__PURE__ */ jsxs(Tabs.Root, {
1494
+ value: tab,
1495
+ onValueChange: t4,
1496
+ className: "workspace-automation-workbench__tabs",
1497
+ children: [t8, t15]
1498
+ });
1499
+ $[37] = t15;
1500
+ $[38] = t4;
1501
+ $[39] = t8;
1502
+ $[40] = tab;
1503
+ $[41] = t16;
1504
+ } else t16 = $[41];
1505
+ let t17;
1506
+ if ($[42] !== automation || $[43] !== completed || $[44] !== draft || $[45] !== graph || $[46] !== setDraft || $[47] !== source.onRun) {
1507
+ t17 = automation.parameters.length > 0 ? /* @__PURE__ */ jsx(RunOptions, {
602
1508
  className: "workspace-automation-workbench__inputs",
603
1509
  draft,
604
1510
  parameters: automation.parameters,
605
- setDraft: source.onRun ? setDraft : void 0
606
- }, automationFormKey(automation)) : null, /* @__PURE__ */ jsxs(Tabs.Root, {
607
- value: tab,
608
- onValueChange: (value) => setTab(String(value)),
609
- className: "workspace-automation-workbench__tabs",
610
- children: [
611
- /* @__PURE__ */ jsxs(Tabs.List, {
612
- variant: "line",
613
- "aria-label": "Automation view",
614
- className: "workspace-automation-workbench__tab-list",
615
- children: [/* @__PURE__ */ jsxs(Tabs.Tab, {
616
- value: "results",
617
- className: "workspace-automation-workbench__tab",
618
- children: [/* @__PURE__ */ jsx(FileIcon, {}), "Results"]
619
- }), /* @__PURE__ */ jsxs(Tabs.Tab, {
620
- value: "steps",
621
- className: "workspace-automation-workbench__tab",
622
- children: [/* @__PURE__ */ jsx(SplitIcon, {}), "Steps"]
623
- })]
624
- }),
625
- /* @__PURE__ */ jsxs(Tabs.Panel, {
626
- value: "results",
627
- className: "workspace-automation-workbench__results",
628
- children: [
629
- /* @__PURE__ */ jsx(WorkbenchResult, {
630
- trace,
631
- runnable: source.onRun != null,
632
- graph,
633
- busy,
634
- completed,
635
- errorMessage
636
- }),
637
- outcome?.files.length ? /* @__PURE__ */ jsx(FileLinks, {
638
- files: outcome.files,
639
- onOpen: source.onOpen
640
- }) : null,
641
- automation.runs?.length ? /* @__PURE__ */ jsxs("details", {
642
- className: "workspace-automation-workbench__history",
643
- children: [/* @__PURE__ */ jsx("summary", { children: "Saved runs" }), /* @__PURE__ */ jsx(FileLinks, {
644
- files: automation.runs,
645
- onOpen: source.onOpen
646
- })]
647
- }) : null
648
- ]
649
- }),
650
- /* @__PURE__ */ jsx(Tabs.Panel, {
651
- value: "steps",
652
- className: "workspace-automation-workbench__steps",
653
- children: graph ? /* @__PURE__ */ jsx(ExecutionBoard, {
654
- className: "workspace-automation-workbench__board",
655
- graph,
656
- trace,
657
- showResults: false
658
- }) : /* @__PURE__ */ jsx(EmptyState, {
659
- icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
660
- title: "Loading automation steps"
661
- })
662
- })
663
- ]
664
- })]
665
- });
1511
+ setDraft: source.onRun ? setDraft : void 0,
1512
+ initiallyOpen: Boolean(graph && !completed),
1513
+ children: automation.description ? /* @__PURE__ */ jsx("p", {
1514
+ className: "workspace-automation-workbench__description",
1515
+ children: automation.description
1516
+ }) : null
1517
+ }, automationFormKey(automation)) : null;
1518
+ $[42] = automation;
1519
+ $[43] = completed;
1520
+ $[44] = draft;
1521
+ $[45] = graph;
1522
+ $[46] = setDraft;
1523
+ $[47] = source.onRun;
1524
+ $[48] = t17;
1525
+ } else t17 = $[48];
1526
+ let t18;
1527
+ if ($[49] !== t16 || $[50] !== t17) {
1528
+ t18 = /* @__PURE__ */ jsxs("div", {
1529
+ className: "workspace-automation-workbench__content",
1530
+ children: [t16, t17]
1531
+ });
1532
+ $[49] = t16;
1533
+ $[50] = t17;
1534
+ $[51] = t18;
1535
+ } else t18 = $[51];
1536
+ return t18;
666
1537
  }
667
- function useWorkbenchTabs(trace, runStatus, busy) {
668
- const [tab, setTab] = React.useState(busy ? "steps" : "results");
1538
+ function useWorkbenchTabs(trace, runStatus, busy, prefersSteps) {
1539
+ const $ = c(5);
1540
+ const [tab, setTab] = React.useState(busy || prefersSteps && trace?.status !== "completed" && runStatus !== "success" ? "steps" : "results");
1541
+ const [seenPrefersSteps, setSeenPrefersSteps] = React.useState(prefersSteps);
1542
+ if (prefersSteps !== seenPrefersSteps) {
1543
+ setSeenPrefersSteps(prefersSteps);
1544
+ if (prefersSteps && trace?.status !== "completed" && runStatus !== "success") setTab("steps");
1545
+ }
669
1546
  const [seenRunStatus, setSeenRunStatus] = React.useState(runStatus);
670
1547
  if (runStatus !== seenRunStatus) {
671
1548
  setSeenRunStatus(runStatus);
672
1549
  if (runStatus === "pending") setTab("steps");
673
1550
  }
674
- const [seenTrace, setSeenTrace] = React.useState(() => ({
675
- executionId: trace?.executionId,
676
- status: trace?.status
677
- }));
1551
+ let t0;
1552
+ if ($[0] !== trace?.executionId || $[1] !== trace?.status) {
1553
+ t0 = () => ({
1554
+ executionId: trace?.executionId,
1555
+ status: trace?.status
1556
+ });
1557
+ $[0] = trace?.executionId;
1558
+ $[1] = trace?.status;
1559
+ $[2] = t0;
1560
+ } else t0 = $[2];
1561
+ const [seenTrace, setSeenTrace] = React.useState(t0);
678
1562
  if (seenTrace.executionId !== trace?.executionId || seenTrace.status !== trace?.status) {
679
1563
  setSeenTrace({
680
1564
  executionId: trace?.executionId,
@@ -682,17 +1566,30 @@ function useWorkbenchTabs(trace, runStatus, busy) {
682
1566
  });
683
1567
  if (trace?.status === "running") setTab("steps");
684
1568
  }
685
- return [tab, setTab];
1569
+ let t1;
1570
+ if ($[3] !== tab) {
1571
+ t1 = [tab, setTab];
1572
+ $[3] = tab;
1573
+ $[4] = t1;
1574
+ } else t1 = $[4];
1575
+ return t1;
686
1576
  }
687
1577
  /** Each newly attached table run reopens table mode; the user can still leave it. */
688
1578
  function useTableMode(tableExecution) {
1579
+ const $ = c(2);
689
1580
  const [tableMode, setTableMode] = React.useState(Boolean(tableExecution));
690
1581
  const [seenTablePath, setSeenTablePath] = React.useState(tableExecution?.path);
691
1582
  if (tableExecution?.path !== seenTablePath) {
692
1583
  setSeenTablePath(tableExecution?.path);
693
1584
  if (tableExecution) setTableMode(true);
694
1585
  }
695
- return [tableMode, setTableMode];
1586
+ let t0;
1587
+ if ($[0] !== tableMode) {
1588
+ t0 = [tableMode, setTableMode];
1589
+ $[0] = tableMode;
1590
+ $[1] = t0;
1591
+ } else t0 = $[1];
1592
+ return t0;
696
1593
  }
697
1594
  /** Keeps the last completed result inspectable while its replacement is running. */
698
1595
  function useVisibleCompleted(outcome, trace, busy) {
@@ -701,91 +1598,271 @@ function useVisibleCompleted(outcome, trace, busy) {
701
1598
  if (completed && completed !== lastCompleted) setLastCompleted(completed);
702
1599
  return busy ? lastCompleted : completed;
703
1600
  }
704
- function WorkspaceAutomationWorkbench({ automation, source, onBack, className, ref, ...props }) {
1601
+ function WorkspaceAutomationWorkbench(t0) {
1602
+ const $ = c(90);
1603
+ let automation;
1604
+ let className;
1605
+ let onBack;
1606
+ let props;
1607
+ let ref;
1608
+ let source;
1609
+ if ($[0] !== t0) {
1610
+ ({automation, source, onBack, className, ref, ...props} = t0);
1611
+ $[0] = t0;
1612
+ $[1] = automation;
1613
+ $[2] = className;
1614
+ $[3] = onBack;
1615
+ $[4] = props;
1616
+ $[5] = ref;
1617
+ $[6] = source;
1618
+ } else {
1619
+ automation = $[1];
1620
+ className = $[2];
1621
+ onBack = $[3];
1622
+ props = $[4];
1623
+ ref = $[5];
1624
+ source = $[6];
1625
+ }
705
1626
  const { trace, draft, setDraft, runMutation, stopMutation, busy, errorMessage, outcome, runStatus } = useAutomationSession(automation, source);
706
1627
  const formId = React.useId();
707
1628
  const graph = trace?.graph ?? automation.graph;
708
1629
  const tableExecution = source.tableExecution?.invocation.path === automation.path ? source.tableExecution : void 0;
709
1630
  const [tableMode, setTableMode] = useTableMode(tableExecution);
710
- const [tab, setTab] = useWorkbenchTabs(trace, runStatus, busy);
1631
+ const [tab, setTab] = useWorkbenchTabs(trace, runStatus, busy, Boolean(graph));
711
1632
  const visibleCompleted = useVisibleCompleted(outcome, trace, busy);
712
- const tableValues = new Map(collectRunParameters(automation.parameters, draft).map(({ name, value }) => [name, value]));
713
- return /* @__PURE__ */ jsx("section", {
714
- ...props,
715
- ref,
716
- "aria-label": props["aria-label"] ?? automationsWorkbenchItem.label,
717
- "data-slot": "workspace-automations-panel",
718
- className: cx("workspace-concept-panel workspace-automation-workbench", className),
719
- children: /* @__PURE__ */ jsxs(Form, {
720
- id: formId,
721
- noValidate: true,
722
- onSubmit: (event) => {
1633
+ let T0;
1634
+ let t1;
1635
+ let t10;
1636
+ let t11;
1637
+ let t12;
1638
+ let t2;
1639
+ let t3;
1640
+ let t4;
1641
+ let t5;
1642
+ let t6;
1643
+ let t7;
1644
+ let t8;
1645
+ let t9;
1646
+ if ($[7] !== automation || $[8] !== busy || $[9] !== className || $[10] !== draft || $[11] !== errorMessage || $[12] !== formId || $[13] !== graph || $[14] !== onBack || $[15] !== outcome || $[16] !== props || $[17] !== ref || $[18] !== runMutation || $[19] !== setDraft || $[20] !== setTab || $[21] !== setTableMode || $[22] !== source || $[23] !== stopMutation || $[24] !== tab || $[25] !== tableExecution || $[26] !== tableMode || $[27] !== trace || $[28] !== visibleCompleted) {
1647
+ const tableValues = new Map(collectRunParameters(automation.parameters, draft).map(_temp6));
1648
+ t8 = props;
1649
+ t9 = ref;
1650
+ t10 = props["aria-label"] ?? automationsWorkbenchItem.label;
1651
+ t11 = "workspace-automations-panel";
1652
+ if ($[42] !== className) {
1653
+ t12 = cx("workspace-concept-panel workspace-automation-workbench", className);
1654
+ $[42] = className;
1655
+ $[43] = t12;
1656
+ } else t12 = $[43];
1657
+ T0 = Form;
1658
+ t1 = formId;
1659
+ t2 = true;
1660
+ if ($[44] !== automation.parameters || $[45] !== busy || $[46] !== draft || $[47] !== runMutation || $[48] !== setTab || $[49] !== source.onRun || $[50] !== stopMutation || $[51] !== tableMode) {
1661
+ t3 = (event) => {
723
1662
  event.preventDefault();
724
1663
  if (!tableMode && !busy && source.onRun) {
725
1664
  stopMutation.reset();
726
1665
  setTab("steps");
727
1666
  runMutation.mutate(collectRunParameters(automation.parameters, draft));
728
1667
  }
729
- },
1668
+ };
1669
+ $[44] = automation.parameters;
1670
+ $[45] = busy;
1671
+ $[46] = draft;
1672
+ $[47] = runMutation;
1673
+ $[48] = setTab;
1674
+ $[49] = source.onRun;
1675
+ $[50] = stopMutation;
1676
+ $[51] = tableMode;
1677
+ $[52] = t3;
1678
+ } else t3 = $[52];
1679
+ const t13 = trace?.status === "running";
1680
+ const t14 = tableExecution?.status === "running";
1681
+ let t15;
1682
+ if ($[53] !== setTableMode) {
1683
+ t15 = () => setTableMode(_temp7);
1684
+ $[53] = setTableMode;
1685
+ $[54] = t15;
1686
+ } else t15 = $[54];
1687
+ let t16;
1688
+ if ($[55] !== stopMutation) {
1689
+ t16 = () => stopMutation.mutate();
1690
+ $[55] = stopMutation;
1691
+ $[56] = t16;
1692
+ } else t16 = $[56];
1693
+ if ($[57] !== automation || $[58] !== busy || $[59] !== formId || $[60] !== onBack || $[61] !== source || $[62] !== stopMutation.isPending || $[63] !== t13 || $[64] !== t14 || $[65] !== t15 || $[66] !== t16 || $[67] !== tableMode) {
1694
+ t4 = /* @__PURE__ */ jsx(WorkbenchHeader, {
1695
+ automation,
1696
+ source,
1697
+ running: t13,
1698
+ tableRunning: t14,
1699
+ formId,
1700
+ onBack,
1701
+ tableMode,
1702
+ onToggleTable: t15,
1703
+ busy,
1704
+ stopping: stopMutation.isPending,
1705
+ onStop: t16
1706
+ });
1707
+ $[57] = automation;
1708
+ $[58] = busy;
1709
+ $[59] = formId;
1710
+ $[60] = onBack;
1711
+ $[61] = source;
1712
+ $[62] = stopMutation.isPending;
1713
+ $[63] = t13;
1714
+ $[64] = t14;
1715
+ $[65] = t15;
1716
+ $[66] = t16;
1717
+ $[67] = tableMode;
1718
+ $[68] = t4;
1719
+ } else t4 = $[68];
1720
+ if ($[69] !== errorMessage || $[70] !== tableMode) {
1721
+ t5 = !tableMode && errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [errorMessage] }) : null;
1722
+ $[69] = errorMessage;
1723
+ $[70] = tableMode;
1724
+ $[71] = t5;
1725
+ } else t5 = $[71];
1726
+ const t17 = busy && trace?.status !== "running" ? "Starting run" : "";
1727
+ if ($[72] !== t17) {
1728
+ t6 = /* @__PURE__ */ jsx("span", {
1729
+ className: "sigvelo-visually-hidden",
1730
+ role: "status",
1731
+ "aria-atomic": "true",
1732
+ children: t17
1733
+ });
1734
+ $[72] = t17;
1735
+ $[73] = t6;
1736
+ } else t6 = $[73];
1737
+ t7 = tableMode ? /* @__PURE__ */ jsx(WorkspaceAutomationTable, {
1738
+ path: automation.path,
1739
+ parameters: automation.parameters.map((parameter) => ({
1740
+ ...parameter,
1741
+ value: tableValues.get(parameter.name)
1742
+ })),
1743
+ execution: tableExecution,
1744
+ trace,
1745
+ graph,
1746
+ onLoadTable: source.onLoadTable,
1747
+ onRequestTableSource: source.onRequestTableSource,
1748
+ onPrepareTable: source.onPrepareTable,
1749
+ onRunTable: source.onRunTable,
1750
+ onStopTable: source.onStopTable,
1751
+ onLoadTableTrace: source.onLoadTableTrace,
1752
+ onScheduleTable: source.onScheduleTable
1753
+ }) : /* @__PURE__ */ jsx(WorkbenchSingleRun, {
1754
+ automation,
1755
+ source,
1756
+ trace,
1757
+ graph,
1758
+ draft,
1759
+ setDraft,
1760
+ tab,
1761
+ setTab,
1762
+ busy,
1763
+ completed: visibleCompleted,
1764
+ errorMessage,
1765
+ outcome
1766
+ });
1767
+ $[7] = automation;
1768
+ $[8] = busy;
1769
+ $[9] = className;
1770
+ $[10] = draft;
1771
+ $[11] = errorMessage;
1772
+ $[12] = formId;
1773
+ $[13] = graph;
1774
+ $[14] = onBack;
1775
+ $[15] = outcome;
1776
+ $[16] = props;
1777
+ $[17] = ref;
1778
+ $[18] = runMutation;
1779
+ $[19] = setDraft;
1780
+ $[20] = setTab;
1781
+ $[21] = setTableMode;
1782
+ $[22] = source;
1783
+ $[23] = stopMutation;
1784
+ $[24] = tab;
1785
+ $[25] = tableExecution;
1786
+ $[26] = tableMode;
1787
+ $[27] = trace;
1788
+ $[28] = visibleCompleted;
1789
+ $[29] = T0;
1790
+ $[30] = t1;
1791
+ $[31] = t10;
1792
+ $[32] = t11;
1793
+ $[33] = t12;
1794
+ $[34] = t2;
1795
+ $[35] = t3;
1796
+ $[36] = t4;
1797
+ $[37] = t5;
1798
+ $[38] = t6;
1799
+ $[39] = t7;
1800
+ $[40] = t8;
1801
+ $[41] = t9;
1802
+ } else {
1803
+ T0 = $[29];
1804
+ t1 = $[30];
1805
+ t10 = $[31];
1806
+ t11 = $[32];
1807
+ t12 = $[33];
1808
+ t2 = $[34];
1809
+ t3 = $[35];
1810
+ t4 = $[36];
1811
+ t5 = $[37];
1812
+ t6 = $[38];
1813
+ t7 = $[39];
1814
+ t8 = $[40];
1815
+ t9 = $[41];
1816
+ }
1817
+ let t13;
1818
+ if ($[74] !== T0 || $[75] !== t1 || $[76] !== t2 || $[77] !== t3 || $[78] !== t4 || $[79] !== t5 || $[80] !== t6 || $[81] !== t7) {
1819
+ t13 = /* @__PURE__ */ jsxs(T0, {
1820
+ id: t1,
1821
+ noValidate: t2,
1822
+ onSubmit: t3,
730
1823
  children: [
731
- /* @__PURE__ */ jsx(WorkbenchHeader, {
732
- automation,
733
- source,
734
- running: trace?.status === "running",
735
- tableRunning: tableExecution?.status === "running",
736
- formId,
737
- onBack,
738
- tableMode,
739
- onToggleTable: () => setTableMode((current) => !current),
740
- busy,
741
- stopping: stopMutation.isPending,
742
- onStop: () => stopMutation.mutate()
743
- }),
744
- automation.description ? /* @__PURE__ */ jsx("p", {
745
- className: "workspace-automation-workbench__description",
746
- children: automation.description
747
- }) : null,
748
- /* @__PURE__ */ jsx(AutomationApps, { apps: automationApps(graph) }),
749
- !tableMode && errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [errorMessage] }) : null,
750
- /* @__PURE__ */ jsx("span", {
751
- className: "sigvelo-visually-hidden",
752
- role: "status",
753
- "aria-atomic": "true",
754
- children: busy && trace?.status !== "running" ? "Starting run" : ""
755
- }),
756
- tableMode ? /* @__PURE__ */ jsx(WorkspaceAutomationTable, {
757
- path: automation.path,
758
- parameters: automation.parameters.map((parameter) => ({
759
- ...parameter,
760
- value: tableValues.get(parameter.name)
761
- })),
762
- execution: tableExecution,
763
- trace,
764
- graph,
765
- onLoadTable: source.onLoadTable,
766
- onRequestTableSource: source.onRequestTableSource,
767
- onPrepareTable: source.onPrepareTable,
768
- onRunTable: source.onRunTable,
769
- onStopTable: source.onStopTable,
770
- onLoadTableTrace: source.onLoadTableTrace,
771
- onScheduleTable: source.onScheduleTable
772
- }) : /* @__PURE__ */ jsx(WorkbenchSingleRun, {
773
- automation,
774
- source,
775
- trace,
776
- graph,
777
- draft,
778
- setDraft,
779
- tab,
780
- setTab,
781
- busy,
782
- completed: visibleCompleted,
783
- errorMessage,
784
- outcome
785
- })
1824
+ t4,
1825
+ t5,
1826
+ t6,
1827
+ t7
786
1828
  ]
787
- })
788
- });
1829
+ });
1830
+ $[74] = T0;
1831
+ $[75] = t1;
1832
+ $[76] = t2;
1833
+ $[77] = t3;
1834
+ $[78] = t4;
1835
+ $[79] = t5;
1836
+ $[80] = t6;
1837
+ $[81] = t7;
1838
+ $[82] = t13;
1839
+ } else t13 = $[82];
1840
+ let t14;
1841
+ if ($[83] !== t10 || $[84] !== t11 || $[85] !== t12 || $[86] !== t13 || $[87] !== t8 || $[88] !== t9) {
1842
+ t14 = /* @__PURE__ */ jsx("section", {
1843
+ ...t8,
1844
+ ref: t9,
1845
+ "aria-label": t10,
1846
+ "data-slot": t11,
1847
+ className: t12,
1848
+ children: t13
1849
+ });
1850
+ $[83] = t10;
1851
+ $[84] = t11;
1852
+ $[85] = t12;
1853
+ $[86] = t13;
1854
+ $[87] = t8;
1855
+ $[88] = t9;
1856
+ $[89] = t14;
1857
+ } else t14 = $[89];
1858
+ return t14;
1859
+ }
1860
+ function _temp7(current) {
1861
+ return !current;
1862
+ }
1863
+ function _temp6(t0) {
1864
+ const { name, value } = t0;
1865
+ return [name, value];
789
1866
  }
790
1867
  //#endregion
791
1868
  export { WorkspaceAutomationFile, WorkspaceAutomationsPanel, automationsWorkbenchItem };