@mcp-b/react-components 0.62.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 (496) 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-D5x4EM9y.d.ts → EmployeeChrome-kegSASjC.d.ts} +15 -8
  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-CMvICi-p.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/{codex-model-catalog-18yO7dln.d.ts → codex-model-catalog-CFEGgUAj.d.ts} +8 -8
  48. package/dist/command-search-1fjmCBBo.js +34 -0
  49. package/dist/components/agents-sdk/AIProviderDialog.d.ts +53 -0
  50. package/dist/components/agents-sdk/AIProviderDialog.js +902 -0
  51. package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
  52. package/dist/components/agents-sdk/AgentActivity.js +78 -31
  53. package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
  54. package/dist/components/agents-sdk/AgentChat.js +1120 -393
  55. package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
  56. package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
  57. package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
  58. package/dist/components/agents-sdk/AgentComputer.js +8045 -0
  59. package/dist/components/agents-sdk/AgentEvent.js +165 -22
  60. package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
  61. package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
  62. package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
  63. package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
  64. package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
  65. package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
  66. package/dist/components/agents-sdk/BrowserReplay.js +298 -133
  67. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
  68. package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
  69. package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
  70. package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
  71. package/dist/components/agents-sdk/EmployeeApp.js +109 -47
  72. package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
  73. package/dist/components/agents-sdk/EmployeeChat.js +504 -103
  74. package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
  75. package/dist/components/agents-sdk/EmployeeChrome.js +1383 -522
  76. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
  77. package/dist/components/agents-sdk/EmployeeSchedules.js +283 -66
  78. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
  79. package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
  80. package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
  81. package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
  82. package/dist/components/agents-sdk/ManagerAccountActions.js +143 -36
  83. package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
  84. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  85. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  86. package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
  87. package/dist/components/agents-sdk/McpConnectionRequest.js +331 -116
  88. package/dist/components/agents-sdk/McpConnectorForm.js +321 -101
  89. package/dist/components/agents-sdk/McpPluginCatalog.js +698 -250
  90. package/dist/components/agents-sdk/McpServerIcon.js +57 -14
  91. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  92. package/dist/components/agents-sdk/McpServerPicker.js +543 -159
  93. package/dist/components/agents-sdk/ModelSelector.d.ts +1 -1
  94. package/dist/components/agents-sdk/ModelSelector.js +1154 -256
  95. package/dist/components/agents-sdk/PromptInputApproval.js +116 -28
  96. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  97. package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
  98. package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
  99. package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
  100. package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
  101. package/dist/components/agents-sdk/SubagentRunPanel.js +359 -131
  102. package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
  103. package/dist/components/agents-sdk/ThinkChat.d.ts +5 -3
  104. package/dist/components/agents-sdk/ThinkChat.js +321 -129
  105. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  106. package/dist/components/agents-sdk/ThinkChatActivity.js +307 -101
  107. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  108. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
  109. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1389 -407
  110. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
  111. package/dist/components/agents-sdk/ThinkExecutionDetail.js +220 -46
  112. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  113. package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
  114. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
  115. package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
  116. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
  117. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +506 -125
  118. package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
  119. package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
  120. package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +3 -1
  121. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +72 -26
  122. package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
  123. package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
  124. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
  125. package/dist/components/agents-sdk/ThinkScheduleActions.js +364 -133
  126. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  127. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
  128. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  129. package/dist/components/agents-sdk/ThinkScheduleDetail.js +312 -91
  130. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
  131. package/dist/components/agents-sdk/ThinkScheduleForm.js +1324 -481
  132. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
  133. package/dist/components/agents-sdk/ThinkThreadPicker.js +435 -215
  134. package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
  135. package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
  136. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  137. package/dist/components/agents-sdk/Workspace.js +491 -166
  138. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  139. package/dist/components/agents-sdk/WorkspaceAutomation.js +1496 -419
  140. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  141. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1320 -529
  142. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
  143. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
  144. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  145. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  146. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
  147. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
  148. package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
  149. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
  150. package/dist/components/agents-sdk/WorkspaceExplorer.js +268 -86
  151. package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
  152. package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
  153. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
  154. package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
  155. package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
  156. package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
  157. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
  158. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
  159. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
  160. package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
  161. package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
  162. package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
  163. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
  164. package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
  165. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
  166. package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
  167. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  168. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  169. package/dist/components/agents-sdk/WorkspaceMountManager.js +119 -59
  170. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
  171. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  172. package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
  173. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  174. package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
  175. package/dist/components/ai-sdk/Activity.js +768 -192
  176. package/dist/components/ai-sdk/AgentAttention.js +286 -58
  177. package/dist/components/ai-sdk/AgentChatMessageEditor.js +194 -69
  178. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  179. package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
  180. package/dist/components/ai-sdk/AgentChatTurnError.d.ts +6 -1
  181. package/dist/components/ai-sdk/AgentChatTurnError.js +77 -25
  182. package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
  183. package/dist/components/ai-sdk/Approval.js +574 -172
  184. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  185. package/dist/components/ai-sdk/Artifact.js +535 -128
  186. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  187. package/dist/components/ai-sdk/ChainOfThought.js +404 -80
  188. package/dist/components/ai-sdk/Checkpoint.js +229 -45
  189. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  190. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  191. package/dist/components/ai-sdk/ComposerLink.js +216 -48
  192. package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
  193. package/dist/components/ai-sdk/Context.js +738 -179
  194. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  195. package/dist/components/ai-sdk/Conversation.js +305 -68
  196. package/dist/components/ai-sdk/ExpansionState.js +74 -15
  197. package/dist/components/ai-sdk/Goal.js +435 -116
  198. package/dist/components/ai-sdk/InlineCitation.js +313 -76
  199. package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
  200. package/dist/components/ai-sdk/Message.d.ts +1 -1
  201. package/dist/components/ai-sdk/Message.js +1010 -195
  202. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  203. package/dist/components/ai-sdk/MessageScroller.js +264 -46
  204. package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
  205. package/dist/components/ai-sdk/Plan.js +639 -128
  206. package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
  207. package/dist/components/ai-sdk/PromptInput.js +2738 -797
  208. package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
  209. package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
  210. package/dist/components/ai-sdk/Queue.js +793 -155
  211. package/dist/components/ai-sdk/Reasoning.js +268 -69
  212. package/dist/components/ai-sdk/Sources.js +226 -63
  213. package/dist/components/ai-sdk/Task.js +294 -71
  214. package/dist/components/ai-sdk/ToolApproval.js +126 -26
  215. package/dist/components/ai-sdk/ToolInvocation.js +112 -22
  216. package/dist/components/extension/ChatGptSignInScreen.js +1 -82
  217. package/dist/components/extension/CodexModelSelector.d.ts +2 -2
  218. package/dist/components/extension/CodexModelSelector.js +468 -147
  219. package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
  220. package/dist/components/extension/ConversationTabPicker.js +254 -76
  221. package/dist/components/extension/FirstRunSetup.d.ts +61 -35
  222. package/dist/components/extension/FirstRunSetup.js +3833 -1011
  223. package/dist/components/foundations/Accordion.js +186 -41
  224. package/dist/components/foundations/AlertDialog.js +425 -97
  225. package/dist/components/foundations/AppIcon.d.ts +13 -13
  226. package/dist/components/foundations/AppIcon.js +183 -34
  227. package/dist/components/foundations/Autocomplete.js +408 -89
  228. package/dist/components/foundations/Avatar.d.ts +100 -2
  229. package/dist/components/foundations/Avatar.js +204 -44
  230. package/dist/components/foundations/Button.js +64 -13
  231. package/dist/components/foundations/Card.js +357 -63
  232. package/dist/components/foundations/Checkbox.js +83 -18
  233. package/dist/components/foundations/CheckboxGroup.js +266 -58
  234. package/dist/components/foundations/Collapsible.d.ts +2 -1
  235. package/dist/components/foundations/Collapsible.js +130 -27
  236. package/dist/components/foundations/Combobox.js +408 -89
  237. package/dist/components/foundations/ContextMenu.d.ts +2 -2
  238. package/dist/components/foundations/ContextMenu.js +591 -117
  239. package/dist/components/foundations/DescriptionList.js +159 -28
  240. package/dist/components/foundations/Dialog.js +373 -89
  241. package/dist/components/foundations/EmptyState.js +86 -23
  242. package/dist/components/foundations/Favicon.d.ts +17 -0
  243. package/dist/components/foundations/Favicon.js +62 -0
  244. package/dist/components/foundations/Field.js +525 -108
  245. package/dist/components/foundations/Fieldset.js +115 -23
  246. package/dist/components/foundations/Form.js +38 -9
  247. package/dist/components/foundations/FormattedDate.d.ts +19 -5
  248. package/dist/components/foundations/FormattedDate.js +82 -12
  249. package/dist/components/foundations/IconButton.d.ts +1 -1
  250. package/dist/components/foundations/IconButton.js +114 -17
  251. package/dist/components/foundations/Input.js +38 -9
  252. package/dist/components/foundations/Kbd.js +55 -10
  253. package/dist/components/foundations/Label.js +56 -12
  254. package/dist/components/foundations/LinkButton.js +67 -15
  255. package/dist/components/foundations/Marker.js +138 -29
  256. package/dist/components/foundations/Menu.d.ts +1 -1
  257. package/dist/components/foundations/Menu.js +634 -136
  258. package/dist/components/foundations/Menubar.d.ts +2 -2
  259. package/dist/components/foundations/Menubar.js +685 -130
  260. package/dist/components/foundations/Meter.js +186 -41
  261. package/dist/components/foundations/NavigationMenu.js +426 -95
  262. package/dist/components/foundations/NumberField.js +223 -49
  263. package/dist/components/foundations/Popover.js +398 -88
  264. package/dist/components/foundations/PreviewCard.js +234 -53
  265. package/dist/components/foundations/Progress.js +117 -25
  266. package/dist/components/foundations/RadioGroup.d.ts +13 -5
  267. package/dist/components/foundations/RadioGroup.js +132 -25
  268. package/dist/components/foundations/ScrollArea.js +230 -51
  269. package/dist/components/foundations/SearchField.d.ts +8 -3
  270. package/dist/components/foundations/SearchField.js +129 -28
  271. package/dist/components/foundations/Select.js +648 -145
  272. package/dist/components/foundations/Separator.js +61 -12
  273. package/dist/components/foundations/Slider.js +260 -57
  274. package/dist/components/foundations/Stepper.d.ts +1 -1
  275. package/dist/components/foundations/Stepper.js +561 -127
  276. package/dist/components/foundations/Switch.js +82 -18
  277. package/dist/components/foundations/Tabs.d.ts +2 -2
  278. package/dist/components/foundations/Tabs.js +282 -53
  279. package/dist/components/foundations/Textarea.js +43 -9
  280. package/dist/components/foundations/ThemeProvider.js +138 -52
  281. package/dist/components/foundations/Toast.d.ts +10 -2
  282. package/dist/components/foundations/Toast.js +322 -75
  283. package/dist/components/foundations/Toggle.d.ts +5 -2
  284. package/dist/components/foundations/Toggle.js +51 -10
  285. package/dist/components/foundations/ToggleGroup.d.ts +4 -4
  286. package/dist/components/foundations/ToggleGroup.js +216 -60
  287. package/dist/components/foundations/Toolbar.js +249 -61
  288. package/dist/components/foundations/Tooltip.d.ts +3 -3
  289. package/dist/components/foundations/Tooltip.js +311 -55
  290. package/dist/components/foundations/TransitionSurface.js +43 -9
  291. package/dist/components/foundations/icons.d.ts +2 -2
  292. package/dist/components/foundations/icons.js +2 -2
  293. package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
  294. package/dist/components/general-purpose/ActionGuide.js +290 -64
  295. package/dist/components/general-purpose/AppFrame.js +72 -14
  296. package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
  297. package/dist/components/general-purpose/AppTopBar.js +349 -60
  298. package/dist/components/general-purpose/BrandLoading.js +37 -9
  299. package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
  300. package/dist/components/general-purpose/CommandPalette.js +271 -0
  301. package/dist/components/general-purpose/Commit.d.ts +1 -1
  302. package/dist/components/general-purpose/Commit.js +937 -167
  303. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  304. package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
  305. package/dist/components/general-purpose/FileTree.d.ts +20 -7
  306. package/dist/components/general-purpose/FileTree.js +1 -1
  307. package/dist/components/general-purpose/ListDetail.d.ts +84 -0
  308. package/dist/components/general-purpose/ListDetail.js +423 -0
  309. package/dist/components/general-purpose/NotificationPrompt.js +20 -11
  310. package/dist/components/general-purpose/PricingBillingToggle.js +34 -7
  311. package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
  312. package/dist/components/general-purpose/PricingFAQ.js +53 -12
  313. package/dist/components/general-purpose/PricingPage.js +376 -139
  314. package/dist/components/general-purpose/PricingPlanCard.js +210 -85
  315. package/dist/components/general-purpose/PricingUsageCalculator.js +233 -83
  316. package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
  317. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  318. package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
  319. package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
  320. package/dist/components/general-purpose/ScreenStack.js +427 -0
  321. package/dist/components/general-purpose/SettingsFormDialog.d.ts +10 -2
  322. package/dist/components/general-purpose/SettingsFormDialog.js +238 -74
  323. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  324. package/dist/components/general-purpose/StatusScreen.js +82 -24
  325. package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
  326. package/dist/components/general-purpose/SwipeActions.js +357 -0
  327. package/dist/components/general-purpose/Terminal.d.ts +22 -48
  328. package/dist/components/general-purpose/Terminal.js +320 -174
  329. package/dist/components/general-purpose/TestResults.js +975 -196
  330. package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
  331. package/dist/components/general-purpose/ThemeModeControl.js +67 -24
  332. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
  333. package/dist/components/general-purpose/WallpaperPicker.js +180 -0
  334. package/dist/components/general-purpose/WebPreview.d.ts +5 -7
  335. package/dist/components/general-purpose/WebPreview.js +770 -203
  336. package/dist/components/nanites/AgentConnection.js +323 -84
  337. package/dist/components/nanites/AgentToolDetail.js +237 -57
  338. package/dist/components/nanites/GithubMotionMark.js +37 -9
  339. package/dist/components/nanites/NaniteScene.js +535 -323
  340. package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
  341. package/dist/container-width-C43ccJ84.js +17 -0
  342. package/dist/context-Ddsp8HgD.js +43 -0
  343. package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
  344. package/dist/copy-button-DWBVJR6D.js +118 -0
  345. package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
  346. package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
  347. package/dist/icons-nLTnB9kd.js +470 -0
  348. package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
  349. package/dist/motion-CGM3i6lX.js +319 -0
  350. package/dist/motion-preferences-6qsDIDvH.js +13 -0
  351. package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
  352. package/dist/progress-ring-BO649JA9.js +79 -0
  353. package/dist/provider-logos-Ceu7iYFx.js +362 -0
  354. package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
  355. package/dist/styles/accessibility.css +26 -0
  356. package/dist/styles/accordion.css +0 -2
  357. package/dist/styles/activity.css +20 -12
  358. package/dist/styles/agent-attention.css +31 -10
  359. package/dist/styles/agent-chat.css +7 -6
  360. package/dist/styles/agent-computer-motion-reduction.css +118 -0
  361. package/dist/styles/agent-computer-motion.css +127 -0
  362. package/dist/styles/agent-computer-phone.css +942 -0
  363. package/dist/styles/agent-computer.css +1764 -0
  364. package/dist/styles/agent-connection.css +5 -5
  365. package/dist/styles/agent-screen-switcher.css +313 -0
  366. package/dist/styles/ai-provider-dialog.css +46 -0
  367. package/dist/styles/app-icon.css +34 -30
  368. package/dist/styles/app-top-bar.css +33 -18
  369. package/dist/styles/approval.css +3 -3
  370. package/dist/styles/artifact.css +1 -1
  371. package/dist/styles/attachment-preview.css +2 -4
  372. package/dist/styles/avatar.css +12 -14
  373. package/dist/styles/base-ui-motion.css +84 -18
  374. package/dist/styles/base-ui-motion.test.tsx +305 -0
  375. package/dist/styles/base.css +16 -12
  376. package/dist/styles/brand.test.ts +7 -20
  377. package/dist/styles/browser-control-overlay.css +1 -1
  378. package/dist/styles/browser-live-screen.css +2 -2
  379. package/dist/styles/browser-live-view.css +1 -1
  380. package/dist/styles/browser-replay.css +0 -8
  381. package/dist/styles/browser-run-panel.css +275 -37
  382. package/dist/styles/button.css +52 -9
  383. package/dist/styles/card.css +6 -5
  384. package/dist/styles/chain-of-thought.css +0 -10
  385. package/dist/styles/checkpoint.css +2 -2
  386. package/dist/styles/codex-model-selector.css +2 -2
  387. package/dist/styles/color-contrast.test.ts +18 -1
  388. package/dist/styles/command-palette.css +110 -0
  389. package/dist/styles/composer-link.css +11 -7
  390. package/dist/styles/composition-motion.css +3 -14
  391. package/dist/styles/context.css +2 -2
  392. package/dist/styles/conversation-tab-picker.css +7 -0
  393. package/dist/styles/conversation.css +8 -2
  394. package/dist/styles/dialog.css +2 -2
  395. package/dist/styles/employee-app.css +8 -2
  396. package/dist/styles/employee-chrome.css +15 -6
  397. package/dist/styles/execution-board.css +206 -114
  398. package/dist/styles/execution-result.css +2 -2
  399. package/dist/styles/field.css +187 -4
  400. package/dist/styles/file-tree.css +218 -40
  401. package/dist/styles/first-run-setup.css +914 -187
  402. package/dist/styles/github-motion-mark.css +0 -8
  403. package/dist/styles/index.css +145 -132
  404. package/dist/styles/inline-citation.css +5 -4
  405. package/dist/styles/list-detail.css +57 -0
  406. package/dist/styles/manager-office.css +6 -8
  407. package/dist/styles/manager-work.css +4 -2
  408. package/dist/styles/mcp-plugin-catalog.css +2 -2
  409. package/dist/styles/mcp-server-picker.css +3 -6
  410. package/dist/styles/media-preview-card.css +2 -2
  411. package/dist/styles/menu.css +0 -9
  412. package/dist/styles/menubar.css +18 -6
  413. package/dist/styles/message-scroller.css +47 -9
  414. package/dist/styles/message.css +3 -3
  415. package/dist/styles/model-selector.css +1 -1
  416. package/dist/styles/motion-reduction.css +39 -6
  417. package/dist/styles/pricing-page.css +1 -1
  418. package/dist/styles/prompt-input.css +29 -29
  419. package/dist/styles/queue.css +1 -1
  420. package/dist/styles/recipes.css +212 -28
  421. package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
  422. package/dist/styles/responsive-sidebar-shell.css +40 -43
  423. package/dist/styles/screen-stack.css +123 -0
  424. package/dist/styles/search-field.css +80 -3
  425. package/dist/styles/stepper.css +0 -10
  426. package/dist/styles/streamdown.css +2 -2
  427. package/dist/styles/subagent-run.css +9 -5
  428. package/dist/styles/swipe-actions.css +158 -0
  429. package/dist/styles/tabs.css +80 -23
  430. package/dist/styles/task.css +7 -1
  431. package/dist/styles/terminal.css +66 -78
  432. package/dist/styles/test-results.css +1 -19
  433. package/dist/styles/textarea.css +2 -1
  434. package/dist/styles/theme-mode-control.css +154 -26
  435. package/dist/styles/think-chat-tool-panels.css +1 -1
  436. package/dist/styles/think-execution-workbench.css +0 -9
  437. package/dist/styles/think-full-app.css +7 -1
  438. package/dist/styles/think-schedule.css +81 -54
  439. package/dist/styles/think-thread-picker.css +28 -37
  440. package/dist/styles/toast.css +11 -0
  441. package/dist/styles/toggle-group.css +0 -10
  442. package/dist/styles/toggle.css +13 -0
  443. package/dist/styles/tooltip.css +12 -0
  444. package/dist/styles/transition-surface.css +1 -0
  445. package/dist/styles/wallpaper-picker.css +224 -0
  446. package/dist/styles/web-preview.css +47 -18
  447. package/dist/styles/workspace-automation.css +116 -17
  448. package/dist/styles/workspace-concepts.css +1 -1
  449. package/dist/styles/workspace-desktop.css +124 -0
  450. package/dist/styles/workspace-entity-card.css +3 -1
  451. package/dist/styles/workspace-explorer.css +499 -5
  452. package/dist/utils/brand-marks.d.ts +13 -0
  453. package/dist/utils/brand-marks.js +14 -0
  454. package/dist/utils/codex-model-catalog.d.ts +1 -1
  455. package/dist/utils/desktop-artwork.d.ts +17 -0
  456. package/dist/utils/desktop-artwork.js +18 -0
  457. package/dist/utils/favicon.d.ts +6 -2
  458. package/dist/utils/favicon.js +16 -4
  459. package/dist/utils/model-provider-error.d.ts +17 -0
  460. package/dist/utils/model-provider-error.js +76 -0
  461. package/dist/utils/structured-code.d.ts +1 -1
  462. package/dist/workspace-assets-DdtnBDU3.js +213 -0
  463. package/dist/{workspace-concept-panel-KpMmznB_.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
  464. package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
  465. package/dist/workspace-delete-BOY6CMBf.js +183 -0
  466. package/dist/workspace-drag-B6hMXUNt.js +304 -0
  467. package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
  468. package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
  469. package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
  470. package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
  471. package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
  472. package/package.json +9 -3
  473. package/dist/Avatar-t1YRzdwB.d.ts +0 -101
  474. package/dist/CodeBlock-CNvOYR0Q.js +0 -318
  475. package/dist/ExecutionResult-DmC21cll.js +0 -279
  476. package/dist/FileTree-H31EVRv_.js +0 -323
  477. package/dist/ManagerOffice-B3X3iZV9.js +0 -1129
  478. package/dist/SetupChecklist-Wo4akaSG.js +0 -78
  479. package/dist/ThinkSchedule-CSuDGrZ9.d.ts +0 -34
  480. package/dist/WorkspaceFileView-BWI_AJlV.js +0 -783
  481. package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
  482. package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
  483. package/dist/attachment-preview-1CXJvrmb.js +0 -25
  484. package/dist/chatgpt-sign-in-button-DNchrZHs.js +0 -32
  485. package/dist/components/agents-sdk/ModelEndpointDialog.d.ts +0 -31
  486. package/dist/components/agents-sdk/ModelEndpointDialog.js +0 -141
  487. package/dist/connected-app-drafts-B9i69bkj.js +0 -283
  488. package/dist/copy-button-z20VEXRF.js +0 -45
  489. package/dist/icons-Yp99gmMC.js +0 -141
  490. package/dist/progress-ring-L2bbF0ji.js +0 -40
  491. package/dist/provider-logos-DWYY8wNz.js +0 -99
  492. package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
  493. package/dist/workspace-assets-Dq5toMQc.js +0 -107
  494. package/dist/workspace-concept-panel-CxZfmFkP.js +0 -66
  495. package/dist/workspace-delete-CoB0l6ZU.js +0 -81
  496. package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
@@ -1,23 +1,24 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { J as PencilIcon, dt as TrashIcon, et as RefreshIcon, it as SpinnerIcon, t as ArchiveIcon } from "../../icons-nLTnB9kd.js";
2
3
  import { ExpansionStateProvider } from "../ai-sdk/ExpansionState.js";
3
- import { V as PencilIcon, Z as SpinnerIcon, it as TrashIcon, q as RefreshIcon, t as ArchiveIcon } from "../../icons-Yp99gmMC.js";
4
- import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
5
- import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
6
4
  import { Message, MessageAction, MessageActions, MessageCopyAction, MessageMeta, MessageTimestamp } from "../ai-sdk/Message.js";
5
+ import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
6
+ import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
7
7
  import { AgentMessageParts } from "../ai-sdk/AgentMessageParts.js";
8
- import { Marker, MarkerContent } from "../foundations/Marker.js";
8
+ import { AgentChatMessageEditor } from "../ai-sdk/AgentChatMessageEditor.js";
9
9
  import { VirtualMessageScroller } from "../ai-sdk/MessageScrollerVirtual.js";
10
+ import { PromptInput, PromptInputSubmit, PromptInputTray, composerLinksToReferences, usePromptInputController } from "../ai-sdk/PromptInput.js";
10
11
  import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemIndicator, QueueList } from "../ai-sdk/Queue.js";
11
- import { BrandLoading } from "../general-purpose/BrandLoading.js";
12
- import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
13
- import { AgentChatQueueProvider, useOptionalAgentChatQueue } from "./AgentChatQueue.js";
14
12
  import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
13
+ import { BrandLoading } from "../general-purpose/BrandLoading.js";
14
+ import { Marker, MarkerContent } from "../foundations/Marker.js";
15
+ import { c } from "react/compiler-runtime";
15
16
  import * as React from "react";
16
17
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
18
  import { useRender } from "@base-ui/react/use-render";
18
19
  import { mergeProps } from "@base-ui/react/merge-props";
19
- import { isTextUIPart } from "ai";
20
20
  import { isCompactionMessage } from "agents/sessions";
21
+ import { isTextUIPart } from "ai";
21
22
  //#region src/components/agents-sdk/AgentChat.tsx
22
23
  function observeAgentChatDock(element) {
23
24
  if (!element || typeof ResizeObserver === "undefined") return;
@@ -45,144 +46,343 @@ function useAgentChatControls() {
45
46
  return value;
46
47
  }
47
48
  function useAgentChatRuntime() {
49
+ const $ = c(3);
48
50
  const messages = React.useContext(AgentChatMessagesContext);
49
51
  const controls = useAgentChatControls();
50
52
  if (!messages) throw new Error("Chat parts must be used inside AgentChat.Root or ThinkChat.Root.");
51
- return React.useMemo(() => ({
52
- messages,
53
- ...controls
54
- }), [messages, controls]);
53
+ let t0;
54
+ if ($[0] !== controls || $[1] !== messages) {
55
+ t0 = {
56
+ messages,
57
+ ...controls
58
+ };
59
+ $[0] = controls;
60
+ $[1] = messages;
61
+ $[2] = t0;
62
+ } else t0 = $[2];
63
+ return t0;
55
64
  }
56
65
  /** Layout and runtime adapter over the nearest queue owner; connections remain host-owned. */
57
- function AgentChatRoot({ onSubmit, onStop, onPromptQueued, ...props }) {
66
+ function AgentChatRoot(t0) {
67
+ const $ = c(14);
68
+ let onPromptQueued;
69
+ let onStop;
70
+ let onSubmit;
71
+ let props;
72
+ if ($[0] !== t0) {
73
+ ({onSubmit, onStop, onPromptQueued, ...props} = t0);
74
+ $[0] = t0;
75
+ $[1] = onPromptQueued;
76
+ $[2] = onStop;
77
+ $[3] = onSubmit;
78
+ $[4] = props;
79
+ } else {
80
+ onPromptQueued = $[1];
81
+ onStop = $[2];
82
+ onSubmit = $[3];
83
+ props = $[4];
84
+ }
58
85
  const queue = useOptionalAgentChatQueue();
59
- const root = /* @__PURE__ */ jsx(AgentChatRuntimeRoot, { ...props });
60
- return queue ? root : /* @__PURE__ */ jsx(AgentChatQueueProvider, {
61
- status: props.status ?? "ready",
62
- onSubmit,
63
- onStop,
64
- onPromptQueued,
65
- children: root
66
- });
67
- }
68
- function AgentChatRuntimeRoot({ messages, status = "ready", onRegenerate, onEditAndResend, onApprovalResponse, children, className, ref, ...props }) {
86
+ let t1;
87
+ if ($[5] !== props) {
88
+ t1 = /* @__PURE__ */ jsx(AgentChatRuntimeRoot, { ...props });
89
+ $[5] = props;
90
+ $[6] = t1;
91
+ } else t1 = $[6];
92
+ const root = t1;
93
+ let t2;
94
+ if ($[7] !== onPromptQueued || $[8] !== onStop || $[9] !== onSubmit || $[10] !== props || $[11] !== queue || $[12] !== root) {
95
+ t2 = queue ? root : /* @__PURE__ */ jsx(AgentChatQueueProvider, {
96
+ status: props.status ?? "ready",
97
+ onSubmit,
98
+ onStop,
99
+ onPromptQueued,
100
+ children: root
101
+ });
102
+ $[7] = onPromptQueued;
103
+ $[8] = onStop;
104
+ $[9] = onSubmit;
105
+ $[10] = props;
106
+ $[11] = queue;
107
+ $[12] = root;
108
+ $[13] = t2;
109
+ } else t2 = $[13];
110
+ return t2;
111
+ }
112
+ function AgentChatRuntimeRoot(t0) {
113
+ const $ = c(50);
114
+ let children;
115
+ let className;
116
+ let messages;
117
+ let onApprovalResponse;
118
+ let onEditAndResend;
119
+ let onRegenerate;
120
+ let props;
121
+ let ref;
122
+ let t1;
123
+ if ($[0] !== t0) {
124
+ ({messages, status: t1, onRegenerate, onEditAndResend, onApprovalResponse, children, className, ref, ...props} = t0);
125
+ $[0] = t0;
126
+ $[1] = children;
127
+ $[2] = className;
128
+ $[3] = messages;
129
+ $[4] = onApprovalResponse;
130
+ $[5] = onEditAndResend;
131
+ $[6] = onRegenerate;
132
+ $[7] = props;
133
+ $[8] = ref;
134
+ $[9] = t1;
135
+ } else {
136
+ children = $[1];
137
+ className = $[2];
138
+ messages = $[3];
139
+ onApprovalResponse = $[4];
140
+ onEditAndResend = $[5];
141
+ onRegenerate = $[6];
142
+ props = $[7];
143
+ ref = $[8];
144
+ t1 = $[9];
145
+ }
146
+ const status = t1 === void 0 ? "ready" : t1;
69
147
  const queue = useOptionalAgentChatQueue();
70
148
  if (!queue) throw new Error("AgentChat requires its queue owner.");
71
149
  const [announcement, setAnnouncement] = React.useState("");
72
150
  const announcementTimer = React.useRef(void 0);
73
- React.useEffect(() => () => clearTimeout(announcementTimer.current), []);
74
- const announce = React.useCallback((text) => {
75
- setAnnouncement("");
76
- clearTimeout(announcementTimer.current);
77
- announcementTimer.current = setTimeout(() => setAnnouncement(text), 50);
78
- }, []);
151
+ let t2;
152
+ let t3;
153
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
154
+ t2 = () => () => clearTimeout(announcementTimer.current);
155
+ t3 = [];
156
+ $[10] = t2;
157
+ $[11] = t3;
158
+ } else {
159
+ t2 = $[10];
160
+ t3 = $[11];
161
+ }
162
+ React.useEffect(t2, t3);
163
+ let t4;
164
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
165
+ t4 = (text) => {
166
+ setAnnouncement("");
167
+ clearTimeout(announcementTimer.current);
168
+ announcementTimer.current = setTimeout(() => setAnnouncement(text), 50);
169
+ };
170
+ $[12] = t4;
171
+ } else t4 = $[12];
172
+ const announce = t4;
79
173
  const { items: queued, submit, captureSubmit, remove: removeQueued, steer, error: queueError, submissionVersion } = queue;
80
174
  const busy = status === "submitted" || status === "streaming";
81
175
  const dockRef = React.useRef(null);
82
176
  const { canStop, stop: stopQueued } = queue;
83
- const stop = React.useMemo(() => canStop ? () => {
84
- stopQueued().catch(() => void 0);
85
- } : void 0, [canStop, stopQueued]);
177
+ let t5;
178
+ if ($[13] !== canStop || $[14] !== stopQueued) {
179
+ t5 = canStop ? () => {
180
+ stopQueued().catch(_temp);
181
+ } : void 0;
182
+ $[13] = canStop;
183
+ $[14] = stopQueued;
184
+ $[15] = t5;
185
+ } else t5 = $[15];
186
+ const stop = t5;
86
187
  const lastMessageId = messages.at(-1)?.id;
87
- const lastUserMessageId = messages.findLast((message) => message.role === "user" && !getAgentEvent(message))?.id;
88
- const lastAssistantMessageId = messages.findLast((message) => message.role === "assistant" && !isCompactionMessage(message) && !getAgentEvent(message))?.id;
89
- const value = React.useMemo(() => ({
90
- lastMessageId,
91
- lastUserMessageId,
92
- lastAssistantMessageId,
93
- status,
94
- busy,
95
- submit,
96
- captureSubmit,
97
- stop,
98
- canSubmit: queue.canSubmit,
99
- onRegenerate,
100
- onEditAndResend,
101
- onApprovalResponse,
102
- queued,
103
- removeQueued,
104
- steer,
105
- queueError,
106
- submissionVersion,
107
- dockRef,
108
- announce
109
- }), [
110
- lastMessageId,
111
- lastUserMessageId,
112
- lastAssistantMessageId,
113
- status,
114
- busy,
115
- submit,
116
- captureSubmit,
117
- stop,
118
- queue.canSubmit,
119
- onRegenerate,
120
- onEditAndResend,
121
- onApprovalResponse,
122
- queued,
123
- removeQueued,
124
- steer,
125
- queueError,
126
- submissionVersion,
127
- announce
128
- ]);
129
- return /* @__PURE__ */ jsx(AgentChatMessagesContext.Provider, {
130
- value: messages,
131
- children: /* @__PURE__ */ jsx(AgentChatControlsContext.Provider, {
188
+ const lastUserMessageId = messages.findLast(_temp2)?.id;
189
+ const lastAssistantMessageId = messages.findLast(_temp3)?.id;
190
+ let t6;
191
+ if ($[16] !== busy || $[17] !== captureSubmit || $[18] !== lastAssistantMessageId || $[19] !== lastMessageId || $[20] !== lastUserMessageId || $[21] !== onApprovalResponse || $[22] !== onEditAndResend || $[23] !== onRegenerate || $[24] !== queue.canSubmit || $[25] !== queueError || $[26] !== queued || $[27] !== removeQueued || $[28] !== status || $[29] !== steer || $[30] !== stop || $[31] !== submissionVersion || $[32] !== submit) {
192
+ t6 = {
193
+ lastMessageId,
194
+ lastUserMessageId,
195
+ lastAssistantMessageId,
196
+ status,
197
+ busy,
198
+ submit,
199
+ captureSubmit,
200
+ stop,
201
+ canSubmit: queue.canSubmit,
202
+ onRegenerate,
203
+ onEditAndResend,
204
+ onApprovalResponse,
205
+ queued,
206
+ removeQueued,
207
+ steer,
208
+ queueError,
209
+ submissionVersion,
210
+ dockRef,
211
+ announce
212
+ };
213
+ $[16] = busy;
214
+ $[17] = captureSubmit;
215
+ $[18] = lastAssistantMessageId;
216
+ $[19] = lastMessageId;
217
+ $[20] = lastUserMessageId;
218
+ $[21] = onApprovalResponse;
219
+ $[22] = onEditAndResend;
220
+ $[23] = onRegenerate;
221
+ $[24] = queue.canSubmit;
222
+ $[25] = queueError;
223
+ $[26] = queued;
224
+ $[27] = removeQueued;
225
+ $[28] = status;
226
+ $[29] = steer;
227
+ $[30] = stop;
228
+ $[31] = submissionVersion;
229
+ $[32] = submit;
230
+ $[33] = t6;
231
+ } else t6 = $[33];
232
+ const value = t6;
233
+ let t7;
234
+ if ($[34] !== className) {
235
+ t7 = cx("agent-chat", className);
236
+ $[34] = className;
237
+ $[35] = t7;
238
+ } else t7 = $[35];
239
+ let t8;
240
+ if ($[36] !== announcement) {
241
+ t8 = /* @__PURE__ */ jsx("span", {
242
+ className: "sigvelo-visually-hidden",
243
+ role: "status",
244
+ "aria-live": "polite",
245
+ "aria-atomic": "true",
246
+ children: announcement
247
+ });
248
+ $[36] = announcement;
249
+ $[37] = t8;
250
+ } else t8 = $[37];
251
+ let t9;
252
+ if ($[38] !== children || $[39] !== props || $[40] !== ref || $[41] !== t7 || $[42] !== t8) {
253
+ t9 = /* @__PURE__ */ jsxs("div", {
254
+ ref,
255
+ className: t7,
256
+ "data-recipe": "fill-host",
257
+ ...props,
258
+ children: [children, t8]
259
+ });
260
+ $[38] = children;
261
+ $[39] = props;
262
+ $[40] = ref;
263
+ $[41] = t7;
264
+ $[42] = t8;
265
+ $[43] = t9;
266
+ } else t9 = $[43];
267
+ let t10;
268
+ if ($[44] !== t9 || $[45] !== value) {
269
+ t10 = /* @__PURE__ */ jsx(AgentChatControlsContext.Provider, {
132
270
  value,
133
- children: /* @__PURE__ */ jsxs("div", {
134
- ref,
135
- className: cx("agent-chat", className),
136
- "data-recipe": "fill-host",
137
- ...props,
138
- children: [children, /* @__PURE__ */ jsx("span", {
139
- className: "sigvelo-visually-hidden",
140
- role: "status",
141
- "aria-live": "polite",
142
- "aria-atomic": "true",
143
- children: announcement
144
- })]
145
- })
146
- })
147
- });
271
+ children: t9
272
+ });
273
+ $[44] = t9;
274
+ $[45] = value;
275
+ $[46] = t10;
276
+ } else t10 = $[46];
277
+ let t11;
278
+ if ($[47] !== messages || $[48] !== t10) {
279
+ t11 = /* @__PURE__ */ jsx(AgentChatMessagesContext.Provider, {
280
+ value: messages,
281
+ children: t10
282
+ });
283
+ $[47] = messages;
284
+ $[48] = t10;
285
+ $[49] = t11;
286
+ } else t11 = $[49];
287
+ return t11;
148
288
  }
289
+ function _temp3(message_0) {
290
+ return message_0.role === "assistant" && !isCompactionMessage(message_0) && !getAgentEvent(message_0);
291
+ }
292
+ function _temp2(message) {
293
+ return message.role === "user" && !getAgentEvent(message);
294
+ }
295
+ function _temp() {}
149
296
  /** Windowed transcript. Historical rows are never a live region; their disclosure state survives windowing. */
150
- function AgentChatTranscript({ children, emptyState, className, scrollAnchor }) {
297
+ function AgentChatTranscript(t0) {
298
+ const $ = c(17);
299
+ const { children, emptyState, className, scrollAnchor } = t0;
151
300
  const { messages, busy } = useAgentChatRuntime();
152
- const messageNumbers = React.useMemo(() => {
301
+ let t1;
302
+ if ($[0] !== messages) {
153
303
  const counts = {
154
304
  system: 0,
155
305
  user: 0,
156
306
  assistant: 0
157
307
  };
158
- return messages.map((message) => isCompactionMessage(message) || getAgentEvent(message) ? 0 : ++counts[message.role]);
159
- }, [messages]);
160
- return /* @__PURE__ */ jsx(ExpansionStateProvider, { children: /* @__PURE__ */ jsx(VirtualMessageScroller, {
161
- className: cx("agent-chat__conversation", className),
162
- items: messages,
163
- scrollAnchor,
164
- getItemKey: (message) => message.id,
165
- emptyState,
166
- contentProps: {
308
+ t1 = messages.map((message) => isCompactionMessage(message) || getAgentEvent(message) ? 0 : counts[message.role] = counts[message.role] + 1);
309
+ $[0] = messages;
310
+ $[1] = t1;
311
+ } else t1 = $[1];
312
+ const messageNumbers = t1;
313
+ let t2;
314
+ if ($[2] !== className) {
315
+ t2 = cx("agent-chat__conversation", className);
316
+ $[2] = className;
317
+ $[3] = t2;
318
+ } else t2 = $[3];
319
+ let t3;
320
+ if ($[4] !== busy) {
321
+ t3 = {
167
322
  role: "log",
168
323
  "aria-live": "off",
169
324
  "aria-busy": busy,
170
325
  className: "agent-chat__transcript-content"
171
- },
172
- scrollButtonLabel: "Scroll to latest",
173
- scrollButtonProps: { className: "agent-chat__scroll-button" },
174
- renderItem: (message, messageIndex) => children({
175
- message,
326
+ };
327
+ $[4] = busy;
328
+ $[5] = t3;
329
+ } else t3 = $[5];
330
+ let t4;
331
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
332
+ t4 = { className: "agent-chat__scroll-button" };
333
+ $[6] = t4;
334
+ } else t4 = $[6];
335
+ let t5;
336
+ if ($[7] !== children || $[8] !== messageNumbers) {
337
+ t5 = (message_1, messageIndex) => children({
338
+ message: message_1,
176
339
  messageIndex,
177
340
  messageNumber: messageNumbers[messageIndex]
178
- })
179
- }) });
341
+ });
342
+ $[7] = children;
343
+ $[8] = messageNumbers;
344
+ $[9] = t5;
345
+ } else t5 = $[9];
346
+ let t6;
347
+ if ($[10] !== emptyState || $[11] !== messages || $[12] !== scrollAnchor || $[13] !== t2 || $[14] !== t3 || $[15] !== t5) {
348
+ t6 = /* @__PURE__ */ jsx(ExpansionStateProvider, { children: /* @__PURE__ */ jsx(VirtualMessageScroller, {
349
+ className: t2,
350
+ items: messages,
351
+ scrollAnchor,
352
+ getItemKey: _temp4,
353
+ emptyState,
354
+ contentProps: t3,
355
+ scrollButtonLabel: "Scroll to latest",
356
+ scrollButtonProps: t4,
357
+ renderItem: t5
358
+ }) });
359
+ $[10] = emptyState;
360
+ $[11] = messages;
361
+ $[12] = scrollAnchor;
362
+ $[13] = t2;
363
+ $[14] = t3;
364
+ $[15] = t5;
365
+ $[16] = t6;
366
+ } else t6 = $[16];
367
+ return t6;
180
368
  }
181
- function AgentChatLoading({ label = "Loading conversation" }) {
182
- return /* @__PURE__ */ jsx(BrandLoading, {
183
- className: "agent-chat__transcript-loading",
184
- label
185
- });
369
+ function _temp4(message_0) {
370
+ return message_0.id;
371
+ }
372
+ function AgentChatLoading(t0) {
373
+ const $ = c(2);
374
+ const { label: t1 } = t0;
375
+ const label = t1 === void 0 ? "Loading conversation" : t1;
376
+ let t2;
377
+ if ($[0] !== label) {
378
+ t2 = /* @__PURE__ */ jsx(BrandLoading, {
379
+ className: "agent-chat__transcript-loading",
380
+ label
381
+ });
382
+ $[0] = label;
383
+ $[1] = t2;
384
+ } else t2 = $[1];
385
+ return t2;
186
386
  }
187
387
  const ChatMessageContext = React.createContext(null);
188
388
  function useChatMessage() {
@@ -191,53 +391,121 @@ function useChatMessage() {
191
391
  return value;
192
392
  }
193
393
  /** Preserves runtime-authored event/compaction provenance and owns only the local edit lifecycle. */
194
- function AgentChatMessage({ message, messageIndex, messageNumber, children }) {
394
+ function AgentChatMessage(t0) {
395
+ const $ = c(25);
396
+ const { message, messageIndex, messageNumber, children } = t0;
195
397
  const { onEditAndResend } = useAgentChatControls();
196
398
  const [editing, setEditing] = React.useState(false);
197
399
  const editRef = React.useRef(null);
198
400
  const restoreFocus = React.useRef(false);
199
- React.useLayoutEffect(() => {
200
- if (!editing && restoreFocus.current) {
201
- editRef.current?.focus();
202
- restoreFocus.current = false;
203
- }
204
- }, [editing]);
205
- const value = React.useMemo(() => ({
206
- message,
207
- messageIndex,
208
- messageNumber,
209
- editRef,
210
- startEdit: () => setEditing(true)
211
- }), [
212
- message,
213
- messageIndex,
214
- messageNumber
215
- ]);
216
- if (isCompactionMessage(message)) return /* @__PURE__ */ jsx(Marker, {
217
- variant: "separator",
218
- children: /* @__PURE__ */ jsx(MarkerContent, { children: "Context compacted" })
219
- });
220
- const event = getAgentEvent(message);
221
- if (event) return /* @__PURE__ */ jsx(AgentEventRow, {
222
- message,
223
- event
224
- });
225
- return /* @__PURE__ */ jsx(ChatMessageContext.Provider, {
226
- value,
227
- children: /* @__PURE__ */ jsx(Message, {
228
- from: message.role,
229
- children: editing && onEditAndResend ? /* @__PURE__ */ jsx(AgentChatMessageEditor, {
401
+ let t1;
402
+ let t2;
403
+ if ($[0] !== editing) {
404
+ t1 = () => {
405
+ if (!editing && restoreFocus.current) {
406
+ editRef.current?.focus();
407
+ restoreFocus.current = false;
408
+ }
409
+ };
410
+ t2 = [editing];
411
+ $[0] = editing;
412
+ $[1] = t1;
413
+ $[2] = t2;
414
+ } else {
415
+ t1 = $[1];
416
+ t2 = $[2];
417
+ }
418
+ React.useLayoutEffect(t1, t2);
419
+ let t3;
420
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
421
+ t3 = () => setEditing(true);
422
+ $[3] = t3;
423
+ } else t3 = $[3];
424
+ let t4;
425
+ if ($[4] !== message || $[5] !== messageIndex || $[6] !== messageNumber) {
426
+ t4 = {
427
+ message,
428
+ messageIndex,
429
+ messageNumber,
430
+ editRef,
431
+ startEdit: t3
432
+ };
433
+ $[4] = message;
434
+ $[5] = messageIndex;
435
+ $[6] = messageNumber;
436
+ $[7] = t4;
437
+ } else t4 = $[7];
438
+ const value = t4;
439
+ if (isCompactionMessage(message)) {
440
+ let t5;
441
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
442
+ t5 = /* @__PURE__ */ jsx(Marker, {
443
+ variant: "separator",
444
+ children: /* @__PURE__ */ jsx(MarkerContent, { children: "Context compacted" })
445
+ });
446
+ $[8] = t5;
447
+ } else t5 = $[8];
448
+ return t5;
449
+ }
450
+ let t5;
451
+ if ($[9] !== message) {
452
+ t5 = getAgentEvent(message);
453
+ $[9] = message;
454
+ $[10] = t5;
455
+ } else t5 = $[10];
456
+ const event = t5;
457
+ if (event) {
458
+ let t6;
459
+ if ($[11] !== event || $[12] !== message) {
460
+ t6 = /* @__PURE__ */ jsx(AgentEventRow, {
230
461
  message,
231
- originalText: editableText(message) ?? "",
232
- onSubmit: onEditAndResend,
233
- onCancel: () => {
234
- restoreFocus.current = true;
235
- setEditing(false);
236
- },
237
- onSuccess: () => setEditing(false)
238
- }) : children
239
- })
240
- });
462
+ event
463
+ });
464
+ $[11] = event;
465
+ $[12] = message;
466
+ $[13] = t6;
467
+ } else t6 = $[13];
468
+ return t6;
469
+ }
470
+ let t6;
471
+ if ($[14] !== children || $[15] !== editing || $[16] !== message || $[17] !== onEditAndResend) {
472
+ t6 = editing && onEditAndResend ? /* @__PURE__ */ jsx(AgentChatMessageEditor, {
473
+ message,
474
+ originalText: editableText(message) ?? "",
475
+ onSubmit: onEditAndResend,
476
+ onCancel: () => {
477
+ restoreFocus.current = true;
478
+ setEditing(false);
479
+ },
480
+ onSuccess: () => setEditing(false)
481
+ }) : children;
482
+ $[14] = children;
483
+ $[15] = editing;
484
+ $[16] = message;
485
+ $[17] = onEditAndResend;
486
+ $[18] = t6;
487
+ } else t6 = $[18];
488
+ let t7;
489
+ if ($[19] !== message.role || $[20] !== t6) {
490
+ t7 = /* @__PURE__ */ jsx(Message, {
491
+ from: message.role,
492
+ children: t6
493
+ });
494
+ $[19] = message.role;
495
+ $[20] = t6;
496
+ $[21] = t7;
497
+ } else t7 = $[21];
498
+ let t8;
499
+ if ($[22] !== t7 || $[23] !== value) {
500
+ t8 = /* @__PURE__ */ jsx(ChatMessageContext.Provider, {
501
+ value,
502
+ children: t7
503
+ });
504
+ $[22] = t7;
505
+ $[23] = value;
506
+ $[24] = t8;
507
+ } else t8 = $[24];
508
+ return t8;
241
509
  }
242
510
  function editableText(message) {
243
511
  const part = message.parts[0];
@@ -248,19 +516,31 @@ function isCompactedPart(message, partIndex) {
248
516
  const metadata = message.metadata;
249
517
  return isTextUIPart(part) ? Array.isArray(metadata?.compactedTextParts) && metadata.compactedTextParts.includes(partIndex) : part !== void 0 && "toolCallId" in part && Array.isArray(metadata?.compactedToolOutputs) && metadata.compactedToolOutputs.includes(part.toolCallId);
250
518
  }
251
- function AgentChatMessageContent({ message, renderPart }) {
519
+ function AgentChatMessageContent(t0) {
520
+ const $ = c(4);
521
+ const { message, renderPart } = t0;
252
522
  const { lastMessageId, status } = useAgentChatControls();
253
- return /* @__PURE__ */ jsx(MemoizedMessageParts, {
254
- message,
255
- renderPart,
256
- status: message.id === lastMessageId ? status : "ready"
257
- });
258
- }
259
- function MessageParts({ message, renderPart, status }) {
260
- return /* @__PURE__ */ jsx(AgentMessageParts, {
261
- message,
262
- status,
263
- renderPart: (context) => {
523
+ const t1 = message.id === lastMessageId ? status : "ready";
524
+ let t2;
525
+ if ($[0] !== message || $[1] !== renderPart || $[2] !== t1) {
526
+ t2 = /* @__PURE__ */ jsx(MemoizedMessageParts, {
527
+ message,
528
+ renderPart,
529
+ status: t1
530
+ });
531
+ $[0] = message;
532
+ $[1] = renderPart;
533
+ $[2] = t1;
534
+ $[3] = t2;
535
+ } else t2 = $[3];
536
+ return t2;
537
+ }
538
+ function MessageParts(t0) {
539
+ const $ = c(7);
540
+ const { message, renderPart, status } = t0;
541
+ let t1;
542
+ if ($[0] !== message || $[1] !== renderPart) {
543
+ t1 = (context) => {
264
544
  const custom = renderPart?.(context);
265
545
  if (!isCompactedPart(message, context.partIndex)) return custom;
266
546
  const rendered = custom === void 0 ? context.defaultRender() : custom;
@@ -268,283 +548,708 @@ function MessageParts({ message, renderPart, status }) {
268
548
  className: "agent-chat__compacted",
269
549
  children: "Output truncated for storage"
270
550
  })] }) : null;
271
- }
272
- });
551
+ };
552
+ $[0] = message;
553
+ $[1] = renderPart;
554
+ $[2] = t1;
555
+ } else t1 = $[2];
556
+ let t2;
557
+ if ($[3] !== message || $[4] !== status || $[5] !== t1) {
558
+ t2 = /* @__PURE__ */ jsx(AgentMessageParts, {
559
+ message,
560
+ status,
561
+ renderPart: t1
562
+ });
563
+ $[3] = message;
564
+ $[4] = status;
565
+ $[5] = t1;
566
+ $[6] = t2;
567
+ } else t2 = $[6];
568
+ return t2;
273
569
  }
274
570
  const MemoizedMessageParts = React.memo(MessageParts);
275
571
  /** Stable action space for a message; callers choose every action inside it. */
276
- function AgentChatActions({ children, ...props }) {
572
+ function AgentChatActions(t0) {
573
+ const $ = c(11);
574
+ let children;
575
+ let props;
576
+ if ($[0] !== t0) {
577
+ ({children, ...props} = t0);
578
+ $[0] = t0;
579
+ $[1] = children;
580
+ $[2] = props;
581
+ } else {
582
+ children = $[1];
583
+ props = $[2];
584
+ }
277
585
  const { message, messageNumber } = useChatMessage();
278
586
  const { lastMessageId, lastUserMessageId, busy } = useAgentChatControls();
279
587
  const unavailable = busy && message.id === (message.role === "user" ? lastUserMessageId : lastMessageId);
280
- const actions = /* @__PURE__ */ jsx(MessageActions, {
281
- reserveSpace: message.role === "assistant",
282
- "aria-label": `Actions for ${message.role === "assistant" ? "response" : "message"} ${messageNumber}`,
283
- "data-unavailable": unavailable ? true : void 0,
284
- "aria-hidden": unavailable ? true : void 0,
285
- inert: unavailable ? true : void 0,
286
- ...props,
287
- children
288
- });
289
- return /* @__PURE__ */ jsx(MessageMeta, { children: actions });
588
+ const t1 = message.role === "assistant";
589
+ const t2 = `Actions for ${message.role === "assistant" ? "response" : "message"} ${messageNumber}`;
590
+ const t3 = unavailable ? true : void 0;
591
+ const t4 = unavailable ? true : void 0;
592
+ const t5 = unavailable ? true : void 0;
593
+ let t6;
594
+ if ($[3] !== children || $[4] !== props || $[5] !== t1 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4 || $[9] !== t5) {
595
+ const actions = /* @__PURE__ */ jsx(MessageActions, {
596
+ reserveSpace: t1,
597
+ "aria-label": t2,
598
+ "data-unavailable": t3,
599
+ "aria-hidden": t4,
600
+ inert: t5,
601
+ ...props,
602
+ children
603
+ });
604
+ t6 = /* @__PURE__ */ jsx(MessageMeta, { children: actions });
605
+ $[3] = children;
606
+ $[4] = props;
607
+ $[5] = t1;
608
+ $[6] = t2;
609
+ $[7] = t3;
610
+ $[8] = t4;
611
+ $[9] = t5;
612
+ $[10] = t6;
613
+ } else t6 = $[10];
614
+ return t6;
290
615
  }
291
616
  function AgentChatCopyAction() {
617
+ const $ = c(14);
292
618
  const { message, messageIndex, messageNumber } = useChatMessage();
293
619
  const { lastMessageId, busy, announce } = useAgentChatControls();
294
- const text = message.parts.filter(isTextUIPart).map((part) => part.text).join("\n\n").trim();
620
+ let t0;
621
+ if ($[0] !== message.parts) {
622
+ t0 = message.parts.filter(isTextUIPart).map(_temp5).join("\n\n").trim();
623
+ $[0] = message.parts;
624
+ $[1] = t0;
625
+ } else t0 = $[1];
626
+ const text = t0;
295
627
  if (!text) return null;
296
628
  const label = message.role === "assistant" ? `Copy response ${messageNumber}` : `Copy message ${messageIndex + 1}`;
297
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MessageCopyAction, {
298
- label,
299
- disabled: busy && message.id === lastMessageId,
300
- tooltip: message.role === "assistant" ? "Copy response" : "Copy message",
301
- text,
302
- size: "sm",
303
- onCopy: () => announce(`${label.replace("Copy response", "Response").replace("Copy message", "Message")} copied.`),
304
- onError: () => announce("Could not copy. Try again.")
305
- }) });
629
+ const t1 = busy && message.id === lastMessageId;
630
+ const t2 = message.role === "assistant" ? "Copy response" : "Copy message";
631
+ let t3;
632
+ if ($[2] !== announce || $[3] !== label) {
633
+ t3 = () => announce(`${label.replace("Copy response", "Response").replace("Copy message", "Message")} copied.`);
634
+ $[2] = announce;
635
+ $[3] = label;
636
+ $[4] = t3;
637
+ } else t3 = $[4];
638
+ let t4;
639
+ if ($[5] !== announce) {
640
+ t4 = () => announce("Could not copy. Try again.");
641
+ $[5] = announce;
642
+ $[6] = t4;
643
+ } else t4 = $[6];
644
+ let t5;
645
+ if ($[7] !== label || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4 || $[12] !== text) {
646
+ t5 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MessageCopyAction, {
647
+ label,
648
+ disabled: t1,
649
+ tooltip: t2,
650
+ text,
651
+ size: "sm",
652
+ onCopy: t3,
653
+ onError: t4
654
+ }) });
655
+ $[7] = label;
656
+ $[8] = t1;
657
+ $[9] = t2;
658
+ $[10] = t3;
659
+ $[11] = t4;
660
+ $[12] = text;
661
+ $[13] = t5;
662
+ } else t5 = $[13];
663
+ return t5;
664
+ }
665
+ function _temp5(part) {
666
+ return part.text;
306
667
  }
307
668
  function AgentChatRetryAction() {
669
+ const $ = c(7);
308
670
  const { message } = useChatMessage();
309
671
  const { lastAssistantMessageId, busy, onRegenerate } = useAgentChatControls();
310
672
  if (!onRegenerate || message.id !== lastAssistantMessageId) return null;
311
- return /* @__PURE__ */ jsx(MessageAction, {
312
- disabled: busy,
313
- label: "Retry",
314
- tooltip: "Regenerate response",
315
- size: "sm",
316
- onClick: () => onRegenerate(message.id),
317
- children: /* @__PURE__ */ jsx(RefreshIcon, { size: 14 })
318
- });
673
+ let t0;
674
+ if ($[0] !== message.id || $[1] !== onRegenerate) {
675
+ t0 = () => onRegenerate(message.id);
676
+ $[0] = message.id;
677
+ $[1] = onRegenerate;
678
+ $[2] = t0;
679
+ } else t0 = $[2];
680
+ let t1;
681
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
682
+ t1 = /* @__PURE__ */ jsx(RefreshIcon, { size: 14 });
683
+ $[3] = t1;
684
+ } else t1 = $[3];
685
+ let t2;
686
+ if ($[4] !== busy || $[5] !== t0) {
687
+ t2 = /* @__PURE__ */ jsx(MessageAction, {
688
+ disabled: busy,
689
+ label: "Retry",
690
+ tooltip: "Regenerate response",
691
+ size: "sm",
692
+ onClick: t0,
693
+ children: t1
694
+ });
695
+ $[4] = busy;
696
+ $[5] = t0;
697
+ $[6] = t2;
698
+ } else t2 = $[6];
699
+ return t2;
319
700
  }
320
701
  function AgentChatEditAction() {
702
+ const $ = c(5);
321
703
  const { message, startEdit, editRef } = useChatMessage();
322
704
  const { lastUserMessageId, busy, onEditAndResend } = useAgentChatControls();
323
705
  if (!onEditAndResend || !editableText(message) || message.id !== lastUserMessageId) return null;
324
- return /* @__PURE__ */ jsx(MessageAction, {
325
- ref: editRef,
326
- disabled: busy,
327
- label: "Edit message",
328
- tooltip: "Edit and resend",
329
- size: "sm",
330
- onClick: startEdit,
331
- children: /* @__PURE__ */ jsx(PencilIcon, {})
332
- });
706
+ let t0;
707
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
708
+ t0 = /* @__PURE__ */ jsx(PencilIcon, {});
709
+ $[0] = t0;
710
+ } else t0 = $[0];
711
+ let t1;
712
+ if ($[1] !== busy || $[2] !== editRef || $[3] !== startEdit) {
713
+ t1 = /* @__PURE__ */ jsx(MessageAction, {
714
+ ref: editRef,
715
+ disabled: busy,
716
+ label: "Edit message",
717
+ tooltip: "Edit and resend",
718
+ size: "sm",
719
+ onClick: startEdit,
720
+ children: t0
721
+ });
722
+ $[1] = busy;
723
+ $[2] = editRef;
724
+ $[3] = startEdit;
725
+ $[4] = t1;
726
+ } else t1 = $[4];
727
+ return t1;
333
728
  }
334
729
  function AgentChatTimestamp() {
730
+ const $ = c(2);
335
731
  const { message } = useChatMessage();
336
732
  const metadata = message.metadata;
337
733
  if (!metadata || typeof metadata !== "object" || !("createdAt" in metadata)) return null;
338
734
  const value = metadata.createdAt;
339
735
  if (!(value instanceof Date) && typeof value !== "number" && typeof value !== "string") return null;
340
- const date = new Date(value);
341
- return Number.isNaN(date.getTime()) ? null : /* @__PURE__ */ jsx(MessageTimestamp, { date });
736
+ let t0;
737
+ if ($[0] !== value) {
738
+ const date = new Date(value);
739
+ t0 = Number.isNaN(date.getTime()) ? null : /* @__PURE__ */ jsx(MessageTimestamp, { date });
740
+ $[0] = value;
741
+ $[1] = t0;
742
+ } else t0 = $[1];
743
+ return t0;
342
744
  }
343
745
  /** Measured bottom surface for notices, queued prompts, approvals and the form. */
344
- function AgentChatDock({ children, render, ref, ...props }) {
746
+ function AgentChatDock(t0) {
747
+ const $ = c(11);
748
+ const { children, render, ref, ...props } = t0;
345
749
  const { dockRef } = useAgentChatControls();
346
- const observe = React.useCallback((element) => {
347
- dockRef.current = element;
348
- return observeAgentChatDock(element);
349
- }, [dockRef]);
350
- return useRender({
351
- defaultTagName: "div",
352
- render,
353
- ref: [ref ?? null, observe],
354
- props: mergeProps({
355
- className: "agent-chat__dock",
356
- children: /* @__PURE__ */ jsx("div", {
357
- className: "agent-chat__dock-content",
358
- children
359
- })
360
- }, props)
361
- });
750
+ let t1;
751
+ if ($[0] !== dockRef) {
752
+ t1 = (element) => {
753
+ dockRef.current = element;
754
+ return observeAgentChatDock(element);
755
+ };
756
+ $[0] = dockRef;
757
+ $[1] = t1;
758
+ } else t1 = $[1];
759
+ const observe = t1;
760
+ const t2 = "div";
761
+ const t3 = ref ?? null;
762
+ let t4;
763
+ if ($[2] !== observe || $[3] !== t3) {
764
+ t4 = [t3, observe];
765
+ $[2] = observe;
766
+ $[3] = t3;
767
+ $[4] = t4;
768
+ } else t4 = $[4];
769
+ let t5;
770
+ if ($[5] !== children) {
771
+ t5 = /* @__PURE__ */ jsx("div", {
772
+ className: "agent-chat__dock-content",
773
+ children
774
+ });
775
+ $[5] = children;
776
+ $[6] = t5;
777
+ } else t5 = $[6];
778
+ const t6 = mergeProps({
779
+ className: "agent-chat__dock",
780
+ children: t5
781
+ }, props);
782
+ let t7;
783
+ if ($[7] !== render || $[8] !== t4 || $[9] !== t6) {
784
+ t7 = {
785
+ defaultTagName: t2,
786
+ render,
787
+ ref: t4,
788
+ props: t6
789
+ };
790
+ $[7] = render;
791
+ $[8] = t4;
792
+ $[9] = t6;
793
+ $[10] = t7;
794
+ } else t7 = $[10];
795
+ return useRender(t7);
362
796
  }
363
797
  /** Submission adapter only. Compose it inside Dock; the caller owns its inputs and controls. */
364
- function AgentChatComposer({ children, disabled = false, className, onSubmitCapture, ...props }) {
798
+ function AgentChatComposer(t0) {
799
+ const $ = c(21);
800
+ let children;
801
+ let className;
802
+ let onSubmitCapture;
803
+ let props;
804
+ let t1;
805
+ if ($[0] !== t0) {
806
+ ({children, disabled: t1, className, onSubmitCapture, ...props} = t0);
807
+ $[0] = t0;
808
+ $[1] = children;
809
+ $[2] = className;
810
+ $[3] = onSubmitCapture;
811
+ $[4] = props;
812
+ $[5] = t1;
813
+ } else {
814
+ children = $[1];
815
+ className = $[2];
816
+ onSubmitCapture = $[3];
817
+ props = $[4];
818
+ t1 = $[5];
819
+ }
820
+ const disabled = t1 === void 0 ? false : t1;
365
821
  const { submit, captureSubmit, canSubmit } = useAgentChatControls();
366
- const submissions = React.useRef(/* @__PURE__ */ new WeakMap());
367
- return /* @__PURE__ */ jsx(PromptInput, {
368
- ...props,
369
- className: cx("agent-chat__composer", className),
370
- onSubmitCapture: (event) => {
822
+ let t2;
823
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
824
+ t2 = /* @__PURE__ */ new WeakMap();
825
+ $[6] = t2;
826
+ } else t2 = $[6];
827
+ const submissions = React.useRef(t2);
828
+ let t3;
829
+ if ($[7] !== className) {
830
+ t3 = cx("agent-chat__composer", className);
831
+ $[7] = className;
832
+ $[8] = t3;
833
+ } else t3 = $[8];
834
+ let t4;
835
+ if ($[9] !== captureSubmit || $[10] !== onSubmitCapture) {
836
+ t4 = (event) => {
371
837
  onSubmitCapture?.(event);
372
838
  submissions.current.set(event.nativeEvent, captureSubmit());
373
- },
374
- onSubmit: (message, event) => {
839
+ };
840
+ $[9] = captureSubmit;
841
+ $[10] = onSubmitCapture;
842
+ $[11] = t4;
843
+ } else t4 = $[11];
844
+ let t5;
845
+ if ($[12] !== submit) {
846
+ t5 = (message, event_0) => {
375
847
  const references = composerLinksToReferences(message.text);
376
- return (submissions.current.get(event.nativeEvent) ?? submit)(references.length ? {
848
+ return (submissions.current.get(event_0.nativeEvent) ?? submit)(references.length ? {
377
849
  ...message,
378
850
  references
379
851
  } : message);
380
- },
381
- inert: disabled || !canSubmit ? true : void 0,
382
- children
383
- });
852
+ };
853
+ $[12] = submit;
854
+ $[13] = t5;
855
+ } else t5 = $[13];
856
+ const t6 = disabled || !canSubmit ? true : void 0;
857
+ let t7;
858
+ if ($[14] !== children || $[15] !== props || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t6) {
859
+ t7 = /* @__PURE__ */ jsx(PromptInput, {
860
+ ...props,
861
+ className: t3,
862
+ onSubmitCapture: t4,
863
+ onSubmit: t5,
864
+ inert: t6,
865
+ children
866
+ });
867
+ $[14] = children;
868
+ $[15] = props;
869
+ $[16] = t3;
870
+ $[17] = t4;
871
+ $[18] = t5;
872
+ $[19] = t6;
873
+ $[20] = t7;
874
+ } else t7 = $[20];
875
+ return t7;
384
876
  }
385
- function AgentChatSubmit({ disabled = false }) {
877
+ function AgentChatSubmit(t0) {
878
+ const $ = c(8);
879
+ const { disabled: t1 } = t0;
880
+ const disabled = t1 === void 0 ? false : t1;
386
881
  const { status, stop, canSubmit } = useAgentChatControls();
387
882
  const { textInput, attachments } = usePromptInputController();
388
- return /* @__PURE__ */ jsx(PromptInputSubmit, {
389
- status,
390
- onStop: stop,
391
- disabled: disabled || !canSubmit,
392
- hasContent: Boolean(textInput.value.trim()) || attachments.files.length > 0
393
- });
883
+ const t2 = disabled || !canSubmit;
884
+ let t3;
885
+ if ($[0] !== attachments || $[1] !== textInput.value) {
886
+ t3 = Boolean(textInput.value.trim()) || attachments.files.length > 0;
887
+ $[0] = attachments;
888
+ $[1] = textInput.value;
889
+ $[2] = t3;
890
+ } else t3 = $[2];
891
+ let t4;
892
+ if ($[3] !== status || $[4] !== stop || $[5] !== t2 || $[6] !== t3) {
893
+ t4 = /* @__PURE__ */ jsx(PromptInputSubmit, {
894
+ status,
895
+ onStop: stop,
896
+ disabled: t2,
897
+ hasContent: t3
898
+ });
899
+ $[3] = status;
900
+ $[4] = stop;
901
+ $[5] = t2;
902
+ $[6] = t3;
903
+ $[7] = t4;
904
+ } else t4 = $[7];
905
+ return t4;
394
906
  }
395
907
  /** A queue tray aligned with the chat composer. */
396
- function AgentChatPromptTray({ className, ...props }) {
397
- return /* @__PURE__ */ jsx(PromptInputTray, {
398
- ...props,
399
- side: "top",
400
- className: cx("agent-chat__prompt-tray", className)
401
- });
908
+ function AgentChatPromptTray(t0) {
909
+ const $ = c(8);
910
+ let className;
911
+ let props;
912
+ if ($[0] !== t0) {
913
+ ({className, ...props} = t0);
914
+ $[0] = t0;
915
+ $[1] = className;
916
+ $[2] = props;
917
+ } else {
918
+ className = $[1];
919
+ props = $[2];
920
+ }
921
+ let t1;
922
+ if ($[3] !== className) {
923
+ t1 = cx("agent-chat__prompt-tray", className);
924
+ $[3] = className;
925
+ $[4] = t1;
926
+ } else t1 = $[4];
927
+ let t2;
928
+ if ($[5] !== props || $[6] !== t1) {
929
+ t2 = /* @__PURE__ */ jsx(PromptInputTray, {
930
+ ...props,
931
+ side: "top",
932
+ className: t1
933
+ });
934
+ $[5] = props;
935
+ $[6] = t1;
936
+ $[7] = t2;
937
+ } else t2 = $[7];
938
+ return t2;
402
939
  }
403
940
  function AgentChatQueue() {
941
+ const $ = c(18);
404
942
  const { queued, busy, stop, steer, removeQueued, queueError } = useAgentChatControls();
405
943
  if (!queued.length && !queueError) return null;
406
- return /* @__PURE__ */ jsx(AgentChatPromptTray, {
407
- "data-agent-chat-queue": "",
408
- children: /* @__PURE__ */ jsxs(Queue, {
409
- density: "compact",
410
- children: [queueError ? /* @__PURE__ */ jsx(AgentChatNotice, {
411
- "data-tone": "danger",
412
- role: "alert",
413
- children: queueError
414
- }) : null, /* @__PURE__ */ jsx(QueueList, {
415
- "aria-label": "Queued messages",
416
- children: queued.map((pending) => {
417
- const label = pending.message.text || "Queued message";
418
- return /* @__PURE__ */ jsxs(QueueItem, {
419
- "data-slot": "agent-chat-queued-message",
420
- children: [
421
- /* @__PURE__ */ jsx(QueueItemIndicator, {}),
422
- /* @__PURE__ */ jsx(QueueItemContent, { children: /* @__PURE__ */ jsx("span", {
423
- "data-slot": "agent-chat-queued-text",
424
- className: "sigvelo-truncate sigvelo-truncate-grow",
425
- children: label
426
- }) }),
427
- /* @__PURE__ */ jsxs(QueueItemActions, {
428
- persistent: true,
429
- children: [!busy || stop ? /* @__PURE__ */ jsx(QueueItemAction, {
430
- "aria-label": `${busy ? "Steer" : "Send"} queued message: ${label}`,
431
- onClick: () => {
432
- steer(pending.id).catch(() => void 0);
433
- },
434
- children: busy ? "Steer" : "Send now"
435
- }) : null, /* @__PURE__ */ jsx(QueueItemAction, {
436
- "aria-label": `Remove queued message: ${label}`,
437
- onClick: () => removeQueued(pending.id),
438
- children: /* @__PURE__ */ jsx(TrashIcon, {})
439
- })]
440
- })
441
- ]
442
- }, pending.id);
443
- })
444
- })]
445
- })
446
- });
447
- }
448
- function AgentChatNotice({ children, ...props }) {
449
- return /* @__PURE__ */ jsx("div", {
450
- className: "agent-chat__notice",
451
- role: "status",
452
- "aria-atomic": "true",
453
- ...props,
454
- children
455
- });
944
+ let t0;
945
+ if ($[0] !== queueError) {
946
+ t0 = queueError ? /* @__PURE__ */ jsx(AgentChatNotice, {
947
+ "data-tone": "danger",
948
+ role: "alert",
949
+ children: queueError
950
+ }) : null;
951
+ $[0] = queueError;
952
+ $[1] = t0;
953
+ } else t0 = $[1];
954
+ let t1;
955
+ if ($[2] !== busy || $[3] !== queued || $[4] !== removeQueued || $[5] !== steer || $[6] !== stop) {
956
+ let t2;
957
+ if ($[8] !== busy || $[9] !== removeQueued || $[10] !== steer || $[11] !== stop) {
958
+ t2 = (pending) => {
959
+ const label = pending.message.text || "Queued message";
960
+ return /* @__PURE__ */ jsxs(QueueItem, {
961
+ "data-slot": "agent-chat-queued-message",
962
+ children: [
963
+ /* @__PURE__ */ jsx(QueueItemIndicator, {}),
964
+ /* @__PURE__ */ jsx(QueueItemContent, { children: /* @__PURE__ */ jsx("span", {
965
+ "data-slot": "agent-chat-queued-text",
966
+ className: "sigvelo-truncate sigvelo-truncate-grow",
967
+ children: label
968
+ }) }),
969
+ /* @__PURE__ */ jsxs(QueueItemActions, {
970
+ persistent: true,
971
+ children: [!busy || stop ? /* @__PURE__ */ jsx(QueueItemAction, {
972
+ "aria-label": `${busy ? "Steer" : "Send"} queued message: ${label}`,
973
+ onClick: () => {
974
+ steer(pending.id).catch(_temp6);
975
+ },
976
+ children: busy ? "Steer" : "Send now"
977
+ }) : null, /* @__PURE__ */ jsx(QueueItemAction, {
978
+ "aria-label": `Remove queued message: ${label}`,
979
+ onClick: () => removeQueued(pending.id),
980
+ children: /* @__PURE__ */ jsx(TrashIcon, {})
981
+ })]
982
+ })
983
+ ]
984
+ }, pending.id);
985
+ };
986
+ $[8] = busy;
987
+ $[9] = removeQueued;
988
+ $[10] = steer;
989
+ $[11] = stop;
990
+ $[12] = t2;
991
+ } else t2 = $[12];
992
+ t1 = queued.map(t2);
993
+ $[2] = busy;
994
+ $[3] = queued;
995
+ $[4] = removeQueued;
996
+ $[5] = steer;
997
+ $[6] = stop;
998
+ $[7] = t1;
999
+ } else t1 = $[7];
1000
+ let t2;
1001
+ if ($[13] !== t1) {
1002
+ t2 = /* @__PURE__ */ jsx(QueueList, {
1003
+ "aria-label": "Queued messages",
1004
+ children: t1
1005
+ });
1006
+ $[13] = t1;
1007
+ $[14] = t2;
1008
+ } else t2 = $[14];
1009
+ let t3;
1010
+ if ($[15] !== t0 || $[16] !== t2) {
1011
+ t3 = /* @__PURE__ */ jsx(AgentChatPromptTray, {
1012
+ "data-agent-chat-queue": "",
1013
+ children: /* @__PURE__ */ jsxs(Queue, {
1014
+ density: "compact",
1015
+ children: [t0, t2]
1016
+ })
1017
+ });
1018
+ $[15] = t0;
1019
+ $[16] = t2;
1020
+ $[17] = t3;
1021
+ } else t3 = $[17];
1022
+ return t3;
1023
+ }
1024
+ function _temp6() {}
1025
+ function AgentChatNotice(t0) {
1026
+ const $ = c(6);
1027
+ let children;
1028
+ let props;
1029
+ if ($[0] !== t0) {
1030
+ ({children, ...props} = t0);
1031
+ $[0] = t0;
1032
+ $[1] = children;
1033
+ $[2] = props;
1034
+ } else {
1035
+ children = $[1];
1036
+ props = $[2];
1037
+ }
1038
+ let t1;
1039
+ if ($[3] !== children || $[4] !== props) {
1040
+ t1 = /* @__PURE__ */ jsx("div", {
1041
+ className: "agent-chat__notice",
1042
+ role: "status",
1043
+ "aria-atomic": "true",
1044
+ ...props,
1045
+ children
1046
+ });
1047
+ $[3] = children;
1048
+ $[4] = props;
1049
+ $[5] = t1;
1050
+ } else t1 = $[5];
1051
+ return t1;
456
1052
  }
457
1053
  const EMPTY_APPROVAL_ITEMS = [];
458
1054
  const EMPTY_SKIPPED_IDS = [];
459
1055
  const ApprovalsContext = React.createContext(null);
1056
+ function pendingApprovalItems(messages, pendingApprovals, skippedIds, pausedExecutions, respondable) {
1057
+ const items = [...getPendingToolApprovals(messages, { pausedExecutions }).filter((part) => (part.state !== "approval-requested" || respondable) && !skippedIds.includes(getApprovalStateKey(part) ?? "")).map((part) => ({ part })), ...pendingApprovals.filter((a) => !skippedIds.includes(a.executionId)).map((approval) => ({ approval }))];
1058
+ return items.length ? items : EMPTY_APPROVAL_ITEMS;
1059
+ }
460
1060
  function useAgentChatApprovals() {
461
1061
  const value = React.useContext(ApprovalsContext);
462
1062
  if (!value) throw new Error("Approval parts require AgentChat.Approvals or ThinkChat.Approvals.");
463
1063
  return value;
464
1064
  }
465
- function AgentChatApprovals({ thinkStub, pendingApprovals = [], onExecutionSettled, children }) {
1065
+ function AgentChatApprovals(t0) {
1066
+ const $ = c(34);
1067
+ const { thinkStub, pendingApprovals: t1, onExecutionSettled, children } = t0;
1068
+ let t2;
1069
+ if ($[0] !== t1) {
1070
+ t2 = t1 === void 0 ? [] : t1;
1071
+ $[0] = t1;
1072
+ $[1] = t2;
1073
+ } else t2 = $[1];
1074
+ const pendingApprovals = t2;
466
1075
  const { messages, onApprovalResponse, dockRef } = useAgentChatRuntime();
467
- const [skipped, setSkipped] = React.useState({
468
- source: thinkStub,
469
- ids: []
470
- });
1076
+ let t3;
1077
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1078
+ t3 = [];
1079
+ $[2] = t3;
1080
+ } else t3 = $[2];
1081
+ let t4;
1082
+ if ($[3] !== thinkStub) {
1083
+ t4 = {
1084
+ source: thinkStub,
1085
+ ids: t3
1086
+ };
1087
+ $[3] = thinkStub;
1088
+ $[4] = t4;
1089
+ } else t4 = $[4];
1090
+ const [skipped, setSkipped] = React.useState(t4);
471
1091
  const ids = skipped.source === thinkStub ? skipped.ids : EMPTY_SKIPPED_IDS;
472
- const items = [...getPendingToolApprovals(messages, { pausedExecutions: Boolean(thinkStub) }).filter((part) => (part.state !== "approval-requested" || onApprovalResponse) && !ids.includes(getApprovalStateKey(part) ?? "")).map((part) => ({ part })), ...pendingApprovals.filter((a) => !ids.includes(a.executionId)).map((approval) => ({ approval }))];
473
- const pending = items.length ? items : EMPTY_APPROVAL_ITEMS;
1092
+ const t5 = Boolean(thinkStub);
1093
+ const t6 = Boolean(onApprovalResponse);
1094
+ let t7;
1095
+ if ($[5] !== ids || $[6] !== messages || $[7] !== pendingApprovals || $[8] !== t5 || $[9] !== t6) {
1096
+ t7 = pendingApprovalItems(messages, pendingApprovals, ids, t5, t6);
1097
+ $[5] = ids;
1098
+ $[6] = messages;
1099
+ $[7] = pendingApprovals;
1100
+ $[8] = t5;
1101
+ $[9] = t6;
1102
+ $[10] = t7;
1103
+ } else t7 = $[10];
1104
+ const pending = t7;
474
1105
  const restore = React.useRef(false);
475
1106
  const active = React.useRef(false);
476
- React.useLayoutEffect(() => {
477
- active.current = true;
478
- return () => {
479
- active.current = false;
480
- restore.current = false;
1107
+ let t8;
1108
+ let t9;
1109
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1110
+ t8 = () => {
1111
+ active.current = true;
1112
+ return () => {
1113
+ active.current = false;
1114
+ restore.current = false;
1115
+ };
481
1116
  };
482
- }, []);
1117
+ t9 = [];
1118
+ $[11] = t8;
1119
+ $[12] = t9;
1120
+ } else {
1121
+ t8 = $[11];
1122
+ t9 = $[12];
1123
+ }
1124
+ React.useLayoutEffect(t8, t9);
483
1125
  const pendingCount = React.useRef(pending.length);
484
- const restoreFocus = React.useCallback(() => {
485
- if (active.current && !pendingCount.current && restore.current) {
486
- restore.current = false;
487
- dockRef.current?.querySelector("textarea,[contenteditable=\"true\"]")?.focus();
488
- }
489
- }, [dockRef]);
490
- React.useLayoutEffect(() => {
491
- pendingCount.current = pending.length;
492
- restoreFocus();
493
- }, [pending.length, restoreFocus]);
494
- const skip = React.useCallback(() => {
495
- const item = pending[0];
496
- if (!item) return;
497
- restore.current = true;
498
- const id = "part" in item ? getApprovalStateKey(item.part) : item.approval.executionId;
499
- if (id) setSkipped({
500
- source: thinkStub,
501
- ids: [...ids, id]
502
- });
503
- }, [
504
- pending,
505
- thinkStub,
506
- ids
507
- ]);
508
- const settled = React.useCallback(async () => {
509
- if (active.current) {
510
- restore.current = true;
1126
+ let t10;
1127
+ if ($[13] !== dockRef) {
1128
+ t10 = () => {
1129
+ if (active.current && !pendingCount.current && restore.current) {
1130
+ restore.current = false;
1131
+ dockRef.current?.querySelector("textarea,[contenteditable=\"true\"]")?.focus();
1132
+ }
1133
+ };
1134
+ $[13] = dockRef;
1135
+ $[14] = t10;
1136
+ } else t10 = $[14];
1137
+ const restoreFocus = t10;
1138
+ let t11;
1139
+ let t12;
1140
+ if ($[15] !== pending.length || $[16] !== restoreFocus) {
1141
+ t11 = () => {
1142
+ pendingCount.current = pending.length;
511
1143
  restoreFocus();
512
- }
513
- await onExecutionSettled?.();
514
- }, [onExecutionSettled, restoreFocus]);
515
- const value = React.useMemo(() => ({
516
- pending,
517
- skip,
518
- settled,
519
- thinkStub
520
- }), [
521
- pending,
522
- skip,
523
- settled,
524
- thinkStub
525
- ]);
526
- return /* @__PURE__ */ jsx(ApprovalsContext.Provider, {
527
- value,
528
- children
529
- });
1144
+ };
1145
+ t12 = [pending.length, restoreFocus];
1146
+ $[15] = pending.length;
1147
+ $[16] = restoreFocus;
1148
+ $[17] = t11;
1149
+ $[18] = t12;
1150
+ } else {
1151
+ t11 = $[17];
1152
+ t12 = $[18];
1153
+ }
1154
+ React.useLayoutEffect(t11, t12);
1155
+ let t13;
1156
+ if ($[19] !== ids || $[20] !== pending[0] || $[21] !== thinkStub) {
1157
+ t13 = () => {
1158
+ const item = pending[0];
1159
+ if (!item) return;
1160
+ restore.current = true;
1161
+ const id = "part" in item ? getApprovalStateKey(item.part) : item.approval.executionId;
1162
+ if (id) setSkipped({
1163
+ source: thinkStub,
1164
+ ids: [...ids, id]
1165
+ });
1166
+ };
1167
+ $[19] = ids;
1168
+ $[20] = pending[0];
1169
+ $[21] = thinkStub;
1170
+ $[22] = t13;
1171
+ } else t13 = $[22];
1172
+ const skip = t13;
1173
+ let t14;
1174
+ if ($[23] !== onExecutionSettled || $[24] !== restoreFocus) {
1175
+ t14 = async () => {
1176
+ if (active.current) {
1177
+ restore.current = true;
1178
+ restoreFocus();
1179
+ }
1180
+ await onExecutionSettled?.();
1181
+ };
1182
+ $[23] = onExecutionSettled;
1183
+ $[24] = restoreFocus;
1184
+ $[25] = t14;
1185
+ } else t14 = $[25];
1186
+ const settled = t14;
1187
+ let t15;
1188
+ if ($[26] !== pending || $[27] !== settled || $[28] !== skip || $[29] !== thinkStub) {
1189
+ t15 = {
1190
+ pending,
1191
+ skip,
1192
+ settled,
1193
+ thinkStub
1194
+ };
1195
+ $[26] = pending;
1196
+ $[27] = settled;
1197
+ $[28] = skip;
1198
+ $[29] = thinkStub;
1199
+ $[30] = t15;
1200
+ } else t15 = $[30];
1201
+ const value = t15;
1202
+ let t16;
1203
+ if ($[31] !== children || $[32] !== value) {
1204
+ t16 = /* @__PURE__ */ jsx(ApprovalsContext.Provider, {
1205
+ value,
1206
+ children
1207
+ });
1208
+ $[31] = children;
1209
+ $[32] = value;
1210
+ $[33] = t16;
1211
+ } else t16 = $[33];
1212
+ return t16;
530
1213
  }
531
1214
  function AgentChatApproval() {
1215
+ const $ = c(11);
532
1216
  const { onApprovalResponse } = useAgentChatControls();
533
1217
  const { pending, skip, settled, thinkStub } = useAgentChatApprovals();
534
1218
  const first = pending[0];
535
1219
  if (!first) return null;
536
- return /* @__PURE__ */ jsx(PromptInputApproval, {
537
- part: "part" in first ? first.part : void 0,
538
- approval: "approval" in first ? first.approval : void 0,
539
- count: pending.length,
540
- thinkStub,
541
- onRespond: onApprovalResponse ? async (response) => {
1220
+ const t0 = "part" in first ? first.part : void 0;
1221
+ const t1 = "approval" in first ? first.approval : void 0;
1222
+ let t2;
1223
+ if ($[0] !== onApprovalResponse || $[1] !== settled) {
1224
+ t2 = onApprovalResponse ? async (response) => {
542
1225
  await onApprovalResponse(response);
543
1226
  await settled();
544
- } : void 0,
545
- onExecutionSettled: settled,
546
- onSkip: skip
547
- });
1227
+ } : void 0;
1228
+ $[0] = onApprovalResponse;
1229
+ $[1] = settled;
1230
+ $[2] = t2;
1231
+ } else t2 = $[2];
1232
+ let t3;
1233
+ if ($[3] !== pending.length || $[4] !== settled || $[5] !== skip || $[6] !== t0 || $[7] !== t1 || $[8] !== t2 || $[9] !== thinkStub) {
1234
+ t3 = /* @__PURE__ */ jsx(PromptInputApproval, {
1235
+ part: t0,
1236
+ approval: t1,
1237
+ count: pending.length,
1238
+ thinkStub,
1239
+ onRespond: t2,
1240
+ onExecutionSettled: settled,
1241
+ onSkip: skip
1242
+ });
1243
+ $[3] = pending.length;
1244
+ $[4] = settled;
1245
+ $[5] = skip;
1246
+ $[6] = t0;
1247
+ $[7] = t1;
1248
+ $[8] = t2;
1249
+ $[9] = thinkStub;
1250
+ $[10] = t3;
1251
+ } else t3 = $[10];
1252
+ return t3;
548
1253
  }
549
1254
  const compactingNotice = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), "Compacting context…"] });
550
1255
  const COMPACTION_NOTICES = {
@@ -564,31 +1269,53 @@ const COMPACTION_COMMAND = {
564
1269
  };
565
1270
  /** Explicit command action controller; callers put its command in the catalog and its notice where appropriate. */
566
1271
  function useAgentChatCompaction(onCompact) {
1272
+ const $ = c(9);
567
1273
  const { busy, submissionVersion } = useAgentChatControls();
568
1274
  const { textInput } = usePromptInputController();
569
1275
  const [state, setState] = React.useState(null);
570
- React.useEffect(() => {
571
- setState(null);
572
- }, [submissionVersion]);
573
1276
  const inFlight = React.useRef(false);
574
- const run = React.useCallback(() => {
575
- if (busy || inFlight.current) return;
576
- inFlight.current = true;
577
- setState("pending");
578
- textInput.clear();
579
- Promise.resolve().then(onCompact).then((result) => setState(result.compacted ? "compacted" : "unchanged"), () => setState("failed")).finally(() => {
580
- inFlight.current = false;
581
- });
582
- }, [
583
- busy,
584
- onCompact,
585
- textInput
586
- ]);
587
- return {
588
- command: busy ? void 0 : COMPACTION_COMMAND,
589
- run,
590
- notice: state ? COMPACTION_NOTICES[state] : null
591
- };
1277
+ let t0;
1278
+ if ($[0] !== busy || $[1] !== onCompact || $[2] !== submissionVersion || $[3] !== textInput) {
1279
+ t0 = () => {
1280
+ if (busy || inFlight.current) return;
1281
+ inFlight.current = true;
1282
+ setState({
1283
+ submissionVersion,
1284
+ outcome: "pending"
1285
+ });
1286
+ textInput.clear();
1287
+ Promise.resolve().then(onCompact).then((result) => setState({
1288
+ submissionVersion,
1289
+ outcome: result.compacted ? "compacted" : "unchanged"
1290
+ }), () => setState({
1291
+ submissionVersion,
1292
+ outcome: "failed"
1293
+ })).finally(() => {
1294
+ inFlight.current = false;
1295
+ });
1296
+ };
1297
+ $[0] = busy;
1298
+ $[1] = onCompact;
1299
+ $[2] = submissionVersion;
1300
+ $[3] = textInput;
1301
+ $[4] = t0;
1302
+ } else t0 = $[4];
1303
+ const run = t0;
1304
+ const t1 = busy ? void 0 : COMPACTION_COMMAND;
1305
+ const t2 = state?.submissionVersion === submissionVersion ? COMPACTION_NOTICES[state.outcome] : null;
1306
+ let t3;
1307
+ if ($[5] !== run || $[6] !== t1 || $[7] !== t2) {
1308
+ t3 = {
1309
+ command: t1,
1310
+ run,
1311
+ notice: t2
1312
+ };
1313
+ $[5] = run;
1314
+ $[6] = t1;
1315
+ $[7] = t2;
1316
+ $[8] = t3;
1317
+ } else t3 = $[8];
1318
+ return t3;
592
1319
  }
593
1320
  const AgentChat = {
594
1321
  Root: AgentChatRoot,