@mcp-b/react-components 0.60.0 → 0.62.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.
- package/dist/{AgentActivity-DSObWhDU.d.ts → AgentActivity-DptCj8XQ.d.ts} +2 -2
- package/dist/{AgentChatQueue-CGR4hd7D.d.ts → AgentChatQueue-DG2rGyCI.d.ts} +1 -1
- package/dist/AgentToolRunsContext-Br3jZ6Up.d.ts +74 -0
- package/dist/{Button-ClRxb8tM.d.ts → Button-DIn-0P-0.d.ts} +4 -5
- package/dist/{Card-BPkXIkBz.d.ts → Card-DkGZ3jKQ.d.ts} +7 -1
- package/dist/{CodeBlock-DYp5V_4O.d.ts → CodeBlock-BTkag9ms.d.ts} +1 -1
- package/dist/{CodeBlock-B4K656LO.js → CodeBlock-CNvOYR0Q.js} +1 -1
- package/dist/{EmployeeChrome-QSki0QT4.d.ts → EmployeeChrome-D5x4EM9y.d.ts} +19 -35
- package/dist/{ExecutionBoard-DHfMvKlB.d.ts → ExecutionBoard-DvPGdn4F.d.ts} +2 -2
- package/dist/{ExecutionResult-Wd1sKAvD.js → ExecutionResult-DmC21cll.js} +4 -4
- package/dist/{FileTree-BpCJuvji.js → FileTree-H31EVRv_.js} +1 -1
- package/dist/{IconButton-43ggXEuf.d.ts → IconButton-FWsa9562.d.ts} +1 -1
- package/dist/{ManagerOffice-BaHSBcSF.js → ManagerOffice-B3X3iZV9.js} +27 -34
- package/dist/{McpConnectorForm-D4bY-lm_.d.ts → McpConnectorForm-BLsQt_er.d.ts} +1 -1
- package/dist/{McpPluginCatalog-2FZDLCeK.d.ts → McpPluginCatalog-SQNOytXQ.d.ts} +2 -2
- package/dist/{Message-CwCqa90H.d.ts → Message-BUedRDN1.d.ts} +2 -2
- package/dist/{MessageScrollerVirtual-DVQeEkNy.d.ts → MessageScrollerVirtual-DxL6XKq9.d.ts} +1 -1
- package/dist/{PromptInput-C3adKglc.d.ts → PromptInput-Dbe6WgWA.d.ts} +1 -1
- package/dist/{ResponsiveSidebarShell-DzBGlRJF.d.ts → ResponsiveSidebarShell-DSAMNDdg.d.ts} +1 -1
- package/dist/{SetupChecklist-BNK2XFaI.js → SetupChecklist-Wo4akaSG.js} +2 -2
- package/dist/{ThinkChatActivity-C4_hPEmb.d.ts → ThinkChatActivity-zZaSsbC-.d.ts} +7 -3
- package/dist/{ThinkChatActivitySummary-ChJ8Iu2T.d.ts → ThinkChatActivitySummary-8MO1VjAJ.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-CPeYVneQ.d.ts → ThinkExecutionRun-DJ2TFDmZ.d.ts} +1 -1
- package/dist/ThinkSchedule-CSuDGrZ9.d.ts +34 -0
- package/dist/{Workspace-iCkXvQRJ.d.ts → Workspace-42LA9Zrb.d.ts} +1 -1
- package/dist/WorkspaceAutomation-CMvICi-p.d.ts +215 -0
- package/dist/{WorkspaceConcept-ByaG-kBq.d.ts → WorkspaceConcept-BjrgGE1w.d.ts} +2 -3
- package/dist/{WorkspaceFile-DkIZKoK6.d.ts → WorkspaceFile-nK2n0i4S.d.ts} +1 -1
- package/dist/{WorkspaceFileView-5SHsjamf.js → WorkspaceFileView-BWI_AJlV.js} +8 -8
- package/dist/{WorkspaceLink-Buo6gKj2.d.ts → WorkspaceLink-C8HH2fMT.d.ts} +1 -0
- package/dist/{WorkspaceMessageResponse-DnsdpaGU.js → WorkspaceMessageResponse-BZ-_I18b.js} +3 -7
- package/dist/agent-tool-runs-DsOp_X2y.js +133 -0
- package/dist/assets/chrome.svg +1 -0
- package/dist/assets/plugins/plugin-github.svg +8 -0
- package/dist/assets/plugins/plugin-gmail.svg +1 -0
- package/dist/assets/plugins/plugin-google-drive.svg +1 -0
- package/dist/assets/plugins/plugin-google.svg +1 -0
- package/dist/assets/plugins/plugin-linear.svg +1 -0
- package/dist/assets/plugins/plugin-notion.svg +25 -0
- package/dist/assets/plugins/plugin-salesforce.svg +31 -0
- package/dist/assets/plugins/plugin-slack.svg +6 -0
- package/dist/chatgpt-sign-in-button-DNchrZHs.js +32 -0
- package/dist/{codex-model-catalog-CFEGgUAj.d.ts → codex-model-catalog-18yO7dln.d.ts} +8 -8
- package/dist/components/agents-sdk/AgentActivity.d.ts +1 -1
- package/dist/components/agents-sdk/AgentActivity.js +5 -4
- package/dist/components/agents-sdk/AgentChat.d.ts +4 -4
- package/dist/components/agents-sdk/AgentChat.js +8 -8
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +5 -5
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +78 -8
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/EmployeeApp.d.ts +4 -3
- package/dist/components/agents-sdk/EmployeeApp.js +2 -2
- package/dist/components/agents-sdk/EmployeeChat.d.ts +9 -2
- package/dist/components/agents-sdk/EmployeeChat.js +15 -11
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +53 -35
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +10 -10
- package/dist/components/agents-sdk/EmployeeSchedules.js +39 -39
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeStartScreen.js +4 -4
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +7 -33
- package/dist/components/agents-sdk/ManagerAccountActions.js +2 -2
- package/dist/components/agents-sdk/ManagerOffice.d.ts +10 -14
- 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 +3 -3
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +4 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.d.ts +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +7 -6
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +4 -2
- package/dist/components/agents-sdk/SubagentRunIndicator.js +4 -3
- package/dist/components/agents-sdk/SubagentRunLanes.d.ts +38 -0
- package/dist/components/agents-sdk/SubagentRunLanes.js +160 -0
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +3 -28
- package/dist/components/agents-sdk/SubagentRunPanel.js +145 -190
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +4 -7
- package/dist/components/agents-sdk/ThinkChat.js +5 -8
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +27 -26
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +28 -28
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +13 -28
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -16
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +4 -4
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -0
- package/dist/components/agents-sdk/ThinkSchedule.js +9 -0
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +42 -0
- package/dist/components/agents-sdk/{ThinkRoutineActions.js → ThinkScheduleActions.js} +35 -35
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +24 -0
- package/dist/components/agents-sdk/{ThinkRoutineBrowser.js → ThinkScheduleBrowser.js} +47 -45
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +19 -0
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +139 -0
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +58 -0
- package/dist/components/agents-sdk/ThinkScheduleForm.js +686 -0
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkbenchBack.d.ts +1 -1
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceAutomation.js +791 -0
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +2 -0
- package/dist/components/agents-sdk/{WorkspaceExecutionTable.js → WorkspaceAutomationTable.js} +45 -65
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceConcept.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +28 -8
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +104 -254
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -4
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +13 -6
- package/dist/components/agents-sdk/WorkspaceLive.js +2 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +37 -2
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +30 -0
- package/dist/components/agents-sdk/WorkspacePerson.js +100 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +24 -60
- package/dist/components/agents-sdk/WorkspaceProject.js +82 -184
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +2 -2
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- 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 +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +51 -63
- package/dist/components/ai-sdk/ConnectedAppCards.js +42 -365
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +3 -3
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +12 -4
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +6 -6
- package/dist/components/ai-sdk/Queue.d.ts +1 -1
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +17 -4
- package/dist/components/extension/ChatGptSignInScreen.js +32 -32
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/extension/FirstRunSetup.d.ts +117 -0
- package/dist/components/extension/FirstRunSetup.js +1175 -0
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +5 -2
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Button.js +1 -1
- package/dist/components/foundations/Card.d.ts +1 -1
- package/dist/components/foundations/Card.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/DescriptionList.d.ts +3 -1
- package/dist/components/foundations/DescriptionList.js +2 -1
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +2 -4
- package/dist/components/foundations/Toggle.js +3 -7
- package/dist/components/foundations/ToggleGroup.d.ts +3 -5
- package/dist/components/foundations/ToggleGroup.js +5 -17
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AccountSignInDialog.js +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +1 -1
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +3 -3
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +2 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.d.ts +2 -2
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentConnection.js +3 -3
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +4 -4
- package/dist/connected-app-drafts-B9i69bkj.js +283 -0
- package/dist/{copy-button-BIfY5M-D.d.ts → copy-button-B09hHWd1.d.ts} +1 -1
- package/dist/{copy-button-BsmxSSeD.js → copy-button-z20VEXRF.js} +1 -1
- package/dist/{execution-result-DWVmm-bL.js → execution-result-DAuW4VWv.js} +30 -2
- package/dist/{icons-Dj6id76o.d.ts → icons-CReP3qYl.d.ts} +7 -1
- package/dist/{icons-Cn3vWZRs.js → icons-Yp99gmMC.js} +9 -3
- package/dist/{mcp-server-catalog-kaMWaSAL.d.ts → mcp-server-catalog-Di4N46H9.d.ts} +9 -3
- package/dist/navigation-link-zK6z8Gn3.d.ts +18 -0
- package/dist/scheduled-table-source-NZR1vFc_.js +38 -0
- package/dist/styles/accessibility.css +22 -9
- package/dist/styles/accordion.css +2 -2
- package/dist/styles/activity-header.css +14 -11
- package/dist/styles/activity.css +6 -13
- package/dist/styles/agent-attention.css +0 -23
- package/dist/styles/agent-chat.css +8 -3
- package/dist/styles/agent-connection.css +2 -2
- package/dist/styles/app-icon.css +7 -0
- package/dist/styles/app-top-bar.css +3 -11
- package/dist/styles/approval.css +2 -2
- package/dist/styles/base.css +3 -1
- package/dist/styles/browser-live-screen.css +3 -1
- package/dist/styles/browser-run-panel.css +2 -2
- package/dist/styles/button.css +13 -44
- package/dist/styles/card.css +42 -5
- package/dist/styles/chain-of-thought.css +2 -8
- package/dist/styles/chatgpt-sign-in-screen.css +91 -83
- package/dist/styles/checkbox-group.css +2 -1
- package/dist/styles/checkbox.css +4 -6
- package/dist/styles/code-block.css +2 -1
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/collapsible.css +2 -2
- package/dist/styles/color-contrast.test.ts +1 -0
- package/dist/styles/combobox.css +5 -9
- package/dist/styles/commit.css +2 -7
- package/dist/styles/composer-link.css +0 -10
- package/dist/styles/connected-app-card.css +32 -32
- package/dist/styles/context-menu.css +2 -2
- package/dist/styles/description-list.css +14 -0
- package/dist/styles/execution-board.css +1 -1
- package/dist/styles/execution-result.css +161 -0
- package/dist/styles/file-tree.css +5 -9
- package/dist/styles/first-run-setup.css +751 -0
- package/dist/styles/index.css +5 -2
- package/dist/styles/inline-citation.css +2 -10
- package/dist/styles/manager-office.css +16 -43
- package/dist/styles/marker.css +2 -2
- package/dist/styles/media-preview-card.css +2 -7
- package/dist/styles/message-scroller.css +3 -2
- package/dist/styles/model-selector.css +19 -15
- package/dist/styles/navigation-menu.css +4 -4
- package/dist/styles/number-field.css +2 -3
- package/dist/styles/preview-card.css +2 -2
- package/dist/styles/prompt-input.css +5 -15
- package/dist/styles/queue.css +2 -7
- package/dist/styles/radio.css +4 -6
- package/dist/styles/recipes.css +25 -52
- package/dist/styles/resizable-side-panel.css +3 -2
- package/dist/styles/responsive-sidebar-shell.css +1 -6
- package/dist/styles/scroll-area.css +3 -2
- package/dist/styles/scrollbars.css +2 -0
- package/dist/styles/search-field.css +1 -2
- package/dist/styles/slider.css +4 -5
- package/dist/styles/sources.css +2 -7
- package/dist/styles/stepper.css +4 -4
- package/dist/styles/streamdown.css +8 -1
- package/dist/styles/subagent-run.css +123 -12
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +5 -4
- package/dist/styles/task.css +2 -7
- package/dist/styles/test-results.css +2 -7
- package/dist/styles/theme-mode-control.css +0 -6
- package/dist/styles/think-chat-activity.css +0 -8
- package/dist/styles/think-execution-status.css +1 -1
- package/dist/styles/think-execution-workbench.css +3 -3
- package/dist/styles/think-full-app.css +3 -2
- package/dist/styles/{think-routine.css → think-schedule.css} +64 -80
- package/dist/styles/toggle-group.css +9 -6
- package/dist/styles/toggle.css +23 -15
- package/dist/styles/toolbar.css +0 -6
- package/dist/styles/workspace-automation.css +233 -0
- package/dist/styles/workspace-concepts.css +18 -412
- package/dist/styles/workspace-entity-card.css +146 -0
- package/dist/styles/workspace-explorer.css +4 -3
- package/dist/utils/codex-model-catalog.d.ts +1 -1
- package/dist/utils/mcp-server-catalog.d.ts +2 -2
- package/dist/utils/mcp-server-catalog.js +108 -21
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-RD6IhOyh.js → workspace-assets-Dq5toMQc.js} +34 -38
- package/dist/workspace-concept-panel-CxZfmFkP.js +66 -0
- package/dist/workspace-concept-panel-KpMmznB_.d.ts +21 -0
- package/dist/{workspace-delete-CrNGUuBp.js → workspace-delete-CoB0l6ZU.js} +2 -1
- package/dist/workspace-entity-card-2TC3RPKh.d.ts +7 -0
- package/dist/workspace-entity-card-B1aV-jBj.js +61 -0
- package/dist/workspace-person-BSgvRjZE.d.ts +24 -0
- package/dist/workspace-person-BVkYb3dv.js +116 -0
- package/package.json +2 -2
- package/dist/AgentToolRunsContext-DniwGn96.d.ts +0 -18
- package/dist/Correspondent-ANkZHGEa.d.ts +0 -60
- package/dist/ThinkRoutine-DoZjbzyn.d.ts +0 -41
- package/dist/WorkspaceConceptPanel-D21iRsWm.js +0 -23
- package/dist/WorkspaceExecutionTable-DNhj6YDX.d.ts +0 -239
- package/dist/WorkspaceMessageResponse-D8FGgIQU.d.ts +0 -39
- package/dist/components/agents-sdk/SubagentRunList.d.ts +0 -17
- package/dist/components/agents-sdk/SubagentRunList.js +0 -26
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +0 -2
- package/dist/components/agents-sdk/ThinkRoutine.js +0 -9
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +0 -42
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +0 -25
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +0 -19
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +0 -97
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +0 -59
- package/dist/components/agents-sdk/ThinkRoutineForm.js +0 -744
- package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +0 -15
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +0 -52
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +0 -2
- package/dist/components/agents-sdk/WorkspaceExecution.js +0 -843
- package/dist/components/agents-sdk/WorkspaceExecutionTable.d.ts +0 -2
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +0 -36
- package/dist/components/agents-sdk/WorkspaceUserScript.js +0 -153
- package/dist/components/ai-sdk/Correspondent.d.ts +0 -2
- package/dist/components/ai-sdk/Correspondent.js +0 -145
- package/dist/styles/correspondent.css +0 -73
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { r as AgentToolRunValue } from "../../AgentToolRunsContext-Br3jZ6Up.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { UIMessage } from "ai";
|
|
4
|
+
import { AgentToolRunPart } from "agents/agent-tools";
|
|
5
|
+
//#region src/components/agents-sdk/SubagentRunLanes.d.ts
|
|
6
|
+
export interface SubagentRunLanesProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> {
|
|
7
|
+
/**
|
|
8
|
+
* Complete retained runs returned by `useAgentToolEvents()`, passed whole.
|
|
9
|
+
* Each run becomes one lane, placed by its upstream `order`.
|
|
10
|
+
*/
|
|
11
|
+
runs: readonly AgentToolRunValue<Part>[];
|
|
12
|
+
/**
|
|
13
|
+
* App-authored TanStack Router Link to the run's own surface. Rendered as
|
|
14
|
+
* the lane's "View report" link, named "View {run name} report".
|
|
15
|
+
*/
|
|
16
|
+
renderRunLink: (run: AgentToolRunValue<Part>) => React.ReactElement;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The transcript's record of delegated work: one quiet lane per run the turn
|
|
20
|
+
* handed off, live while the child works — status mark and name, the child's
|
|
21
|
+
* latest progress line, then the report's headline or the failure — and a
|
|
22
|
+
* link to the run's report.
|
|
23
|
+
*
|
|
24
|
+
* Lanes stack in a narrow column such as a side panel and sit up to three
|
|
25
|
+
* across when the column has room. Inside an `AgentToolRunsProvider` given
|
|
26
|
+
* `onStopRun`, a run that may still execute gets its own Stop beside its
|
|
27
|
+
* link — the same command, pending state, and failure as its row in
|
|
28
|
+
* `SubagentRunPanel`; otherwise a lane is a pure record. Lanes are never a
|
|
29
|
+
* live region.
|
|
30
|
+
*
|
|
31
|
+
* Lanes on the list's first frame are history and stay still. To have a live
|
|
32
|
+
* dispatch arrive with motion, mount the lanes while the dispatching turn
|
|
33
|
+
* streams, before its runs exist: with no runs they render nothing.
|
|
34
|
+
* `ThinkChat.MessageContent` does this under each activity group when given
|
|
35
|
+
* `renderAgentToolRunLink`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function SubagentRunLanes<Part extends AgentToolRunPart = UIMessage["parts"][number]>({ runs, renderRunLink }: SubagentRunLanesProps<Part>): React.JSX.Element | null;
|
|
38
|
+
//#endregion
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
3
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
|
+
import { SubagentRunIndicator, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
5
|
+
import { a as runStopOffered, c as useRunOpen, d as useRunsStore, l as useRunStop } from "../../agent-tool-runs-DsOp_X2y.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/agents-sdk/SubagentRunLanes.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Lanes present on the first frame are history and stay still; lanes that
|
|
11
|
+
* arrive afterwards are live work and enter with the shared presence motion.
|
|
12
|
+
* Readiness waits two frames so the first frame's styles are computed before
|
|
13
|
+
* `[data-content-ready]` enables the transition, even when React flushes this
|
|
14
|
+
* effect before paint (a render caused by a click).
|
|
15
|
+
*/
|
|
16
|
+
function useArrivalsReady() {
|
|
17
|
+
const [ready, setReady] = React.useState(false);
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
let frame = requestAnimationFrame(() => {
|
|
20
|
+
frame = requestAnimationFrame(() => setReady(true));
|
|
21
|
+
});
|
|
22
|
+
return () => cancelAnimationFrame(frame);
|
|
23
|
+
}, []);
|
|
24
|
+
return ready;
|
|
25
|
+
}
|
|
26
|
+
function SubagentRunLaneView({ run, renderRunLink }) {
|
|
27
|
+
const store = useRunsStore();
|
|
28
|
+
const stop = useRunStop(run.runId);
|
|
29
|
+
const runOpen = useRunOpen();
|
|
30
|
+
const stoppable = runStopOffered(run, stop);
|
|
31
|
+
const name = getSubagentRunName(run);
|
|
32
|
+
const live = run.status === "starting" || run.status === "running";
|
|
33
|
+
const linkRef = React.useRef(null);
|
|
34
|
+
const stopFocused = React.useRef(false);
|
|
35
|
+
React.useLayoutEffect(() => {
|
|
36
|
+
if (stoppable || !stopFocused.current) return;
|
|
37
|
+
stopFocused.current = false;
|
|
38
|
+
if (document.activeElement === document.body) linkRef.current?.focus({ preventScroll: true });
|
|
39
|
+
}, [stoppable]);
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
const returnFocus = store?.returnFocus;
|
|
42
|
+
const claim = returnFocus?.current;
|
|
43
|
+
if (!returnFocus || runOpen || claim?.to !== "lane" || claim.runId !== run.runId) return;
|
|
44
|
+
let frame = requestAnimationFrame(() => {
|
|
45
|
+
frame = requestAnimationFrame(() => {
|
|
46
|
+
if (returnFocus.current !== claim) return;
|
|
47
|
+
returnFocus.current = null;
|
|
48
|
+
if (document.activeElement === document.body) linkRef.current?.focus({ preventScroll: true });
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
return () => cancelAnimationFrame(frame);
|
|
52
|
+
}, [
|
|
53
|
+
store,
|
|
54
|
+
runOpen,
|
|
55
|
+
run.runId
|
|
56
|
+
]);
|
|
57
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
58
|
+
className: "subagent-run-lanes__lane",
|
|
59
|
+
"data-run-id": run.runId,
|
|
60
|
+
"data-status": run.status,
|
|
61
|
+
"data-live": live || void 0,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsxs("p", {
|
|
64
|
+
className: "subagent-run-lanes__header",
|
|
65
|
+
children: [/* @__PURE__ */ jsx(SubagentRunIndicator, { run }), /* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "subagent-run__title sigvelo-truncate",
|
|
67
|
+
children: name
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx("p", {
|
|
71
|
+
className: cx("subagent-run__status subagent-run-lanes__status", live ? "sigvelo-truncate" : "sigvelo-line-clamp"),
|
|
72
|
+
children: getSubagentRunStatusText(run)
|
|
73
|
+
}),
|
|
74
|
+
stop?.error ? /* @__PURE__ */ jsx("p", {
|
|
75
|
+
className: "subagent-run-lanes__error",
|
|
76
|
+
role: "alert",
|
|
77
|
+
children: stop.error
|
|
78
|
+
}) : null,
|
|
79
|
+
/* @__PURE__ */ jsxs("div", {
|
|
80
|
+
className: "subagent-run-lanes__actions",
|
|
81
|
+
children: [/* @__PURE__ */ jsx(NavigationLink, {
|
|
82
|
+
ref: linkRef,
|
|
83
|
+
render: renderRunLink(run),
|
|
84
|
+
"data-slot": "subagent-run-lane-link",
|
|
85
|
+
className: buttonVariants({
|
|
86
|
+
variant: "ghost",
|
|
87
|
+
color: "neutral",
|
|
88
|
+
size: "xs"
|
|
89
|
+
}),
|
|
90
|
+
"aria-label": `View ${name} report`,
|
|
91
|
+
onClick: (event) => {
|
|
92
|
+
if (store && isPlainPrimaryLinkActivation(event)) store.returnFocus.current = {
|
|
93
|
+
to: "lane",
|
|
94
|
+
runId: run.runId
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
children: "View report"
|
|
98
|
+
}), store && stop && stoppable ? /* @__PURE__ */ jsx(Button, {
|
|
99
|
+
size: "xs",
|
|
100
|
+
variant: "ghost",
|
|
101
|
+
color: "neutral",
|
|
102
|
+
disabled: stop.pending,
|
|
103
|
+
focusableWhenDisabled: true,
|
|
104
|
+
"aria-busy": stop.pending,
|
|
105
|
+
"aria-label": `Stop ${name}`,
|
|
106
|
+
onFocus: () => {
|
|
107
|
+
stopFocused.current = true;
|
|
108
|
+
},
|
|
109
|
+
onBlur: () => {
|
|
110
|
+
stopFocused.current = false;
|
|
111
|
+
},
|
|
112
|
+
onClick: () => {
|
|
113
|
+
store.stopRun(run.runId).catch(() => void 0);
|
|
114
|
+
},
|
|
115
|
+
children: stop.pending ? "Stopping…" : "Stop"
|
|
116
|
+
}) : null]
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
const SubagentRunLane = React.memo(SubagentRunLaneView);
|
|
122
|
+
/**
|
|
123
|
+
* The transcript's record of delegated work: one quiet lane per run the turn
|
|
124
|
+
* handed off, live while the child works — status mark and name, the child's
|
|
125
|
+
* latest progress line, then the report's headline or the failure — and a
|
|
126
|
+
* link to the run's report.
|
|
127
|
+
*
|
|
128
|
+
* Lanes stack in a narrow column such as a side panel and sit up to three
|
|
129
|
+
* across when the column has room. Inside an `AgentToolRunsProvider` given
|
|
130
|
+
* `onStopRun`, a run that may still execute gets its own Stop beside its
|
|
131
|
+
* link — the same command, pending state, and failure as its row in
|
|
132
|
+
* `SubagentRunPanel`; otherwise a lane is a pure record. Lanes are never a
|
|
133
|
+
* live region.
|
|
134
|
+
*
|
|
135
|
+
* Lanes on the list's first frame are history and stay still. To have a live
|
|
136
|
+
* dispatch arrive with motion, mount the lanes while the dispatching turn
|
|
137
|
+
* streams, before its runs exist: with no runs they render nothing.
|
|
138
|
+
* `ThinkChat.MessageContent` does this under each activity group when given
|
|
139
|
+
* `renderAgentToolRunLink`.
|
|
140
|
+
*/
|
|
141
|
+
function SubagentRunLanes({ runs, renderRunLink }) {
|
|
142
|
+
const arrivalsReady = useArrivalsReady();
|
|
143
|
+
if (runs.length === 0) return null;
|
|
144
|
+
return /* @__PURE__ */ jsx("div", {
|
|
145
|
+
className: "subagent-run-lanes",
|
|
146
|
+
"data-slot": "subagent-run-lanes",
|
|
147
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
148
|
+
className: "subagent-run-lanes__list",
|
|
149
|
+
role: "list",
|
|
150
|
+
"aria-label": "Delegated runs",
|
|
151
|
+
"data-content-ready": arrivalsReady ? "" : void 0,
|
|
152
|
+
children: runs.toSorted((a, b) => a.order - b.order).map((run) => /* @__PURE__ */ jsx(SubagentRunLane, {
|
|
153
|
+
run,
|
|
154
|
+
renderRunLink
|
|
155
|
+
}, run.runId))
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { SubagentRunLanes };
|
|
@@ -1,39 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as AgentToolRunValue } from "../../AgentToolRunsContext-Br3jZ6Up.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { AgentToolRunPart } from "agents/agent-tools";
|
|
4
3
|
//#region src/components/agents-sdk/SubagentRunPanel.d.ts
|
|
5
|
-
interface CommandState {
|
|
6
|
-
pending: boolean;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SubagentRunPanelProviderProps {
|
|
10
|
-
/** Conversation identity; changing it resets transient controls without remounting children. */
|
|
11
|
-
scopeKey: string;
|
|
12
|
-
/** The one upstream event-hook value from the parent connection. */
|
|
13
|
-
agentTools: AgentToolEventsValue<AgentToolRunPart>;
|
|
14
|
-
selectedRunId?: string;
|
|
15
|
-
parentRunning: boolean;
|
|
16
|
-
onStopCurrentWork: () => Promise<void>;
|
|
17
|
-
onStopRun: (runId: string) => Promise<void>;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
interface SubagentRunPanelValue extends Pick<SubagentRunPanelProviderProps, "agentTools" | "selectedRunId" | "parentRunning"> {
|
|
21
|
-
/** Set while a run is open, so coming back lands on the pill that led there. */
|
|
22
|
-
restoreFocus: React.RefObject<boolean>;
|
|
23
|
-
commands: Readonly<Record<string, CommandState>>;
|
|
24
|
-
stopCurrentWork: () => Promise<void>;
|
|
25
|
-
stopRun: (runId: string) => Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
/** A thread's transient Stop commands and focus return; run facts remain in the SDK value. */
|
|
28
|
-
export declare function SubagentRunPanelProvider({ scopeKey, agentTools, selectedRunId, parentRunning, onStopCurrentWork, onStopRun, children }: SubagentRunPanelProviderProps): React.JSX.Element;
|
|
29
|
-
export declare function useOptionalSubagentRunPanel(): SubagentRunPanelValue | null;
|
|
30
4
|
export interface SubagentRunPanelProps {
|
|
31
5
|
renderRunLink: (run: AgentToolRunValue) => React.ReactElement;
|
|
32
6
|
}
|
|
33
7
|
/**
|
|
34
8
|
* Parent-scoped delegated work, collapsed to one pill above the composer — the
|
|
35
9
|
* shipped Codex "N background agents" row. The runs open in a popover on
|
|
36
|
-
* demand, so the dock never grows with the roster.
|
|
10
|
+
* demand, so the dock never grows with the roster. Renders inside an
|
|
11
|
+
* `AgentToolRunsProvider` once the parent has a run.
|
|
37
12
|
*/
|
|
38
13
|
export declare function SubagentRunPanel({ renderRunLink }: SubagentRunPanelProps): React.JSX.Element | null;
|
|
39
14
|
//#endregion
|
|
@@ -1,131 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as SquareIcon, Z as SpinnerIcon } from "../../icons-Yp99gmMC.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
+
import { Popover } from "../foundations/Popover.js";
|
|
6
|
+
import { Queue, QueueItem, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList } from "../ai-sdk/Queue.js";
|
|
5
7
|
import { SubagentRunIndicator, getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
8
|
+
import { a as runStopOffered, c as useRunOpen, d as useRunsStore, n as IDLE, u as useRunsSelector } from "../../agent-tool-runs-DsOp_X2y.js";
|
|
6
9
|
import { useOptionalAgentChatQueue } from "./AgentChatQueue.js";
|
|
7
|
-
import { Queue, QueueItem, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList } from "../ai-sdk/Queue.js";
|
|
8
10
|
import { AgentChatNotice } from "./AgentChat.js";
|
|
9
|
-
import { Popover } from "../foundations/Popover.js";
|
|
10
11
|
import { SubagentRunSelector } from "./SubagentRunSelector.js";
|
|
11
12
|
import * as React from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { agentToolRunMayExecute } from "agents/react";
|
|
14
15
|
//#region src/components/agents-sdk/SubagentRunPanel.tsx
|
|
15
|
-
const IDLE = { pending: false };
|
|
16
|
-
const SubagentRunPanelContext = React.createContext(null);
|
|
17
|
-
function createPanelState(scopeKey, selectedRunId) {
|
|
18
|
-
return {
|
|
19
|
-
scopeKey,
|
|
20
|
-
commands: {},
|
|
21
|
-
inFlight: /* @__PURE__ */ new Map(),
|
|
22
|
-
restoreFocus: { current: Boolean(selectedRunId) }
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/** A thread's transient Stop commands and focus return; run facts remain in the SDK value. */
|
|
26
|
-
function SubagentRunPanelProvider({ scopeKey, agentTools, selectedRunId, parentRunning, onStopCurrentWork, onStopRun, children }) {
|
|
27
|
-
const [state, setState] = React.useState(() => createPanelState(scopeKey, selectedRunId));
|
|
28
|
-
if (state.scopeKey !== scopeKey) setState(createPanelState(scopeKey, selectedRunId));
|
|
29
|
-
const { commands, inFlight, restoreFocus } = state;
|
|
30
|
-
React.useLayoutEffect(() => {
|
|
31
|
-
if (selectedRunId) restoreFocus.current = true;
|
|
32
|
-
}, [restoreFocus, selectedRunId]);
|
|
33
|
-
const execute = React.useCallback((key, command) => {
|
|
34
|
-
const pending = inFlight.get(key);
|
|
35
|
-
if (pending) return pending;
|
|
36
|
-
const setCommand = (command) => setState((current) => current.inFlight === inFlight ? {
|
|
37
|
-
...current,
|
|
38
|
-
commands: {
|
|
39
|
-
...current.commands,
|
|
40
|
-
[key]: command
|
|
41
|
-
}
|
|
42
|
-
} : current);
|
|
43
|
-
setCommand({ pending: true });
|
|
44
|
-
const operation = Promise.resolve().then(command).then(() => setCommand(IDLE), (cause) => {
|
|
45
|
-
const error = cause instanceof Error ? cause.message : "Stop could not be confirmed. Try again.";
|
|
46
|
-
setCommand({
|
|
47
|
-
pending: false,
|
|
48
|
-
error
|
|
49
|
-
});
|
|
50
|
-
throw cause;
|
|
51
|
-
}).finally(() => inFlight.delete(key));
|
|
52
|
-
inFlight.set(key, operation);
|
|
53
|
-
return operation;
|
|
54
|
-
}, [inFlight]);
|
|
55
|
-
const stopCurrentWork = React.useCallback(() => execute("current-work", onStopCurrentWork), [execute, onStopCurrentWork]);
|
|
56
|
-
const stopRun = React.useCallback((id) => execute(id, () => onStopRun(id)), [execute, onStopRun]);
|
|
57
|
-
const value = React.useMemo(() => ({
|
|
58
|
-
agentTools,
|
|
59
|
-
selectedRunId,
|
|
60
|
-
parentRunning,
|
|
61
|
-
restoreFocus,
|
|
62
|
-
commands,
|
|
63
|
-
stopCurrentWork,
|
|
64
|
-
stopRun
|
|
65
|
-
}), [
|
|
66
|
-
agentTools,
|
|
67
|
-
selectedRunId,
|
|
68
|
-
parentRunning,
|
|
69
|
-
restoreFocus,
|
|
70
|
-
commands,
|
|
71
|
-
stopCurrentWork,
|
|
72
|
-
stopRun
|
|
73
|
-
]);
|
|
74
|
-
return /* @__PURE__ */ jsx(SubagentRunPanelContext.Provider, {
|
|
75
|
-
value,
|
|
76
|
-
children
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function useOptionalSubagentRunPanel() {
|
|
80
|
-
return React.useContext(SubagentRunPanelContext);
|
|
81
|
-
}
|
|
82
16
|
/** Runs that may still execute lead; each group keeps dispatch order. */
|
|
83
|
-
function sortSubagentRuns(
|
|
84
|
-
return Object.values(
|
|
17
|
+
function sortSubagentRuns(runsById) {
|
|
18
|
+
return Object.values(runsById).sort((a, b) => Number(!agentToolRunMayExecute(a)) - Number(!agentToolRunMayExecute(b)) || a.order - b.order);
|
|
85
19
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
React.useLayoutEffect(() => {
|
|
94
|
-
const previous = focusedControl.current;
|
|
95
|
-
const root = rootRef.current;
|
|
96
|
-
if (!previous || previous.element.isConnected || !root || document.activeElement !== document.body) return;
|
|
97
|
-
(Array.from(root.querySelectorAll("[data-run-id]")).find((element) => element.dataset.runId === previous.runId)?.querySelector("a") ?? root).focus({ preventScroll: true });
|
|
98
|
-
});
|
|
99
|
-
React.useEffect(() => {
|
|
100
|
-
if (panel.selectedRunId || !panel.restoreFocus.current) return;
|
|
101
|
-
triggerRef.current?.focus({ preventScroll: true });
|
|
102
|
-
panel.restoreFocus.current = false;
|
|
103
|
-
}, [panel.restoreFocus, panel.selectedRunId]);
|
|
104
|
-
const onFocusCapture = (event) => {
|
|
105
|
-
focusedControl.current = {
|
|
106
|
-
element: event.target,
|
|
107
|
-
runId: event.target.closest("[data-run-id]")?.dataset.runId
|
|
108
|
-
};
|
|
109
|
-
if (!focusedOrder && event.target.closest("[data-run-id]")) setFocusedOrder(ordered.map((run) => run.runId));
|
|
110
|
-
};
|
|
111
|
-
const onBlurCapture = (event) => {
|
|
112
|
-
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
113
|
-
focusedControl.current = null;
|
|
114
|
-
setFocusedOrder(null);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
20
|
+
function countLabel(active, finished) {
|
|
21
|
+
return [active && `${active} active`, finished && `${finished} finished`].filter(Boolean).join(", ");
|
|
22
|
+
}
|
|
23
|
+
function selectPill(state) {
|
|
24
|
+
const runs = sortSubagentRuns(state.agentTools.runsById);
|
|
25
|
+
const lead = runs.find((run) => run.status !== "completed") ?? runs[0];
|
|
26
|
+
if (!lead) return null;
|
|
117
27
|
return {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
onFocusCapture,
|
|
122
|
-
onBlurCapture
|
|
28
|
+
total: runs.length,
|
|
29
|
+
active: runs.filter(agentToolRunMayExecute).length,
|
|
30
|
+
lead
|
|
123
31
|
};
|
|
124
32
|
}
|
|
125
|
-
function
|
|
33
|
+
function samePill(a, b) {
|
|
34
|
+
return a === b || !!a && !!b && a.total === b.total && a.active === b.active && a.lead.runId === b.lead.runId && a.lead.status === b.lead.status && a.lead.childStillRunning === b.lead.childStillRunning;
|
|
35
|
+
}
|
|
36
|
+
const NO_RUNS = {};
|
|
37
|
+
const selectRunsById = (state) => state.agentTools.runsById;
|
|
38
|
+
const selectStops = (state) => state.onStopRun ? state.stops : null;
|
|
39
|
+
const selectSelectedRunId = (state) => state.selectedRunId;
|
|
40
|
+
const selectCollection = (state) => state.agentTools.collection;
|
|
41
|
+
const selectCurrentWork = (state) => state.onStopCurrentWork ? state.stops["current-work"] ?? IDLE : null;
|
|
42
|
+
function SubagentRunStopAll({ active }) {
|
|
43
|
+
const store = useRunsStore();
|
|
126
44
|
const queue = useOptionalAgentChatQueue();
|
|
127
|
-
const stop =
|
|
128
|
-
if (active < 2 && !stop.error && !stop.pending) return null;
|
|
45
|
+
const stop = useRunsSelector(selectCurrentWork, null);
|
|
46
|
+
if (!store || !stop || active < 2 && !stop.error && !stop.pending) return null;
|
|
129
47
|
return /* @__PURE__ */ jsx("div", {
|
|
130
48
|
className: "subagent-run__menu-header",
|
|
131
49
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -139,58 +57,147 @@ function SubagentRunStopAll({ panel, active }) {
|
|
|
139
57
|
"aria-busy": stop.pending,
|
|
140
58
|
onClick: () => {
|
|
141
59
|
queue?.hold();
|
|
142
|
-
|
|
60
|
+
store.stopCurrentWork().catch(() => void 0);
|
|
143
61
|
},
|
|
144
62
|
children: stop.pending ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(SquareIcon, {})
|
|
145
63
|
})
|
|
146
64
|
});
|
|
147
65
|
}
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
const actionable = agentToolRunMayExecute(run) || command.error || command.pending;
|
|
66
|
+
function SubagentRunRowView({ run, stop, selected, renderRunLink }) {
|
|
67
|
+
const store = useRunsStore();
|
|
151
68
|
return /* @__PURE__ */ jsxs(QueueItem, {
|
|
152
69
|
"data-run-id": run.runId,
|
|
153
70
|
children: [/* @__PURE__ */ jsxs(QueueItemContent, { children: [/* @__PURE__ */ jsx(SubagentRunSelector, {
|
|
154
71
|
run,
|
|
155
72
|
render: renderRunLink(run),
|
|
156
73
|
surface: "plain",
|
|
157
|
-
"aria-current":
|
|
158
|
-
}),
|
|
74
|
+
"aria-current": selected ? "page" : void 0
|
|
75
|
+
}), stop?.error ? /* @__PURE__ */ jsx(QueueItemDescription, {
|
|
159
76
|
role: "alert",
|
|
160
|
-
children:
|
|
161
|
-
}) : null] }),
|
|
77
|
+
children: stop.error
|
|
78
|
+
}) : null] }), store && stop && runStopOffered(run, stop) ? /* @__PURE__ */ jsx(QueueItemActions, {
|
|
162
79
|
persistent: true,
|
|
163
80
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
164
81
|
label: `Stop ${getSubagentRunName(run)}`,
|
|
165
|
-
tooltip:
|
|
82
|
+
tooltip: stop.pending ? "Stopping…" : void 0,
|
|
166
83
|
size: "xs",
|
|
167
84
|
variant: "ghost",
|
|
168
85
|
color: "neutral",
|
|
169
|
-
disabled:
|
|
86
|
+
disabled: stop.pending,
|
|
170
87
|
focusableWhenDisabled: true,
|
|
171
|
-
"aria-busy":
|
|
88
|
+
"aria-busy": stop.pending,
|
|
172
89
|
onClick: () => {
|
|
173
|
-
|
|
90
|
+
store.stopRun(run.runId).catch(() => void 0);
|
|
174
91
|
},
|
|
175
|
-
children:
|
|
92
|
+
children: stop.pending ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(SquareIcon, {})
|
|
176
93
|
})
|
|
177
94
|
}) : null]
|
|
178
95
|
});
|
|
179
96
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const
|
|
97
|
+
const SubagentRunRow = React.memo(SubagentRunRowView);
|
|
98
|
+
/** The open list. Mounted only while open, so the closed pill never follows every chunk. */
|
|
99
|
+
function SubagentRunMenu({ renderRunLink }) {
|
|
100
|
+
const runs = sortSubagentRuns(useRunsSelector(selectRunsById, NO_RUNS));
|
|
101
|
+
const stops = useRunsSelector(selectStops, null);
|
|
102
|
+
const selectedRunId = useRunsSelector(selectSelectedRunId, void 0);
|
|
103
|
+
const collection = useRunsSelector(selectCollection, null);
|
|
104
|
+
const stop = useRunsSelector(selectCurrentWork, null);
|
|
105
|
+
const rootRef = React.useRef(null);
|
|
106
|
+
const focusedControl = React.useRef(null);
|
|
107
|
+
const [focusedOrder, setFocusedOrder] = React.useState(null);
|
|
108
|
+
const ranks = focusedOrder ? new Map(focusedOrder.map((id, index) => [id, index])) : null;
|
|
109
|
+
const ordered = ranks ? runs.toSorted((a, b) => (ranks.get(a.runId) ?? Infinity) - (ranks.get(b.runId) ?? Infinity)) : runs;
|
|
110
|
+
React.useLayoutEffect(() => {
|
|
111
|
+
const previous = focusedControl.current;
|
|
112
|
+
const root = rootRef.current;
|
|
113
|
+
if (!previous || previous.element.isConnected || !root || document.activeElement !== document.body) return;
|
|
114
|
+
(Array.from(root.querySelectorAll("[data-run-id]")).find((element) => element.dataset.runId === previous.runId)?.querySelector("a") ?? root).focus({ preventScroll: true });
|
|
115
|
+
});
|
|
116
|
+
return /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
117
|
+
ref: rootRef,
|
|
118
|
+
"aria-label": "Delegated work",
|
|
119
|
+
className: "subagent-run__menu",
|
|
120
|
+
initialFocus: (openType) => openType === "keyboard" ? rootRef.current?.querySelector("[data-run-id] a") ?? true : rootRef.current,
|
|
121
|
+
onFocusCapture: (event) => {
|
|
122
|
+
focusedControl.current = {
|
|
123
|
+
element: event.target,
|
|
124
|
+
runId: event.target.closest("[data-run-id]")?.dataset.runId
|
|
125
|
+
};
|
|
126
|
+
if (!focusedOrder && event.target.closest("[data-run-id]")) setFocusedOrder(ordered.map((run) => run.runId));
|
|
127
|
+
},
|
|
128
|
+
onBlurCapture: (event) => {
|
|
129
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
130
|
+
focusedControl.current = null;
|
|
131
|
+
setFocusedOrder(null);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsx(SubagentRunStopAll, { active: runs.filter(agentToolRunMayExecute).length }),
|
|
136
|
+
/* @__PURE__ */ jsxs("div", {
|
|
137
|
+
className: "subagent-run__notices",
|
|
138
|
+
children: [
|
|
139
|
+
stop?.error ? /* @__PURE__ */ jsx(AgentChatNotice, {
|
|
140
|
+
"data-tone": "danger",
|
|
141
|
+
role: "alert",
|
|
142
|
+
children: stop.error
|
|
143
|
+
}) : null,
|
|
144
|
+
collection?.status === "loading" ? /* @__PURE__ */ jsx(AgentChatNotice, { children: collection.stale ? "Reconnecting. Last known runs are shown." : "Loading delegated work…" }) : null,
|
|
145
|
+
collection?.status === "error" ? /* @__PURE__ */ jsx(AgentChatNotice, {
|
|
146
|
+
"data-tone": "danger",
|
|
147
|
+
role: "alert",
|
|
148
|
+
children: collection.error ?? "Could not refresh delegated work. Last known runs are retained."
|
|
149
|
+
}) : null
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ jsx(Queue, {
|
|
153
|
+
density: "compact",
|
|
154
|
+
children: /* @__PURE__ */ jsx(QueueList, {
|
|
155
|
+
"aria-label": "Delegated work runs",
|
|
156
|
+
children: ordered.map((run) => /* @__PURE__ */ jsx(SubagentRunRow, {
|
|
157
|
+
run,
|
|
158
|
+
stop: stops ? stops[run.runId] ?? IDLE : null,
|
|
159
|
+
selected: run.runId === selectedRunId,
|
|
160
|
+
renderRunLink
|
|
161
|
+
}, run.runId))
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Parent-scoped delegated work, collapsed to one pill above the composer — the
|
|
169
|
+
* shipped Codex "N background agents" row. The runs open in a popover on
|
|
170
|
+
* demand, so the dock never grows with the roster. Renders inside an
|
|
171
|
+
* `AgentToolRunsProvider` once the parent has a run.
|
|
172
|
+
*/
|
|
173
|
+
function SubagentRunPanel({ renderRunLink }) {
|
|
174
|
+
const store = useRunsStore();
|
|
175
|
+
const pill = useRunsSelector(selectPill, null, samePill);
|
|
176
|
+
const runOpen = useRunOpen();
|
|
177
|
+
const triggerRef = React.useRef(null);
|
|
184
178
|
const [open, setOpen] = React.useState(false);
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
React.useEffect(() => {
|
|
180
|
+
const returnFocus = store?.returnFocus;
|
|
181
|
+
const claim = returnFocus?.current;
|
|
182
|
+
if (!returnFocus || runOpen || !claim) return;
|
|
183
|
+
const takeFocus = () => {
|
|
184
|
+
if (returnFocus.current !== claim) return;
|
|
185
|
+
returnFocus.current = null;
|
|
186
|
+
if (claim.to === "pill" || document.activeElement === document.body) triggerRef.current?.focus({ preventScroll: true });
|
|
187
|
+
};
|
|
188
|
+
if (claim.to === "pill") return takeFocus();
|
|
189
|
+
let frame = requestAnimationFrame(() => {
|
|
190
|
+
frame = requestAnimationFrame(() => {
|
|
191
|
+
frame = requestAnimationFrame(takeFocus);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
return () => cancelAnimationFrame(frame);
|
|
195
|
+
}, [store, runOpen]);
|
|
196
|
+
if (!pill) {
|
|
187
197
|
if (open) setOpen(false);
|
|
188
198
|
return null;
|
|
189
199
|
}
|
|
190
|
-
const
|
|
191
|
-
const finished = runs.length - active;
|
|
192
|
-
const counts = [active && `${active} active`, finished && `${finished} finished`].filter(Boolean).join(", ");
|
|
193
|
-
const { collection } = panel.agentTools;
|
|
200
|
+
const counts = countLabel(pill.active, pill.total - pill.active);
|
|
194
201
|
return /* @__PURE__ */ jsx("div", {
|
|
195
202
|
className: "subagent-run__dock",
|
|
196
203
|
"data-subagent-run-panel": "",
|
|
@@ -202,7 +209,7 @@ function SubagentRunPanelContent({ panel, renderRunLink }) {
|
|
|
202
209
|
children: [/* @__PURE__ */ jsxs(Tooltip.Trigger, {
|
|
203
210
|
render: /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
204
211
|
unstyled: true,
|
|
205
|
-
ref:
|
|
212
|
+
ref: triggerRef,
|
|
206
213
|
"data-slot": "subagent-run-panel-trigger",
|
|
207
214
|
className: buttonVariants({
|
|
208
215
|
variant: "surface",
|
|
@@ -212,7 +219,7 @@ function SubagentRunPanelContent({ panel, renderRunLink }) {
|
|
|
212
219
|
}),
|
|
213
220
|
"aria-description": counts
|
|
214
221
|
}),
|
|
215
|
-
children: [/* @__PURE__ */ jsx(SubagentRunIndicator, { run: lead }),
|
|
222
|
+
children: [/* @__PURE__ */ jsx(SubagentRunIndicator, { run: pill.lead }), pill.total === 1 ? "1 agent" : `${pill.total} agents`]
|
|
216
223
|
}), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
217
224
|
side: "top",
|
|
218
225
|
sideOffset: 6,
|
|
@@ -222,62 +229,10 @@ function SubagentRunPanelContent({ panel, renderRunLink }) {
|
|
|
222
229
|
side: "top",
|
|
223
230
|
align: "center",
|
|
224
231
|
sideOffset: 8,
|
|
225
|
-
children: /* @__PURE__ */
|
|
226
|
-
ref: focus.rootRef,
|
|
227
|
-
"aria-label": "Delegated work",
|
|
228
|
-
className: "subagent-run__menu",
|
|
229
|
-
initialFocus: (openType) => openType === "keyboard" ? focus.rootRef.current?.querySelector("[data-run-id] a") ?? true : focus.rootRef.current,
|
|
230
|
-
onFocusCapture: focus.onFocusCapture,
|
|
231
|
-
onBlurCapture: focus.onBlurCapture,
|
|
232
|
-
children: [
|
|
233
|
-
/* @__PURE__ */ jsx(SubagentRunStopAll, {
|
|
234
|
-
panel,
|
|
235
|
-
active
|
|
236
|
-
}),
|
|
237
|
-
/* @__PURE__ */ jsxs("div", {
|
|
238
|
-
className: "subagent-run__notices",
|
|
239
|
-
children: [
|
|
240
|
-
stop.error ? /* @__PURE__ */ jsx(AgentChatNotice, {
|
|
241
|
-
"data-tone": "danger",
|
|
242
|
-
role: "alert",
|
|
243
|
-
children: stop.error
|
|
244
|
-
}) : null,
|
|
245
|
-
collection.status === "loading" ? /* @__PURE__ */ jsx(AgentChatNotice, { children: collection.stale ? "Reconnecting. Last known runs are shown." : "Loading delegated work…" }) : null,
|
|
246
|
-
collection.status === "error" ? /* @__PURE__ */ jsx(AgentChatNotice, {
|
|
247
|
-
"data-tone": "danger",
|
|
248
|
-
role: "alert",
|
|
249
|
-
children: collection.error ?? "Could not refresh delegated work. Last known runs are retained."
|
|
250
|
-
}) : null
|
|
251
|
-
]
|
|
252
|
-
}),
|
|
253
|
-
/* @__PURE__ */ jsx(Queue, {
|
|
254
|
-
density: "compact",
|
|
255
|
-
children: /* @__PURE__ */ jsx(QueueList, {
|
|
256
|
-
"aria-label": "Delegated work runs",
|
|
257
|
-
children: focus.ordered.map((run) => /* @__PURE__ */ jsx(SubagentRunRow, {
|
|
258
|
-
panel,
|
|
259
|
-
run,
|
|
260
|
-
renderRunLink
|
|
261
|
-
}, run.runId))
|
|
262
|
-
})
|
|
263
|
-
})
|
|
264
|
-
]
|
|
265
|
-
})
|
|
232
|
+
children: /* @__PURE__ */ jsx(SubagentRunMenu, { renderRunLink })
|
|
266
233
|
}) })]
|
|
267
234
|
})
|
|
268
235
|
});
|
|
269
236
|
}
|
|
270
|
-
/**
|
|
271
|
-
* Parent-scoped delegated work, collapsed to one pill above the composer — the
|
|
272
|
-
* shipped Codex "N background agents" row. The runs open in a popover on
|
|
273
|
-
* demand, so the dock never grows with the roster.
|
|
274
|
-
*/
|
|
275
|
-
function SubagentRunPanel({ renderRunLink }) {
|
|
276
|
-
const panel = useOptionalSubagentRunPanel();
|
|
277
|
-
return panel ? /* @__PURE__ */ jsx(SubagentRunPanelContent, {
|
|
278
|
-
panel,
|
|
279
|
-
renderRunLink
|
|
280
|
-
}) : null;
|
|
281
|
-
}
|
|
282
237
|
//#endregion
|
|
283
|
-
export { SubagentRunPanel
|
|
238
|
+
export { SubagentRunPanel };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as AgentToolRunValue } from "../../AgentToolRunsContext-Br3jZ6Up.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { UIMessage } from "ai";
|
|
4
4
|
import { AgentToolRunPart } from "agents/agent-tools";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
5
4
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
|
+
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/SubagentRunSelector.tsx
|