@mcp-b/react-components 0.59.2 → 0.61.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-Bs_Z03eC.js → CodeBlock-CNvOYR0Q.js} +1 -1
- package/dist/{EmployeeChrome-QSki0QT4.d.ts → EmployeeChrome-D3IgFX22.d.ts} +12 -34
- package/dist/{ExecutionBoard-DHfMvKlB.d.ts → ExecutionBoard-DvPGdn4F.d.ts} +2 -2
- package/dist/{ExecutionResult-BSZsUbrL.js → ExecutionResult-DmC21cll.js} +4 -4
- package/dist/{FileTree-DyLBn7O_.js → FileTree-H31EVRv_.js} +1 -1
- package/dist/{IconButton-43ggXEuf.d.ts → IconButton-FWsa9562.d.ts} +1 -1
- package/dist/{ManagerOffice-BxBKEb_j.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-CKQ-mKYt.js → SetupChecklist-Wo4akaSG.js} +1 -1
- 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-5S834QKW.d.ts +34 -0
- package/dist/{Workspace-iCkXvQRJ.d.ts → Workspace-42LA9Zrb.d.ts} +1 -1
- package/dist/WorkspaceAutomation-B2Pdz_SU.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-CsWwQA1U.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-CReSIBpd.d.ts → codex-model-catalog-CFEGgUAj.d.ts} +68 -20
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/components/agents-sdk/EmployeeChat.d.ts +9 -2
- package/dist/components/agents-sdk/EmployeeChat.js +13 -9
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +42 -30
- 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 +3 -3
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +6 -32
- 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 +3 -3
- 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/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 +143 -188
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +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 +12 -27
- 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 +3 -3
- 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} +46 -44
- 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/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 +2 -2
- 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 +2 -2
- 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 +13 -5
- 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 +4 -4
- package/dist/components/ai-sdk/Queue.d.ts +1 -1
- package/dist/components/ai-sdk/Queue.js +2 -2
- 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/ai-sdk/ToolInvocation.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 +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- 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 +2 -2
- 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 +2 -4
- package/dist/components/foundations/ToggleGroup.js +4 -16
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- 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 +3 -3
- 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 +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- 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 +1 -1
- 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 +3 -3
- 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-M4sAp9xS.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-DvlrWt54.js → icons-Yp99gmMC.js} +8 -2
- 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/codex-model-catalog.js +51 -19
- 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-DVn0d-fN.js → workspace-assets-Dq5toMQc.js} +34 -38
- package/dist/workspace-concept-panel-CxZfmFkP.js +66 -0
- package/dist/workspace-concept-panel-CxuqDi4m.d.ts +21 -0
- package/dist/{workspace-delete-CMY1kPkq.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 +28 -28
- 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,686 @@
|
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { E as InfoIcon, Z as SpinnerIcon, d as CheckIcon, f as ChevronDownIcon, r as ArrowLeftIcon, st as WarningIcon } from "../../icons-Yp99gmMC.js";
|
|
3
|
+
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { Field } from "../foundations/Field.js";
|
|
5
|
+
import { Form } from "../foundations/Form.js";
|
|
6
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
7
|
+
import { IconButton } from "../foundations/IconButton.js";
|
|
8
|
+
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
9
|
+
import { Select } from "../foundations/Select.js";
|
|
10
|
+
import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-Dq5toMQc.js";
|
|
11
|
+
import { n as executionErrorSummary } from "../../execution-result-DAuW4VWv.js";
|
|
12
|
+
import { t as ExecutionResult } from "../../ExecutionResult-DmC21cll.js";
|
|
13
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
14
|
+
import { Checkbox } from "../foundations/Checkbox.js";
|
|
15
|
+
import { n as OptionSelect, t as scheduledTableSourceNote } from "../../scheduled-table-source-NZR1vFc_.js";
|
|
16
|
+
import { Fieldset } from "../foundations/Fieldset.js";
|
|
17
|
+
import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
|
|
18
|
+
import { Combobox } from "../foundations/Combobox.js";
|
|
19
|
+
import { NumberField } from "../foundations/NumberField.js";
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
//#region src/components/agents-sdk/ThinkScheduleForm.tsx
|
|
23
|
+
const REPEAT_KIND_OPTIONS = [
|
|
24
|
+
{
|
|
25
|
+
label: "At an interval",
|
|
26
|
+
value: "interval"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "Every day",
|
|
30
|
+
value: "daily"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Every weekday",
|
|
34
|
+
value: "weekdays"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Every week",
|
|
38
|
+
value: "weekly"
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
const INTERVAL_UNIT_OPTIONS = [{
|
|
42
|
+
label: "Minutes",
|
|
43
|
+
value: "minute"
|
|
44
|
+
}, {
|
|
45
|
+
label: "Hours",
|
|
46
|
+
value: "hour"
|
|
47
|
+
}];
|
|
48
|
+
const MINUTE_MS = 6e4;
|
|
49
|
+
const HOUR_MS = 36e5;
|
|
50
|
+
const BROWSER_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
51
|
+
const TIMEZONE_OPTIONS = [.../* @__PURE__ */ new Set([
|
|
52
|
+
BROWSER_TIMEZONE,
|
|
53
|
+
"UTC",
|
|
54
|
+
...Intl.supportedValuesOf("timeZone")
|
|
55
|
+
])].sort((left, right) => left.localeCompare(right)).map((value) => ({
|
|
56
|
+
label: value,
|
|
57
|
+
value
|
|
58
|
+
}));
|
|
59
|
+
const WEEKDAYS = [
|
|
60
|
+
{
|
|
61
|
+
token: "mon",
|
|
62
|
+
dayNumber: 1,
|
|
63
|
+
label: "Monday"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
token: "tue",
|
|
67
|
+
dayNumber: 2,
|
|
68
|
+
label: "Tuesday"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
token: "wed",
|
|
72
|
+
dayNumber: 3,
|
|
73
|
+
label: "Wednesday"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
token: "thu",
|
|
77
|
+
dayNumber: 4,
|
|
78
|
+
label: "Thursday"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
token: "fri",
|
|
82
|
+
dayNumber: 5,
|
|
83
|
+
label: "Friday"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
token: "sat",
|
|
87
|
+
dayNumber: 6,
|
|
88
|
+
label: "Saturday"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
token: "sun",
|
|
92
|
+
dayNumber: 0,
|
|
93
|
+
label: "Sunday"
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
const NEW_TIMING = {
|
|
97
|
+
kind: "daily",
|
|
98
|
+
intervalEvery: 1,
|
|
99
|
+
intervalUnit: "hour",
|
|
100
|
+
time: "09:00",
|
|
101
|
+
timezone: BROWSER_TIMEZONE,
|
|
102
|
+
days: ["mon"]
|
|
103
|
+
};
|
|
104
|
+
function timingDraft(timing) {
|
|
105
|
+
if (!timing) return NEW_TIMING;
|
|
106
|
+
if (timing.kind === "interval") {
|
|
107
|
+
const intervalUnit = timing.intervalMs % HOUR_MS === 0 ? "hour" : "minute";
|
|
108
|
+
return {
|
|
109
|
+
...NEW_TIMING,
|
|
110
|
+
kind: "interval",
|
|
111
|
+
intervalEvery: timing.intervalMs / (intervalUnit === "hour" ? HOUR_MS : MINUTE_MS),
|
|
112
|
+
intervalUnit
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
const { days } = timing;
|
|
116
|
+
const pad = (value) => String(value).padStart(2, "0");
|
|
117
|
+
return {
|
|
118
|
+
...NEW_TIMING,
|
|
119
|
+
kind: days === "daily" ? "daily" : days === "weekday" ? "weekdays" : "weekly",
|
|
120
|
+
time: `${pad(timing.hour)}:${pad(timing.minute)}`,
|
|
121
|
+
timezone: timing.timezone,
|
|
122
|
+
days: typeof days === "string" ? NEW_TIMING.days : WEEKDAYS.filter((day) => days.includes(day.dayNumber)).map((day) => day.token)
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function serializeSchedule({ kind, intervalEvery, intervalUnit, time, timezone, days }) {
|
|
126
|
+
if (kind === "interval") {
|
|
127
|
+
if (intervalEvery === null || !Number.isSafeInteger(intervalEvery) || intervalEvery < 1) return null;
|
|
128
|
+
return `every ${intervalEvery} ${intervalUnit}${intervalEvery === 1 ? "" : "s"}`;
|
|
129
|
+
}
|
|
130
|
+
if (kind === "weekly") {
|
|
131
|
+
if (days.length === 0) return null;
|
|
132
|
+
return `every week on ${WEEKDAYS.filter((day) => days.includes(day.token)).map((day) => day.token).join(",")} at ${time} in ${timezone}`;
|
|
133
|
+
}
|
|
134
|
+
if (kind === "weekdays") return `every weekday at ${time} in ${timezone}`;
|
|
135
|
+
return `every day at ${time} in ${timezone}`;
|
|
136
|
+
}
|
|
137
|
+
function ScheduleSelect({ description, disabled, label, name, onValueChange, options, value }) {
|
|
138
|
+
return /* @__PURE__ */ jsx("div", {
|
|
139
|
+
className: "think-schedule__select-field",
|
|
140
|
+
children: /* @__PURE__ */ jsx(OptionSelect, {
|
|
141
|
+
disabled,
|
|
142
|
+
name,
|
|
143
|
+
options,
|
|
144
|
+
value,
|
|
145
|
+
onValueChange,
|
|
146
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
className: "think-schedule__input-label",
|
|
148
|
+
children: [/* @__PURE__ */ jsx(Select.Label, { children: label }), description ? /* @__PURE__ */ jsx(IconButton, {
|
|
149
|
+
label: `About ${label}`,
|
|
150
|
+
tooltip: description,
|
|
151
|
+
variant: "ghost",
|
|
152
|
+
color: "neutral",
|
|
153
|
+
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
154
|
+
}) : null]
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function ScheduleTableSource({ table, automations }) {
|
|
160
|
+
if (!table) return null;
|
|
161
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
162
|
+
className: "think-schedule__table-source",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsx("p", { children: "Run once for each table row" }),
|
|
165
|
+
/* @__PURE__ */ jsx(ScheduleTableOrigin, {
|
|
166
|
+
table,
|
|
167
|
+
automations
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx("p", {
|
|
170
|
+
className: "think-schedule__input-help",
|
|
171
|
+
children: scheduledTableSourceNote(table.source)
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function ScheduleTableOrigin({ table, automations }) {
|
|
177
|
+
if ("data" in table.source && table.source.data.source) {
|
|
178
|
+
const source = table.source.data.source;
|
|
179
|
+
const href = source.href ? httpUrl(source.href) : void 0;
|
|
180
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
181
|
+
className: "sigvelo-cluster",
|
|
182
|
+
children: [/* @__PURE__ */ jsx(FaviconMark, { href }), href ? /* @__PURE__ */ jsx("a", {
|
|
183
|
+
href,
|
|
184
|
+
target: "_blank",
|
|
185
|
+
rel: "noreferrer",
|
|
186
|
+
children: source.label
|
|
187
|
+
}) : source.label]
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if ("path" in table.source) return /* @__PURE__ */ jsx("p", { children: [/\.json$/iu.test(table.source.path) ? "Saved table" : table.source.path.split("/").at(-1), table.source.sheet].filter(Boolean).join(" · ") });
|
|
191
|
+
if ("script" in table.source) {
|
|
192
|
+
const path = table.source.script.path;
|
|
193
|
+
return /* @__PURE__ */ jsx("p", { children: automations.find((automation) => automation.path === path)?.name ?? "Connected table" });
|
|
194
|
+
}
|
|
195
|
+
return /* @__PURE__ */ jsx("p", { children: "Saved table" });
|
|
196
|
+
}
|
|
197
|
+
function ScheduleAutomationParameter({ parameter, value, setArgument }) {
|
|
198
|
+
if (value !== void 0 && (typeof value === "object" || typeof value !== parameter.type)) return null;
|
|
199
|
+
const help = [parameter.description, parameter.required ? "Required by the automation." : void 0].filter(Boolean).join(" ");
|
|
200
|
+
if (parameter.type === "boolean") return /* @__PURE__ */ jsx(Field.Root, {
|
|
201
|
+
name: parameter.name,
|
|
202
|
+
children: /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
203
|
+
label: parameter.label,
|
|
204
|
+
description: help || void 0,
|
|
205
|
+
name: parameter.name,
|
|
206
|
+
value: value === void 0 ? "" : String(value),
|
|
207
|
+
options: [
|
|
208
|
+
{
|
|
209
|
+
label: parameter.required ? "Choose an option" : "Use automation default",
|
|
210
|
+
value: ""
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
label: "Yes",
|
|
214
|
+
value: "true"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: "No",
|
|
218
|
+
value: "false"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
onValueChange: (nextValue) => setArgument(parameter.name, nextValue === "" ? void 0 : nextValue === "true")
|
|
222
|
+
})
|
|
223
|
+
});
|
|
224
|
+
return /* @__PURE__ */ jsxs(Field.Root, {
|
|
225
|
+
name: parameter.name,
|
|
226
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
227
|
+
className: "think-schedule__input-label",
|
|
228
|
+
children: [/* @__PURE__ */ jsx(Field.Label, { children: parameter.label }), help ? /* @__PURE__ */ jsx(IconButton, {
|
|
229
|
+
label: `About ${parameter.label}`,
|
|
230
|
+
tooltip: help,
|
|
231
|
+
variant: "ghost",
|
|
232
|
+
color: "neutral",
|
|
233
|
+
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
234
|
+
}) : null]
|
|
235
|
+
}), /* @__PURE__ */ jsx(Field.Control, {
|
|
236
|
+
name: parameter.name,
|
|
237
|
+
type: parameter.type === "number" ? "number" : "text",
|
|
238
|
+
step: parameter.type === "number" ? "any" : void 0,
|
|
239
|
+
value: value === void 0 ? "" : String(value),
|
|
240
|
+
autoComplete: "off",
|
|
241
|
+
placeholder: parameter.required ? void 0 : "Use automation default",
|
|
242
|
+
onChange: (event) => {
|
|
243
|
+
const nextValue = event.currentTarget.value;
|
|
244
|
+
setArgument(parameter.name, nextValue === "" ? void 0 : parameter.type === "number" ? Number(nextValue) : nextValue);
|
|
245
|
+
}
|
|
246
|
+
})]
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function useScheduleTiming(initialTiming) {
|
|
250
|
+
const [draft, setDraft] = React.useState(() => timingDraft(initialTiming));
|
|
251
|
+
const [timezoneInput, setTimezoneInput] = React.useState(draft.timezone);
|
|
252
|
+
const [timezoneError, setTimezoneError] = React.useState(false);
|
|
253
|
+
const [daysError, setDaysError] = React.useState(false);
|
|
254
|
+
const firstDayRef = React.useRef(null);
|
|
255
|
+
const timezoneInputRef = React.useRef(null);
|
|
256
|
+
const timezoneOptions = React.useMemo(() => TIMEZONE_OPTIONS.some((option) => option.value === draft.timezone) ? TIMEZONE_OPTIONS : [...TIMEZONE_OPTIONS, {
|
|
257
|
+
label: draft.timezone,
|
|
258
|
+
value: draft.timezone
|
|
259
|
+
}].sort((left, right) => left.value.localeCompare(right.value)), [draft.timezone]);
|
|
260
|
+
const selectedTimezone = React.useMemo(() => timezoneOptions.find((option) => option.value === draft.timezone) ?? {
|
|
261
|
+
label: draft.timezone,
|
|
262
|
+
value: draft.timezone
|
|
263
|
+
}, [timezoneOptions, draft.timezone]);
|
|
264
|
+
function change(fields) {
|
|
265
|
+
setDraft((current) => ({
|
|
266
|
+
...current,
|
|
267
|
+
...fields
|
|
268
|
+
}));
|
|
269
|
+
}
|
|
270
|
+
function typeTimezone(input) {
|
|
271
|
+
setTimezoneInput(input);
|
|
272
|
+
if (input === selectedTimezone.label) setTimezoneError(false);
|
|
273
|
+
}
|
|
274
|
+
function selectTimezone(option) {
|
|
275
|
+
change({ timezone: option.value });
|
|
276
|
+
setTimezoneInput(option.label);
|
|
277
|
+
setTimezoneError(false);
|
|
278
|
+
}
|
|
279
|
+
function chooseDays(days) {
|
|
280
|
+
change({ days });
|
|
281
|
+
if (days.length > 0) setDaysError(false);
|
|
282
|
+
}
|
|
283
|
+
function value() {
|
|
284
|
+
if (draft.kind !== "interval" && timezoneInput !== selectedTimezone.label) {
|
|
285
|
+
setTimezoneError(true);
|
|
286
|
+
queueMicrotask(() => timezoneInputRef.current?.focus());
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
if (draft.kind === "weekly" && draft.days.length === 0) {
|
|
290
|
+
setDaysError(true);
|
|
291
|
+
queueMicrotask(() => firstDayRef.current?.focus());
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
return serializeSchedule(draft);
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
draft,
|
|
298
|
+
change,
|
|
299
|
+
timezoneInput,
|
|
300
|
+
typeTimezone,
|
|
301
|
+
selectTimezone,
|
|
302
|
+
timezoneError,
|
|
303
|
+
timezoneInputRef,
|
|
304
|
+
timezoneOptions,
|
|
305
|
+
selectedTimezone,
|
|
306
|
+
chooseDays,
|
|
307
|
+
daysError,
|
|
308
|
+
firstDayRef,
|
|
309
|
+
value
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
function ScheduleWeeklyDays({ timing }) {
|
|
313
|
+
const descriptionId = React.useId();
|
|
314
|
+
const errorId = React.useId();
|
|
315
|
+
return /* @__PURE__ */ jsxs(Fieldset.Root, {
|
|
316
|
+
variant: "plain",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsx(Fieldset.Legend, { children: "Days" }),
|
|
319
|
+
/* @__PURE__ */ jsx(Fieldset.Description, {
|
|
320
|
+
id: descriptionId,
|
|
321
|
+
children: "Select at least one day."
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ jsx(CheckboxGroup, {
|
|
324
|
+
layout: "grid",
|
|
325
|
+
value: timing.draft.days,
|
|
326
|
+
"aria-describedby": `${descriptionId}${timing.daysError ? ` ${errorId}` : ""}`,
|
|
327
|
+
"aria-invalid": timing.daysError || void 0,
|
|
328
|
+
onValueChange: (values) => timing.chooseDays(WEEKDAYS.filter((day) => values.includes(day.token)).map((day) => day.token)),
|
|
329
|
+
children: WEEKDAYS.map((day) => /* @__PURE__ */ jsxs(CheckboxGroup.Item, { children: [/* @__PURE__ */ jsx(CheckboxGroup.Icon, { children: /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
330
|
+
ref: day.token === "mon" ? timing.firstDayRef : void 0,
|
|
331
|
+
value: day.token,
|
|
332
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {})
|
|
333
|
+
}) }), /* @__PURE__ */ jsx(CheckboxGroup.Content, { children: /* @__PURE__ */ jsx(CheckboxGroup.Title, { children: day.label }) })] }, day.token))
|
|
334
|
+
}),
|
|
335
|
+
timing.daysError ? /* @__PURE__ */ jsx(Field.Errors, {
|
|
336
|
+
id: errorId,
|
|
337
|
+
errors: ["Select at least one day."]
|
|
338
|
+
}) : null
|
|
339
|
+
]
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
function ScheduleTimingFields({ timing }) {
|
|
343
|
+
const intervalLabelId = React.useId();
|
|
344
|
+
const timezoneLabelId = React.useId();
|
|
345
|
+
const timezoneErrorId = React.useId();
|
|
346
|
+
const { draft } = timing;
|
|
347
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScheduleSelect, {
|
|
348
|
+
label: "Repeats",
|
|
349
|
+
value: draft.kind,
|
|
350
|
+
options: REPEAT_KIND_OPTIONS,
|
|
351
|
+
onValueChange: (kind) => timing.change({ kind })
|
|
352
|
+
}), draft.kind === "interval" ? /* @__PURE__ */ jsxs("div", {
|
|
353
|
+
className: "think-schedule__form-row",
|
|
354
|
+
children: [/* @__PURE__ */ jsxs(Field.Root, {
|
|
355
|
+
name: "interval",
|
|
356
|
+
children: [/* @__PURE__ */ jsx(Field.Label, {
|
|
357
|
+
id: intervalLabelId,
|
|
358
|
+
children: "Every"
|
|
359
|
+
}), /* @__PURE__ */ jsx(NumberField.Root, {
|
|
360
|
+
value: draft.intervalEvery,
|
|
361
|
+
min: 1,
|
|
362
|
+
step: 1,
|
|
363
|
+
onValueChange: (intervalEvery) => timing.change({ intervalEvery }),
|
|
364
|
+
children: /* @__PURE__ */ jsxs(NumberField.Group, { children: [
|
|
365
|
+
/* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
366
|
+
"aria-label": "Decrease interval",
|
|
367
|
+
children: "−"
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ jsx(NumberField.Input, {
|
|
370
|
+
name: "interval",
|
|
371
|
+
required: true,
|
|
372
|
+
"aria-labelledby": intervalLabelId
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ jsx(NumberField.Increment, {
|
|
375
|
+
"aria-label": "Increase interval",
|
|
376
|
+
children: "+"
|
|
377
|
+
})
|
|
378
|
+
] })
|
|
379
|
+
})]
|
|
380
|
+
}), /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
381
|
+
label: "Unit",
|
|
382
|
+
value: draft.intervalUnit,
|
|
383
|
+
options: INTERVAL_UNIT_OPTIONS,
|
|
384
|
+
onValueChange: (intervalUnit) => timing.change({ intervalUnit })
|
|
385
|
+
})]
|
|
386
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [draft.kind === "weekly" ? /* @__PURE__ */ jsx(ScheduleWeeklyDays, { timing }) : null, /* @__PURE__ */ jsxs("div", {
|
|
387
|
+
className: "think-schedule__form-row",
|
|
388
|
+
children: [/* @__PURE__ */ jsxs(Field.Root, {
|
|
389
|
+
name: "time",
|
|
390
|
+
children: [
|
|
391
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Time" }),
|
|
392
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
393
|
+
name: "time",
|
|
394
|
+
type: "time",
|
|
395
|
+
value: draft.time,
|
|
396
|
+
required: true,
|
|
397
|
+
onChange: (event) => timing.change({ time: event.currentTarget.value })
|
|
398
|
+
}),
|
|
399
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
400
|
+
match: "valueMissing",
|
|
401
|
+
children: "Time is required"
|
|
402
|
+
})
|
|
403
|
+
]
|
|
404
|
+
}), /* @__PURE__ */ jsxs(Field.Root, {
|
|
405
|
+
name: "timezone",
|
|
406
|
+
invalid: timing.timezoneError,
|
|
407
|
+
children: [
|
|
408
|
+
/* @__PURE__ */ jsx(Field.Label, {
|
|
409
|
+
id: timezoneLabelId,
|
|
410
|
+
children: "Time zone"
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ jsxs(Combobox.Root, {
|
|
413
|
+
items: timing.timezoneOptions,
|
|
414
|
+
value: timing.selectedTimezone,
|
|
415
|
+
inputValue: timing.timezoneInput,
|
|
416
|
+
onInputValueChange: timing.typeTimezone,
|
|
417
|
+
onValueChange: (option) => {
|
|
418
|
+
if (option) timing.selectTimezone(option);
|
|
419
|
+
},
|
|
420
|
+
children: [/* @__PURE__ */ jsxs(Combobox.InputGroup, { children: [/* @__PURE__ */ jsx(Combobox.Input, {
|
|
421
|
+
ref: timing.timezoneInputRef,
|
|
422
|
+
name: "timezone",
|
|
423
|
+
required: true,
|
|
424
|
+
"aria-invalid": timing.timezoneError || void 0,
|
|
425
|
+
"aria-labelledby": timezoneLabelId,
|
|
426
|
+
"aria-describedby": timing.timezoneError ? timezoneErrorId : void 0
|
|
427
|
+
}), /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
428
|
+
"aria-label": "Open time zone list",
|
|
429
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
430
|
+
})] }), /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
431
|
+
sideOffset: 4,
|
|
432
|
+
children: /* @__PURE__ */ jsxs(Combobox.Popup, { children: [/* @__PURE__ */ jsx(Combobox.List, { children: (option) => /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
433
|
+
value: option,
|
|
434
|
+
children: [/* @__PURE__ */ jsx(Combobox.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }), option.label]
|
|
435
|
+
}, option.value) }), /* @__PURE__ */ jsx(Combobox.Empty, { children: "No matching time zones." })] })
|
|
436
|
+
}) })]
|
|
437
|
+
}),
|
|
438
|
+
timing.timezoneError ? /* @__PURE__ */ jsx(Field.Errors, {
|
|
439
|
+
id: timezoneErrorId,
|
|
440
|
+
errors: ["Select a valid time zone from the list."]
|
|
441
|
+
}) : null
|
|
442
|
+
]
|
|
443
|
+
})]
|
|
444
|
+
})] })] });
|
|
445
|
+
}
|
|
446
|
+
function useScheduleTask(schedule, initialAutomation) {
|
|
447
|
+
const initialInvocation = schedule ? "automation" in schedule.task ? schedule.task.automation : void 0 : initialAutomation;
|
|
448
|
+
const initialPath = initialInvocation?.path ?? "";
|
|
449
|
+
const [mode, setMode] = React.useState(initialPath ? "automation" : "prompt");
|
|
450
|
+
const [prompt, setPrompt] = React.useState(schedule && "prompt" in schedule.task ? schedule.task.prompt : "");
|
|
451
|
+
const [automationPath, setAutomationPath] = React.useState(initialPath);
|
|
452
|
+
const [argumentsByPath, setArgumentsByPath] = React.useState(() => initialInvocation ? { [initialInvocation.path]: initialInvocation.args ?? {} } : {});
|
|
453
|
+
const table = automationPath === initialInvocation?.path ? initialInvocation.table : void 0;
|
|
454
|
+
const automationArgs = argumentsByPath[automationPath] ?? {};
|
|
455
|
+
function setArgument(name, value) {
|
|
456
|
+
setArgumentsByPath((current) => {
|
|
457
|
+
const args = { ...current[automationPath] };
|
|
458
|
+
if (value === void 0) delete args[name];
|
|
459
|
+
else args[name] = value;
|
|
460
|
+
return {
|
|
461
|
+
...current,
|
|
462
|
+
[automationPath]: args
|
|
463
|
+
};
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
function value() {
|
|
467
|
+
if (mode === "prompt") return prompt.trim() ? { prompt: prompt.trim() } : null;
|
|
468
|
+
if (!automationPath.trim()) return null;
|
|
469
|
+
return { automation: {
|
|
470
|
+
path: automationPath,
|
|
471
|
+
args: automationArgs,
|
|
472
|
+
...table ? { table } : {}
|
|
473
|
+
} };
|
|
474
|
+
}
|
|
475
|
+
return {
|
|
476
|
+
mode,
|
|
477
|
+
setMode,
|
|
478
|
+
prompt,
|
|
479
|
+
setPrompt,
|
|
480
|
+
automationPath,
|
|
481
|
+
setAutomationPath,
|
|
482
|
+
table,
|
|
483
|
+
automationArgs,
|
|
484
|
+
setArgument,
|
|
485
|
+
value
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
function ScheduleAutomationFields({ task, automations, automationsLoading, automationsError }) {
|
|
489
|
+
const selectedAutomation = automations.find((automation) => automation.path === task.automationPath);
|
|
490
|
+
const automationOptions = automations.map((automation) => ({
|
|
491
|
+
label: automation.name,
|
|
492
|
+
value: automation.path
|
|
493
|
+
}));
|
|
494
|
+
if (task.automationPath && !selectedAutomation) automationOptions.unshift({
|
|
495
|
+
label: "Automation (unavailable)",
|
|
496
|
+
value: task.automationPath
|
|
497
|
+
});
|
|
498
|
+
const retainedArgs = Object.fromEntries(Object.entries(task.automationArgs).filter(([name, value]) => !selectedAutomation?.parameters.some((parameter) => parameter.name === name && typeof value === parameter.type)));
|
|
499
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
500
|
+
/* @__PURE__ */ jsx(ScheduleSelect, {
|
|
501
|
+
label: "Automation",
|
|
502
|
+
value: task.automationPath,
|
|
503
|
+
disabled: automationsLoading,
|
|
504
|
+
options: [{
|
|
505
|
+
label: automationsLoading ? "Loading automations…" : "Choose an automation",
|
|
506
|
+
value: ""
|
|
507
|
+
}, ...automationOptions],
|
|
508
|
+
onValueChange: task.setAutomationPath
|
|
509
|
+
}),
|
|
510
|
+
automationsError ? /* @__PURE__ */ jsx(Field.Errors, { errors: [executionErrorSummary(automationsError)] }) : null,
|
|
511
|
+
!automationsLoading && !automationsError && automations.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
512
|
+
className: "think-schedule__input-help",
|
|
513
|
+
children: "Ask Rook to create an automation first."
|
|
514
|
+
}) : null,
|
|
515
|
+
/* @__PURE__ */ jsx(ScheduleTableSource, {
|
|
516
|
+
table: task.table,
|
|
517
|
+
automations
|
|
518
|
+
}),
|
|
519
|
+
selectedAutomation?.parameters.filter((parameter) => !task.table?.columns[parameter.name]).map((parameter) => /* @__PURE__ */ jsx(ScheduleAutomationParameter, {
|
|
520
|
+
parameter,
|
|
521
|
+
value: task.automationArgs[parameter.name],
|
|
522
|
+
setArgument: task.setArgument
|
|
523
|
+
}, parameter.name)),
|
|
524
|
+
Object.keys(retainedArgs).length > 0 ? /* @__PURE__ */ jsxs("details", {
|
|
525
|
+
className: "think-schedule__saved-inputs",
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ jsx("summary", { children: "Saved inputs" }),
|
|
528
|
+
/* @__PURE__ */ jsx(ExecutionResult, {
|
|
529
|
+
result: retainedArgs,
|
|
530
|
+
showSummary: false
|
|
531
|
+
}),
|
|
532
|
+
/* @__PURE__ */ jsx("p", {
|
|
533
|
+
className: "think-schedule__input-help",
|
|
534
|
+
children: "These inputs are preserved. Ask Rook to change them."
|
|
535
|
+
})
|
|
536
|
+
]
|
|
537
|
+
}) : null
|
|
538
|
+
] });
|
|
539
|
+
}
|
|
540
|
+
function ScheduleTaskFields({ task, automations, automationsLoading, automationsError }) {
|
|
541
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScheduleSelect, {
|
|
542
|
+
label: "Run",
|
|
543
|
+
value: task.mode,
|
|
544
|
+
onValueChange: task.setMode,
|
|
545
|
+
options: [{
|
|
546
|
+
label: "Agent instructions",
|
|
547
|
+
value: "prompt"
|
|
548
|
+
}, {
|
|
549
|
+
label: "Automation",
|
|
550
|
+
value: "automation"
|
|
551
|
+
}]
|
|
552
|
+
}), task.mode === "automation" ? /* @__PURE__ */ jsx(ScheduleAutomationFields, {
|
|
553
|
+
task,
|
|
554
|
+
automations,
|
|
555
|
+
automationsLoading,
|
|
556
|
+
automationsError
|
|
557
|
+
}) : /* @__PURE__ */ jsxs(Field.Root, {
|
|
558
|
+
name: "prompt",
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Instructions" }),
|
|
561
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
562
|
+
render: /* @__PURE__ */ jsx(Textarea, { rows: 8 }),
|
|
563
|
+
name: "prompt",
|
|
564
|
+
value: task.prompt,
|
|
565
|
+
required: true,
|
|
566
|
+
placeholder: "Review open pull requests, summarize blockers, and draft a concise project update.",
|
|
567
|
+
onChange: (event) => task.setPrompt(event.currentTarget.value)
|
|
568
|
+
}),
|
|
569
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
570
|
+
match: "valueMissing",
|
|
571
|
+
children: "Instructions are required"
|
|
572
|
+
})
|
|
573
|
+
]
|
|
574
|
+
})] });
|
|
575
|
+
}
|
|
576
|
+
/** Create/edit surface for scheduled instructions or an automation. */
|
|
577
|
+
function ThinkScheduleForm({ cancelLink, cancelLabel = "Back to schedules", className, schedule, initialAutomation, automations = [], automationsLoading = false, automationsError, onSubmit, ref, ...props }) {
|
|
578
|
+
const editing = schedule !== void 0;
|
|
579
|
+
const [name, setName] = React.useState(schedule?.name ?? "");
|
|
580
|
+
const task = useScheduleTask(schedule, initialAutomation);
|
|
581
|
+
const timing = useScheduleTiming(schedule?.parsedSchedule);
|
|
582
|
+
const [busy, setBusy] = React.useState(false);
|
|
583
|
+
const [error, setError] = React.useState(null);
|
|
584
|
+
function value() {
|
|
585
|
+
if (!name.trim()) return null;
|
|
586
|
+
const taskValue = task.value();
|
|
587
|
+
if (!taskValue) return null;
|
|
588
|
+
const repeats = timing.value();
|
|
589
|
+
if (!repeats) return null;
|
|
590
|
+
return {
|
|
591
|
+
name: name.trim(),
|
|
592
|
+
...taskValue,
|
|
593
|
+
schedule: repeats
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
async function submit(event) {
|
|
597
|
+
event.preventDefault();
|
|
598
|
+
const nextValue = value();
|
|
599
|
+
if (!nextValue) return;
|
|
600
|
+
setBusy(true);
|
|
601
|
+
setError(null);
|
|
602
|
+
try {
|
|
603
|
+
await onSubmit(nextValue);
|
|
604
|
+
} catch (nextError) {
|
|
605
|
+
setError(executionErrorSummary(formatErrorMessage(nextError)));
|
|
606
|
+
} finally {
|
|
607
|
+
setBusy(false);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
611
|
+
ref,
|
|
612
|
+
className: cx("think-schedule__editor", className),
|
|
613
|
+
...props,
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
616
|
+
"aria-label": "Schedule editor controls",
|
|
617
|
+
children: [cancelLink ? /* @__PURE__ */ jsx(AppTopBar.Leading, { children: /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
618
|
+
label: cancelLabel,
|
|
619
|
+
render: cancelLink,
|
|
620
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
621
|
+
}) }) : null, /* @__PURE__ */ jsx(AppTopBar.Title, { children: editing ? "Edit schedule" : "New schedule" })]
|
|
622
|
+
}),
|
|
623
|
+
error ? /* @__PURE__ */ jsxs("div", {
|
|
624
|
+
className: "think-schedule__editor-error",
|
|
625
|
+
role: "alert",
|
|
626
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: error })]
|
|
627
|
+
}) : null,
|
|
628
|
+
/* @__PURE__ */ jsx("main", {
|
|
629
|
+
className: "think-schedule__create",
|
|
630
|
+
"aria-label": editing ? "Edit schedule" : "New schedule",
|
|
631
|
+
children: /* @__PURE__ */ jsxs(Form, {
|
|
632
|
+
className: "think-schedule__form",
|
|
633
|
+
validationMode: "onBlur",
|
|
634
|
+
onSubmit: submit,
|
|
635
|
+
children: [/* @__PURE__ */ jsxs(Field.Group, { children: [
|
|
636
|
+
/* @__PURE__ */ jsxs(Field.Root, {
|
|
637
|
+
name: "name",
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Name" }),
|
|
640
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
641
|
+
name: "name",
|
|
642
|
+
value: name,
|
|
643
|
+
required: true,
|
|
644
|
+
autoComplete: "off",
|
|
645
|
+
placeholder: "Weekly project review",
|
|
646
|
+
onChange: (event) => setName(event.currentTarget.value)
|
|
647
|
+
}),
|
|
648
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
649
|
+
match: "valueMissing",
|
|
650
|
+
children: "Name is required"
|
|
651
|
+
})
|
|
652
|
+
]
|
|
653
|
+
}),
|
|
654
|
+
/* @__PURE__ */ jsx(ScheduleTaskFields, {
|
|
655
|
+
task,
|
|
656
|
+
automations,
|
|
657
|
+
automationsLoading,
|
|
658
|
+
automationsError
|
|
659
|
+
}),
|
|
660
|
+
/* @__PURE__ */ jsx(ScheduleTimingFields, { timing })
|
|
661
|
+
] }), /* @__PURE__ */ jsxs("footer", {
|
|
662
|
+
className: "think-schedule__form-actions",
|
|
663
|
+
children: [cancelLink ? /* @__PURE__ */ jsx(Button, {
|
|
664
|
+
variant: "ghost",
|
|
665
|
+
color: "neutral",
|
|
666
|
+
disabled: busy,
|
|
667
|
+
nativeButton: false,
|
|
668
|
+
render: cancelLink,
|
|
669
|
+
children: "Cancel"
|
|
670
|
+
}) : null, /* @__PURE__ */ jsxs(Button, {
|
|
671
|
+
type: "submit",
|
|
672
|
+
disabled: busy || task.mode === "automation" && !task.automationPath,
|
|
673
|
+
children: [
|
|
674
|
+
busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : null,
|
|
675
|
+
" ",
|
|
676
|
+
editing ? "Save changes" : "Create schedule"
|
|
677
|
+
]
|
|
678
|
+
})]
|
|
679
|
+
})]
|
|
680
|
+
})
|
|
681
|
+
})
|
|
682
|
+
]
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
//#endregion
|
|
686
|
+
export { ThinkScheduleForm };
|