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