@mcp-b/react-components 0.60.0 → 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-B4K656LO.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-Wd1sKAvD.js → ExecutionResult-DmC21cll.js} +4 -4
- package/dist/{FileTree-BpCJuvji.js → FileTree-H31EVRv_.js} +1 -1
- package/dist/{IconButton-43ggXEuf.d.ts → IconButton-FWsa9562.d.ts} +1 -1
- package/dist/{ManagerOffice-BaHSBcSF.js → ManagerOffice-B3X3iZV9.js} +27 -34
- package/dist/{McpConnectorForm-D4bY-lm_.d.ts → McpConnectorForm-BLsQt_er.d.ts} +1 -1
- package/dist/{McpPluginCatalog-2FZDLCeK.d.ts → McpPluginCatalog-SQNOytXQ.d.ts} +2 -2
- package/dist/{Message-CwCqa90H.d.ts → Message-BUedRDN1.d.ts} +2 -2
- package/dist/{MessageScrollerVirtual-DVQeEkNy.d.ts → MessageScrollerVirtual-DxL6XKq9.d.ts} +1 -1
- package/dist/{PromptInput-C3adKglc.d.ts → PromptInput-Dbe6WgWA.d.ts} +1 -1
- package/dist/{ResponsiveSidebarShell-DzBGlRJF.d.ts → ResponsiveSidebarShell-DSAMNDdg.d.ts} +1 -1
- package/dist/{SetupChecklist-BNK2XFaI.js → SetupChecklist-Wo4akaSG.js} +2 -2
- package/dist/{ThinkChatActivity-C4_hPEmb.d.ts → ThinkChatActivity-zZaSsbC-.d.ts} +7 -3
- package/dist/{ThinkChatActivitySummary-ChJ8Iu2T.d.ts → ThinkChatActivitySummary-8MO1VjAJ.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-CPeYVneQ.d.ts → ThinkExecutionRun-DJ2TFDmZ.d.ts} +1 -1
- package/dist/ThinkSchedule-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-5SHsjamf.js → WorkspaceFileView-BWI_AJlV.js} +8 -8
- package/dist/{WorkspaceLink-Buo6gKj2.d.ts → WorkspaceLink-C8HH2fMT.d.ts} +1 -0
- package/dist/{WorkspaceMessageResponse-DnsdpaGU.js → WorkspaceMessageResponse-BZ-_I18b.js} +3 -7
- package/dist/agent-tool-runs-DsOp_X2y.js +133 -0
- package/dist/assets/chrome.svg +1 -0
- package/dist/assets/plugins/plugin-github.svg +8 -0
- package/dist/assets/plugins/plugin-gmail.svg +1 -0
- package/dist/assets/plugins/plugin-google-drive.svg +1 -0
- package/dist/assets/plugins/plugin-google.svg +1 -0
- package/dist/assets/plugins/plugin-linear.svg +1 -0
- package/dist/assets/plugins/plugin-notion.svg +25 -0
- package/dist/assets/plugins/plugin-salesforce.svg +31 -0
- package/dist/assets/plugins/plugin-slack.svg +6 -0
- package/dist/chatgpt-sign-in-button-DNchrZHs.js +32 -0
- package/dist/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 +7 -7
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +4 -4
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +78 -8
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/EmployeeApp.d.ts +4 -3
- package/dist/components/agents-sdk/EmployeeApp.js +1 -1
- package/dist/components/agents-sdk/EmployeeChat.d.ts +9 -2
- package/dist/components/agents-sdk/EmployeeChat.js +14 -10
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +45 -33
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +10 -10
- package/dist/components/agents-sdk/EmployeeSchedules.js +39 -39
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeStartScreen.js +4 -4
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +7 -33
- package/dist/components/agents-sdk/ManagerAccountActions.js +2 -2
- package/dist/components/agents-sdk/ManagerOffice.d.ts +10 -14
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +3 -3
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +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/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +4 -2
- package/dist/components/agents-sdk/SubagentRunIndicator.js +4 -3
- package/dist/components/agents-sdk/SubagentRunLanes.d.ts +38 -0
- package/dist/components/agents-sdk/SubagentRunLanes.js +160 -0
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +3 -28
- package/dist/components/agents-sdk/SubagentRunPanel.js +145 -190
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +4 -7
- package/dist/components/agents-sdk/ThinkChat.js +5 -8
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +27 -26
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +28 -28
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +13 -28
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -16
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +4 -4
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -0
- package/dist/components/agents-sdk/ThinkSchedule.js +9 -0
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +42 -0
- package/dist/components/agents-sdk/{ThinkRoutineActions.js → ThinkScheduleActions.js} +35 -35
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +24 -0
- package/dist/components/agents-sdk/{ThinkRoutineBrowser.js → ThinkScheduleBrowser.js} +47 -45
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +19 -0
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +139 -0
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +58 -0
- package/dist/components/agents-sdk/ThinkScheduleForm.js +686 -0
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkbenchBack.d.ts +1 -1
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceAutomation.js +791 -0
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +2 -0
- package/dist/components/agents-sdk/{WorkspaceExecutionTable.js → WorkspaceAutomationTable.js} +45 -65
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceConcept.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +28 -8
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +104 -254
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -4
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +13 -6
- package/dist/components/agents-sdk/WorkspaceLive.js +2 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +37 -2
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +30 -0
- package/dist/components/agents-sdk/WorkspacePerson.js +100 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +24 -60
- package/dist/components/agents-sdk/WorkspaceProject.js +82 -184
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +2 -2
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +51 -63
- package/dist/components/ai-sdk/ConnectedAppCards.js +42 -365
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +3 -3
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +12 -4
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +6 -6
- package/dist/components/ai-sdk/Queue.d.ts +1 -1
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +17 -4
- package/dist/components/extension/ChatGptSignInScreen.js +32 -32
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/extension/FirstRunSetup.d.ts +117 -0
- package/dist/components/extension/FirstRunSetup.js +1175 -0
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +5 -2
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Button.js +1 -1
- package/dist/components/foundations/Card.d.ts +1 -1
- package/dist/components/foundations/Card.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/DescriptionList.d.ts +3 -1
- package/dist/components/foundations/DescriptionList.js +2 -1
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +2 -4
- package/dist/components/foundations/Toggle.js +3 -7
- package/dist/components/foundations/ToggleGroup.d.ts +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/AccountSignInDialog.js +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +1 -1
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +3 -3
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +2 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.d.ts +2 -2
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentConnection.js +3 -3
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +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-BsmxSSeD.js → copy-button-z20VEXRF.js} +1 -1
- package/dist/{execution-result-DWVmm-bL.js → execution-result-DAuW4VWv.js} +30 -2
- package/dist/{icons-Dj6id76o.d.ts → icons-CReP3qYl.d.ts} +7 -1
- package/dist/{icons-Cn3vWZRs.js → icons-Yp99gmMC.js} +9 -3
- package/dist/{mcp-server-catalog-kaMWaSAL.d.ts → mcp-server-catalog-Di4N46H9.d.ts} +9 -3
- package/dist/navigation-link-zK6z8Gn3.d.ts +18 -0
- package/dist/scheduled-table-source-NZR1vFc_.js +38 -0
- package/dist/styles/accessibility.css +22 -9
- package/dist/styles/accordion.css +2 -2
- package/dist/styles/activity-header.css +14 -11
- package/dist/styles/activity.css +6 -13
- package/dist/styles/agent-attention.css +0 -23
- package/dist/styles/agent-chat.css +8 -3
- package/dist/styles/agent-connection.css +2 -2
- package/dist/styles/app-icon.css +7 -0
- package/dist/styles/app-top-bar.css +3 -11
- package/dist/styles/approval.css +2 -2
- package/dist/styles/base.css +3 -1
- package/dist/styles/browser-live-screen.css +3 -1
- package/dist/styles/browser-run-panel.css +2 -2
- package/dist/styles/button.css +13 -44
- package/dist/styles/card.css +42 -5
- package/dist/styles/chain-of-thought.css +2 -8
- package/dist/styles/chatgpt-sign-in-screen.css +91 -83
- package/dist/styles/checkbox-group.css +2 -1
- package/dist/styles/checkbox.css +4 -6
- package/dist/styles/code-block.css +2 -1
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/collapsible.css +2 -2
- package/dist/styles/color-contrast.test.ts +1 -0
- package/dist/styles/combobox.css +5 -9
- package/dist/styles/commit.css +2 -7
- package/dist/styles/composer-link.css +0 -10
- package/dist/styles/connected-app-card.css +32 -32
- package/dist/styles/context-menu.css +2 -2
- package/dist/styles/description-list.css +14 -0
- package/dist/styles/execution-board.css +1 -1
- package/dist/styles/execution-result.css +161 -0
- package/dist/styles/file-tree.css +5 -9
- package/dist/styles/first-run-setup.css +751 -0
- package/dist/styles/index.css +5 -2
- package/dist/styles/inline-citation.css +2 -10
- package/dist/styles/manager-office.css +16 -43
- package/dist/styles/marker.css +2 -2
- package/dist/styles/media-preview-card.css +2 -7
- package/dist/styles/message-scroller.css +3 -2
- package/dist/styles/model-selector.css +19 -15
- package/dist/styles/navigation-menu.css +4 -4
- package/dist/styles/number-field.css +2 -3
- package/dist/styles/preview-card.css +2 -2
- package/dist/styles/prompt-input.css +5 -15
- package/dist/styles/queue.css +2 -7
- package/dist/styles/radio.css +4 -6
- package/dist/styles/recipes.css +25 -52
- package/dist/styles/resizable-side-panel.css +3 -2
- package/dist/styles/responsive-sidebar-shell.css +1 -6
- package/dist/styles/scroll-area.css +3 -2
- package/dist/styles/scrollbars.css +2 -0
- package/dist/styles/search-field.css +1 -2
- package/dist/styles/slider.css +4 -5
- package/dist/styles/sources.css +2 -7
- package/dist/styles/stepper.css +4 -4
- package/dist/styles/streamdown.css +8 -1
- package/dist/styles/subagent-run.css +123 -12
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +5 -4
- package/dist/styles/task.css +2 -7
- package/dist/styles/test-results.css +2 -7
- package/dist/styles/theme-mode-control.css +0 -6
- package/dist/styles/think-chat-activity.css +0 -8
- package/dist/styles/think-execution-status.css +1 -1
- package/dist/styles/think-execution-workbench.css +3 -3
- package/dist/styles/think-full-app.css +3 -2
- package/dist/styles/{think-routine.css → think-schedule.css} +64 -80
- package/dist/styles/toggle-group.css +9 -6
- package/dist/styles/toggle.css +23 -15
- package/dist/styles/toolbar.css +0 -6
- package/dist/styles/workspace-automation.css +233 -0
- package/dist/styles/workspace-concepts.css +18 -412
- package/dist/styles/workspace-entity-card.css +146 -0
- package/dist/styles/workspace-explorer.css +4 -3
- package/dist/utils/mcp-server-catalog.d.ts +2 -2
- package/dist/utils/mcp-server-catalog.js +108 -21
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-RD6IhOyh.js → workspace-assets-Dq5toMQc.js} +34 -38
- package/dist/workspace-concept-panel-CxZfmFkP.js +66 -0
- package/dist/workspace-concept-panel-CxuqDi4m.d.ts +21 -0
- package/dist/{workspace-delete-CrNGUuBp.js → workspace-delete-CoB0l6ZU.js} +2 -1
- package/dist/workspace-entity-card-2TC3RPKh.d.ts +7 -0
- package/dist/workspace-entity-card-B1aV-jBj.js +61 -0
- package/dist/workspace-person-BSgvRjZE.d.ts +24 -0
- package/dist/workspace-person-BVkYb3dv.js +116 -0
- package/package.json +2 -2
- package/dist/AgentToolRunsContext-DniwGn96.d.ts +0 -18
- package/dist/Correspondent-ANkZHGEa.d.ts +0 -60
- package/dist/ThinkRoutine-DoZjbzyn.d.ts +0 -41
- package/dist/WorkspaceConceptPanel-D21iRsWm.js +0 -23
- package/dist/WorkspaceExecutionTable-DNhj6YDX.d.ts +0 -239
- package/dist/WorkspaceMessageResponse-D8FGgIQU.d.ts +0 -39
- package/dist/components/agents-sdk/SubagentRunList.d.ts +0 -17
- package/dist/components/agents-sdk/SubagentRunList.js +0 -26
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +0 -2
- package/dist/components/agents-sdk/ThinkRoutine.js +0 -9
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +0 -42
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +0 -25
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +0 -19
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +0 -97
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +0 -59
- package/dist/components/agents-sdk/ThinkRoutineForm.js +0 -744
- package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +0 -15
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +0 -52
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +0 -2
- package/dist/components/agents-sdk/WorkspaceExecution.js +0 -843
- package/dist/components/agents-sdk/WorkspaceExecutionTable.d.ts +0 -2
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +0 -36
- package/dist/components/agents-sdk/WorkspaceUserScript.js +0 -153
- package/dist/components/ai-sdk/Correspondent.d.ts +0 -2
- package/dist/components/ai-sdk/Correspondent.js +0 -145
- package/dist/styles/correspondent.css +0 -73
|
@@ -0,0 +1,1175 @@
|
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { A as LockIcon, C as FileIcon, D as KeyboardIcon, G as PuzzleIcon, H as PinIcon, O as LaptopIcon, P as MessageSquareIcon, S as EyeOffIcon, U as PlayIcon, W as PlusIcon, Z as SpinnerIcon, at as UserIcon, b as EllipsisVerticalIcon, c as BoxIcon, d as CheckIcon, et as StopIcon, i as ArrowRightIcon, j as MailIcon, ot as UsersIcon, r as ArrowLeftIcon, st as WarningIcon, u as CalendarIcon } from "../../icons-Yp99gmMC.js";
|
|
3
|
+
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
5
|
+
import { Kbd } from "../foundations/Kbd.js";
|
|
6
|
+
import { a as formatErrorMessage, r as firstLine, t as capitalize } from "../../format-CWaZEp5o.js";
|
|
7
|
+
import { PromptInput, PromptInputBody, PromptInputButton, PromptInputDictation, PromptInputFooter, PromptInputFooterEnd, PromptInputProvider, PromptInputSubmit, PromptInputTextarea, PromptInputTools } from "../ai-sdk/PromptInput.js";
|
|
8
|
+
import { Avatar } from "../foundations/Avatar.js";
|
|
9
|
+
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
|
+
import { t as WorkspaceEntityCard } from "../../workspace-entity-card-B1aV-jBj.js";
|
|
11
|
+
import { n as peopleListItems, r as personFor } from "../../workspace-person-BVkYb3dv.js";
|
|
12
|
+
import { t as ChatGptSignInButton } from "../../chatgpt-sign-in-button-DNchrZHs.js";
|
|
13
|
+
import { getThinkScheduleNextRun } from "../agents-sdk/ThinkSchedule.js";
|
|
14
|
+
import { a as executionResultSummary, n as executionErrorSummary, s as stepState, t as boardNotice } from "../../execution-result-DAuW4VWv.js";
|
|
15
|
+
import { WorkspaceAutomationFile } from "../agents-sdk/WorkspaceAutomation.js";
|
|
16
|
+
import { WorkspaceCorrespondenceCard } from "../agents-sdk/WorkspaceCorrespondence.js";
|
|
17
|
+
import { WorkspacePersonFile } from "../agents-sdk/WorkspacePerson.js";
|
|
18
|
+
import { WorkspaceProjectFile } from "../agents-sdk/WorkspaceProject.js";
|
|
19
|
+
import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
|
|
20
|
+
import { Switch } from "../foundations/Switch.js";
|
|
21
|
+
import * as React from "react";
|
|
22
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
24
|
+
//#region src/components/extension/FirstRunSetup.tsx
|
|
25
|
+
/**
|
|
26
|
+
* The screens after the welcome, in order, under their label in the rail. A
|
|
27
|
+
* screen the flow skips gives way to the next one here.
|
|
28
|
+
*/
|
|
29
|
+
const RAIL = [
|
|
30
|
+
["Sign in", [
|
|
31
|
+
"sign-in",
|
|
32
|
+
"who",
|
|
33
|
+
"on-device",
|
|
34
|
+
"google"
|
|
35
|
+
]],
|
|
36
|
+
["Your projects", ["projects"]],
|
|
37
|
+
["Your people", ["people"]],
|
|
38
|
+
["Your writing", ["style", "signing"]],
|
|
39
|
+
["Boundaries", ["boundaries"]],
|
|
40
|
+
["Automations", ["automations", "try"]],
|
|
41
|
+
["Schedules", ["schedule"]],
|
|
42
|
+
["Skills", ["skills"]],
|
|
43
|
+
["Ready", [
|
|
44
|
+
"pin",
|
|
45
|
+
"ask",
|
|
46
|
+
"ready"
|
|
47
|
+
]]
|
|
48
|
+
];
|
|
49
|
+
const KINDS = ["welcome", ...RAIL.flatMap(([, kinds]) => kinds)];
|
|
50
|
+
const isScheduleStep = (step) => step.startsWith("schedule-");
|
|
51
|
+
const kindOf = (step) => isScheduleStep(step) ? "schedule" : step;
|
|
52
|
+
const rank = (step) => KINDS.indexOf(kindOf(step));
|
|
53
|
+
const ADVANCE_MS = 1600;
|
|
54
|
+
const GOOGLE_MARK = new URL("../../assets/plugins/plugin-google.svg", import.meta.url).href;
|
|
55
|
+
const CHROME_MARK = new URL("../../assets/chrome.svg", import.meta.url).href;
|
|
56
|
+
const SIGVELO_LOGO = /* @__PURE__ */ jsx("img", {
|
|
57
|
+
src: new URL("../../assets/sigvelo-logo.svg", import.meta.url).href,
|
|
58
|
+
alt: "",
|
|
59
|
+
width: 96,
|
|
60
|
+
height: 96
|
|
61
|
+
});
|
|
62
|
+
const seconds = new Intl.NumberFormat(void 0, {
|
|
63
|
+
style: "unit",
|
|
64
|
+
unit: "second",
|
|
65
|
+
unitDisplay: "long"
|
|
66
|
+
});
|
|
67
|
+
const STYLES = [
|
|
68
|
+
["direct", "Short and direct"],
|
|
69
|
+
["friendly", "Warm and friendly"],
|
|
70
|
+
["detailed", "Clear and detailed"]
|
|
71
|
+
];
|
|
72
|
+
const GOOGLE_ACCESS = [
|
|
73
|
+
[MailIcon, "Read your email and send replies you approve"],
|
|
74
|
+
[FileIcon, "Open and edit your files and docs"],
|
|
75
|
+
[CalendarIcon, "See your calendar and book meetings"],
|
|
76
|
+
[MessageSquareIcon, "Read and send Google Chat messages"],
|
|
77
|
+
[UsersIcon, "Look up the people you work with"]
|
|
78
|
+
];
|
|
79
|
+
const FirstRunContext = React.createContext(null);
|
|
80
|
+
function useFirstRun() {
|
|
81
|
+
const context = React.use(FirstRunContext);
|
|
82
|
+
if (!context) throw new Error("First-run screens render inside FirstRunSetup.");
|
|
83
|
+
return context;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The first run of a Chrome extension agent, one screen at a time: connect a
|
|
87
|
+
* model and Google, watch the agent set up projects, people, writing, and
|
|
88
|
+
* automations from the person's own work, say what it should check first, try
|
|
89
|
+
* an automation, schedule the ones that suggest it, see the skills it wrote,
|
|
90
|
+
* and pin the product. The lists are the product's own rows. Controlled: the
|
|
91
|
+
* host owns `step` and gets each answer as the person leaves its screen;
|
|
92
|
+
* moving between screens animates through React view transitions.
|
|
93
|
+
*/
|
|
94
|
+
function FirstRunSetup({ step, onStepChange, brandName = "Rook", brandLogo = SIGVELO_LOGO, email, shortcut, signIn, google, projects, people, writing, boundaries, automations, schedules, skills, pinned, onOpen, className, ...props }) {
|
|
95
|
+
const titleId = React.useId();
|
|
96
|
+
const [arrival, setArrival] = React.useState(true);
|
|
97
|
+
const [picks, setPicks] = React.useState({});
|
|
98
|
+
const [checkFirst, setCheckFirst] = React.useState("");
|
|
99
|
+
const list = useQuery(automations.source.queryOptions).data ?? [];
|
|
100
|
+
const tryable = automations.source.onRun ? list.find((automation) => !automation.parameters.some((parameter) => parameter.required)) : void 0;
|
|
101
|
+
const scheduled = list.filter((automation) => automation.schedule);
|
|
102
|
+
const reading = google.status === "done";
|
|
103
|
+
const order = KINDS.flatMap((kind) => {
|
|
104
|
+
switch (kind) {
|
|
105
|
+
case "people":
|
|
106
|
+
case "style": return reading ? [kind] : [];
|
|
107
|
+
case "try": return tryable ? [kind] : [];
|
|
108
|
+
case "schedule": return scheduled.map((_, index) => `schedule-${index}`);
|
|
109
|
+
default: return [kind];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const current = order.includes(step) ? step : order.find((candidate) => rank(candidate) > rank(step)) ?? "ready";
|
|
113
|
+
const index = order.indexOf(current);
|
|
114
|
+
const answer = {
|
|
115
|
+
style: picks.style ?? writing.suggested ?? "direct",
|
|
116
|
+
sign: picks.sign ?? "assistant"
|
|
117
|
+
};
|
|
118
|
+
const nextStep = order[index + 1];
|
|
119
|
+
const previousStep = order[index - 1];
|
|
120
|
+
const context = React.useMemo(() => {
|
|
121
|
+
const go = (to, back = false) => {
|
|
122
|
+
if (!to) return;
|
|
123
|
+
React.startTransition(() => {
|
|
124
|
+
React.addTransitionType(back ? "first-run-back" : "first-run-forward");
|
|
125
|
+
setArrival(false);
|
|
126
|
+
onStepChange(to);
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
return {
|
|
130
|
+
brandName,
|
|
131
|
+
brandLogo,
|
|
132
|
+
titleId,
|
|
133
|
+
arrival,
|
|
134
|
+
next: () => go(nextStep),
|
|
135
|
+
back: () => go(previousStep, true)
|
|
136
|
+
};
|
|
137
|
+
}, [
|
|
138
|
+
brandName,
|
|
139
|
+
brandLogo,
|
|
140
|
+
titleId,
|
|
141
|
+
arrival,
|
|
142
|
+
nextStep,
|
|
143
|
+
previousStep,
|
|
144
|
+
onStepChange
|
|
145
|
+
]);
|
|
146
|
+
const writingScreen = () => /* @__PURE__ */ jsx(WritingStep, {
|
|
147
|
+
signing: current === "signing",
|
|
148
|
+
writing,
|
|
149
|
+
people: people.source,
|
|
150
|
+
answer,
|
|
151
|
+
onPick: (pick) => setPicks((previous) => ({
|
|
152
|
+
...previous,
|
|
153
|
+
...pick
|
|
154
|
+
}))
|
|
155
|
+
});
|
|
156
|
+
const screen = {
|
|
157
|
+
welcome: () => /* @__PURE__ */ jsx(WelcomeStep, {}),
|
|
158
|
+
"sign-in": () => /* @__PURE__ */ jsx(SignInStep, { ...signIn }),
|
|
159
|
+
who: () => /* @__PURE__ */ jsx(WhoStep, { email }),
|
|
160
|
+
"on-device": () => /* @__PURE__ */ jsx(OnDeviceStep, {}),
|
|
161
|
+
google: () => /* @__PURE__ */ jsx(GoogleStep, {
|
|
162
|
+
...google,
|
|
163
|
+
email
|
|
164
|
+
}),
|
|
165
|
+
projects: () => /* @__PURE__ */ jsx(ProjectsStep, { projects }),
|
|
166
|
+
people: () => /* @__PURE__ */ jsx(PeopleStep, {
|
|
167
|
+
people,
|
|
168
|
+
recipient: recipientOf(writing.samples[0])
|
|
169
|
+
}),
|
|
170
|
+
style: writingScreen,
|
|
171
|
+
signing: writingScreen,
|
|
172
|
+
boundaries: () => /* @__PURE__ */ jsx(BoundariesStep, {
|
|
173
|
+
value: checkFirst,
|
|
174
|
+
onChange: setCheckFirst,
|
|
175
|
+
onSave: boundaries.onSave
|
|
176
|
+
}),
|
|
177
|
+
automations: () => /* @__PURE__ */ jsx(AutomationsStep, {
|
|
178
|
+
automations,
|
|
179
|
+
entries: list
|
|
180
|
+
}),
|
|
181
|
+
try: () => /* @__PURE__ */ jsx(TryStep, {
|
|
182
|
+
automation: tryable,
|
|
183
|
+
source: automations.source
|
|
184
|
+
}),
|
|
185
|
+
schedule: () => /* @__PURE__ */ jsx(ScheduleStep, {
|
|
186
|
+
automation: scheduled[Number(current.slice(9))],
|
|
187
|
+
schedules
|
|
188
|
+
}),
|
|
189
|
+
skills: () => /* @__PURE__ */ jsx(SkillsStep, { skills }),
|
|
190
|
+
pin: () => /* @__PURE__ */ jsx(PinStep, {
|
|
191
|
+
pinned,
|
|
192
|
+
email
|
|
193
|
+
}),
|
|
194
|
+
ask: () => /* @__PURE__ */ jsx(AskStep, {}),
|
|
195
|
+
ready: () => /* @__PURE__ */ jsx(ReadyStep, {
|
|
196
|
+
schedules: schedules.list,
|
|
197
|
+
shortcut,
|
|
198
|
+
onOpen
|
|
199
|
+
})
|
|
200
|
+
}[kindOf(current)]();
|
|
201
|
+
const present = new Set(order.map(kindOf));
|
|
202
|
+
const rail = RAIL.filter(([, kinds]) => kinds.some((kind) => present.has(kind)));
|
|
203
|
+
const at = rail.findIndex(([, kinds]) => kinds.includes(kindOf(current)));
|
|
204
|
+
return /* @__PURE__ */ jsx(FirstRunContext, {
|
|
205
|
+
value: context,
|
|
206
|
+
children: /* @__PURE__ */ jsx("main", {
|
|
207
|
+
...props,
|
|
208
|
+
className: cx("first-run", className),
|
|
209
|
+
"aria-label": `Set up ${brandName}`,
|
|
210
|
+
"data-arrival": arrival ? "" : void 0,
|
|
211
|
+
"data-recipe": "fill-host",
|
|
212
|
+
children: current === "welcome" ? screen : /* @__PURE__ */ jsxs("div", {
|
|
213
|
+
className: "first-run__page",
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ jsx("header", {
|
|
216
|
+
className: "first-run-top",
|
|
217
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
218
|
+
className: "first-run-brand",
|
|
219
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
220
|
+
className: "first-run-brand__mark",
|
|
221
|
+
children: brandLogo
|
|
222
|
+
}), brandName]
|
|
223
|
+
})
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ jsx("nav", {
|
|
226
|
+
className: "first-run-rail",
|
|
227
|
+
"aria-label": "Setup steps",
|
|
228
|
+
children: /* @__PURE__ */ jsx("ol", { children: rail.map(([label], position) => /* @__PURE__ */ jsxs("li", {
|
|
229
|
+
"aria-current": position === at ? "step" : void 0,
|
|
230
|
+
children: [
|
|
231
|
+
position === at ? /* @__PURE__ */ jsx("span", { className: "first-run-rail__marker" }) : null,
|
|
232
|
+
/* @__PURE__ */ jsx("span", {
|
|
233
|
+
className: "first-run-rail__mark",
|
|
234
|
+
children: position < at ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
235
|
+
size: 12,
|
|
236
|
+
strokeWidth: 2.5
|
|
237
|
+
}) : null
|
|
238
|
+
}),
|
|
239
|
+
label
|
|
240
|
+
]
|
|
241
|
+
}, label)) })
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx("section", {
|
|
244
|
+
className: "first-run-card",
|
|
245
|
+
"aria-labelledby": titleId,
|
|
246
|
+
children: /* @__PURE__ */ jsx(React.Fragment, { children: screen }, current)
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ jsx(PoweredBy, {})
|
|
249
|
+
]
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** Who a sample email is to, as its To field reads. Every sample goes to the same person. */
|
|
255
|
+
const recipientOf = (sample) => sample?.fields.find((field) => field.name === "to")?.value;
|
|
256
|
+
function PoweredBy() {
|
|
257
|
+
return /* @__PURE__ */ jsx("footer", {
|
|
258
|
+
className: "chatgpt-sign-in__footer first-run-foot",
|
|
259
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
260
|
+
href: "https://sigvelo.com",
|
|
261
|
+
target: "_blank",
|
|
262
|
+
rel: "noopener noreferrer",
|
|
263
|
+
children: "Powered by SigVelo"
|
|
264
|
+
})
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* One screen: its intro and body scroll inside the card, its actions stay at
|
|
269
|
+
* the card's foot. `announce` is read out when it changes on this screen.
|
|
270
|
+
*/
|
|
271
|
+
function Step({ hero, title, lead, body, narrow, actions, center, announce = "" }) {
|
|
272
|
+
const { arrival, titleId } = useFirstRun();
|
|
273
|
+
const heading = React.useRef(null);
|
|
274
|
+
const shown = React.useRef(false);
|
|
275
|
+
const [initial] = React.useState(announce);
|
|
276
|
+
React.useLayoutEffect(() => {
|
|
277
|
+
const update = shown.current;
|
|
278
|
+
shown.current = true;
|
|
279
|
+
if (update ? document.activeElement === document.body : !arrival) heading.current?.focus({ preventScroll: true });
|
|
280
|
+
});
|
|
281
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
282
|
+
className: "first-run-card__scroll",
|
|
283
|
+
"data-recipe": "scroll-fade-y",
|
|
284
|
+
children: [/* @__PURE__ */ jsx(React.ViewTransition, {
|
|
285
|
+
name: "first-run-step",
|
|
286
|
+
children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
287
|
+
className: "first-run-intro",
|
|
288
|
+
children: [
|
|
289
|
+
hero,
|
|
290
|
+
/* @__PURE__ */ jsx("h1", {
|
|
291
|
+
ref: heading,
|
|
292
|
+
id: titleId,
|
|
293
|
+
tabIndex: -1,
|
|
294
|
+
children: title
|
|
295
|
+
}),
|
|
296
|
+
lead ? /* @__PURE__ */ jsx("p", { children: lead }) : null
|
|
297
|
+
]
|
|
298
|
+
}), body ? /* @__PURE__ */ jsx("div", {
|
|
299
|
+
className: "first-run-body",
|
|
300
|
+
"data-narrow": narrow ? "" : void 0,
|
|
301
|
+
children: body
|
|
302
|
+
}) : null] })
|
|
303
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
304
|
+
role: "status",
|
|
305
|
+
className: "sigvelo-visually-hidden",
|
|
306
|
+
children: announce === initial ? "" : announce
|
|
307
|
+
})]
|
|
308
|
+
}), /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
309
|
+
name: "first-run-actions",
|
|
310
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
311
|
+
className: "first-run-actions",
|
|
312
|
+
"data-center": center ? "" : void 0,
|
|
313
|
+
children: actions
|
|
314
|
+
})
|
|
315
|
+
})] });
|
|
316
|
+
}
|
|
317
|
+
/** A screen's usual actions: Back at the start, its own controls at the end. */
|
|
318
|
+
function Actions({ children }) {
|
|
319
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Back, {}), /* @__PURE__ */ jsx("div", {
|
|
320
|
+
className: "first-run-actions__end",
|
|
321
|
+
children
|
|
322
|
+
})] });
|
|
323
|
+
}
|
|
324
|
+
function Back() {
|
|
325
|
+
const { back } = useFirstRun();
|
|
326
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
327
|
+
className: "first-run-back",
|
|
328
|
+
variant: "ghost",
|
|
329
|
+
color: "neutral",
|
|
330
|
+
size: "md",
|
|
331
|
+
onClick: back,
|
|
332
|
+
children: [/* @__PURE__ */ jsx(ArrowLeftIcon, {}), "Back"]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
/** Moves on; on a screen whose answer is kept, `onSave` keeps it first. */
|
|
336
|
+
function Next({ onSave }) {
|
|
337
|
+
const { next } = useFirstRun();
|
|
338
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
339
|
+
size: "md",
|
|
340
|
+
onClick: () => {
|
|
341
|
+
onSave?.();
|
|
342
|
+
next();
|
|
343
|
+
},
|
|
344
|
+
children: ["Continue", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function NotNow() {
|
|
348
|
+
const { next } = useFirstRun();
|
|
349
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
350
|
+
variant: "surface",
|
|
351
|
+
color: "neutral",
|
|
352
|
+
size: "md",
|
|
353
|
+
onClick: next,
|
|
354
|
+
children: "Not now"
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function TryAgain({ onClick }) {
|
|
358
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
359
|
+
variant: "surface",
|
|
360
|
+
color: "neutral",
|
|
361
|
+
size: "md",
|
|
362
|
+
onClick,
|
|
363
|
+
children: "Try again"
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
function Stop({ onClick }) {
|
|
367
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
368
|
+
variant: "ghost",
|
|
369
|
+
color: "neutral",
|
|
370
|
+
size: "md",
|
|
371
|
+
onClick,
|
|
372
|
+
children: [/* @__PURE__ */ jsx(StopIcon, {}), "Stop"]
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function Note({ icon, children }) {
|
|
376
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
377
|
+
className: "first-run-note",
|
|
378
|
+
children: [icon, /* @__PURE__ */ jsx("span", { children })]
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
/** An app's mark over a screen. Screens that share it keep it in place as they change. */
|
|
382
|
+
function Hero({ src, name }) {
|
|
383
|
+
return /* @__PURE__ */ jsx("div", {
|
|
384
|
+
className: "first-run-hero",
|
|
385
|
+
style: { viewTransitionName: `first-run-hero-${name}` },
|
|
386
|
+
children: /* @__PURE__ */ jsx(AppIcon.Root, {
|
|
387
|
+
size: "xl",
|
|
388
|
+
variant: "surface",
|
|
389
|
+
"aria-hidden": "true",
|
|
390
|
+
children: /* @__PURE__ */ jsx(AppIcon.Image, {
|
|
391
|
+
keepMounted: true,
|
|
392
|
+
fit: "contain",
|
|
393
|
+
loading: "eager",
|
|
394
|
+
src,
|
|
395
|
+
alt: ""
|
|
396
|
+
})
|
|
397
|
+
})
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
/** Moves on a moment after `done` turns true on this screen, not when it arrives done. */
|
|
401
|
+
function useAutoAdvance(done) {
|
|
402
|
+
const { next } = useFirstRun();
|
|
403
|
+
const [arrivedDone] = React.useState(done);
|
|
404
|
+
const advance = React.useEffectEvent(next);
|
|
405
|
+
React.useEffect(() => {
|
|
406
|
+
if (!done || arrivedDone) return;
|
|
407
|
+
const timer = window.setTimeout(advance, ADVANCE_MS);
|
|
408
|
+
return () => window.clearTimeout(timer);
|
|
409
|
+
}, [done, arrivedDone]);
|
|
410
|
+
}
|
|
411
|
+
function WelcomeStep() {
|
|
412
|
+
const { brandName, brandLogo, next } = useFirstRun();
|
|
413
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
414
|
+
className: "first-run-welcome",
|
|
415
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
416
|
+
className: "first-run-welcome__content",
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ jsx("span", {
|
|
419
|
+
className: "first-run-welcome__mark",
|
|
420
|
+
children: brandLogo
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ jsxs("h1", { children: ["Meet ", brandName] }),
|
|
423
|
+
/* @__PURE__ */ jsx("p", { children: "Your assistant in Chrome" }),
|
|
424
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
425
|
+
size: "xl",
|
|
426
|
+
onClick: next,
|
|
427
|
+
children: ["Get started", /* @__PURE__ */ jsx(ArrowRightIcon, {})]
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
}), /* @__PURE__ */ jsx(PoweredBy, {})]
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function SignInStep({ status, onSignIn, onOtherProvider }) {
|
|
434
|
+
const { brandName } = useFirstRun();
|
|
435
|
+
const done = status === "done";
|
|
436
|
+
useAutoAdvance(done);
|
|
437
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
438
|
+
title: "Connect your AI",
|
|
439
|
+
lead: `${brandName} uses it for everything, starting with the rest of setup.`,
|
|
440
|
+
body: /* @__PURE__ */ jsxs("div", {
|
|
441
|
+
className: "first-run-sign-in",
|
|
442
|
+
children: [
|
|
443
|
+
/* @__PURE__ */ jsx(ChatGptSignInButton, {
|
|
444
|
+
busy: status === "waiting",
|
|
445
|
+
done,
|
|
446
|
+
failed: status === "failed",
|
|
447
|
+
label: status === "waiting" ? "Waiting for ChatGPT…" : done ? "Signed in with ChatGPT" : "Sign in with ChatGPT",
|
|
448
|
+
onClick: onSignIn
|
|
449
|
+
}),
|
|
450
|
+
status === "failed" ? /* @__PURE__ */ jsx("p", {
|
|
451
|
+
role: "alert",
|
|
452
|
+
className: "chatgpt-sign-in__error",
|
|
453
|
+
children: "Sign-in didn’t finish. Try again."
|
|
454
|
+
}) : null,
|
|
455
|
+
done ? null : /* @__PURE__ */ jsx(Button, {
|
|
456
|
+
variant: "ghost",
|
|
457
|
+
color: "neutral",
|
|
458
|
+
onClick: onOtherProvider,
|
|
459
|
+
children: "Use a different AI provider"
|
|
460
|
+
})
|
|
461
|
+
]
|
|
462
|
+
}),
|
|
463
|
+
center: !done,
|
|
464
|
+
actions: done ? /* @__PURE__ */ jsx("div", {
|
|
465
|
+
className: "first-run-actions__end",
|
|
466
|
+
children: /* @__PURE__ */ jsx(Next, {})
|
|
467
|
+
}) : /* @__PURE__ */ jsxs(Note, {
|
|
468
|
+
icon: /* @__PURE__ */ jsx(LockIcon, {}),
|
|
469
|
+
children: [
|
|
470
|
+
"You sign in on OpenAI’s own page, in a new tab. ",
|
|
471
|
+
brandName,
|
|
472
|
+
" never sees your password."
|
|
473
|
+
]
|
|
474
|
+
}),
|
|
475
|
+
announce: status === "waiting" ? "Waiting for ChatGPT" : done ? "Signed in with ChatGPT" : ""
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
function WhoStep({ email }) {
|
|
479
|
+
const { brandName } = useFirstRun();
|
|
480
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
481
|
+
hero: /* @__PURE__ */ jsx(Hero, {
|
|
482
|
+
src: CHROME_MARK,
|
|
483
|
+
name: "chrome"
|
|
484
|
+
}),
|
|
485
|
+
title: `${brandName} works in your Chrome`,
|
|
486
|
+
lead: "It uses the apps you’re already signed in to.",
|
|
487
|
+
body: email ? /* @__PURE__ */ jsxs("p", {
|
|
488
|
+
className: "first-run-identity",
|
|
489
|
+
children: ["Signed in to Chrome as ", /* @__PURE__ */ jsx("strong", { children: email })]
|
|
490
|
+
}) : void 0,
|
|
491
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) })
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
function OnDeviceStep() {
|
|
495
|
+
const { brandName } = useFirstRun();
|
|
496
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
497
|
+
hero: /* @__PURE__ */ jsx(Hero, {
|
|
498
|
+
src: CHROME_MARK,
|
|
499
|
+
name: "chrome"
|
|
500
|
+
}),
|
|
501
|
+
title: `${brandName} stays on your computer`,
|
|
502
|
+
lead: "It learns how you work from your history, bookmarks and tabs, right here. Nothing leaves except what it sends ChatGPT or your apps.",
|
|
503
|
+
body: /* @__PURE__ */ jsxs("div", {
|
|
504
|
+
className: "first-run-notes",
|
|
505
|
+
children: [/* @__PURE__ */ jsxs(Note, {
|
|
506
|
+
icon: /* @__PURE__ */ jsx(EyeOffIcon, {}),
|
|
507
|
+
children: [
|
|
508
|
+
"ChatGPT can leave that out of training, in its",
|
|
509
|
+
" ",
|
|
510
|
+
/* @__PURE__ */ jsx("a", {
|
|
511
|
+
href: "https://help.openai.com/en/articles/7730893-data-controls-faq",
|
|
512
|
+
target: "_blank",
|
|
513
|
+
rel: "noopener noreferrer",
|
|
514
|
+
children: "data controls"
|
|
515
|
+
}),
|
|
516
|
+
"."
|
|
517
|
+
]
|
|
518
|
+
}), /* @__PURE__ */ jsxs(Note, {
|
|
519
|
+
icon: /* @__PURE__ */ jsx(LaptopIcon, {}),
|
|
520
|
+
children: [
|
|
521
|
+
"To keep it all here, run your own AI on this computer.",
|
|
522
|
+
" ",
|
|
523
|
+
/* @__PURE__ */ jsx("a", {
|
|
524
|
+
href: "https://docs.ollama.com/api/openai-compatibility",
|
|
525
|
+
target: "_blank",
|
|
526
|
+
rel: "noopener noreferrer",
|
|
527
|
+
children: "How to set it up"
|
|
528
|
+
})
|
|
529
|
+
]
|
|
530
|
+
})]
|
|
531
|
+
}),
|
|
532
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) })
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
function GoogleStep({ status, onSignIn, email }) {
|
|
536
|
+
const { brandName } = useFirstRun();
|
|
537
|
+
const done = status === "done";
|
|
538
|
+
const waiting = status === "waiting";
|
|
539
|
+
useAutoAdvance(done);
|
|
540
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
541
|
+
hero: /* @__PURE__ */ jsx(Hero, {
|
|
542
|
+
src: GOOGLE_MARK,
|
|
543
|
+
name: "google"
|
|
544
|
+
}),
|
|
545
|
+
title: done ? `${brandName} can use your Google account` : "Connect your Google account",
|
|
546
|
+
lead: done ? email ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
547
|
+
"Signed in as ",
|
|
548
|
+
/* @__PURE__ */ jsx("strong", { children: email }),
|
|
549
|
+
"."
|
|
550
|
+
] }) : void 0 : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
551
|
+
"We recommend allowing everything for ",
|
|
552
|
+
brandName,
|
|
553
|
+
" to work. If you want ",
|
|
554
|
+
brandName,
|
|
555
|
+
" to have limited access, run it in its own",
|
|
556
|
+
" ",
|
|
557
|
+
/* @__PURE__ */ jsx("a", {
|
|
558
|
+
href: "https://support.google.com/chrome/answer/2364824",
|
|
559
|
+
target: "_blank",
|
|
560
|
+
rel: "noopener noreferrer",
|
|
561
|
+
children: "Chrome profile"
|
|
562
|
+
}),
|
|
563
|
+
"."
|
|
564
|
+
] }),
|
|
565
|
+
body: /* @__PURE__ */ jsxs(Fragment, { children: [status === "failed" ? /* @__PURE__ */ jsx("p", {
|
|
566
|
+
role: "alert",
|
|
567
|
+
className: "chatgpt-sign-in__error",
|
|
568
|
+
children: "Sign-in didn’t finish. Try again, and allow everything."
|
|
569
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
570
|
+
className: "first-run-notes",
|
|
571
|
+
children: GOOGLE_ACCESS.map(([Icon, text]) => /* @__PURE__ */ jsx(Note, {
|
|
572
|
+
icon: done ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(Icon, {}),
|
|
573
|
+
children: text
|
|
574
|
+
}, text))
|
|
575
|
+
})] }),
|
|
576
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: done ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NotNow, {}), /* @__PURE__ */ jsxs(Button, {
|
|
577
|
+
size: "md",
|
|
578
|
+
focusableWhenDisabled: true,
|
|
579
|
+
color: status === "failed" ? "destructive" : "primary",
|
|
580
|
+
disabled: waiting,
|
|
581
|
+
onClick: onSignIn,
|
|
582
|
+
children: [waiting ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx("img", {
|
|
583
|
+
className: "first-run-google",
|
|
584
|
+
src: GOOGLE_MARK,
|
|
585
|
+
alt: ""
|
|
586
|
+
}), waiting ? "Waiting for Google…" : "Sign in with Google"]
|
|
587
|
+
})] }) }),
|
|
588
|
+
announce: waiting ? "Waiting for Google" : done ? `${brandName} can use your Google account` : ""
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Work the agent does during setup: its rows as the product lists them, then
|
|
593
|
+
* a live line while it works. Stop keeps what it made so far; a failure
|
|
594
|
+
* offers to try again.
|
|
595
|
+
*/
|
|
596
|
+
function WorkStep({ work, caption, live, copy, rows }) {
|
|
597
|
+
const { brandName } = useFirstRun();
|
|
598
|
+
const working = work.status === "working";
|
|
599
|
+
const [title, lead] = work.status === "failed" ? [copy.failed, `Try again, or continue and ask ${brandName} later.`] : copy[work.status];
|
|
600
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
601
|
+
title,
|
|
602
|
+
lead,
|
|
603
|
+
body: rows.length || working ? /* @__PURE__ */ jsxs("figure", {
|
|
604
|
+
className: "first-run-figure",
|
|
605
|
+
"data-working": working ? "" : void 0,
|
|
606
|
+
children: [
|
|
607
|
+
/* @__PURE__ */ jsx("figcaption", { children: caption }),
|
|
608
|
+
rows.length ? /* @__PURE__ */ jsx("ul", {
|
|
609
|
+
className: "workspace-concept-list",
|
|
610
|
+
children: rows
|
|
611
|
+
}) : null,
|
|
612
|
+
working ? /* @__PURE__ */ jsx("p", {
|
|
613
|
+
className: "first-run-live",
|
|
614
|
+
children: live
|
|
615
|
+
}) : null
|
|
616
|
+
]
|
|
617
|
+
}) : void 0,
|
|
618
|
+
actions: working ? work.onStop ? /* @__PURE__ */ jsx(Stop, { onClick: work.onStop }) : /* @__PURE__ */ jsx(Back, {}) : /* @__PURE__ */ jsxs(Actions, { children: [work.status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: work.onRetry }) : null, /* @__PURE__ */ jsx(Next, {})] }),
|
|
619
|
+
announce: working ? "" : title
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
function ProjectsStep({ projects }) {
|
|
623
|
+
const { brandName } = useFirstRun();
|
|
624
|
+
const entries = useQuery(projects.source.queryOptions).data ?? [];
|
|
625
|
+
const count = entries.length;
|
|
626
|
+
return /* @__PURE__ */ jsx(WorkStep, {
|
|
627
|
+
work: projects,
|
|
628
|
+
caption: "Projects",
|
|
629
|
+
live: "Finding your projects",
|
|
630
|
+
copy: {
|
|
631
|
+
working: [`${brandName} is setting up your projects`, "One for each thing you work on."],
|
|
632
|
+
done: count ? [`${brandName} made ${count} ${count === 1 ? "project" : "projects"}`, `Each one keeps its files, links and conversations together. Find them under Projects in ${brandName}.`] : [`${brandName} didn’t make any projects`, "You can ask it to make one anytime."],
|
|
633
|
+
failed: `${brandName} couldn’t set up your projects`
|
|
634
|
+
},
|
|
635
|
+
rows: entries.map((project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectFile, {
|
|
636
|
+
flat: true,
|
|
637
|
+
path: project.path,
|
|
638
|
+
source: { queryOptions: projects.source.queryOptions }
|
|
639
|
+
}) }, project.path))
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* People, grouped as the People panel groups them once they are all in. The
|
|
644
|
+
* sample email's recipient carries their avatar into the email on the next screen.
|
|
645
|
+
*/
|
|
646
|
+
function PeopleStep({ people, recipient }) {
|
|
647
|
+
const { brandName } = useFirstRun();
|
|
648
|
+
const groupId = React.useId();
|
|
649
|
+
const entries = useQuery(people.source.queryOptions).data ?? [];
|
|
650
|
+
const count = entries.length;
|
|
651
|
+
const addressee = recipient === void 0 ? void 0 : personFor(recipient, entries);
|
|
652
|
+
const row = (person) => /* @__PURE__ */ jsx("li", {
|
|
653
|
+
style: person === addressee ? { "--first-run-vt": "first-run-recipient" } : void 0,
|
|
654
|
+
children: /* @__PURE__ */ jsx(WorkspacePersonFile, {
|
|
655
|
+
flat: true,
|
|
656
|
+
path: person.path,
|
|
657
|
+
source: { queryOptions: people.source.queryOptions }
|
|
658
|
+
})
|
|
659
|
+
}, person.path);
|
|
660
|
+
return /* @__PURE__ */ jsx(WorkStep, {
|
|
661
|
+
work: people,
|
|
662
|
+
caption: "People",
|
|
663
|
+
live: "Finding the people you talk to most",
|
|
664
|
+
copy: {
|
|
665
|
+
working: [`${brandName} is finding your people`, "From your email."],
|
|
666
|
+
done: count ? [`${brandName} found ${count} ${count === 1 ? "person" : "people"} you talk to most`, "It remembers who they are, and writes to each one the way you do."] : [`${brandName} didn’t find anyone yet`, "You can ask it to add someone anytime."],
|
|
667
|
+
failed: `${brandName} couldn’t find your people`
|
|
668
|
+
},
|
|
669
|
+
rows: people.status === "working" ? entries.map(row) : peopleListItems(entries, groupId, row)
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
/** The same email in the picked style; the signing screen also shows whose name is on it. */
|
|
673
|
+
function WritingStep({ signing, writing, people, answer, onPick }) {
|
|
674
|
+
const { brandName } = useFirstRun();
|
|
675
|
+
const known = useQuery(people.queryOptions).data;
|
|
676
|
+
const sign = signing ? answer.sign : "you";
|
|
677
|
+
const sample = writing.samples.find((candidate) => candidate.style === answer.style && candidate.sign === sign);
|
|
678
|
+
const to = recipientOf(sample);
|
|
679
|
+
const name = to && known && personFor(to, known)?.name;
|
|
680
|
+
const working = writing.status === "working";
|
|
681
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
682
|
+
title: signing ? `How should ${brandName} sign?` : "Which one sounds like you?",
|
|
683
|
+
lead: signing ? `This is the name people see when ${brandName} writes for you.` : working ? `${brandName} is writing the same email three ways.` : sample ? `${brandName} wrote the same email to ${name ?? to ?? "them"} three ways.` : void 0,
|
|
684
|
+
body: /* @__PURE__ */ jsxs("figure", {
|
|
685
|
+
className: "first-run-figure",
|
|
686
|
+
children: [/* @__PURE__ */ jsx(WritingChoices, {
|
|
687
|
+
signing,
|
|
688
|
+
answer,
|
|
689
|
+
suggested: writing.suggested,
|
|
690
|
+
onPick
|
|
691
|
+
}), working ? /* @__PURE__ */ jsx("p", {
|
|
692
|
+
className: "first-run-live",
|
|
693
|
+
children: "Writing your email"
|
|
694
|
+
}) : sample ? /* @__PURE__ */ jsx("div", {
|
|
695
|
+
className: "first-run-draft",
|
|
696
|
+
style: { "--first-run-vt": "first-run-recipient" },
|
|
697
|
+
children: /* @__PURE__ */ jsx(WorkspaceCorrespondenceCard, {
|
|
698
|
+
flat: true,
|
|
699
|
+
kind: sample.kind,
|
|
700
|
+
fields: sample.fields,
|
|
701
|
+
body: sample.body,
|
|
702
|
+
people: known
|
|
703
|
+
})
|
|
704
|
+
}) : null]
|
|
705
|
+
}),
|
|
706
|
+
actions: /* @__PURE__ */ jsxs(Actions, { children: [writing.status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: writing.onRetry }) : null, /* @__PURE__ */ jsx(Next, { onSave: signing ? () => writing.onSave(answer) : void 0 })] })
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
/** The styles to pick from, or on the signing screen, whose name goes on the email. */
|
|
710
|
+
function WritingChoices({ signing, answer, suggested, onPick }) {
|
|
711
|
+
const { brandName, brandLogo } = useFirstRun();
|
|
712
|
+
return signing ? /* @__PURE__ */ jsxs(RadioGroup.Root, {
|
|
713
|
+
className: "first-run-choices",
|
|
714
|
+
"aria-label": "Sign as",
|
|
715
|
+
value: answer.sign,
|
|
716
|
+
onValueChange: (value) => onPick({ sign: value }),
|
|
717
|
+
children: [/* @__PURE__ */ jsx(Choice, {
|
|
718
|
+
value: "assistant",
|
|
719
|
+
note: "Recommended",
|
|
720
|
+
children: "As your assistant"
|
|
721
|
+
}), /* @__PURE__ */ jsx(Choice, {
|
|
722
|
+
value: "you",
|
|
723
|
+
children: "As you"
|
|
724
|
+
})]
|
|
725
|
+
}) : /* @__PURE__ */ jsx(RadioGroup.Root, {
|
|
726
|
+
className: "first-run-choices",
|
|
727
|
+
"aria-label": "Writing style",
|
|
728
|
+
value: answer.style,
|
|
729
|
+
onValueChange: (value) => onPick({ style: value }),
|
|
730
|
+
children: STYLES.map(([style, label]) => /* @__PURE__ */ jsx(Choice, {
|
|
731
|
+
value: style,
|
|
732
|
+
note: style === suggested ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
733
|
+
brandLogo,
|
|
734
|
+
brandName,
|
|
735
|
+
"’s pick"
|
|
736
|
+
] }) : void 0,
|
|
737
|
+
children: label
|
|
738
|
+
}, style))
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
function Choice({ value, note, children }) {
|
|
742
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
743
|
+
className: "first-run-choice",
|
|
744
|
+
children: [
|
|
745
|
+
/* @__PURE__ */ jsx(Radio.Root, {
|
|
746
|
+
value,
|
|
747
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {})
|
|
748
|
+
}),
|
|
749
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
750
|
+
note ? /* @__PURE__ */ jsx("span", {
|
|
751
|
+
className: "first-run-choice__note",
|
|
752
|
+
children: note
|
|
753
|
+
}) : null
|
|
754
|
+
]
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
/** What the agent should ask about before doing, in the person's words. Left empty, nothing is saved. */
|
|
758
|
+
function BoundariesStep({ value, onChange, onSave }) {
|
|
759
|
+
const { brandName, titleId } = useFirstRun();
|
|
760
|
+
const words = value.trim();
|
|
761
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
762
|
+
narrow: true,
|
|
763
|
+
title: `What should ${brandName} check with you first?`,
|
|
764
|
+
lead: `${brandName} does the work and tells you after. Name anything it should ask you about first.`,
|
|
765
|
+
body: /* @__PURE__ */ jsx(Textarea, {
|
|
766
|
+
"aria-labelledby": titleId,
|
|
767
|
+
rows: 3,
|
|
768
|
+
placeholder: "For example, ask me before you buy anything or email someone new.",
|
|
769
|
+
value,
|
|
770
|
+
onChange: (event) => onChange(event.target.value)
|
|
771
|
+
}),
|
|
772
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: words ? /* @__PURE__ */ jsx(Next, { onSave: () => onSave(words) }) : /* @__PURE__ */ jsx(NotNow, {}) })
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
function AutomationsStep({ automations, entries }) {
|
|
776
|
+
const { brandName } = useFirstRun();
|
|
777
|
+
const count = entries.length;
|
|
778
|
+
return /* @__PURE__ */ jsx(WorkStep, {
|
|
779
|
+
work: automations,
|
|
780
|
+
caption: "Automations",
|
|
781
|
+
live: "Looking at what you do each week",
|
|
782
|
+
copy: {
|
|
783
|
+
working: [`${brandName} is making automations for you`, "From your projects and what you do each week."],
|
|
784
|
+
done: count ? [`${brandName} made ${count} ${count === 1 ? "automation" : "automations"} for you`, "Each takes over work you do by hand. None runs until you say so."] : [`${brandName} didn’t make any automations`, "You can ask it to make one anytime."],
|
|
785
|
+
failed: `${brandName} couldn’t make automations`
|
|
786
|
+
},
|
|
787
|
+
rows: entries.map((automation) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceAutomationFile, {
|
|
788
|
+
flat: true,
|
|
789
|
+
path: automation.path,
|
|
790
|
+
source: { queryOptions: automations.source.queryOptions }
|
|
791
|
+
}) }, automation.path))
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/** One automation, run for real in the agent's own tabs, step by step. */
|
|
795
|
+
function TryStep({ automation, source }) {
|
|
796
|
+
const { brandName } = useFirstRun();
|
|
797
|
+
const { onStop } = source;
|
|
798
|
+
const trace = source.trace?.path === automation.path ? source.trace : void 0;
|
|
799
|
+
const run = useMutation({ mutationFn: () => source.onRun({
|
|
800
|
+
path: automation.path,
|
|
801
|
+
args: {}
|
|
802
|
+
}) });
|
|
803
|
+
const status = tryStatus(run.status, trace);
|
|
804
|
+
const nodes = (trace?.graph ?? automation.graph)?.nodes ?? [];
|
|
805
|
+
const progress = nodes.length ? /* @__PURE__ */ jsx(RunProgress, {
|
|
806
|
+
nodes,
|
|
807
|
+
trace
|
|
808
|
+
}) : void 0;
|
|
809
|
+
if (status === "idle") return /* @__PURE__ */ jsx(Step, {
|
|
810
|
+
title: "Try one now",
|
|
811
|
+
lead: `${brandName} can run “${automation.name}” for you now, in tabs of its own.`,
|
|
812
|
+
actions: /* @__PURE__ */ jsxs(Actions, { children: [/* @__PURE__ */ jsx(NotNow, {}), /* @__PURE__ */ jsx(Button, {
|
|
813
|
+
size: "md",
|
|
814
|
+
onClick: () => run.mutate(),
|
|
815
|
+
children: "Run it"
|
|
816
|
+
})] })
|
|
817
|
+
});
|
|
818
|
+
if (status === "running") return /* @__PURE__ */ jsx(Step, {
|
|
819
|
+
narrow: true,
|
|
820
|
+
title: automation.name,
|
|
821
|
+
lead: `${brandName} is working in tabs of its own.`,
|
|
822
|
+
body: progress,
|
|
823
|
+
actions: onStop && trace ? /* @__PURE__ */ jsx(Stop, { onClick: () => void onStop(trace.executionId) }) : null,
|
|
824
|
+
announce: `Running ${automation.name}`
|
|
825
|
+
});
|
|
826
|
+
if (status === "done") {
|
|
827
|
+
const title = trace?.completedAt == null ? "Done" : `Done in ${seconds.format(Math.max(1, Math.round((trace.completedAt - trace.startedAt) / 1e3)))}`;
|
|
828
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
829
|
+
narrow: true,
|
|
830
|
+
title,
|
|
831
|
+
lead: firstLine(executionResultSummary(run.data?.result ?? trace?.result)),
|
|
832
|
+
body: /* @__PURE__ */ jsxs(Fragment, { children: [progress, /* @__PURE__ */ jsxs(Note, {
|
|
833
|
+
icon: /* @__PURE__ */ jsx(PlayIcon, {}),
|
|
834
|
+
children: [
|
|
835
|
+
"Run it again anytime from Automations in ",
|
|
836
|
+
brandName,
|
|
837
|
+
"."
|
|
838
|
+
]
|
|
839
|
+
})] }),
|
|
840
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) }),
|
|
841
|
+
announce: title
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
const reason = (trace ? boardNotice(trace.graph, trace) : void 0)?.text ?? executionErrorSummary(formatErrorMessage(run.error));
|
|
845
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
846
|
+
narrow: true,
|
|
847
|
+
title: automation.name,
|
|
848
|
+
lead: reason,
|
|
849
|
+
body: progress,
|
|
850
|
+
actions: /* @__PURE__ */ jsxs(Actions, { children: [/* @__PURE__ */ jsx(TryAgain, { onClick: () => run.mutate() }), /* @__PURE__ */ jsx(Next, {})] }),
|
|
851
|
+
announce: reason
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
/** Where the tried run stands: its trace once the host streams one, else the request. */
|
|
855
|
+
function tryStatus(request, trace) {
|
|
856
|
+
if (request === "pending" || trace?.status === "running") return "running";
|
|
857
|
+
if (trace) return trace.status === "completed" ? "done" : "failed";
|
|
858
|
+
if (request === "error") return "failed";
|
|
859
|
+
return request === "success" ? "done" : "idle";
|
|
860
|
+
}
|
|
861
|
+
/** The run's steps, each marked as it runs, finishes, or fails. */
|
|
862
|
+
function RunProgress({ nodes, trace }) {
|
|
863
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
864
|
+
className: "first-run-progress",
|
|
865
|
+
"aria-label": "Steps",
|
|
866
|
+
children: nodes.map((node, position) => {
|
|
867
|
+
const state = stepState(node, trace);
|
|
868
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
869
|
+
"data-state": state === "Running" || state === "Completed" || state === "Failed" ? void 0 : "upcoming",
|
|
870
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
871
|
+
className: "first-run-progress__mark",
|
|
872
|
+
"aria-hidden": "true",
|
|
873
|
+
children: state === "Running" ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : state === "Completed" ? /* @__PURE__ */ jsx(CheckIcon, {}) : state === "Failed" ? /* @__PURE__ */ jsx(WarningIcon, {}) : position + 1
|
|
874
|
+
}), /* @__PURE__ */ jsxs("span", { children: [node.label, /* @__PURE__ */ jsxs("span", {
|
|
875
|
+
className: "sigvelo-visually-hidden",
|
|
876
|
+
children: [", ", state.toLowerCase()]
|
|
877
|
+
})] })]
|
|
878
|
+
}, node.id);
|
|
879
|
+
})
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
/** One automation that suggests a schedule: yes turns it on, and the screen moves on. */
|
|
883
|
+
function ScheduleStep({ automation, schedules }) {
|
|
884
|
+
const { brandName } = useFirstRun();
|
|
885
|
+
const schedule = schedules.list.find((candidate) => "automation" in candidate.task && candidate.task.automation.path === automation.path);
|
|
886
|
+
const on = schedule?.enabled ?? false;
|
|
887
|
+
const change = useMutation({ mutationFn: (enabled) => schedules.onChange(automation, enabled) });
|
|
888
|
+
useAutoAdvance(on);
|
|
889
|
+
const next = schedule && getThinkScheduleNextRun(schedule);
|
|
890
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
891
|
+
narrow: true,
|
|
892
|
+
title: on ? `${brandName} will run it ${automation.schedule}` : `Run it ${automation.schedule}?`,
|
|
893
|
+
lead: on ? `You can turn it off anytime under Schedules in ${brandName}.` : void 0,
|
|
894
|
+
body: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("figure", {
|
|
895
|
+
className: "first-run-figure",
|
|
896
|
+
children: [
|
|
897
|
+
/* @__PURE__ */ jsx("figcaption", { children: "Schedules" }),
|
|
898
|
+
/* @__PURE__ */ jsxs("div", {
|
|
899
|
+
className: "first-run-schedule",
|
|
900
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
901
|
+
className: "think-schedule__schedule-copy",
|
|
902
|
+
children: [
|
|
903
|
+
/* @__PURE__ */ jsx("strong", { children: automation.name }),
|
|
904
|
+
/* @__PURE__ */ jsx("span", { children: automation.schedule }),
|
|
905
|
+
/* @__PURE__ */ jsx("small", { children: on ? next ? `Next ${next}` : "On" : "Off" })
|
|
906
|
+
]
|
|
907
|
+
}), /* @__PURE__ */ jsx(Switch.Root, {
|
|
908
|
+
"aria-label": automation.name,
|
|
909
|
+
checked: on,
|
|
910
|
+
disabled: change.isPending,
|
|
911
|
+
onCheckedChange: (enabled) => change.mutate(enabled),
|
|
912
|
+
children: /* @__PURE__ */ jsx(Switch.Thumb, {})
|
|
913
|
+
})]
|
|
914
|
+
}),
|
|
915
|
+
change.isError ? /* @__PURE__ */ jsx("p", {
|
|
916
|
+
role: "alert",
|
|
917
|
+
className: "chatgpt-sign-in__error",
|
|
918
|
+
children: firstLine(formatErrorMessage(change.error))
|
|
919
|
+
}) : null
|
|
920
|
+
]
|
|
921
|
+
}), /* @__PURE__ */ jsxs(Note, {
|
|
922
|
+
icon: /* @__PURE__ */ jsx(MessageSquareIcon, {}),
|
|
923
|
+
children: [
|
|
924
|
+
"Anything you can ask ",
|
|
925
|
+
brandName,
|
|
926
|
+
", it can also do on a schedule."
|
|
927
|
+
]
|
|
928
|
+
})] }),
|
|
929
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: on ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NotNow, {}), /* @__PURE__ */ jsxs(Button, {
|
|
930
|
+
size: "md",
|
|
931
|
+
disabled: change.isPending,
|
|
932
|
+
onClick: () => change.mutate(true),
|
|
933
|
+
children: ["Yes, ", automation.schedule]
|
|
934
|
+
})] }) }),
|
|
935
|
+
announce: on ? `${automation.name} is on` : ""
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
/** The skills the agent wrote during setup, named in words: `writing-style` reads “Writing style”. */
|
|
939
|
+
function SkillsStep({ skills }) {
|
|
940
|
+
const { brandName } = useFirstRun();
|
|
941
|
+
const count = skills.source.list.length;
|
|
942
|
+
return /* @__PURE__ */ jsx(WorkStep, {
|
|
943
|
+
work: skills,
|
|
944
|
+
caption: "Skills",
|
|
945
|
+
live: "Learning how you work",
|
|
946
|
+
copy: {
|
|
947
|
+
working: [`${brandName} is writing down how you work`, "As skills it reads whenever the work calls for one."],
|
|
948
|
+
done: count ? [`${brandName} made ${count} ${count === 1 ? "skill" : "skills"}`, "It reads each one whenever the work calls for it."] : [`${brandName} didn’t make any skills`, "You can ask it to make one anytime."],
|
|
949
|
+
failed: `${brandName} couldn’t finish its skills`
|
|
950
|
+
},
|
|
951
|
+
rows: skills.source.list.map((skill) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
952
|
+
flat: true,
|
|
953
|
+
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
954
|
+
name: capitalize(skill.name.replaceAll("-", " ")),
|
|
955
|
+
meta: firstLine(skill.description)
|
|
956
|
+
}) }, skill.name))
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* A drawing of Chrome's toolbar and Extensions menu that says where to click.
|
|
961
|
+
* Chrome's own toolbar is where it happens; the host reports `pinned`.
|
|
962
|
+
*/
|
|
963
|
+
function PinStep({ pinned, email }) {
|
|
964
|
+
const { brandName, brandLogo } = useFirstRun();
|
|
965
|
+
useAutoAdvance(pinned);
|
|
966
|
+
const toolbar = /* @__PURE__ */ jsxs("div", {
|
|
967
|
+
className: "first-run-pin__toolbar",
|
|
968
|
+
children: [
|
|
969
|
+
/* @__PURE__ */ jsx("span", { className: "first-run-pin__omnibox" }),
|
|
970
|
+
pinned ? /* @__PURE__ */ jsx("span", {
|
|
971
|
+
className: "first-run-pin__tool",
|
|
972
|
+
children: brandLogo
|
|
973
|
+
}) : null,
|
|
974
|
+
/* @__PURE__ */ jsx("span", {
|
|
975
|
+
className: "first-run-pin__tool",
|
|
976
|
+
"data-target": pinned ? void 0 : "",
|
|
977
|
+
children: /* @__PURE__ */ jsx(PuzzleIcon, {})
|
|
978
|
+
}),
|
|
979
|
+
/* @__PURE__ */ jsx("span", {
|
|
980
|
+
className: "first-run-pin__tool",
|
|
981
|
+
children: /* @__PURE__ */ jsx(Avatar.Root, {
|
|
982
|
+
size: "sm",
|
|
983
|
+
"aria-hidden": "true",
|
|
984
|
+
children: /* @__PURE__ */ jsx(Avatar.Fallback, { children: email ? Array.from(email)[0].toUpperCase() : /* @__PURE__ */ jsx(UserIcon, {}) })
|
|
985
|
+
})
|
|
986
|
+
}),
|
|
987
|
+
/* @__PURE__ */ jsx("span", {
|
|
988
|
+
className: "first-run-pin__tool",
|
|
989
|
+
children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {})
|
|
990
|
+
})
|
|
991
|
+
]
|
|
992
|
+
});
|
|
993
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
994
|
+
title: `Keep ${brandName} one click away`,
|
|
995
|
+
lead: `Click the puzzle piece at the top right of Chrome, then the pin next to ${brandName}.`,
|
|
996
|
+
body: pinned ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("figure", {
|
|
997
|
+
className: "first-run-figure first-run-pin",
|
|
998
|
+
role: "img",
|
|
999
|
+
"aria-label": `Chrome’s toolbar with ${brandName} pinned`,
|
|
1000
|
+
children: toolbar
|
|
1001
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1002
|
+
className: "first-run-pinned",
|
|
1003
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, {}), /* @__PURE__ */ jsxs("span", { children: [
|
|
1004
|
+
"Pinned. Click ",
|
|
1005
|
+
brandName,
|
|
1006
|
+
" in your toolbar anytime to open it."
|
|
1007
|
+
] })]
|
|
1008
|
+
})] }) : /* @__PURE__ */ jsxs("figure", {
|
|
1009
|
+
className: "first-run-figure first-run-pin",
|
|
1010
|
+
role: "img",
|
|
1011
|
+
"aria-label": `Chrome’s toolbar: the puzzle piece opens Extensions, where ${brandName} has a pin`,
|
|
1012
|
+
children: [toolbar, /* @__PURE__ */ jsxs("div", {
|
|
1013
|
+
className: "first-run-pin__menu",
|
|
1014
|
+
children: [/* @__PURE__ */ jsx("p", { children: "Extensions" }), /* @__PURE__ */ jsxs("div", {
|
|
1015
|
+
className: "first-run-pin__row",
|
|
1016
|
+
children: [
|
|
1017
|
+
brandLogo,
|
|
1018
|
+
/* @__PURE__ */ jsx("span", { children: brandName }),
|
|
1019
|
+
/* @__PURE__ */ jsx("span", {
|
|
1020
|
+
className: "first-run-pin__tool",
|
|
1021
|
+
"data-target": "",
|
|
1022
|
+
children: /* @__PURE__ */ jsx(PinIcon, {})
|
|
1023
|
+
})
|
|
1024
|
+
]
|
|
1025
|
+
})]
|
|
1026
|
+
})]
|
|
1027
|
+
}),
|
|
1028
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: pinned ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsx(NotNow, {}) }),
|
|
1029
|
+
announce: pinned ? "Pinned" : ""
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
/** The product's composer, where only the mic works: it plays a spoken example. */
|
|
1033
|
+
function AskStep() {
|
|
1034
|
+
const { brandName } = useFirstRun();
|
|
1035
|
+
const [text, setText] = React.useState("");
|
|
1036
|
+
const voice = useExampleVoice(`Hey ${brandName}, every Friday at 4, recap my week…`);
|
|
1037
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
1038
|
+
narrow: true,
|
|
1039
|
+
title: `Just ask ${brandName}`,
|
|
1040
|
+
lead: `If you’re ever unsure how to do something in ${brandName}, just ask. ${brandName} can do everything you can do.`,
|
|
1041
|
+
body: /* @__PURE__ */ jsxs("figure", {
|
|
1042
|
+
className: "first-run-figure",
|
|
1043
|
+
children: [/* @__PURE__ */ jsx(PromptInputProvider, {
|
|
1044
|
+
value: text,
|
|
1045
|
+
onValueChange: setText,
|
|
1046
|
+
children: /* @__PURE__ */ jsxs(PromptInput, { children: [/* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
|
|
1047
|
+
readOnly: true,
|
|
1048
|
+
"aria-label": `Message ${brandName}`,
|
|
1049
|
+
placeholder: `Ask ${brandName} for anything`
|
|
1050
|
+
}) }), /* @__PURE__ */ jsxs(PromptInputFooter, { children: [/* @__PURE__ */ jsx(PromptInputTools, { children: /* @__PURE__ */ jsx(PromptInputButton, {
|
|
1051
|
+
inert: true,
|
|
1052
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
1053
|
+
}) }), /* @__PURE__ */ jsxs(PromptInputFooterEnd, { children: [/* @__PURE__ */ jsx(PromptInputDictation, {
|
|
1054
|
+
voice,
|
|
1055
|
+
beforeStart: () => setText(""),
|
|
1056
|
+
"data-target": voice.played || voice.isListening ? void 0 : ""
|
|
1057
|
+
}), /* @__PURE__ */ jsx(PromptInputSubmit, { disabled: true })] })] })] })
|
|
1058
|
+
}), /* @__PURE__ */ jsx("figcaption", { children: voice.isListening ? "Playing an example" : voice.played ? "Click the mic to see it again" : "Click the mic to see an example" })]
|
|
1059
|
+
}),
|
|
1060
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: voice.played ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsx(NotNow, {}) })
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
const EXAMPLE_WORD_MS = 450;
|
|
1064
|
+
const EXAMPLE_LEVEL_MS = 120;
|
|
1065
|
+
/**
|
|
1066
|
+
* A voice input that speaks `line` one word at a time, the way dictation
|
|
1067
|
+
* delivers final transcripts, with a moving level while it plays.
|
|
1068
|
+
*/
|
|
1069
|
+
function useExampleVoice(line) {
|
|
1070
|
+
const [state, setState] = React.useState({
|
|
1071
|
+
transcript: "",
|
|
1072
|
+
said: 0,
|
|
1073
|
+
listening: false,
|
|
1074
|
+
level: 0,
|
|
1075
|
+
played: false
|
|
1076
|
+
});
|
|
1077
|
+
React.useEffect(() => {
|
|
1078
|
+
if (!state.listening) return;
|
|
1079
|
+
const words = line.split(" ");
|
|
1080
|
+
const timer = window.setTimeout(() => setState((previous) => previous.said < words.length ? {
|
|
1081
|
+
...previous,
|
|
1082
|
+
transcript: words[previous.said],
|
|
1083
|
+
said: previous.said + 1
|
|
1084
|
+
} : {
|
|
1085
|
+
...previous,
|
|
1086
|
+
listening: false,
|
|
1087
|
+
level: 0,
|
|
1088
|
+
played: true
|
|
1089
|
+
}), EXAMPLE_WORD_MS);
|
|
1090
|
+
return () => window.clearTimeout(timer);
|
|
1091
|
+
}, [
|
|
1092
|
+
state.listening,
|
|
1093
|
+
state.said,
|
|
1094
|
+
line
|
|
1095
|
+
]);
|
|
1096
|
+
React.useEffect(() => {
|
|
1097
|
+
if (!state.listening) return;
|
|
1098
|
+
const timer = window.setInterval(() => setState((previous) => ({
|
|
1099
|
+
...previous,
|
|
1100
|
+
level: Math.random() * .08
|
|
1101
|
+
})), EXAMPLE_LEVEL_MS);
|
|
1102
|
+
return () => window.clearInterval(timer);
|
|
1103
|
+
}, [state.listening]);
|
|
1104
|
+
return {
|
|
1105
|
+
transcript: state.transcript,
|
|
1106
|
+
interimTranscript: null,
|
|
1107
|
+
isListening: state.listening,
|
|
1108
|
+
audioLevel: state.level,
|
|
1109
|
+
error: null,
|
|
1110
|
+
played: state.played,
|
|
1111
|
+
start: () => setState((previous) => ({
|
|
1112
|
+
...previous,
|
|
1113
|
+
transcript: "",
|
|
1114
|
+
said: 0,
|
|
1115
|
+
listening: true
|
|
1116
|
+
})),
|
|
1117
|
+
stop: () => setState((previous) => ({
|
|
1118
|
+
...previous,
|
|
1119
|
+
transcript: line.split(" ").slice(previous.said).join(" "),
|
|
1120
|
+
listening: false,
|
|
1121
|
+
level: 0,
|
|
1122
|
+
played: true
|
|
1123
|
+
})),
|
|
1124
|
+
clear: () => setState((previous) => ({
|
|
1125
|
+
...previous,
|
|
1126
|
+
transcript: ""
|
|
1127
|
+
}))
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
function ReadyStep({ schedules, shortcut, onOpen }) {
|
|
1131
|
+
const { brandName, brandLogo } = useFirstRun();
|
|
1132
|
+
const on = schedules.filter((schedule) => schedule.enabled);
|
|
1133
|
+
return /* @__PURE__ */ jsx(Step, {
|
|
1134
|
+
narrow: true,
|
|
1135
|
+
hero: /* @__PURE__ */ jsx("div", {
|
|
1136
|
+
className: "first-run-hero first-run-hero__brand",
|
|
1137
|
+
children: brandLogo
|
|
1138
|
+
}),
|
|
1139
|
+
title: `${brandName} is ready`,
|
|
1140
|
+
lead: `${on.length ? "Here’s what it does next. " : "Nothing is scheduled. "}Ask it for anything in the side panel.`,
|
|
1141
|
+
body: on.length || shortcut ? /* @__PURE__ */ jsxs(Fragment, { children: [on.length ? /* @__PURE__ */ jsxs("figure", {
|
|
1142
|
+
className: "first-run-figure",
|
|
1143
|
+
children: [/* @__PURE__ */ jsx("figcaption", { children: "Schedules" }), on.map((schedule) => {
|
|
1144
|
+
const next = getThinkScheduleNextRun(schedule);
|
|
1145
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1146
|
+
className: "first-run-schedule",
|
|
1147
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
1148
|
+
className: "think-schedule__schedule-copy",
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ jsx("strong", { children: schedule.name }),
|
|
1151
|
+
/* @__PURE__ */ jsx("span", { children: schedule.task.schedule }),
|
|
1152
|
+
/* @__PURE__ */ jsx("small", { children: next ? `Next ${next}` : "On" })
|
|
1153
|
+
]
|
|
1154
|
+
})
|
|
1155
|
+
}, schedule.id);
|
|
1156
|
+
})]
|
|
1157
|
+
}) : null, shortcut ? /* @__PURE__ */ jsxs(Note, {
|
|
1158
|
+
icon: /* @__PURE__ */ jsx(KeyboardIcon, {}),
|
|
1159
|
+
children: [
|
|
1160
|
+
"Press ",
|
|
1161
|
+
/* @__PURE__ */ jsx(Kbd, { children: shortcut }),
|
|
1162
|
+
" to open ",
|
|
1163
|
+
brandName,
|
|
1164
|
+
" anytime."
|
|
1165
|
+
]
|
|
1166
|
+
}) : null] }) : void 0,
|
|
1167
|
+
actions: /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsxs(Button, {
|
|
1168
|
+
size: "md",
|
|
1169
|
+
onClick: onOpen,
|
|
1170
|
+
children: ["Open ", brandName]
|
|
1171
|
+
}) })
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
//#endregion
|
|
1175
|
+
export { FirstRunSetup };
|