@mcp-b/react-components 0.63.0 → 0.64.1
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.
- package/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
- package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
- package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
- package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
- package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
- package/dist/CodeBlock-dt0L8md0.js +892 -0
- package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
- package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
- package/dist/ExecutionResult-CXnGcmM4.js +671 -0
- package/dist/FileTree-CjfzpN6X.js +968 -0
- package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
- package/dist/ManagerOffice-T79utm-P.js +2469 -0
- package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
- package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
- package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
- package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
- package/dist/SetupChecklist-DwscX3Bw.js +230 -0
- package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
- package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
- package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
- package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
- package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
- package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
- package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
- package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
- package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
- package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
- package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
- package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
- package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
- package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
- package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
- package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
- package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
- package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
- package/dist/assets/desktop/README.md +43 -0
- package/dist/assets/desktop/automations.svg +19 -0
- package/dist/assets/desktop/document.svg +24 -0
- package/dist/assets/desktop/folder.png +0 -0
- package/dist/assets/desktop/mail.svg +31 -0
- package/dist/assets/desktop/settings.svg +9 -0
- package/dist/assets/desktop/trash-full.svg +23 -0
- package/dist/assets/desktop/trash.svg +19 -0
- package/dist/attachment-preview-DeRqFjdz.js +68 -0
- package/dist/attempt-CySQHJsF.js +21 -0
- package/dist/command-search-1fjmCBBo.js +34 -0
- package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
- package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +78 -31
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +1113 -386
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
- package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
- package/dist/components/agents-sdk/AgentComputer.js +8045 -0
- package/dist/components/agents-sdk/AgentEvent.js +164 -21
- package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
- package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
- package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
- package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
- package/dist/components/agents-sdk/BrowserReplay.js +298 -133
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.js +108 -46
- package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +500 -99
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
- package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
- package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
- package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
- package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
- package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
- package/dist/components/agents-sdk/McpServerIcon.js +57 -14
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +542 -158
- package/dist/components/agents-sdk/ModelSelector.js +1151 -253
- package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
- package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
- package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
- package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
- package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
- package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
- package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChat.js +321 -132
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
- package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
- package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
- package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +491 -166
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
- package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
- package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
- package/dist/components/ai-sdk/Activity.js +768 -192
- package/dist/components/ai-sdk/AgentAttention.js +286 -58
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
- package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
- package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
- package/dist/components/ai-sdk/Approval.js +574 -172
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +535 -128
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +404 -80
- package/dist/components/ai-sdk/Checkpoint.js +229 -45
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +216 -48
- package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
- package/dist/components/ai-sdk/Context.js +737 -178
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +305 -68
- package/dist/components/ai-sdk/ExpansionState.js +74 -15
- package/dist/components/ai-sdk/Goal.js +435 -116
- package/dist/components/ai-sdk/InlineCitation.js +313 -76
- package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +1010 -195
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +264 -46
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
- package/dist/components/ai-sdk/Plan.js +639 -128
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +2735 -794
- package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
- package/dist/components/ai-sdk/Queue.js +792 -154
- package/dist/components/ai-sdk/Reasoning.js +268 -69
- package/dist/components/ai-sdk/Sources.js +226 -63
- package/dist/components/ai-sdk/Task.js +294 -71
- package/dist/components/ai-sdk/ToolApproval.js +126 -26
- package/dist/components/ai-sdk/ToolInvocation.js +112 -22
- package/dist/components/extension/ChatGptSignInScreen.js +1 -82
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +467 -146
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
- package/dist/components/extension/ConversationTabPicker.js +254 -76
- package/dist/components/extension/FirstRunSetup.d.ts +100 -36
- package/dist/components/extension/FirstRunSetup.js +3974 -1016
- package/dist/components/foundations/Accordion.js +186 -41
- package/dist/components/foundations/AlertDialog.js +425 -97
- package/dist/components/foundations/AppIcon.d.ts +13 -13
- package/dist/components/foundations/AppIcon.js +183 -34
- package/dist/components/foundations/Autocomplete.js +408 -89
- package/dist/components/foundations/Avatar.d.ts +100 -2
- package/dist/components/foundations/Avatar.js +204 -44
- package/dist/components/foundations/Button.js +64 -13
- package/dist/components/foundations/Card.js +357 -63
- package/dist/components/foundations/Checkbox.js +82 -17
- package/dist/components/foundations/CheckboxGroup.js +266 -58
- package/dist/components/foundations/Collapsible.d.ts +2 -1
- package/dist/components/foundations/Collapsible.js +129 -26
- package/dist/components/foundations/Combobox.js +408 -89
- package/dist/components/foundations/ContextMenu.d.ts +2 -2
- package/dist/components/foundations/ContextMenu.js +591 -117
- package/dist/components/foundations/DescriptionList.js +159 -28
- package/dist/components/foundations/Dialog.js +373 -89
- package/dist/components/foundations/EmptyState.js +86 -23
- package/dist/components/foundations/Favicon.d.ts +17 -0
- package/dist/components/foundations/Favicon.js +62 -0
- package/dist/components/foundations/Field.js +525 -108
- package/dist/components/foundations/Fieldset.js +115 -23
- package/dist/components/foundations/Form.js +38 -9
- package/dist/components/foundations/FormattedDate.d.ts +19 -5
- package/dist/components/foundations/FormattedDate.js +82 -12
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/IconButton.js +114 -17
- package/dist/components/foundations/Input.js +38 -9
- package/dist/components/foundations/Kbd.js +55 -10
- package/dist/components/foundations/Label.js +56 -12
- package/dist/components/foundations/LinkButton.js +67 -15
- package/dist/components/foundations/Marker.js +138 -29
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +634 -136
- package/dist/components/foundations/Menubar.d.ts +2 -2
- package/dist/components/foundations/Menubar.js +685 -130
- package/dist/components/foundations/Meter.js +186 -41
- package/dist/components/foundations/NavigationMenu.js +426 -95
- package/dist/components/foundations/NumberField.js +223 -49
- package/dist/components/foundations/Popover.js +398 -88
- package/dist/components/foundations/PreviewCard.js +234 -53
- package/dist/components/foundations/Progress.js +117 -25
- package/dist/components/foundations/RadioGroup.d.ts +13 -5
- package/dist/components/foundations/RadioGroup.js +132 -25
- package/dist/components/foundations/ScrollArea.js +230 -51
- package/dist/components/foundations/SearchField.d.ts +8 -3
- package/dist/components/foundations/SearchField.js +129 -28
- package/dist/components/foundations/Select.js +648 -145
- package/dist/components/foundations/Separator.js +61 -12
- package/dist/components/foundations/Slider.js +260 -57
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +561 -127
- package/dist/components/foundations/Switch.js +82 -18
- package/dist/components/foundations/Tabs.d.ts +2 -2
- package/dist/components/foundations/Tabs.js +282 -53
- package/dist/components/foundations/Textarea.js +43 -9
- package/dist/components/foundations/ThemeProvider.js +138 -52
- package/dist/components/foundations/Toast.d.ts +10 -2
- package/dist/components/foundations/Toast.js +322 -75
- package/dist/components/foundations/Toggle.d.ts +5 -2
- package/dist/components/foundations/Toggle.js +51 -10
- package/dist/components/foundations/ToggleGroup.d.ts +3 -3
- package/dist/components/foundations/ToggleGroup.js +215 -59
- package/dist/components/foundations/Toolbar.js +249 -61
- package/dist/components/foundations/Tooltip.d.ts +3 -3
- package/dist/components/foundations/Tooltip.js +311 -55
- package/dist/components/foundations/TransitionSurface.js +43 -9
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
- package/dist/components/general-purpose/ActionGuide.js +290 -64
- package/dist/components/general-purpose/AppFrame.js +72 -14
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
- package/dist/components/general-purpose/AppTopBar.js +349 -60
- package/dist/components/general-purpose/BrandLoading.js +37 -9
- package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
- package/dist/components/general-purpose/CommandPalette.js +271 -0
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +937 -167
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
- package/dist/components/general-purpose/FileTree.d.ts +20 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/ListDetail.d.ts +84 -0
- package/dist/components/general-purpose/ListDetail.js +423 -0
- package/dist/components/general-purpose/NotificationPrompt.js +20 -11
- package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
- package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
- package/dist/components/general-purpose/PricingFAQ.js +53 -12
- package/dist/components/general-purpose/PricingPage.js +376 -139
- package/dist/components/general-purpose/PricingPlanCard.js +209 -84
- package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
- package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
- package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
- package/dist/components/general-purpose/ScreenStack.js +427 -0
- package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/StatusScreen.js +82 -24
- package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
- package/dist/components/general-purpose/SwipeActions.js +357 -0
- package/dist/components/general-purpose/Terminal.d.ts +22 -48
- package/dist/components/general-purpose/Terminal.js +320 -174
- package/dist/components/general-purpose/TestResults.js +975 -196
- package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
- package/dist/components/general-purpose/ThemeModeControl.js +66 -23
- package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
- package/dist/components/general-purpose/WallpaperPicker.js +180 -0
- package/dist/components/general-purpose/WebPreview.d.ts +5 -7
- package/dist/components/general-purpose/WebPreview.js +770 -203
- package/dist/components/nanites/AgentConnection.js +323 -84
- package/dist/components/nanites/AgentToolDetail.js +233 -53
- package/dist/components/nanites/GithubMotionMark.js +37 -9
- package/dist/components/nanites/NaniteScene.js +535 -323
- package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
- package/dist/container-width-C43ccJ84.js +17 -0
- package/dist/context-Ddsp8HgD.js +43 -0
- package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
- package/dist/copy-button-DWBVJR6D.js +118 -0
- package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
- package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
- package/dist/icons-nLTnB9kd.js +470 -0
- package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
- package/dist/motion-CGM3i6lX.js +319 -0
- package/dist/motion-preferences-6qsDIDvH.js +13 -0
- package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
- package/dist/progress-ring-BO649JA9.js +79 -0
- package/dist/provider-logos-Ceu7iYFx.js +362 -0
- package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
- package/dist/styles/accessibility.css +26 -0
- package/dist/styles/accordion.css +0 -2
- package/dist/styles/activity.css +20 -12
- package/dist/styles/agent-attention.css +31 -10
- package/dist/styles/agent-chat.css +7 -6
- package/dist/styles/agent-computer-motion-reduction.css +118 -0
- package/dist/styles/agent-computer-motion.css +127 -0
- package/dist/styles/agent-computer-phone.css +942 -0
- package/dist/styles/agent-computer.css +1764 -0
- package/dist/styles/agent-connection.css +5 -5
- package/dist/styles/agent-screen-switcher.css +313 -0
- package/dist/styles/app-icon.css +34 -30
- package/dist/styles/app-top-bar.css +33 -18
- package/dist/styles/approval.css +3 -3
- package/dist/styles/artifact.css +1 -1
- package/dist/styles/attachment-preview.css +2 -4
- package/dist/styles/avatar.css +12 -14
- package/dist/styles/base-ui-motion.css +84 -18
- package/dist/styles/base-ui-motion.test.tsx +305 -0
- package/dist/styles/base.css +16 -12
- package/dist/styles/brand.test.ts +7 -20
- package/dist/styles/browser-control-overlay.css +1 -1
- package/dist/styles/browser-live-screen.css +2 -2
- package/dist/styles/browser-live-view.css +1 -1
- package/dist/styles/browser-replay.css +0 -8
- package/dist/styles/browser-run-panel.css +275 -37
- package/dist/styles/button.css +52 -9
- package/dist/styles/card.css +6 -5
- package/dist/styles/chain-of-thought.css +0 -10
- package/dist/styles/checkpoint.css +2 -2
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/color-contrast.test.ts +18 -1
- package/dist/styles/command-palette.css +110 -0
- package/dist/styles/composer-link.css +11 -7
- package/dist/styles/composition-motion.css +3 -14
- package/dist/styles/context.css +2 -2
- package/dist/styles/conversation-tab-picker.css +7 -0
- package/dist/styles/conversation.css +8 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/employee-app.css +8 -2
- package/dist/styles/employee-chrome.css +4 -4
- package/dist/styles/execution-board.css +206 -114
- package/dist/styles/execution-result.css +2 -2
- package/dist/styles/field.css +187 -4
- package/dist/styles/file-tree.css +218 -40
- package/dist/styles/first-run-setup.css +914 -187
- package/dist/styles/github-motion-mark.css +0 -8
- package/dist/styles/index.css +145 -133
- package/dist/styles/inline-citation.css +5 -4
- package/dist/styles/list-detail.css +57 -0
- package/dist/styles/manager-office.css +6 -8
- package/dist/styles/manager-work.css +4 -2
- package/dist/styles/mcp-plugin-catalog.css +2 -2
- package/dist/styles/mcp-server-picker.css +3 -6
- package/dist/styles/media-preview-card.css +2 -2
- package/dist/styles/menu.css +0 -9
- package/dist/styles/menubar.css +18 -6
- package/dist/styles/message-scroller.css +47 -9
- package/dist/styles/message.css +3 -3
- package/dist/styles/model-selector.css +1 -1
- package/dist/styles/motion-reduction.css +39 -6
- package/dist/styles/pricing-page.css +1 -1
- package/dist/styles/prompt-input.css +29 -29
- package/dist/styles/queue.css +1 -1
- package/dist/styles/recipes.css +212 -28
- package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
- package/dist/styles/responsive-sidebar-shell.css +40 -43
- package/dist/styles/screen-stack.css +123 -0
- package/dist/styles/search-field.css +80 -3
- package/dist/styles/stepper.css +0 -10
- package/dist/styles/streamdown.css +2 -2
- package/dist/styles/subagent-run.css +9 -5
- package/dist/styles/swipe-actions.css +158 -0
- package/dist/styles/tabs.css +80 -23
- package/dist/styles/task.css +7 -1
- package/dist/styles/terminal.css +66 -78
- package/dist/styles/test-results.css +1 -19
- package/dist/styles/textarea.css +2 -1
- package/dist/styles/theme-mode-control.css +154 -26
- package/dist/styles/think-chat-tool-panels.css +1 -1
- package/dist/styles/think-execution-workbench.css +0 -9
- package/dist/styles/think-full-app.css +7 -1
- package/dist/styles/think-schedule.css +81 -54
- package/dist/styles/think-thread-picker.css +28 -37
- package/dist/styles/toast.css +11 -0
- package/dist/styles/toggle-group.css +0 -10
- package/dist/styles/toggle.css +13 -0
- package/dist/styles/tooltip.css +12 -0
- package/dist/styles/transition-surface.css +1 -0
- package/dist/styles/wallpaper-picker.css +224 -0
- package/dist/styles/web-preview.css +47 -18
- package/dist/styles/workspace-automation.css +116 -17
- package/dist/styles/workspace-concepts.css +1 -1
- package/dist/styles/workspace-desktop.css +124 -0
- package/dist/styles/workspace-entity-card.css +3 -1
- package/dist/styles/workspace-explorer.css +499 -5
- package/dist/utils/brand-marks.d.ts +13 -0
- package/dist/utils/brand-marks.js +14 -0
- package/dist/utils/desktop-artwork.d.ts +17 -0
- package/dist/utils/desktop-artwork.js +18 -0
- package/dist/utils/favicon.d.ts +6 -2
- package/dist/utils/favicon.js +16 -4
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-assets-DdtnBDU3.js +213 -0
- package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
- package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
- package/dist/workspace-delete-BOY6CMBf.js +183 -0
- package/dist/workspace-drag-B6hMXUNt.js +304 -0
- package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
- package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
- package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
- package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
- package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
- package/package.json +9 -3
- package/dist/Avatar-t1YRzdwB.d.ts +0 -101
- package/dist/CodeBlock-DYQdZUH6.js +0 -318
- package/dist/ExecutionResult-2fBkpIGN.js +0 -279
- package/dist/FileTree-CDLOD643.js +0 -323
- package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
- package/dist/SetupChecklist-B-iEta9v.js +0 -78
- package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
- package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
- package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
- package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
- package/dist/attachment-preview-1CXJvrmb.js +0 -25
- package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
- package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
- package/dist/copy-button-DbR932tF.js +0 -45
- package/dist/icons-GoybMAB2.js +0 -141
- package/dist/progress-ring-L2bbF0ji.js +0 -40
- package/dist/provider-logos-DWYY8wNz.js +0 -99
- package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
- package/dist/workspace-assets-F3r6XltC.js +0 -107
- package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
- package/dist/workspace-delete-CQvv1eDE.js +0 -81
- package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { J as PencilIcon, dt as TrashIcon, et as RefreshIcon, it as SpinnerIcon, t as ArchiveIcon } from "../../icons-nLTnB9kd.js";
|
|
3
3
|
import { ExpansionStateProvider } from "../ai-sdk/ExpansionState.js";
|
|
4
4
|
import { Message, MessageAction, MessageActions, MessageCopyAction, MessageMeta, MessageTimestamp } from "../ai-sdk/Message.js";
|
|
5
5
|
import { AgentEventRow, getAgentEvent } from "./AgentEvent.js";
|
|
@@ -12,6 +12,7 @@ import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent,
|
|
|
12
12
|
import { PromptInputApproval, getApprovalStateKey, getPendingToolApprovals } from "./PromptInputApproval.js";
|
|
13
13
|
import { BrandLoading } from "../general-purpose/BrandLoading.js";
|
|
14
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";
|
|
@@ -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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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(
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
clearTimeout(announcementTimer.current);
|
|
77
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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(
|
|
88
|
-
const lastAssistantMessageId = messages.findLast(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
onRegenerate
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
queued
|
|
123
|
-
removeQueued
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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;
|
|
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);
|
|
148
294
|
}
|
|
295
|
+
function _temp() {}
|
|
149
296
|
/** Windowed transcript. Historical rows are never a live region; their disclosure state survives windowing. */
|
|
150
|
-
function AgentChatTranscript(
|
|
297
|
+
function AgentChatTranscript(t0) {
|
|
298
|
+
const $ = c(17);
|
|
299
|
+
const { children, emptyState, className, scrollAnchor } = t0;
|
|
151
300
|
const { messages, busy } = useAgentChatRuntime();
|
|
152
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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;
|
|
368
|
+
}
|
|
369
|
+
function _temp4(message_0) {
|
|
370
|
+
return message_0.id;
|
|
180
371
|
}
|
|
181
|
-
function AgentChatLoading(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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(
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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(
|
|
519
|
+
function AgentChatMessageContent(t0) {
|
|
520
|
+
const $ = c(4);
|
|
521
|
+
const { message, renderPart } = t0;
|
|
252
522
|
const { lastMessageId, status } = useAgentChatControls();
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
message
|
|
262
|
-
|
|
263
|
-
|
|
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(
|
|
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
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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
|
-
|
|
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
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
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
|
-
|
|
341
|
-
|
|
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(
|
|
746
|
+
function AgentChatDock(t0) {
|
|
747
|
+
const $ = c(11);
|
|
748
|
+
const { children, render, ref, ...props } = t0;
|
|
345
749
|
const { dockRef } = useAgentChatControls();
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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(
|
|
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
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
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
|
-
|
|
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(
|
|
848
|
+
return (submissions.current.get(event_0.nativeEvent) ?? submit)(references.length ? {
|
|
377
849
|
...message,
|
|
378
850
|
references
|
|
379
851
|
} : message);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
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(
|
|
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
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
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
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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(
|
|
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
|
-
|
|
468
|
-
|
|
469
|
-
|
|
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
|
|
473
|
-
const
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
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
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
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
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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
|
-
|
|
546
|
-
|
|
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
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
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,
|