@mcp-b/react-components 0.63.0 → 0.64.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-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
- package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
- package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
- package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
- package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
- package/dist/CodeBlock-dt0L8md0.js +892 -0
- package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
- package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
- package/dist/ExecutionResult-CXnGcmM4.js +671 -0
- package/dist/FileTree-CjfzpN6X.js +968 -0
- package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
- package/dist/ManagerOffice-T79utm-P.js +2469 -0
- package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
- package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
- package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
- package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
- package/dist/SetupChecklist-DwscX3Bw.js +230 -0
- package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
- package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
- package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
- package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
- package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
- package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
- package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
- package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
- package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
- package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
- package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
- package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
- package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
- package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
- package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
- package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
- package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
- package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
- package/dist/assets/desktop/README.md +43 -0
- package/dist/assets/desktop/automations.svg +19 -0
- package/dist/assets/desktop/document.svg +24 -0
- package/dist/assets/desktop/folder.png +0 -0
- package/dist/assets/desktop/mail.svg +31 -0
- package/dist/assets/desktop/settings.svg +9 -0
- package/dist/assets/desktop/trash-full.svg +23 -0
- package/dist/assets/desktop/trash.svg +19 -0
- package/dist/attachment-preview-DeRqFjdz.js +68 -0
- package/dist/attempt-CySQHJsF.js +21 -0
- package/dist/command-search-1fjmCBBo.js +34 -0
- package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
- package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +78 -31
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +1113 -386
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
- package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
- package/dist/components/agents-sdk/AgentComputer.js +8045 -0
- package/dist/components/agents-sdk/AgentEvent.js +164 -21
- package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
- package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
- package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
- package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
- package/dist/components/agents-sdk/BrowserReplay.js +298 -133
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.js +108 -46
- package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +500 -99
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
- package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
- package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
- package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
- package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
- package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
- package/dist/components/agents-sdk/McpServerIcon.js +57 -14
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +542 -158
- package/dist/components/agents-sdk/ModelSelector.js +1151 -253
- package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
- package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
- package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
- package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
- package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
- package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
- package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChat.js +321 -132
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
- package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
- package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
- package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +491 -166
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
- package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
- package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
- package/dist/components/ai-sdk/Activity.js +768 -192
- package/dist/components/ai-sdk/AgentAttention.js +286 -58
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
- package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
- package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
- package/dist/components/ai-sdk/Approval.js +574 -172
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +535 -128
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +404 -80
- package/dist/components/ai-sdk/Checkpoint.js +229 -45
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +216 -48
- package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
- package/dist/components/ai-sdk/Context.js +737 -178
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +305 -68
- package/dist/components/ai-sdk/ExpansionState.js +74 -15
- package/dist/components/ai-sdk/Goal.js +435 -116
- package/dist/components/ai-sdk/InlineCitation.js +313 -76
- package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +1010 -195
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +264 -46
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
- package/dist/components/ai-sdk/Plan.js +639 -128
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +2735 -794
- package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
- package/dist/components/ai-sdk/Queue.js +792 -154
- package/dist/components/ai-sdk/Reasoning.js +268 -69
- package/dist/components/ai-sdk/Sources.js +226 -63
- package/dist/components/ai-sdk/Task.js +294 -71
- package/dist/components/ai-sdk/ToolApproval.js +126 -26
- package/dist/components/ai-sdk/ToolInvocation.js +112 -22
- package/dist/components/extension/ChatGptSignInScreen.js +1 -82
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +467 -146
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
- package/dist/components/extension/ConversationTabPicker.js +254 -76
- package/dist/components/extension/FirstRunSetup.d.ts +61 -35
- package/dist/components/extension/FirstRunSetup.js +3834 -1012
- package/dist/components/foundations/Accordion.js +186 -41
- package/dist/components/foundations/AlertDialog.js +425 -97
- package/dist/components/foundations/AppIcon.d.ts +13 -13
- package/dist/components/foundations/AppIcon.js +183 -34
- package/dist/components/foundations/Autocomplete.js +408 -89
- package/dist/components/foundations/Avatar.d.ts +100 -2
- package/dist/components/foundations/Avatar.js +204 -44
- package/dist/components/foundations/Button.js +64 -13
- package/dist/components/foundations/Card.js +357 -63
- package/dist/components/foundations/Checkbox.js +82 -17
- package/dist/components/foundations/CheckboxGroup.js +266 -58
- package/dist/components/foundations/Collapsible.d.ts +2 -1
- package/dist/components/foundations/Collapsible.js +129 -26
- package/dist/components/foundations/Combobox.js +408 -89
- package/dist/components/foundations/ContextMenu.d.ts +2 -2
- package/dist/components/foundations/ContextMenu.js +591 -117
- package/dist/components/foundations/DescriptionList.js +159 -28
- package/dist/components/foundations/Dialog.js +373 -89
- package/dist/components/foundations/EmptyState.js +86 -23
- package/dist/components/foundations/Favicon.d.ts +17 -0
- package/dist/components/foundations/Favicon.js +62 -0
- package/dist/components/foundations/Field.js +525 -108
- package/dist/components/foundations/Fieldset.js +115 -23
- package/dist/components/foundations/Form.js +38 -9
- package/dist/components/foundations/FormattedDate.d.ts +19 -5
- package/dist/components/foundations/FormattedDate.js +82 -12
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/IconButton.js +114 -17
- package/dist/components/foundations/Input.js +38 -9
- package/dist/components/foundations/Kbd.js +55 -10
- package/dist/components/foundations/Label.js +56 -12
- package/dist/components/foundations/LinkButton.js +67 -15
- package/dist/components/foundations/Marker.js +138 -29
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +634 -136
- package/dist/components/foundations/Menubar.d.ts +2 -2
- package/dist/components/foundations/Menubar.js +685 -130
- package/dist/components/foundations/Meter.js +186 -41
- package/dist/components/foundations/NavigationMenu.js +426 -95
- package/dist/components/foundations/NumberField.js +223 -49
- package/dist/components/foundations/Popover.js +398 -88
- package/dist/components/foundations/PreviewCard.js +234 -53
- package/dist/components/foundations/Progress.js +117 -25
- package/dist/components/foundations/RadioGroup.d.ts +13 -5
- package/dist/components/foundations/RadioGroup.js +132 -25
- package/dist/components/foundations/ScrollArea.js +230 -51
- package/dist/components/foundations/SearchField.d.ts +8 -3
- package/dist/components/foundations/SearchField.js +129 -28
- package/dist/components/foundations/Select.js +648 -145
- package/dist/components/foundations/Separator.js +61 -12
- package/dist/components/foundations/Slider.js +260 -57
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +561 -127
- package/dist/components/foundations/Switch.js +82 -18
- package/dist/components/foundations/Tabs.d.ts +2 -2
- package/dist/components/foundations/Tabs.js +282 -53
- package/dist/components/foundations/Textarea.js +43 -9
- package/dist/components/foundations/ThemeProvider.js +138 -52
- package/dist/components/foundations/Toast.d.ts +10 -2
- package/dist/components/foundations/Toast.js +322 -75
- package/dist/components/foundations/Toggle.d.ts +5 -2
- package/dist/components/foundations/Toggle.js +51 -10
- package/dist/components/foundations/ToggleGroup.d.ts +3 -3
- package/dist/components/foundations/ToggleGroup.js +215 -59
- package/dist/components/foundations/Toolbar.js +249 -61
- package/dist/components/foundations/Tooltip.d.ts +3 -3
- package/dist/components/foundations/Tooltip.js +311 -55
- package/dist/components/foundations/TransitionSurface.js +43 -9
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
- package/dist/components/general-purpose/ActionGuide.js +290 -64
- package/dist/components/general-purpose/AppFrame.js +72 -14
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
- package/dist/components/general-purpose/AppTopBar.js +349 -60
- package/dist/components/general-purpose/BrandLoading.js +37 -9
- package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
- package/dist/components/general-purpose/CommandPalette.js +271 -0
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +937 -167
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
- package/dist/components/general-purpose/FileTree.d.ts +20 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/ListDetail.d.ts +84 -0
- package/dist/components/general-purpose/ListDetail.js +423 -0
- package/dist/components/general-purpose/NotificationPrompt.js +20 -11
- package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
- package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
- package/dist/components/general-purpose/PricingFAQ.js +53 -12
- package/dist/components/general-purpose/PricingPage.js +376 -139
- package/dist/components/general-purpose/PricingPlanCard.js +209 -84
- package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
- package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
- package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
- package/dist/components/general-purpose/ScreenStack.js +427 -0
- package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/StatusScreen.js +82 -24
- package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
- package/dist/components/general-purpose/SwipeActions.js +357 -0
- package/dist/components/general-purpose/Terminal.d.ts +22 -48
- package/dist/components/general-purpose/Terminal.js +320 -174
- package/dist/components/general-purpose/TestResults.js +975 -196
- package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
- package/dist/components/general-purpose/ThemeModeControl.js +66 -23
- package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
- package/dist/components/general-purpose/WallpaperPicker.js +180 -0
- package/dist/components/general-purpose/WebPreview.d.ts +5 -7
- package/dist/components/general-purpose/WebPreview.js +770 -203
- package/dist/components/nanites/AgentConnection.js +323 -84
- package/dist/components/nanites/AgentToolDetail.js +233 -53
- package/dist/components/nanites/GithubMotionMark.js +37 -9
- package/dist/components/nanites/NaniteScene.js +535 -323
- package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
- package/dist/container-width-C43ccJ84.js +17 -0
- package/dist/context-Ddsp8HgD.js +43 -0
- package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
- package/dist/copy-button-DWBVJR6D.js +118 -0
- package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
- package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
- package/dist/icons-nLTnB9kd.js +470 -0
- package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
- package/dist/motion-CGM3i6lX.js +319 -0
- package/dist/motion-preferences-6qsDIDvH.js +13 -0
- package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
- package/dist/progress-ring-BO649JA9.js +79 -0
- package/dist/provider-logos-Ceu7iYFx.js +362 -0
- package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
- package/dist/styles/accessibility.css +26 -0
- package/dist/styles/accordion.css +0 -2
- package/dist/styles/activity.css +20 -12
- package/dist/styles/agent-attention.css +31 -10
- package/dist/styles/agent-chat.css +7 -6
- package/dist/styles/agent-computer-motion-reduction.css +118 -0
- package/dist/styles/agent-computer-motion.css +127 -0
- package/dist/styles/agent-computer-phone.css +942 -0
- package/dist/styles/agent-computer.css +1764 -0
- package/dist/styles/agent-connection.css +5 -5
- package/dist/styles/agent-screen-switcher.css +313 -0
- package/dist/styles/app-icon.css +34 -30
- package/dist/styles/app-top-bar.css +33 -18
- package/dist/styles/approval.css +3 -3
- package/dist/styles/artifact.css +1 -1
- package/dist/styles/attachment-preview.css +2 -4
- package/dist/styles/avatar.css +12 -14
- package/dist/styles/base-ui-motion.css +84 -18
- package/dist/styles/base-ui-motion.test.tsx +305 -0
- package/dist/styles/base.css +16 -12
- package/dist/styles/brand.test.ts +7 -20
- package/dist/styles/browser-control-overlay.css +1 -1
- package/dist/styles/browser-live-screen.css +2 -2
- package/dist/styles/browser-live-view.css +1 -1
- package/dist/styles/browser-replay.css +0 -8
- package/dist/styles/browser-run-panel.css +275 -37
- package/dist/styles/button.css +52 -9
- package/dist/styles/card.css +6 -5
- package/dist/styles/chain-of-thought.css +0 -10
- package/dist/styles/checkpoint.css +2 -2
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/color-contrast.test.ts +18 -1
- package/dist/styles/command-palette.css +110 -0
- package/dist/styles/composer-link.css +11 -7
- package/dist/styles/composition-motion.css +3 -14
- package/dist/styles/context.css +2 -2
- package/dist/styles/conversation-tab-picker.css +7 -0
- package/dist/styles/conversation.css +8 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/employee-app.css +8 -2
- package/dist/styles/employee-chrome.css +4 -4
- package/dist/styles/execution-board.css +206 -114
- package/dist/styles/execution-result.css +2 -2
- package/dist/styles/field.css +187 -4
- package/dist/styles/file-tree.css +218 -40
- package/dist/styles/first-run-setup.css +914 -187
- package/dist/styles/github-motion-mark.css +0 -8
- package/dist/styles/index.css +145 -133
- package/dist/styles/inline-citation.css +5 -4
- package/dist/styles/list-detail.css +57 -0
- package/dist/styles/manager-office.css +6 -8
- package/dist/styles/manager-work.css +4 -2
- package/dist/styles/mcp-plugin-catalog.css +2 -2
- package/dist/styles/mcp-server-picker.css +3 -6
- package/dist/styles/media-preview-card.css +2 -2
- package/dist/styles/menu.css +0 -9
- package/dist/styles/menubar.css +18 -6
- package/dist/styles/message-scroller.css +47 -9
- package/dist/styles/message.css +3 -3
- package/dist/styles/model-selector.css +1 -1
- package/dist/styles/motion-reduction.css +39 -6
- package/dist/styles/pricing-page.css +1 -1
- package/dist/styles/prompt-input.css +29 -29
- package/dist/styles/queue.css +1 -1
- package/dist/styles/recipes.css +212 -28
- package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
- package/dist/styles/responsive-sidebar-shell.css +40 -43
- package/dist/styles/screen-stack.css +123 -0
- package/dist/styles/search-field.css +80 -3
- package/dist/styles/stepper.css +0 -10
- package/dist/styles/streamdown.css +2 -2
- package/dist/styles/subagent-run.css +9 -5
- package/dist/styles/swipe-actions.css +158 -0
- package/dist/styles/tabs.css +80 -23
- package/dist/styles/task.css +7 -1
- package/dist/styles/terminal.css +66 -78
- package/dist/styles/test-results.css +1 -19
- package/dist/styles/textarea.css +2 -1
- package/dist/styles/theme-mode-control.css +154 -26
- package/dist/styles/think-chat-tool-panels.css +1 -1
- package/dist/styles/think-execution-workbench.css +0 -9
- package/dist/styles/think-full-app.css +7 -1
- package/dist/styles/think-schedule.css +81 -54
- package/dist/styles/think-thread-picker.css +28 -37
- package/dist/styles/toast.css +11 -0
- package/dist/styles/toggle-group.css +0 -10
- package/dist/styles/toggle.css +13 -0
- package/dist/styles/tooltip.css +12 -0
- package/dist/styles/transition-surface.css +1 -0
- package/dist/styles/wallpaper-picker.css +224 -0
- package/dist/styles/web-preview.css +47 -18
- package/dist/styles/workspace-automation.css +116 -17
- package/dist/styles/workspace-concepts.css +1 -1
- package/dist/styles/workspace-desktop.css +124 -0
- package/dist/styles/workspace-entity-card.css +3 -1
- package/dist/styles/workspace-explorer.css +499 -5
- package/dist/utils/brand-marks.d.ts +13 -0
- package/dist/utils/brand-marks.js +14 -0
- package/dist/utils/desktop-artwork.d.ts +17 -0
- package/dist/utils/desktop-artwork.js +18 -0
- package/dist/utils/favicon.d.ts +6 -2
- package/dist/utils/favicon.js +16 -4
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-assets-DdtnBDU3.js +213 -0
- package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
- package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
- package/dist/workspace-delete-BOY6CMBf.js +183 -0
- package/dist/workspace-drag-B6hMXUNt.js +304 -0
- package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
- package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
- package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
- package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
- package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
- package/package.json +9 -3
- package/dist/Avatar-t1YRzdwB.d.ts +0 -101
- package/dist/CodeBlock-DYQdZUH6.js +0 -318
- package/dist/ExecutionResult-2fBkpIGN.js +0 -279
- package/dist/FileTree-CDLOD643.js +0 -323
- package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
- package/dist/SetupChecklist-B-iEta9v.js +0 -78
- package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
- package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
- package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
- package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
- package/dist/attachment-preview-1CXJvrmb.js +0 -25
- package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
- package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
- package/dist/copy-button-DbR932tF.js +0 -45
- package/dist/icons-GoybMAB2.js +0 -141
- package/dist/progress-ring-L2bbF0ji.js +0 -40
- package/dist/provider-logos-DWYY8wNz.js +0 -99
- package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
- package/dist/workspace-assets-F3r6XltC.js +0 -107
- package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
- package/dist/workspace-delete-CQvv1eDE.js +0 -81
- package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
|
@@ -1,855 +1,1525 @@
|
|
|
1
|
+
import { CHROME_MARK, GMAIL_MARK, SIGVELO_LOGO } from "../../utils/brand-marks.js";
|
|
1
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { N as KeyboardIcon, P as LaptopIcon, Q as PuzzleIcon, T as EllipsisVerticalIcon, Y as PinIcon, Z as PlusIcon, ft as UserIcon, i as ArrowRightIcon, it as SpinnerIcon, m as ChevronDownIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, s as ArrowUpRightIcon, u as BoxIcon } from "../../icons-nLTnB9kd.js";
|
|
4
|
+
import { Select } from "../foundations/Select.js";
|
|
5
|
+
import { a as formatErrorMessage, r as firstLine, t as capitalize } from "../../format-DL7f2rqp.js";
|
|
4
6
|
import { Button } from "../foundations/Button.js";
|
|
5
|
-
import {
|
|
7
|
+
import { AppIcon } from "../foundations/AppIcon.js";
|
|
6
8
|
import { Kbd } from "../foundations/Kbd.js";
|
|
9
|
+
import { Tabs } from "../foundations/Tabs.js";
|
|
7
10
|
import { PromptInput, PromptInputBody, PromptInputButton, PromptInputDictation, PromptInputFooter, PromptInputFooterEnd, PromptInputProvider, PromptInputSubmit, PromptInputTextarea, PromptInputTools } from "../ai-sdk/PromptInput.js";
|
|
8
|
-
import {
|
|
11
|
+
import { Input } from "../foundations/Input.js";
|
|
9
12
|
import { Avatar } from "../foundations/Avatar.js";
|
|
10
|
-
import {
|
|
13
|
+
import { t as ProviderLogo } from "../../provider-logos-Ceu7iYFx.js";
|
|
14
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
15
|
+
import { Card, CardContent } from "../foundations/Card.js";
|
|
11
16
|
import { a as executionResultSummary, n as executionErrorSummary, s as stepState, t as boardNotice } from "../../execution-result-DAuW4VWv.js";
|
|
12
|
-
import { getThinkScheduleNextRun } from "../agents-sdk/ThinkSchedule.js";
|
|
17
|
+
import { formatThinkScheduleRepeat, getThinkScheduleNextRun } from "../agents-sdk/ThinkSchedule.js";
|
|
13
18
|
import { Switch } from "../foundations/Switch.js";
|
|
14
|
-
import { t as WorkspaceEntityCard } from "../../workspace-entity-card-
|
|
19
|
+
import { t as WorkspaceEntityCard } from "../../workspace-entity-card-9YcsNiqU.js";
|
|
15
20
|
import { WorkspaceAutomationFile } from "../agents-sdk/WorkspaceAutomation.js";
|
|
16
|
-
import { n as peopleListItems
|
|
17
|
-
import { WorkspaceCorrespondenceCard } from "../agents-sdk/WorkspaceCorrespondence.js";
|
|
21
|
+
import { n as peopleListItems } from "../../workspace-person-ZwPqu5TX.js";
|
|
18
22
|
import { WorkspacePersonFile } from "../agents-sdk/WorkspacePerson.js";
|
|
19
23
|
import { WorkspaceProjectFile } from "../agents-sdk/WorkspaceProject.js";
|
|
20
24
|
import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
|
|
25
|
+
import { c } from "react/compiler-runtime";
|
|
21
26
|
import * as React from "react";
|
|
27
|
+
import { ShieldCheck } from "lucide-react";
|
|
22
28
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
-
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
24
|
-
//#region src/components/extension/
|
|
29
|
+
import { useIsMutating, useMutation, useQuery } from "@tanstack/react-query";
|
|
30
|
+
//#region src/components/extension/first-run/flow.ts
|
|
25
31
|
/**
|
|
26
|
-
* The screens after the welcome, in order, under their label in the
|
|
32
|
+
* The screens after the welcome, in order, under their label in the selector. A
|
|
27
33
|
* screen the flow skips gives way to the next one here.
|
|
28
34
|
*/
|
|
29
35
|
const RAIL = [
|
|
30
|
-
["
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
36
|
+
["Connect your AI", ["sign-in", "model-connection"]],
|
|
37
|
+
["Chrome profile", ["chrome-profile"]],
|
|
38
|
+
["Work", [
|
|
39
|
+
"history",
|
|
40
|
+
"preparation",
|
|
41
|
+
"writing",
|
|
42
|
+
"schedules",
|
|
43
|
+
"try"
|
|
35
44
|
]],
|
|
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
45
|
["Ready", [
|
|
44
46
|
"pin",
|
|
45
47
|
"ask",
|
|
46
48
|
"ready"
|
|
47
49
|
]]
|
|
48
50
|
];
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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"]
|
|
51
|
+
/** Work's screens, each listed under Work in the selector once history is in use. */
|
|
52
|
+
const WORK = [
|
|
53
|
+
["preparation", "Preparation"],
|
|
54
|
+
["writing", "Writing style"],
|
|
55
|
+
["schedules", "Schedule"],
|
|
56
|
+
["try", "Try an automation"]
|
|
78
57
|
];
|
|
58
|
+
const STEPS = ["welcome", ...RAIL.flatMap(([, steps]) => steps)];
|
|
59
|
+
const rank = (step) => STEPS.indexOf(step);
|
|
60
|
+
const section = (step) => RAIL.find(([, steps]) => steps.includes(step));
|
|
61
|
+
const isWork = (step) => WORK.some(([candidate]) => candidate === step);
|
|
62
|
+
/**
|
|
63
|
+
* Whether a screen is a stop on this person's way. Connecting a model is a
|
|
64
|
+
* branch of sign-in, Work's screens wait for history consent, and Pin stays
|
|
65
|
+
* only while there is something to pin or the person is on it.
|
|
66
|
+
*/
|
|
67
|
+
function applies(candidate, { step, history, pinned, trial }) {
|
|
68
|
+
switch (candidate) {
|
|
69
|
+
case "model-connection": return false;
|
|
70
|
+
case "try": return history === "history" && trial;
|
|
71
|
+
case "pin": return !pinned || step === "pin";
|
|
72
|
+
default: return !isWork(candidate) || history === "history";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const flowOrder = (flow) => STEPS.filter((candidate) => applies(candidate, flow));
|
|
76
|
+
/** The screen to show for the host's step: a skipped screen shows the next one that applies. */
|
|
77
|
+
function currentStep(flow) {
|
|
78
|
+
const { step, history, preparation } = flow;
|
|
79
|
+
if (step === "model-connection") return step;
|
|
80
|
+
if (isWork(step) && history === "unset") return "history";
|
|
81
|
+
if (isWork(step) && step !== "preparation" && history === "history" && preparation !== "done") return "preparation";
|
|
82
|
+
const order = flowOrder(flow);
|
|
83
|
+
return order.includes(step) ? step : order.find((candidate) => rank(candidate) > rank(step)) ?? "ready";
|
|
84
|
+
}
|
|
85
|
+
function nextStep(flow) {
|
|
86
|
+
const current = currentStep(flow);
|
|
87
|
+
if (current === "model-connection") return "chrome-profile";
|
|
88
|
+
const order = flowOrder({
|
|
89
|
+
...flow,
|
|
90
|
+
step: current
|
|
91
|
+
});
|
|
92
|
+
return order[order.indexOf(current) + 1];
|
|
93
|
+
}
|
|
94
|
+
function previousStep(flow) {
|
|
95
|
+
const current = currentStep(flow);
|
|
96
|
+
if (current === "model-connection") return "sign-in";
|
|
97
|
+
const order = flowOrder({
|
|
98
|
+
...flow,
|
|
99
|
+
step: current
|
|
100
|
+
});
|
|
101
|
+
return order[order.indexOf(current) - 1];
|
|
102
|
+
}
|
|
103
|
+
/** Whether the selector can move to `target`: Work's later screens wait for all preparation. */
|
|
104
|
+
function canVisit(target, navigation) {
|
|
105
|
+
if (navigation.saving) return false;
|
|
106
|
+
if (!flowOrder({
|
|
107
|
+
...navigation,
|
|
108
|
+
step: currentStep(navigation)
|
|
109
|
+
}).includes(target)) return false;
|
|
110
|
+
if (isWork(target)) return target === "preparation" || navigation.preparation === "done";
|
|
111
|
+
return rank(target) <= navigation.furthest;
|
|
112
|
+
}
|
|
113
|
+
/** The selector's entries: each section at its first screen, and Work's screens under it. */
|
|
114
|
+
function navigationItems(navigation) {
|
|
115
|
+
const order = flowOrder({
|
|
116
|
+
...navigation,
|
|
117
|
+
step: currentStep(navigation)
|
|
118
|
+
});
|
|
119
|
+
return RAIL.flatMap(([label, steps]) => {
|
|
120
|
+
const value = order.find((candidate) => steps.includes(candidate));
|
|
121
|
+
if (!value) return [];
|
|
122
|
+
return [{
|
|
123
|
+
label,
|
|
124
|
+
value,
|
|
125
|
+
disabled: !canVisit(value, navigation),
|
|
126
|
+
completed: label === "Work" ? navigation.history !== "unset" : steps.every((step) => rank(step) < navigation.furthest),
|
|
127
|
+
completionText: "Completed"
|
|
128
|
+
}, ...value === "history" && navigation.history === "history" ? WORK.map(([step, label]) => ({
|
|
129
|
+
label,
|
|
130
|
+
value: step,
|
|
131
|
+
disabled: !canVisit(step, navigation),
|
|
132
|
+
completed: step === "preparation" ? navigation.preparation === "done" : step === "writing" || step === "schedules" ? navigation.reviewed[step] : false,
|
|
133
|
+
completionText: step === "preparation" ? "Completed" : "Reviewed"
|
|
134
|
+
})) : []];
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** The selector's value for a screen: Work's own screens, or the section's first one. */
|
|
138
|
+
function navigationValue(flow) {
|
|
139
|
+
const current = currentStep(flow);
|
|
140
|
+
if (isWork(current)) return current;
|
|
141
|
+
const order = flowOrder({
|
|
142
|
+
...flow,
|
|
143
|
+
step: current
|
|
144
|
+
});
|
|
145
|
+
const steps = section(current)?.[1] ?? [];
|
|
146
|
+
return order.find((candidate) => steps.includes(candidate));
|
|
147
|
+
}
|
|
148
|
+
/** Parallel work in one status: working while any runs, then failed if any failed. */
|
|
149
|
+
function preparationState(works) {
|
|
150
|
+
const done = works.filter((work) => work.status === "done").length;
|
|
151
|
+
return {
|
|
152
|
+
status: works.some((work) => work.status === "working") ? "working" : works.some((work) => work.status === "failed") ? "failed" : done === works.length ? "done" : "idle",
|
|
153
|
+
done,
|
|
154
|
+
total: works.length
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/extension/first-run/frame.tsx
|
|
159
|
+
const ADVANCE_MS = 1600;
|
|
79
160
|
const FirstRunContext = React.createContext(null);
|
|
80
161
|
function useFirstRun() {
|
|
81
162
|
const context = React.use(FirstRunContext);
|
|
82
163
|
if (!context) throw new Error("First-run screens render inside FirstRunSetup.");
|
|
83
164
|
return context;
|
|
84
165
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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",
|
|
166
|
+
function PoweredBy() {
|
|
167
|
+
const $ = c(2);
|
|
168
|
+
let t0;
|
|
169
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
170
|
+
t0 = /* @__PURE__ */ jsx("span", {
|
|
171
|
+
className: "first-run-foot__prefix",
|
|
172
|
+
children: "Powered by"
|
|
173
|
+
});
|
|
174
|
+
$[0] = t0;
|
|
175
|
+
} else t0 = $[0];
|
|
176
|
+
let t1;
|
|
177
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
178
|
+
t1 = /* @__PURE__ */ jsx("footer", {
|
|
179
|
+
className: "chatgpt-sign-in__footer first-run-foot",
|
|
180
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
181
|
+
href: "https://sigvelo.com",
|
|
182
|
+
target: "_blank",
|
|
183
|
+
rel: "noopener noreferrer",
|
|
214
184
|
children: [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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, {})
|
|
185
|
+
t0,
|
|
186
|
+
" ",
|
|
187
|
+
/* @__PURE__ */ jsx("span", {
|
|
188
|
+
className: "first-run-foot__brand",
|
|
189
|
+
children: "SigVelo"
|
|
190
|
+
})
|
|
249
191
|
]
|
|
250
192
|
})
|
|
251
|
-
})
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
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
|
-
});
|
|
193
|
+
});
|
|
194
|
+
$[1] = t1;
|
|
195
|
+
} else t1 = $[1];
|
|
196
|
+
return t1;
|
|
266
197
|
}
|
|
267
198
|
/**
|
|
268
199
|
* One screen: its intro and body scroll inside the card, its actions stay at
|
|
269
200
|
* the card's foot. `announce` is read out when it changes on this screen.
|
|
201
|
+
* `layout` names a screen whose body sets its own scroll layout.
|
|
270
202
|
*/
|
|
271
|
-
function Step(
|
|
203
|
+
function Step(t0) {
|
|
204
|
+
const $ = c(29);
|
|
205
|
+
const { hero, title, lead, body, narrow, layout, actions, center, announce: t1 } = t0;
|
|
206
|
+
const announce = t1 === void 0 ? "" : t1;
|
|
272
207
|
const { arrival, titleId } = useFirstRun();
|
|
273
208
|
const heading = React.useRef(null);
|
|
274
209
|
const shown = React.useRef(false);
|
|
275
210
|
const [initial] = React.useState(announce);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
211
|
+
let t2;
|
|
212
|
+
if ($[0] !== arrival) {
|
|
213
|
+
t2 = () => {
|
|
214
|
+
const update = shown.current;
|
|
215
|
+
shown.current = true;
|
|
216
|
+
if (update ? document.activeElement === document.body : !arrival) heading.current?.focus({ preventScroll: true });
|
|
217
|
+
};
|
|
218
|
+
$[0] = arrival;
|
|
219
|
+
$[1] = t2;
|
|
220
|
+
} else t2 = $[1];
|
|
221
|
+
React.useLayoutEffect(t2);
|
|
222
|
+
let t3;
|
|
223
|
+
if ($[2] !== title || $[3] !== titleId) {
|
|
224
|
+
t3 = /* @__PURE__ */ jsx("h1", {
|
|
225
|
+
ref: heading,
|
|
226
|
+
id: titleId,
|
|
227
|
+
tabIndex: -1,
|
|
228
|
+
children: title
|
|
229
|
+
});
|
|
230
|
+
$[2] = title;
|
|
231
|
+
$[3] = titleId;
|
|
232
|
+
$[4] = t3;
|
|
233
|
+
} else t3 = $[4];
|
|
234
|
+
let t4;
|
|
235
|
+
if ($[5] !== lead) {
|
|
236
|
+
t4 = lead ? /* @__PURE__ */ jsx("p", { children: lead }) : null;
|
|
237
|
+
$[5] = lead;
|
|
238
|
+
$[6] = t4;
|
|
239
|
+
} else t4 = $[6];
|
|
240
|
+
let t5;
|
|
241
|
+
if ($[7] !== hero || $[8] !== t3 || $[9] !== t4) {
|
|
242
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
243
|
+
className: "first-run-intro",
|
|
244
|
+
children: [
|
|
245
|
+
hero,
|
|
246
|
+
t3,
|
|
247
|
+
t4
|
|
248
|
+
]
|
|
249
|
+
});
|
|
250
|
+
$[7] = hero;
|
|
251
|
+
$[8] = t3;
|
|
252
|
+
$[9] = t4;
|
|
253
|
+
$[10] = t5;
|
|
254
|
+
} else t5 = $[10];
|
|
255
|
+
let t6;
|
|
256
|
+
if ($[11] !== body || $[12] !== narrow) {
|
|
257
|
+
t6 = body ? /* @__PURE__ */ jsx("div", {
|
|
258
|
+
className: "first-run-body",
|
|
259
|
+
"data-narrow": narrow ? "" : void 0,
|
|
260
|
+
children: body
|
|
261
|
+
}) : null;
|
|
262
|
+
$[11] = body;
|
|
263
|
+
$[12] = narrow;
|
|
264
|
+
$[13] = t6;
|
|
265
|
+
} else t6 = $[13];
|
|
266
|
+
let t7;
|
|
267
|
+
if ($[14] !== t5 || $[15] !== t6) {
|
|
268
|
+
t7 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
285
269
|
name: "first-run-step",
|
|
286
|
-
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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", {
|
|
270
|
+
children: /* @__PURE__ */ jsxs("div", { children: [t5, t6] })
|
|
271
|
+
});
|
|
272
|
+
$[14] = t5;
|
|
273
|
+
$[15] = t6;
|
|
274
|
+
$[16] = t7;
|
|
275
|
+
} else t7 = $[16];
|
|
276
|
+
const t8 = announce === initial ? "" : announce;
|
|
277
|
+
let t9;
|
|
278
|
+
if ($[17] !== t8) {
|
|
279
|
+
t9 = /* @__PURE__ */ jsx("p", {
|
|
304
280
|
role: "status",
|
|
305
281
|
className: "sigvelo-visually-hidden",
|
|
306
|
-
children:
|
|
307
|
-
})
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
282
|
+
children: t8
|
|
283
|
+
});
|
|
284
|
+
$[17] = t8;
|
|
285
|
+
$[18] = t9;
|
|
286
|
+
} else t9 = $[18];
|
|
287
|
+
let t10;
|
|
288
|
+
if ($[19] !== layout || $[20] !== t7 || $[21] !== t9) {
|
|
289
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
290
|
+
className: "first-run-screen__scroll",
|
|
291
|
+
"data-recipe": "scroll-fade-y",
|
|
292
|
+
"data-layout": layout,
|
|
293
|
+
children: [t7, t9]
|
|
294
|
+
});
|
|
295
|
+
$[19] = layout;
|
|
296
|
+
$[20] = t7;
|
|
297
|
+
$[21] = t9;
|
|
298
|
+
$[22] = t10;
|
|
299
|
+
} else t10 = $[22];
|
|
300
|
+
const t11 = center ? "" : void 0;
|
|
301
|
+
let t12;
|
|
302
|
+
if ($[23] !== actions || $[24] !== t11) {
|
|
303
|
+
t12 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
304
|
+
name: "first-run-actions",
|
|
305
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
306
|
+
className: "first-run-actions",
|
|
307
|
+
"data-center": t11,
|
|
308
|
+
children: actions
|
|
309
|
+
})
|
|
310
|
+
});
|
|
311
|
+
$[23] = actions;
|
|
312
|
+
$[24] = t11;
|
|
313
|
+
$[25] = t12;
|
|
314
|
+
} else t12 = $[25];
|
|
315
|
+
let t13;
|
|
316
|
+
if ($[26] !== t10 || $[27] !== t12) {
|
|
317
|
+
t13 = /* @__PURE__ */ jsxs(Fragment, { children: [t10, t12] });
|
|
318
|
+
$[26] = t10;
|
|
319
|
+
$[27] = t12;
|
|
320
|
+
$[28] = t13;
|
|
321
|
+
} else t13 = $[28];
|
|
322
|
+
return t13;
|
|
316
323
|
}
|
|
317
324
|
/** A screen's usual actions: Back at the start, its own controls at the end. */
|
|
318
|
-
function Actions(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
function Actions(t0) {
|
|
326
|
+
const $ = c(3);
|
|
327
|
+
const { children } = t0;
|
|
328
|
+
let t1;
|
|
329
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
330
|
+
t1 = /* @__PURE__ */ jsx(Back, {});
|
|
331
|
+
$[0] = t1;
|
|
332
|
+
} else t1 = $[0];
|
|
333
|
+
let t2;
|
|
334
|
+
if ($[1] !== children) {
|
|
335
|
+
t2 = /* @__PURE__ */ jsxs(Fragment, { children: [t1, /* @__PURE__ */ jsx("div", {
|
|
336
|
+
className: "first-run-actions__end",
|
|
337
|
+
children
|
|
338
|
+
})] });
|
|
339
|
+
$[1] = children;
|
|
340
|
+
$[2] = t2;
|
|
341
|
+
} else t2 = $[2];
|
|
342
|
+
return t2;
|
|
323
343
|
}
|
|
324
|
-
function Back() {
|
|
344
|
+
function Back(t0) {
|
|
345
|
+
const $ = c(4);
|
|
346
|
+
const { disabled } = t0;
|
|
325
347
|
const { back } = useFirstRun();
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
348
|
+
let t1;
|
|
349
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
350
|
+
t1 = /* @__PURE__ */ jsx(ArrowLeftIcon, {});
|
|
351
|
+
$[0] = t1;
|
|
352
|
+
} else t1 = $[0];
|
|
353
|
+
let t2;
|
|
354
|
+
if ($[1] !== back || $[2] !== disabled) {
|
|
355
|
+
t2 = /* @__PURE__ */ jsxs(Button, {
|
|
356
|
+
className: "first-run-back",
|
|
357
|
+
variant: "ghost",
|
|
358
|
+
color: "neutral",
|
|
359
|
+
size: "md",
|
|
360
|
+
disabled,
|
|
361
|
+
onClick: back,
|
|
362
|
+
children: [t1, "Back"]
|
|
363
|
+
});
|
|
364
|
+
$[1] = back;
|
|
365
|
+
$[2] = disabled;
|
|
366
|
+
$[3] = t2;
|
|
367
|
+
} else t2 = $[3];
|
|
368
|
+
return t2;
|
|
334
369
|
}
|
|
335
370
|
/** Moves on; on a screen whose answer is kept, `onSave` keeps it first. */
|
|
336
|
-
function Next(
|
|
371
|
+
function Next(t0) {
|
|
372
|
+
const $ = c(7);
|
|
373
|
+
const { onSave, disabled } = t0;
|
|
337
374
|
const { next } = useFirstRun();
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
375
|
+
let t1;
|
|
376
|
+
if ($[0] !== next || $[1] !== onSave) {
|
|
377
|
+
t1 = () => {
|
|
341
378
|
onSave?.();
|
|
342
379
|
next();
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
380
|
+
};
|
|
381
|
+
$[0] = next;
|
|
382
|
+
$[1] = onSave;
|
|
383
|
+
$[2] = t1;
|
|
384
|
+
} else t1 = $[2];
|
|
385
|
+
let t2;
|
|
386
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
387
|
+
t2 = /* @__PURE__ */ jsx(ArrowRightIcon, {});
|
|
388
|
+
$[3] = t2;
|
|
389
|
+
} else t2 = $[3];
|
|
390
|
+
let t3;
|
|
391
|
+
if ($[4] !== disabled || $[5] !== t1) {
|
|
392
|
+
t3 = /* @__PURE__ */ jsxs(Button, {
|
|
393
|
+
size: "md",
|
|
394
|
+
disabled,
|
|
395
|
+
onClick: t1,
|
|
396
|
+
children: ["Continue", t2]
|
|
397
|
+
});
|
|
398
|
+
$[4] = disabled;
|
|
399
|
+
$[5] = t1;
|
|
400
|
+
$[6] = t3;
|
|
401
|
+
} else t3 = $[6];
|
|
402
|
+
return t3;
|
|
346
403
|
}
|
|
347
404
|
function NotNow() {
|
|
405
|
+
const $ = c(2);
|
|
348
406
|
const { next } = useFirstRun();
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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
|
-
});
|
|
407
|
+
let t0;
|
|
408
|
+
if ($[0] !== next) {
|
|
409
|
+
t0 = /* @__PURE__ */ jsx(Button, {
|
|
410
|
+
variant: "surface",
|
|
411
|
+
color: "neutral",
|
|
412
|
+
size: "md",
|
|
413
|
+
onClick: next,
|
|
414
|
+
children: "Not now"
|
|
415
|
+
});
|
|
416
|
+
$[0] = next;
|
|
417
|
+
$[1] = t0;
|
|
418
|
+
} else t0 = $[1];
|
|
419
|
+
return t0;
|
|
380
420
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
children: /* @__PURE__ */ jsx(AppIcon.Root, {
|
|
387
|
-
size: "xl",
|
|
421
|
+
function TryAgain(props) {
|
|
422
|
+
const $ = c(2);
|
|
423
|
+
let t0;
|
|
424
|
+
if ($[0] !== props) {
|
|
425
|
+
t0 = /* @__PURE__ */ jsx(Button, {
|
|
388
426
|
variant: "surface",
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
427
|
+
color: "neutral",
|
|
428
|
+
size: "md",
|
|
429
|
+
...props,
|
|
430
|
+
children: "Try again"
|
|
431
|
+
});
|
|
432
|
+
$[0] = props;
|
|
433
|
+
$[1] = t0;
|
|
434
|
+
} else t0 = $[1];
|
|
435
|
+
return t0;
|
|
436
|
+
}
|
|
437
|
+
function Note(t0) {
|
|
438
|
+
const $ = c(5);
|
|
439
|
+
const { icon, children } = t0;
|
|
440
|
+
let t1;
|
|
441
|
+
if ($[0] !== children) {
|
|
442
|
+
t1 = /* @__PURE__ */ jsx("span", { children });
|
|
443
|
+
$[0] = children;
|
|
444
|
+
$[1] = t1;
|
|
445
|
+
} else t1 = $[1];
|
|
446
|
+
let t2;
|
|
447
|
+
if ($[2] !== icon || $[3] !== t1) {
|
|
448
|
+
t2 = /* @__PURE__ */ jsxs("p", {
|
|
449
|
+
className: "first-run-note",
|
|
450
|
+
children: [icon, t1]
|
|
451
|
+
});
|
|
452
|
+
$[2] = icon;
|
|
453
|
+
$[3] = t1;
|
|
454
|
+
$[4] = t2;
|
|
455
|
+
} else t2 = $[4];
|
|
456
|
+
return t2;
|
|
399
457
|
}
|
|
400
458
|
/** Moves on a moment after `done` turns true on this screen, not when it arrives done. */
|
|
401
459
|
function useAutoAdvance(done) {
|
|
460
|
+
const $ = c(7);
|
|
402
461
|
const { next } = useFirstRun();
|
|
403
462
|
const [arrivedDone] = React.useState(done);
|
|
404
463
|
const advance = React.useEffectEvent(next);
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
464
|
+
let t0;
|
|
465
|
+
if ($[0] !== advance || $[1] !== arrivedDone || $[2] !== done) {
|
|
466
|
+
t0 = () => {
|
|
467
|
+
if (!done || arrivedDone) return;
|
|
468
|
+
const timer = window.setTimeout(advance, ADVANCE_MS);
|
|
469
|
+
return () => window.clearTimeout(timer);
|
|
470
|
+
};
|
|
471
|
+
$[0] = advance;
|
|
472
|
+
$[1] = arrivedDone;
|
|
473
|
+
$[2] = done;
|
|
474
|
+
$[3] = t0;
|
|
475
|
+
} else t0 = $[3];
|
|
476
|
+
let t1;
|
|
477
|
+
if ($[4] !== arrivedDone || $[5] !== done) {
|
|
478
|
+
t1 = [done, arrivedDone];
|
|
479
|
+
$[4] = arrivedDone;
|
|
480
|
+
$[5] = done;
|
|
481
|
+
$[6] = t1;
|
|
482
|
+
} else t1 = $[6];
|
|
483
|
+
React.useEffect(t0, t1);
|
|
410
484
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
485
|
+
/**
|
|
486
|
+
* A status as one mark: a check, a warning, a spinner while working, and
|
|
487
|
+
* `idle` before it starts. With `text`, the check and warning are named and
|
|
488
|
+
* waiting and working read as words.
|
|
489
|
+
*/
|
|
490
|
+
function WorkStatusMark(t0) {
|
|
491
|
+
const $ = c(11);
|
|
492
|
+
const { status, idle, text } = t0;
|
|
493
|
+
let t1;
|
|
494
|
+
if ($[0] !== status || $[1] !== text) {
|
|
495
|
+
t1 = text ? /* @__PURE__ */ jsx("span", {
|
|
496
|
+
className: "sigvelo-visually-hidden",
|
|
497
|
+
children: text[status]
|
|
498
|
+
}) : null;
|
|
499
|
+
$[0] = status;
|
|
500
|
+
$[1] = text;
|
|
501
|
+
$[2] = t1;
|
|
502
|
+
} else t1 = $[2];
|
|
503
|
+
const name = t1;
|
|
504
|
+
switch (status) {
|
|
505
|
+
case "done": {
|
|
506
|
+
let t2;
|
|
507
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
508
|
+
t2 = /* @__PURE__ */ jsx(CheckIcon, {});
|
|
509
|
+
$[3] = t2;
|
|
510
|
+
} else t2 = $[3];
|
|
511
|
+
let t3;
|
|
512
|
+
if ($[4] !== name) {
|
|
513
|
+
t3 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, name] });
|
|
514
|
+
$[4] = name;
|
|
515
|
+
$[5] = t3;
|
|
516
|
+
} else t3 = $[5];
|
|
517
|
+
return t3;
|
|
518
|
+
}
|
|
519
|
+
case "failed": {
|
|
520
|
+
let t2;
|
|
521
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
522
|
+
t2 = /* @__PURE__ */ jsx(WarningIcon, {});
|
|
523
|
+
$[6] = t2;
|
|
524
|
+
} else t2 = $[6];
|
|
525
|
+
let t3;
|
|
526
|
+
if ($[7] !== name) {
|
|
527
|
+
t3 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, name] });
|
|
528
|
+
$[7] = name;
|
|
529
|
+
$[8] = t3;
|
|
530
|
+
} else t3 = $[8];
|
|
531
|
+
return t3;
|
|
532
|
+
}
|
|
533
|
+
case "working": {
|
|
534
|
+
let t2;
|
|
535
|
+
if ($[9] !== text) {
|
|
536
|
+
t2 = text ? text.working : /* @__PURE__ */ jsx(SpinnerIcon, {});
|
|
537
|
+
$[9] = text;
|
|
538
|
+
$[10] = t2;
|
|
539
|
+
} else t2 = $[10];
|
|
540
|
+
return t2;
|
|
541
|
+
}
|
|
542
|
+
default: return text ? text.idle : idle;
|
|
543
|
+
}
|
|
432
544
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
return
|
|
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
|
-
});
|
|
545
|
+
//#endregion
|
|
546
|
+
//#region src/components/extension/first-run/model-address.ts
|
|
547
|
+
function localModelAddress(endpoint) {
|
|
548
|
+
const host = URL.parse(endpoint)?.hostname ?? "";
|
|
549
|
+
return host === "localhost" || host.endsWith(".localhost") || host === "[::1]" || /^127\.\d+\.\d+\.\d+$/.test(host);
|
|
477
550
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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
|
-
});
|
|
551
|
+
/** What is wrong with trimmed settings' service address, or undefined when it can be checked. */
|
|
552
|
+
function validateModelAddress(value) {
|
|
553
|
+
const address = URL.parse(value.endpoint);
|
|
554
|
+
if (!address || !/^https?:$/.test(address.protocol)) return "Enter an HTTP or HTTPS service address.";
|
|
555
|
+
if (value.kind === "local" && !localModelAddress(value.endpoint)) return "Use an address on this computer, or choose another AI provider.";
|
|
493
556
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region src/components/extension/first-run/ModelConnectionStep.tsx
|
|
559
|
+
function ModelConnectionStep(t0) {
|
|
560
|
+
const $ = c(79);
|
|
561
|
+
const { connection } = t0;
|
|
562
|
+
const { go } = useFirstRun();
|
|
563
|
+
const { value } = connection;
|
|
564
|
+
let t1;
|
|
565
|
+
if ($[0] !== value.endpoint) {
|
|
566
|
+
t1 = value.endpoint.trim();
|
|
567
|
+
$[0] = value.endpoint;
|
|
568
|
+
$[1] = t1;
|
|
569
|
+
} else t1 = $[1];
|
|
570
|
+
let t2;
|
|
571
|
+
if ($[2] !== value.model) {
|
|
572
|
+
t2 = value.model.trim();
|
|
573
|
+
$[2] = value.model;
|
|
574
|
+
$[3] = t2;
|
|
575
|
+
} else t2 = $[3];
|
|
576
|
+
let t3;
|
|
577
|
+
if ($[4] !== t1 || $[5] !== t2 || $[6] !== value) {
|
|
578
|
+
t3 = {
|
|
579
|
+
...value,
|
|
580
|
+
endpoint: t1,
|
|
581
|
+
model: t2
|
|
582
|
+
};
|
|
583
|
+
$[4] = t1;
|
|
584
|
+
$[5] = t2;
|
|
585
|
+
$[6] = value;
|
|
586
|
+
$[7] = t3;
|
|
587
|
+
} else t3 = $[7];
|
|
588
|
+
const settings = t3;
|
|
589
|
+
let t4;
|
|
590
|
+
if ($[8] !== connection.connected || $[9] !== value.kind || $[10] !== value.model) {
|
|
591
|
+
t4 = () => connection.connected && value.kind === "local" && value.model ? [value.model] : [];
|
|
592
|
+
$[8] = connection.connected;
|
|
593
|
+
$[9] = value.kind;
|
|
594
|
+
$[10] = value.model;
|
|
595
|
+
$[11] = t4;
|
|
596
|
+
} else t4 = $[11];
|
|
597
|
+
const [models, setModels] = React.useState(t4);
|
|
598
|
+
const [busy, setBusy] = React.useState(false);
|
|
599
|
+
const [message, setMessage] = React.useState("");
|
|
600
|
+
const [error, setError] = React.useState("");
|
|
601
|
+
const request = React.useRef(0);
|
|
602
|
+
const controller = React.useRef(null);
|
|
603
|
+
let t5;
|
|
604
|
+
let t6;
|
|
605
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
606
|
+
t5 = () => () => {
|
|
607
|
+
request.current = request.current + 1;
|
|
608
|
+
controller.current?.abort();
|
|
609
|
+
};
|
|
610
|
+
t6 = [];
|
|
611
|
+
$[12] = t5;
|
|
612
|
+
$[13] = t6;
|
|
613
|
+
} else {
|
|
614
|
+
t5 = $[12];
|
|
615
|
+
t6 = $[13];
|
|
616
|
+
}
|
|
617
|
+
React.useEffect(t5, t6);
|
|
618
|
+
let t7;
|
|
619
|
+
if ($[14] !== connection || $[15] !== value) {
|
|
620
|
+
t7 = (patch) => {
|
|
621
|
+
request.current = request.current + 1;
|
|
622
|
+
controller.current?.abort();
|
|
623
|
+
setBusy(false);
|
|
624
|
+
setError("");
|
|
625
|
+
if (patch.kind !== void 0 || patch.endpoint !== void 0) {
|
|
626
|
+
setModels([]);
|
|
627
|
+
setMessage("");
|
|
628
|
+
}
|
|
629
|
+
connection.onChange({
|
|
630
|
+
...value,
|
|
631
|
+
...patch
|
|
632
|
+
});
|
|
633
|
+
};
|
|
634
|
+
$[14] = connection;
|
|
635
|
+
$[15] = value;
|
|
636
|
+
$[16] = t7;
|
|
637
|
+
} else t7 = $[16];
|
|
638
|
+
const update = t7;
|
|
639
|
+
let t8;
|
|
640
|
+
if ($[17] !== update || $[18] !== value.endpoint || $[19] !== value.kind) {
|
|
641
|
+
t8 = (kind) => {
|
|
642
|
+
if (kind === value.kind) return;
|
|
643
|
+
const local = localModelAddress(value.endpoint);
|
|
644
|
+
update({
|
|
645
|
+
kind,
|
|
646
|
+
endpoint: kind === "local" && !local ? "http://localhost:11434/v1" : kind === "api" && local ? "" : value.endpoint,
|
|
647
|
+
model: ""
|
|
648
|
+
});
|
|
649
|
+
};
|
|
650
|
+
$[17] = update;
|
|
651
|
+
$[18] = value.endpoint;
|
|
652
|
+
$[19] = value.kind;
|
|
653
|
+
$[20] = t8;
|
|
654
|
+
} else t8 = $[20];
|
|
655
|
+
const chooseKind = t8;
|
|
656
|
+
let t9;
|
|
657
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
658
|
+
t9 = (failure) => {
|
|
659
|
+
setBusy(false);
|
|
660
|
+
setError(failure);
|
|
661
|
+
setMessage("");
|
|
662
|
+
};
|
|
663
|
+
$[21] = t9;
|
|
664
|
+
} else t9 = $[21];
|
|
665
|
+
const fail = t9;
|
|
666
|
+
let t10;
|
|
667
|
+
if ($[22] !== connection || $[23] !== settings || $[24] !== update) {
|
|
668
|
+
t10 = async () => {
|
|
669
|
+
const id = request.current = request.current + 1;
|
|
670
|
+
controller.current?.abort();
|
|
671
|
+
const pending = controller.current = new AbortController();
|
|
672
|
+
const invalid = validateModelAddress(settings);
|
|
673
|
+
if (invalid) {
|
|
674
|
+
setModels([]);
|
|
675
|
+
fail(invalid);
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
setBusy(true);
|
|
679
|
+
setError("");
|
|
680
|
+
setMessage("Checking the service…");
|
|
681
|
+
let found;
|
|
682
|
+
try {
|
|
683
|
+
found = await connection.onFindModels(settings, pending.signal);
|
|
684
|
+
} catch (t11) {
|
|
685
|
+
const failure_0 = t11;
|
|
686
|
+
if (id === request.current) {
|
|
687
|
+
setModels([]);
|
|
688
|
+
fail(formatErrorMessage(failure_0));
|
|
689
|
+
}
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
if (id !== request.current) return;
|
|
693
|
+
const localModels = [...new Set(found.map(_temp$5).filter(_temp2$4))];
|
|
694
|
+
if (!localModels.length) {
|
|
695
|
+
setModels([]);
|
|
696
|
+
fail(found.length ? "Only cloud models were found. Add a local model in Ollama, then check again." : "No models are installed. Add a model, then check again.");
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
setModels(localModels);
|
|
700
|
+
update({ model: localModels.includes(settings.model) ? settings.model : localModels[0] });
|
|
701
|
+
setMessage("Choose a model, then connect it.");
|
|
702
|
+
};
|
|
703
|
+
$[22] = connection;
|
|
704
|
+
$[23] = settings;
|
|
705
|
+
$[24] = update;
|
|
706
|
+
$[25] = t10;
|
|
707
|
+
} else t10 = $[25];
|
|
708
|
+
const findModels = t10;
|
|
709
|
+
let t11;
|
|
710
|
+
if ($[26] !== connection || $[27] !== go || $[28] !== settings) {
|
|
711
|
+
t11 = async () => {
|
|
712
|
+
const id_0 = request.current = request.current + 1;
|
|
713
|
+
controller.current?.abort();
|
|
714
|
+
const pending_0 = controller.current = new AbortController();
|
|
715
|
+
const invalid_0 = validateModelAddress(settings) ?? (settings.model ? void 0 : "Find a model or enter its name before connecting.");
|
|
716
|
+
if (invalid_0) {
|
|
717
|
+
fail(invalid_0);
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
setBusy(true);
|
|
721
|
+
setError("");
|
|
722
|
+
setMessage("Testing a short answer from this model…");
|
|
723
|
+
try {
|
|
724
|
+
await connection.onConnect(settings, pending_0.signal);
|
|
725
|
+
} catch (t12) {
|
|
726
|
+
const failure_1 = t12;
|
|
727
|
+
if (id_0 === request.current) fail(formatErrorMessage(failure_1));
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
if (id_0 !== request.current) return;
|
|
731
|
+
setBusy(false);
|
|
732
|
+
go("chrome-profile");
|
|
733
|
+
};
|
|
734
|
+
$[26] = connection;
|
|
735
|
+
$[27] = go;
|
|
736
|
+
$[28] = settings;
|
|
737
|
+
$[29] = t11;
|
|
738
|
+
} else t11 = $[29];
|
|
739
|
+
const connect = t11;
|
|
740
|
+
let t12;
|
|
741
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
742
|
+
t12 = /* @__PURE__ */ jsx("legend", { children: "AI source" });
|
|
743
|
+
$[30] = t12;
|
|
744
|
+
} else t12 = $[30];
|
|
745
|
+
let t13;
|
|
746
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
747
|
+
t13 = /* @__PURE__ */ jsxs("label", { children: [/* @__PURE__ */ jsx(Radio.Root, {
|
|
748
|
+
value: "local",
|
|
749
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {})
|
|
750
|
+
}), "Local AI"] });
|
|
751
|
+
$[31] = t13;
|
|
752
|
+
} else t13 = $[31];
|
|
753
|
+
let t14;
|
|
754
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
755
|
+
t14 = /* @__PURE__ */ jsxs("label", { children: [/* @__PURE__ */ jsx(Radio.Root, {
|
|
756
|
+
value: "api",
|
|
757
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {})
|
|
758
|
+
}), "Another provider"] });
|
|
759
|
+
$[32] = t14;
|
|
760
|
+
} else t14 = $[32];
|
|
761
|
+
let t15;
|
|
762
|
+
if ($[33] !== chooseKind || $[34] !== value.kind) {
|
|
763
|
+
t15 = /* @__PURE__ */ jsxs("fieldset", {
|
|
764
|
+
className: "first-run-model-source",
|
|
765
|
+
children: [t12, /* @__PURE__ */ jsxs(RadioGroup.Root, {
|
|
766
|
+
className: "first-run-model-source__options",
|
|
767
|
+
"aria-label": "AI source",
|
|
768
|
+
name: "providerKind",
|
|
769
|
+
orientation: "horizontal",
|
|
770
|
+
value: value.kind,
|
|
771
|
+
onValueChange: chooseKind,
|
|
772
|
+
children: [t13, t14]
|
|
530
773
|
})]
|
|
531
|
-
})
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
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",
|
|
774
|
+
});
|
|
775
|
+
$[33] = chooseKind;
|
|
776
|
+
$[34] = value.kind;
|
|
777
|
+
$[35] = t15;
|
|
778
|
+
} else t15 = $[35];
|
|
779
|
+
let t16;
|
|
780
|
+
if ($[36] !== value.kind) {
|
|
781
|
+
t16 = value.kind === "local" ? /* @__PURE__ */ jsxs("p", { children: [
|
|
782
|
+
"New to local AI?",
|
|
556
783
|
" ",
|
|
557
784
|
/* @__PURE__ */ jsx("a", {
|
|
558
|
-
href: "https://
|
|
785
|
+
href: "https://docs.ollama.com/quickstart",
|
|
559
786
|
target: "_blank",
|
|
560
787
|
rel: "noopener noreferrer",
|
|
561
|
-
children: "
|
|
788
|
+
children: "Install Ollama and add a model"
|
|
562
789
|
}),
|
|
563
|
-
"."
|
|
564
|
-
] })
|
|
565
|
-
|
|
790
|
+
", then find your models below."
|
|
791
|
+
] }) : null;
|
|
792
|
+
$[36] = value.kind;
|
|
793
|
+
$[37] = t16;
|
|
794
|
+
} else t16 = $[37];
|
|
795
|
+
let t17;
|
|
796
|
+
if ($[38] !== value.kind) {
|
|
797
|
+
t17 = value.kind === "api" ? /* @__PURE__ */ jsx("p", { children: "Enter your provider’s OpenAI-compatible service address and model name." }) : null;
|
|
798
|
+
$[38] = value.kind;
|
|
799
|
+
$[39] = t17;
|
|
800
|
+
} else t17 = $[39];
|
|
801
|
+
let t18;
|
|
802
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
803
|
+
t18 = /* @__PURE__ */ jsx("span", { children: "Service address" });
|
|
804
|
+
$[40] = t18;
|
|
805
|
+
} else t18 = $[40];
|
|
806
|
+
const t19 = value.kind === "local" ? "http://localhost:11434/v1" : "https://your-provider.example/v1";
|
|
807
|
+
let t20;
|
|
808
|
+
if ($[41] !== update) {
|
|
809
|
+
t20 = (event) => update({ endpoint: event.currentTarget.value });
|
|
810
|
+
$[41] = update;
|
|
811
|
+
$[42] = t20;
|
|
812
|
+
} else t20 = $[42];
|
|
813
|
+
let t21;
|
|
814
|
+
if ($[43] !== busy || $[44] !== t19 || $[45] !== t20 || $[46] !== value.endpoint) {
|
|
815
|
+
t21 = /* @__PURE__ */ jsxs("label", {
|
|
816
|
+
className: "first-run-field",
|
|
817
|
+
children: [t18, /* @__PURE__ */ jsx(Input, {
|
|
818
|
+
name: "endpoint",
|
|
819
|
+
value: value.endpoint,
|
|
820
|
+
disabled: busy,
|
|
821
|
+
placeholder: t19,
|
|
822
|
+
onChange: t20
|
|
823
|
+
})]
|
|
824
|
+
});
|
|
825
|
+
$[43] = busy;
|
|
826
|
+
$[44] = t19;
|
|
827
|
+
$[45] = t20;
|
|
828
|
+
$[46] = value.endpoint;
|
|
829
|
+
$[47] = t21;
|
|
830
|
+
} else t21 = $[47];
|
|
831
|
+
let t22;
|
|
832
|
+
if ($[48] !== busy || $[49] !== findModels || $[50] !== models || $[51] !== update || $[52] !== value.kind || $[53] !== value.model) {
|
|
833
|
+
t22 = value.kind === "local" ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Button, {
|
|
834
|
+
variant: "surface",
|
|
835
|
+
color: "neutral",
|
|
836
|
+
size: "sm",
|
|
837
|
+
disabled: busy,
|
|
838
|
+
onClick: () => void findModels(),
|
|
839
|
+
children: "Find models"
|
|
840
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
841
|
+
className: "first-run-field first-run-model-field",
|
|
842
|
+
children: /* @__PURE__ */ jsxs(Select.Root, {
|
|
843
|
+
items: models.map(_temp3$3),
|
|
844
|
+
name: "model",
|
|
845
|
+
value: models.length ? value.model : null,
|
|
846
|
+
disabled: busy || !models.length,
|
|
847
|
+
onValueChange: (model_2) => {
|
|
848
|
+
if (model_2) update({ model: model_2 });
|
|
849
|
+
},
|
|
850
|
+
children: [
|
|
851
|
+
/* @__PURE__ */ jsx(Select.Label, { children: "Model" }),
|
|
852
|
+
/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
853
|
+
"aria-label": "Model",
|
|
854
|
+
children: [/* @__PURE__ */ jsx(Select.Value, { placeholder: "Find models first" }), /* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })]
|
|
855
|
+
}),
|
|
856
|
+
/* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
857
|
+
sideOffset: 4,
|
|
858
|
+
alignItemWithTrigger: false,
|
|
859
|
+
children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsx(Select.List, { children: models.map(_temp4$2) }) })
|
|
860
|
+
}) })
|
|
861
|
+
]
|
|
862
|
+
})
|
|
863
|
+
})] }) : /* @__PURE__ */ jsxs("label", {
|
|
864
|
+
className: "first-run-field",
|
|
865
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Model name" }), /* @__PURE__ */ jsx(Input, {
|
|
866
|
+
name: "model",
|
|
867
|
+
value: value.model,
|
|
868
|
+
disabled: busy,
|
|
869
|
+
required: true,
|
|
870
|
+
placeholder: "Model ID from your provider",
|
|
871
|
+
onChange: (event_0) => update({ model: event_0.currentTarget.value })
|
|
872
|
+
})]
|
|
873
|
+
});
|
|
874
|
+
$[48] = busy;
|
|
875
|
+
$[49] = findModels;
|
|
876
|
+
$[50] = models;
|
|
877
|
+
$[51] = update;
|
|
878
|
+
$[52] = value.kind;
|
|
879
|
+
$[53] = value.model;
|
|
880
|
+
$[54] = t22;
|
|
881
|
+
} else t22 = $[54];
|
|
882
|
+
let t23;
|
|
883
|
+
if ($[55] !== message) {
|
|
884
|
+
t23 = message ? /* @__PURE__ */ jsx("p", {
|
|
885
|
+
className: "first-run-provider-status",
|
|
886
|
+
role: "status",
|
|
887
|
+
children: message
|
|
888
|
+
}) : null;
|
|
889
|
+
$[55] = message;
|
|
890
|
+
$[56] = t23;
|
|
891
|
+
} else t23 = $[56];
|
|
892
|
+
let t24;
|
|
893
|
+
if ($[57] !== error) {
|
|
894
|
+
t24 = error ? /* @__PURE__ */ jsx("p", {
|
|
895
|
+
className: "first-run-connection-error",
|
|
566
896
|
role: "alert",
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
897
|
+
children: error
|
|
898
|
+
}) : null;
|
|
899
|
+
$[57] = error;
|
|
900
|
+
$[58] = t24;
|
|
901
|
+
} else t24 = $[58];
|
|
902
|
+
let t25;
|
|
903
|
+
if ($[59] !== t15 || $[60] !== t16 || $[61] !== t17 || $[62] !== t21 || $[63] !== t22 || $[64] !== t23 || $[65] !== t24) {
|
|
904
|
+
t25 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
905
|
+
t15,
|
|
906
|
+
t16,
|
|
907
|
+
t17,
|
|
908
|
+
t21,
|
|
909
|
+
t22,
|
|
910
|
+
t23,
|
|
911
|
+
t24
|
|
912
|
+
] });
|
|
913
|
+
$[59] = t15;
|
|
914
|
+
$[60] = t16;
|
|
915
|
+
$[61] = t17;
|
|
916
|
+
$[62] = t21;
|
|
917
|
+
$[63] = t22;
|
|
918
|
+
$[64] = t23;
|
|
919
|
+
$[65] = t24;
|
|
920
|
+
$[66] = t25;
|
|
921
|
+
} else t25 = $[66];
|
|
922
|
+
const t26 = busy || value.kind === "local" && !models.length;
|
|
923
|
+
let t27;
|
|
924
|
+
if ($[67] !== connect) {
|
|
925
|
+
t27 = () => void connect();
|
|
926
|
+
$[67] = connect;
|
|
927
|
+
$[68] = t27;
|
|
928
|
+
} else t27 = $[68];
|
|
929
|
+
const t28 = busy ? "Checking…" : "Connect model";
|
|
930
|
+
let t29;
|
|
931
|
+
if ($[69] !== busy) {
|
|
932
|
+
t29 = busy ? null : /* @__PURE__ */ jsx(ArrowRightIcon, {});
|
|
933
|
+
$[69] = busy;
|
|
934
|
+
$[70] = t29;
|
|
935
|
+
} else t29 = $[70];
|
|
936
|
+
let t30;
|
|
937
|
+
if ($[71] !== t26 || $[72] !== t27 || $[73] !== t28 || $[74] !== t29) {
|
|
938
|
+
t30 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsxs(Button, {
|
|
939
|
+
disabled: t26,
|
|
940
|
+
onClick: t27,
|
|
941
|
+
children: [t28, t29]
|
|
942
|
+
}) });
|
|
943
|
+
$[71] = t26;
|
|
944
|
+
$[72] = t27;
|
|
945
|
+
$[73] = t28;
|
|
946
|
+
$[74] = t29;
|
|
947
|
+
$[75] = t30;
|
|
948
|
+
} else t30 = $[75];
|
|
949
|
+
let t31;
|
|
950
|
+
if ($[76] !== t25 || $[77] !== t30) {
|
|
951
|
+
t31 = /* @__PURE__ */ jsx(Step, {
|
|
952
|
+
title: "Connect a model",
|
|
953
|
+
lead: "Use another AI provider or a model running on this computer.",
|
|
954
|
+
body: t25,
|
|
955
|
+
actions: t30
|
|
956
|
+
});
|
|
957
|
+
$[76] = t25;
|
|
958
|
+
$[77] = t30;
|
|
959
|
+
$[78] = t31;
|
|
960
|
+
} else t31 = $[78];
|
|
961
|
+
return t31;
|
|
590
962
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
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
|
-
});
|
|
963
|
+
function _temp4$2(model_3) {
|
|
964
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
965
|
+
value: model_3,
|
|
966
|
+
children: [/* @__PURE__ */ jsx(Select.ItemIndicator, {}), /* @__PURE__ */ jsx(Select.ItemText, { children: model_3 })]
|
|
967
|
+
}, model_3);
|
|
621
968
|
}
|
|
622
|
-
function
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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
|
-
});
|
|
969
|
+
function _temp3$3(model_1) {
|
|
970
|
+
return {
|
|
971
|
+
label: model_1,
|
|
972
|
+
value: model_1
|
|
973
|
+
};
|
|
641
974
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
975
|
+
function _temp2$4(model_0) {
|
|
976
|
+
return model_0 && !/\bcloud\b/i.test(model_0);
|
|
977
|
+
}
|
|
978
|
+
function _temp$5(model) {
|
|
979
|
+
return model.trim();
|
|
980
|
+
}
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/components/extension/first-run/WorkPreparation.tsx
|
|
983
|
+
const ORB_PARTICLES = Array.from({ length: 80 }, (_, id) => {
|
|
984
|
+
const y = 1 - id / 79 * 2;
|
|
985
|
+
const radius = Math.sqrt(1 - y * y);
|
|
986
|
+
const angle = id * Math.PI * (3 - Math.sqrt(5));
|
|
987
|
+
const x = Math.cos(angle) * radius * 17;
|
|
988
|
+
const z = Math.sin(angle) * radius * 17;
|
|
989
|
+
return {
|
|
990
|
+
id,
|
|
991
|
+
x: 20 + x,
|
|
992
|
+
y: 20 + y * 17,
|
|
993
|
+
radius: .55 + (z + 17) / 34 * .45,
|
|
994
|
+
opacity: .35 + (z + 17) / 34 * .65
|
|
995
|
+
};
|
|
996
|
+
});
|
|
997
|
+
/** Parallel preparation shares one tabbed page; writing, approvals, and a trial are separate. */
|
|
998
|
+
function WorkPreparation(t0) {
|
|
999
|
+
const $ = c(65);
|
|
1000
|
+
const { tab, onTabChange, preparation, projects, people, automations, skills, writing } = t0;
|
|
647
1001
|
const { brandName } = useFirstRun();
|
|
648
1002
|
const groupId = React.useId();
|
|
649
|
-
const
|
|
650
|
-
const
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
children: /* @__PURE__ */ jsx(WorkspacePersonFile, {
|
|
1003
|
+
const projectEntries = useQuery(projects.source.queryOptions).data ?? [];
|
|
1004
|
+
const personEntries = useQuery(people.source.queryOptions).data ?? [];
|
|
1005
|
+
const automationEntries = useQuery(automations.source.queryOptions).data ?? [];
|
|
1006
|
+
let t1;
|
|
1007
|
+
if ($[0] !== people.source.queryOptions) {
|
|
1008
|
+
t1 = (person) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspacePersonFile, {
|
|
655
1009
|
flat: true,
|
|
656
1010
|
path: person.path,
|
|
657
1011
|
source: { queryOptions: people.source.queryOptions }
|
|
658
|
-
})
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
})
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
1012
|
+
}) }, person.path);
|
|
1013
|
+
$[0] = people.source.queryOptions;
|
|
1014
|
+
$[1] = t1;
|
|
1015
|
+
} else t1 = $[1];
|
|
1016
|
+
const personRow = t1;
|
|
1017
|
+
const t2 = `Each one keeps its files, links and conversations together. Find them under Projects in ${brandName}.`;
|
|
1018
|
+
let T0;
|
|
1019
|
+
let T1;
|
|
1020
|
+
let T2;
|
|
1021
|
+
let completed;
|
|
1022
|
+
let stages;
|
|
1023
|
+
let t10;
|
|
1024
|
+
let t3;
|
|
1025
|
+
let t4;
|
|
1026
|
+
let t5;
|
|
1027
|
+
let t6;
|
|
1028
|
+
let t7;
|
|
1029
|
+
let t8;
|
|
1030
|
+
let t9;
|
|
1031
|
+
if ($[2] !== automationEntries || $[3] !== automations || $[4] !== brandName || $[5] !== groupId || $[6] !== onTabChange || $[7] !== people || $[8] !== personEntries || $[9] !== personRow || $[10] !== preparation || $[11] !== projectEntries || $[12] !== projects || $[13] !== skills || $[14] !== t2 || $[15] !== tab || $[16] !== writing.status) {
|
|
1032
|
+
let t11;
|
|
1033
|
+
if ($[30] !== projects.source.queryOptions) {
|
|
1034
|
+
t11 = (project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectFile, {
|
|
1035
|
+
flat: true,
|
|
1036
|
+
path: project.path,
|
|
1037
|
+
source: { queryOptions: projects.source.queryOptions }
|
|
1038
|
+
}) }, project.path);
|
|
1039
|
+
$[30] = projects.source.queryOptions;
|
|
1040
|
+
$[31] = t11;
|
|
1041
|
+
} else t11 = $[31];
|
|
1042
|
+
let t12;
|
|
1043
|
+
if ($[32] !== automations.source.queryOptions) {
|
|
1044
|
+
t12 = (automation) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceAutomationFile, {
|
|
1045
|
+
flat: true,
|
|
1046
|
+
path: automation.path,
|
|
1047
|
+
source: { queryOptions: automations.source.queryOptions }
|
|
1048
|
+
}) }, automation.path);
|
|
1049
|
+
$[32] = automations.source.queryOptions;
|
|
1050
|
+
$[33] = t12;
|
|
1051
|
+
} else t12 = $[33];
|
|
1052
|
+
stages = [
|
|
1053
|
+
{
|
|
1054
|
+
id: "projects",
|
|
1055
|
+
label: "Projects",
|
|
1056
|
+
work: projects,
|
|
1057
|
+
count: projectEntries.length,
|
|
1058
|
+
description: t2,
|
|
1059
|
+
rows: projectEntries.map(t11)
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
id: "people",
|
|
1063
|
+
label: "People",
|
|
1064
|
+
work: people,
|
|
1065
|
+
count: personEntries.length,
|
|
1066
|
+
description: `${brandName} remembers who they are, and writes to each one the way you do.`,
|
|
1067
|
+
rows: people.status === "working" ? personEntries.map(personRow) : peopleListItems(personEntries, groupId, personRow)
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
id: "automations",
|
|
1071
|
+
label: "Automations",
|
|
1072
|
+
work: automations,
|
|
1073
|
+
count: automationEntries.length,
|
|
1074
|
+
description: "Each takes over work you do by hand. None runs until you say so.",
|
|
1075
|
+
rows: automationEntries.map(t12)
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
id: "skills",
|
|
1079
|
+
label: "Skills",
|
|
1080
|
+
work: skills,
|
|
1081
|
+
count: skills.source.list.length,
|
|
1082
|
+
description: `${brandName} reads each one whenever the work calls for it.`,
|
|
1083
|
+
rows: skills.source.list.map(_temp$4)
|
|
1084
|
+
}
|
|
1085
|
+
];
|
|
1086
|
+
const categories = preparationState(stages.map(_temp2$3)).status;
|
|
1087
|
+
const working = preparation === "working";
|
|
1088
|
+
completed = preparation === "done";
|
|
1089
|
+
T2 = Step;
|
|
1090
|
+
t9 = "work";
|
|
1091
|
+
t10 = completed ? "Your work is ready" : /* @__PURE__ */ jsxs(Card, {
|
|
1092
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
1093
|
+
className: "first-run-work__heading",
|
|
1094
|
+
children: [working ? /* @__PURE__ */ jsx("span", {
|
|
1095
|
+
className: "first-run-orb",
|
|
1096
|
+
"aria-hidden": "true",
|
|
1097
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
1098
|
+
className: "first-run-orb__flow",
|
|
1099
|
+
viewBox: "0 0 40 40",
|
|
1100
|
+
width: "40",
|
|
1101
|
+
height: "40",
|
|
1102
|
+
focusable: "false",
|
|
1103
|
+
children: ORB_PARTICLES.map(_temp3$2)
|
|
703
1104
|
})
|
|
704
|
-
}) : null]
|
|
705
|
-
})
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
children:
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
})
|
|
1105
|
+
}) : null, /* @__PURE__ */ jsx("span", { children: writing.status === "failed" ? `${brandName} couldn’t analyze your writing style` : categories === "failed" && !working ? "Your work needs a little attention" : categories === "done" ? `${brandName} is preparing your writing style` : `${brandName} is preparing your work` })]
|
|
1106
|
+
});
|
|
1107
|
+
T1 = Tabs.Root;
|
|
1108
|
+
t5 = tab;
|
|
1109
|
+
if ($[34] !== onTabChange) {
|
|
1110
|
+
t6 = (value) => onTabChange(String(value));
|
|
1111
|
+
$[34] = onTabChange;
|
|
1112
|
+
$[35] = t6;
|
|
1113
|
+
} else t6 = $[35];
|
|
1114
|
+
t7 = "first-run-work";
|
|
1115
|
+
let t14;
|
|
1116
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1117
|
+
t14 = /* @__PURE__ */ jsx(Tabs.Indicator, {});
|
|
1118
|
+
$[36] = t14;
|
|
1119
|
+
} else t14 = $[36];
|
|
1120
|
+
t8 = /* @__PURE__ */ jsxs(Tabs.List, {
|
|
1121
|
+
variant: "line",
|
|
1122
|
+
className: "first-run-work__tabs",
|
|
1123
|
+
"aria-label": "Work preparation",
|
|
1124
|
+
children: [stages.map((t13) => {
|
|
1125
|
+
const { id: id_0, label, work: work_0, count } = t13;
|
|
1126
|
+
return /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
1127
|
+
value: id_0,
|
|
1128
|
+
className: "first-run-work__tab",
|
|
1129
|
+
"aria-label": label,
|
|
1130
|
+
"aria-describedby": `${groupId}-${id_0}-status`,
|
|
1131
|
+
children: [
|
|
1132
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1133
|
+
className: "first-run-work__tab-label",
|
|
1134
|
+
children: [label, /* @__PURE__ */ jsx("span", {
|
|
1135
|
+
className: "first-run-work__tab-count",
|
|
1136
|
+
children: count
|
|
1137
|
+
})]
|
|
1138
|
+
}),
|
|
1139
|
+
/* @__PURE__ */ jsx("span", {
|
|
1140
|
+
className: "first-run-work__tab-state",
|
|
1141
|
+
"aria-hidden": "true",
|
|
1142
|
+
children: /* @__PURE__ */ jsx(WorkStatusMark, {
|
|
1143
|
+
status: work_0.status,
|
|
1144
|
+
idle: "—"
|
|
1145
|
+
})
|
|
1146
|
+
}),
|
|
1147
|
+
/* @__PURE__ */ jsx("span", {
|
|
1148
|
+
id: `${groupId}-${id_0}-status`,
|
|
1149
|
+
className: "sigvelo-visually-hidden",
|
|
1150
|
+
children: WORK_STATUS_TEXT[work_0.status]
|
|
1151
|
+
})
|
|
1152
|
+
]
|
|
1153
|
+
}, id_0);
|
|
1154
|
+
}), t14]
|
|
1155
|
+
});
|
|
1156
|
+
T0 = Tabs.Panels;
|
|
1157
|
+
t3 = "first-run-work__panels";
|
|
1158
|
+
t4 = stages.map((t15) => {
|
|
1159
|
+
const { id: id_1, label: label_0, work: work_1, description, rows } = t15;
|
|
1160
|
+
return /* @__PURE__ */ jsxs(Tabs.Panel, {
|
|
1161
|
+
value: id_1,
|
|
1162
|
+
className: "first-run-work__panel",
|
|
1163
|
+
children: [
|
|
1164
|
+
/* @__PURE__ */ jsx("h2", {
|
|
1165
|
+
className: "sigvelo-visually-hidden",
|
|
1166
|
+
children: label_0
|
|
1167
|
+
}),
|
|
1168
|
+
/* @__PURE__ */ jsx("p", {
|
|
1169
|
+
className: "first-run-work__description",
|
|
1170
|
+
children: description
|
|
1171
|
+
}),
|
|
1172
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1173
|
+
className: "first-run-work__result",
|
|
1174
|
+
children: [
|
|
1175
|
+
work_1.status !== "done" && work_1.activity?.length ? /* @__PURE__ */ jsx("ul", {
|
|
1176
|
+
className: "first-run-work__sources",
|
|
1177
|
+
"aria-label": `${label_0} activity`,
|
|
1178
|
+
children: work_1.activity.map(_temp4$1)
|
|
1179
|
+
}) : null,
|
|
1180
|
+
rows.length ? /* @__PURE__ */ jsx("ul", {
|
|
1181
|
+
className: "workspace-concept-list",
|
|
1182
|
+
children: rows
|
|
1183
|
+
}) : work_1.status === "working" && work_1.activity?.length ? null : /* @__PURE__ */ jsx("p", {
|
|
1184
|
+
className: "first-run-work__empty",
|
|
1185
|
+
children: work_1.status === "done" ? `No ${label_0.toLowerCase()} found. You can add them later.` : work_1.status === "failed" ? `${brandName} couldn’t finish this section. Your other work can continue.` : `Finding your ${label_0.toLowerCase()}…`
|
|
1186
|
+
}),
|
|
1187
|
+
work_1.status === "failed" ? /* @__PURE__ */ jsx(Button, {
|
|
1188
|
+
className: "first-run-work__retry",
|
|
1189
|
+
variant: "surface",
|
|
1190
|
+
color: "neutral",
|
|
1191
|
+
onClick: work_1.onRetry,
|
|
1192
|
+
"aria-label": `Retry ${label_0}`,
|
|
1193
|
+
children: "Try again"
|
|
1194
|
+
}) : null
|
|
1195
|
+
]
|
|
1196
|
+
})
|
|
1197
|
+
]
|
|
1198
|
+
}, id_1);
|
|
1199
|
+
});
|
|
1200
|
+
$[2] = automationEntries;
|
|
1201
|
+
$[3] = automations;
|
|
1202
|
+
$[4] = brandName;
|
|
1203
|
+
$[5] = groupId;
|
|
1204
|
+
$[6] = onTabChange;
|
|
1205
|
+
$[7] = people;
|
|
1206
|
+
$[8] = personEntries;
|
|
1207
|
+
$[9] = personRow;
|
|
1208
|
+
$[10] = preparation;
|
|
1209
|
+
$[11] = projectEntries;
|
|
1210
|
+
$[12] = projects;
|
|
1211
|
+
$[13] = skills;
|
|
1212
|
+
$[14] = t2;
|
|
1213
|
+
$[15] = tab;
|
|
1214
|
+
$[16] = writing.status;
|
|
1215
|
+
$[17] = T0;
|
|
1216
|
+
$[18] = T1;
|
|
1217
|
+
$[19] = T2;
|
|
1218
|
+
$[20] = completed;
|
|
1219
|
+
$[21] = stages;
|
|
1220
|
+
$[22] = t10;
|
|
1221
|
+
$[23] = t3;
|
|
1222
|
+
$[24] = t4;
|
|
1223
|
+
$[25] = t5;
|
|
1224
|
+
$[26] = t6;
|
|
1225
|
+
$[27] = t7;
|
|
1226
|
+
$[28] = t8;
|
|
1227
|
+
$[29] = t9;
|
|
1228
|
+
} else {
|
|
1229
|
+
T0 = $[17];
|
|
1230
|
+
T1 = $[18];
|
|
1231
|
+
T2 = $[19];
|
|
1232
|
+
completed = $[20];
|
|
1233
|
+
stages = $[21];
|
|
1234
|
+
t10 = $[22];
|
|
1235
|
+
t3 = $[23];
|
|
1236
|
+
t4 = $[24];
|
|
1237
|
+
t5 = $[25];
|
|
1238
|
+
t6 = $[26];
|
|
1239
|
+
t7 = $[27];
|
|
1240
|
+
t8 = $[28];
|
|
1241
|
+
t9 = $[29];
|
|
1242
|
+
}
|
|
1243
|
+
let t11;
|
|
1244
|
+
if ($[37] !== T0 || $[38] !== t3 || $[39] !== t4) {
|
|
1245
|
+
t11 = /* @__PURE__ */ jsx(T0, {
|
|
1246
|
+
className: t3,
|
|
1247
|
+
children: t4
|
|
1248
|
+
});
|
|
1249
|
+
$[37] = T0;
|
|
1250
|
+
$[38] = t3;
|
|
1251
|
+
$[39] = t4;
|
|
1252
|
+
$[40] = t11;
|
|
1253
|
+
} else t11 = $[40];
|
|
1254
|
+
let t12;
|
|
1255
|
+
if ($[41] !== T1 || $[42] !== t11 || $[43] !== t5 || $[44] !== t6 || $[45] !== t7 || $[46] !== t8) {
|
|
1256
|
+
t12 = /* @__PURE__ */ jsxs(T1, {
|
|
1257
|
+
value: t5,
|
|
1258
|
+
onValueChange: t6,
|
|
1259
|
+
className: t7,
|
|
1260
|
+
children: [t8, t11]
|
|
1261
|
+
});
|
|
1262
|
+
$[41] = T1;
|
|
1263
|
+
$[42] = t11;
|
|
1264
|
+
$[43] = t5;
|
|
1265
|
+
$[44] = t6;
|
|
1266
|
+
$[45] = t7;
|
|
1267
|
+
$[46] = t8;
|
|
1268
|
+
$[47] = t12;
|
|
1269
|
+
} else t12 = $[47];
|
|
1270
|
+
let t13;
|
|
1271
|
+
if ($[48] !== writing.onRetry || $[49] !== writing.status) {
|
|
1272
|
+
t13 = writing.status === "failed" ? /* @__PURE__ */ jsx(TryAgain, {
|
|
1273
|
+
onClick: writing.onRetry,
|
|
1274
|
+
"aria-label": "Retry writing style analysis"
|
|
1275
|
+
}) : null;
|
|
1276
|
+
$[48] = writing.onRetry;
|
|
1277
|
+
$[49] = writing.status;
|
|
1278
|
+
$[50] = t13;
|
|
1279
|
+
} else t13 = $[50];
|
|
1280
|
+
const t14 = !completed;
|
|
1281
|
+
let t15;
|
|
1282
|
+
if ($[51] !== t14) {
|
|
1283
|
+
t15 = /* @__PURE__ */ jsx(Next, { disabled: t14 });
|
|
1284
|
+
$[51] = t14;
|
|
1285
|
+
$[52] = t15;
|
|
1286
|
+
} else t15 = $[52];
|
|
1287
|
+
let t16;
|
|
1288
|
+
if ($[53] !== t13 || $[54] !== t15) {
|
|
1289
|
+
t16 = /* @__PURE__ */ jsxs(Actions, { children: [t13, t15] });
|
|
1290
|
+
$[53] = t13;
|
|
1291
|
+
$[54] = t15;
|
|
1292
|
+
$[55] = t16;
|
|
1293
|
+
} else t16 = $[55];
|
|
1294
|
+
let t17;
|
|
1295
|
+
if ($[56] !== stages) {
|
|
1296
|
+
t17 = stages.map(_temp5$1);
|
|
1297
|
+
$[56] = stages;
|
|
1298
|
+
$[57] = t17;
|
|
1299
|
+
} else t17 = $[57];
|
|
1300
|
+
const t18 = t17.join(". ");
|
|
1301
|
+
let t19;
|
|
1302
|
+
if ($[58] !== T2 || $[59] !== t10 || $[60] !== t12 || $[61] !== t16 || $[62] !== t18 || $[63] !== t9) {
|
|
1303
|
+
t19 = /* @__PURE__ */ jsx(T2, {
|
|
1304
|
+
layout: t9,
|
|
1305
|
+
title: t10,
|
|
1306
|
+
body: t12,
|
|
1307
|
+
actions: t16,
|
|
1308
|
+
announce: t18
|
|
1309
|
+
});
|
|
1310
|
+
$[58] = T2;
|
|
1311
|
+
$[59] = t10;
|
|
1312
|
+
$[60] = t12;
|
|
1313
|
+
$[61] = t16;
|
|
1314
|
+
$[62] = t18;
|
|
1315
|
+
$[63] = t9;
|
|
1316
|
+
$[64] = t19;
|
|
1317
|
+
} else t19 = $[64];
|
|
1318
|
+
return t19;
|
|
1319
|
+
}
|
|
1320
|
+
function _temp5$1(t0) {
|
|
1321
|
+
const { label: label_1, work: work_2 } = t0;
|
|
1322
|
+
return `${label_1}: ${WORK_STATUS_TEXT[work_2.status]}`;
|
|
1323
|
+
}
|
|
1324
|
+
function _temp4$1(activity) {
|
|
1325
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
1326
|
+
className: "first-run-work__source",
|
|
1327
|
+
children: [
|
|
1328
|
+
/* @__PURE__ */ jsx(AppIcon.Root, {
|
|
1329
|
+
size: "sm",
|
|
1330
|
+
variant: "artwork",
|
|
1331
|
+
"aria-hidden": "true",
|
|
1332
|
+
children: activity.icon ?? /* @__PURE__ */ jsx(AppIcon.Fallback, { children: /* @__PURE__ */ jsx(BoxIcon, {}) })
|
|
1333
|
+
}),
|
|
1334
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1335
|
+
className: "first-run-work__source-copy",
|
|
1336
|
+
children: [/* @__PURE__ */ jsx("strong", { children: activity.name }), /* @__PURE__ */ jsx("span", { children: activity.description })]
|
|
1337
|
+
}),
|
|
1338
|
+
/* @__PURE__ */ jsx("span", {
|
|
1339
|
+
className: "first-run-work__source-status",
|
|
1340
|
+
children: /* @__PURE__ */ jsx(WorkStatusMark, {
|
|
1341
|
+
status: activity.status,
|
|
1342
|
+
text: ACTIVITY_STATUS_TEXT
|
|
1343
|
+
})
|
|
1344
|
+
})
|
|
754
1345
|
]
|
|
755
|
-
});
|
|
1346
|
+
}, activity.id);
|
|
756
1347
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
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
|
-
});
|
|
1348
|
+
function _temp3$2(t0) {
|
|
1349
|
+
const { id, x, y, radius, opacity } = t0;
|
|
1350
|
+
return /* @__PURE__ */ jsx("circle", {
|
|
1351
|
+
className: "first-run-orb__particle",
|
|
1352
|
+
cx: x,
|
|
1353
|
+
cy: y,
|
|
1354
|
+
r: radius,
|
|
1355
|
+
opacity
|
|
1356
|
+
}, id);
|
|
774
1357
|
}
|
|
775
|
-
function
|
|
776
|
-
const {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
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
|
-
});
|
|
1358
|
+
function _temp2$3(t0) {
|
|
1359
|
+
const { work } = t0;
|
|
1360
|
+
return work;
|
|
1361
|
+
}
|
|
1362
|
+
function _temp$4(skill) {
|
|
1363
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
1364
|
+
flat: true,
|
|
1365
|
+
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
1366
|
+
name: capitalize(skill.name.replaceAll("-", " ")),
|
|
1367
|
+
meta: firstLine(skill.description)
|
|
1368
|
+
}) }, skill.name);
|
|
793
1369
|
}
|
|
794
|
-
/**
|
|
795
|
-
|
|
1370
|
+
/** How a preparation tab names its status. */
|
|
1371
|
+
const WORK_STATUS_TEXT = {
|
|
1372
|
+
idle: "Waiting",
|
|
1373
|
+
working: "Preparing",
|
|
1374
|
+
done: "Ready",
|
|
1375
|
+
failed: "Needs attention"
|
|
1376
|
+
};
|
|
1377
|
+
/** How a source row names its status, in words while it waits or works. */
|
|
1378
|
+
const ACTIVITY_STATUS_TEXT = {
|
|
1379
|
+
idle: "Waiting",
|
|
1380
|
+
working: "Checking…",
|
|
1381
|
+
done: "Completed",
|
|
1382
|
+
failed: "Needs attention"
|
|
1383
|
+
};
|
|
1384
|
+
//#endregion
|
|
1385
|
+
//#region src/components/extension/first-run/WorkTrial.tsx
|
|
1386
|
+
/** A trial is separate from schedule decisions and always starts with an explicit Run action. */
|
|
1387
|
+
function WorkTrial(t0) {
|
|
1388
|
+
const $ = c(47);
|
|
1389
|
+
const { automation, source } = t0;
|
|
796
1390
|
const { brandName } = useFirstRun();
|
|
797
|
-
const { onStop } = source;
|
|
798
1391
|
const trace = source.trace?.path === automation.path ? source.trace : void 0;
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
1392
|
+
let t1;
|
|
1393
|
+
if ($[0] !== automation.path || $[1] !== source.onRun) {
|
|
1394
|
+
t1 = { mutationFn: () => source.onRun({
|
|
1395
|
+
path: automation.path,
|
|
1396
|
+
args: {}
|
|
1397
|
+
}) };
|
|
1398
|
+
$[0] = automation.path;
|
|
1399
|
+
$[1] = source.onRun;
|
|
1400
|
+
$[2] = t1;
|
|
1401
|
+
} else t1 = $[2];
|
|
1402
|
+
const run = useMutation(t1);
|
|
1403
|
+
let t2;
|
|
1404
|
+
if ($[3] !== source.onStop) {
|
|
1405
|
+
t2 = { mutationFn: (executionId) => source.onStop(executionId) };
|
|
1406
|
+
$[3] = source.onStop;
|
|
1407
|
+
$[4] = t2;
|
|
1408
|
+
} else t2 = $[4];
|
|
1409
|
+
const stop = useMutation(t2);
|
|
1410
|
+
let t3;
|
|
1411
|
+
if ($[5] !== run.status || $[6] !== trace) {
|
|
1412
|
+
t3 = tryStatus(run.status, trace);
|
|
1413
|
+
$[5] = run.status;
|
|
1414
|
+
$[6] = trace;
|
|
1415
|
+
$[7] = t3;
|
|
1416
|
+
} else t3 = $[7];
|
|
1417
|
+
const status = t3;
|
|
1418
|
+
let t4;
|
|
1419
|
+
if ($[8] !== trace) {
|
|
1420
|
+
t4 = trace ? boardNotice(trace.graph, trace) : void 0;
|
|
1421
|
+
$[8] = trace;
|
|
1422
|
+
$[9] = t4;
|
|
1423
|
+
} else t4 = $[9];
|
|
1424
|
+
const notice = t4;
|
|
1425
|
+
let t5;
|
|
1426
|
+
if ($[10] !== automation.graph || $[11] !== trace?.graph) {
|
|
1427
|
+
t5 = (trace?.graph ?? automation.graph)?.nodes ?? [];
|
|
1428
|
+
$[10] = automation.graph;
|
|
1429
|
+
$[11] = trace?.graph;
|
|
1430
|
+
$[12] = t5;
|
|
1431
|
+
} else t5 = $[12];
|
|
1432
|
+
const nodes = t5;
|
|
1433
|
+
const busy = status === "running";
|
|
1434
|
+
const t6 = status === "idle" ? "Try an automation now" : status === "done" ? "Done" : automation.name;
|
|
1435
|
+
let t7;
|
|
1436
|
+
if ($[13] !== automation.name || $[14] !== brandName || $[15] !== busy || $[16] !== notice?.text || $[17] !== run.data?.result || $[18] !== run.error || $[19] !== status || $[20] !== stop || $[21] !== trace?.result) {
|
|
1437
|
+
t7 = status === "idle" ? `${brandName} can run “${automation.name}” for you now, in tabs of its own.` : busy ? stop.error ? executionErrorSummary(formatErrorMessage(stop.error)) : `${brandName} is working in tabs of its own.` : status === "done" ? firstLine(executionResultSummary(run.data?.result ?? trace?.result)) : notice?.text ?? executionErrorSummary(formatErrorMessage(run.error));
|
|
1438
|
+
$[13] = automation.name;
|
|
1439
|
+
$[14] = brandName;
|
|
1440
|
+
$[15] = busy;
|
|
1441
|
+
$[16] = notice?.text;
|
|
1442
|
+
$[17] = run.data?.result;
|
|
1443
|
+
$[18] = run.error;
|
|
1444
|
+
$[19] = status;
|
|
1445
|
+
$[20] = stop;
|
|
1446
|
+
$[21] = trace?.result;
|
|
1447
|
+
$[22] = t7;
|
|
1448
|
+
} else t7 = $[22];
|
|
1449
|
+
let t8;
|
|
1450
|
+
if ($[23] !== nodes || $[24] !== status || $[25] !== trace) {
|
|
1451
|
+
t8 = status !== "idle" && nodes.length ? /* @__PURE__ */ jsx(RunProgress, {
|
|
1452
|
+
nodes,
|
|
1453
|
+
trace
|
|
1454
|
+
}) : void 0;
|
|
1455
|
+
$[23] = nodes;
|
|
1456
|
+
$[24] = status;
|
|
1457
|
+
$[25] = trace;
|
|
1458
|
+
$[26] = t8;
|
|
1459
|
+
} else t8 = $[26];
|
|
1460
|
+
let t9;
|
|
1461
|
+
if ($[27] !== busy) {
|
|
1462
|
+
t9 = /* @__PURE__ */ jsx(Back, { disabled: busy });
|
|
1463
|
+
$[27] = busy;
|
|
1464
|
+
$[28] = t9;
|
|
1465
|
+
} else t9 = $[28];
|
|
1466
|
+
let t10;
|
|
1467
|
+
if ($[29] !== busy || $[30] !== run || $[31] !== source.onStop || $[32] !== status || $[33] !== stop || $[34] !== trace) {
|
|
1468
|
+
t10 = busy ? source.onStop && trace ? /* @__PURE__ */ jsx(Button, {
|
|
1469
|
+
variant: "surface",
|
|
1470
|
+
color: "neutral",
|
|
1471
|
+
size: "md",
|
|
1472
|
+
disabled: stop.isPending,
|
|
1473
|
+
onClick: () => stop.mutate(trace.executionId),
|
|
1474
|
+
children: "Stop run"
|
|
1475
|
+
}) : null : status === "idle" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(NotNow, {}), /* @__PURE__ */ jsx(Button, {
|
|
813
1476
|
size: "md",
|
|
814
1477
|
onClick: () => run.mutate(),
|
|
815
1478
|
children: "Run it"
|
|
816
|
-
})] })
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
if (
|
|
827
|
-
|
|
828
|
-
|
|
1479
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: () => run.mutate() }) : null, /* @__PURE__ */ jsx(Next, {})] });
|
|
1480
|
+
$[29] = busy;
|
|
1481
|
+
$[30] = run;
|
|
1482
|
+
$[31] = source.onStop;
|
|
1483
|
+
$[32] = status;
|
|
1484
|
+
$[33] = stop;
|
|
1485
|
+
$[34] = trace;
|
|
1486
|
+
$[35] = t10;
|
|
1487
|
+
} else t10 = $[35];
|
|
1488
|
+
let t11;
|
|
1489
|
+
if ($[36] !== t10) {
|
|
1490
|
+
t11 = /* @__PURE__ */ jsx("div", {
|
|
1491
|
+
className: "first-run-actions__end",
|
|
1492
|
+
children: t10
|
|
1493
|
+
});
|
|
1494
|
+
$[36] = t10;
|
|
1495
|
+
$[37] = t11;
|
|
1496
|
+
} else t11 = $[37];
|
|
1497
|
+
let t12;
|
|
1498
|
+
if ($[38] !== t11 || $[39] !== t9) {
|
|
1499
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [t9, t11] });
|
|
1500
|
+
$[38] = t11;
|
|
1501
|
+
$[39] = t9;
|
|
1502
|
+
$[40] = t12;
|
|
1503
|
+
} else t12 = $[40];
|
|
1504
|
+
const t13 = busy ? `Running ${automation.name}` : status === "done" ? "Run completed" : "";
|
|
1505
|
+
let t14;
|
|
1506
|
+
if ($[41] !== t12 || $[42] !== t13 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8) {
|
|
1507
|
+
t14 = /* @__PURE__ */ jsx(Step, {
|
|
829
1508
|
narrow: true,
|
|
830
|
-
title,
|
|
831
|
-
lead:
|
|
832
|
-
body:
|
|
833
|
-
|
|
834
|
-
|
|
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
|
|
1509
|
+
title: t6,
|
|
1510
|
+
lead: t7,
|
|
1511
|
+
body: t8,
|
|
1512
|
+
actions: t12,
|
|
1513
|
+
announce: t13
|
|
842
1514
|
});
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
announce: reason
|
|
852
|
-
});
|
|
1515
|
+
$[41] = t12;
|
|
1516
|
+
$[42] = t13;
|
|
1517
|
+
$[43] = t6;
|
|
1518
|
+
$[44] = t7;
|
|
1519
|
+
$[45] = t8;
|
|
1520
|
+
$[46] = t14;
|
|
1521
|
+
} else t14 = $[46];
|
|
1522
|
+
return t14;
|
|
853
1523
|
}
|
|
854
1524
|
/** Where the tried run stands: its trace once the host streams one, else the request. */
|
|
855
1525
|
function tryStatus(request, trace) {
|
|
@@ -858,154 +1528,1858 @@ function tryStatus(request, trace) {
|
|
|
858
1528
|
if (request === "error") return "failed";
|
|
859
1529
|
return request === "success" ? "done" : "idle";
|
|
860
1530
|
}
|
|
1531
|
+
/** The run step states that draw a mark; every other state is upcoming. */
|
|
1532
|
+
const RUN_STATUS = {
|
|
1533
|
+
Running: "working",
|
|
1534
|
+
Completed: "done",
|
|
1535
|
+
Failed: "failed"
|
|
1536
|
+
};
|
|
861
1537
|
/** The run's steps, each marked as it runs, finishes, or fails. */
|
|
862
|
-
function RunProgress(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
"
|
|
873
|
-
children:
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1538
|
+
function RunProgress(t0) {
|
|
1539
|
+
const $ = c(7);
|
|
1540
|
+
const { nodes, trace } = t0;
|
|
1541
|
+
let t1;
|
|
1542
|
+
if ($[0] !== nodes || $[1] !== trace) {
|
|
1543
|
+
let t2;
|
|
1544
|
+
if ($[3] !== trace) {
|
|
1545
|
+
t2 = (node, position) => {
|
|
1546
|
+
const state = stepState(node, trace);
|
|
1547
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
1548
|
+
"data-state": RUN_STATUS[state] ? void 0 : "upcoming",
|
|
1549
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1550
|
+
className: "first-run-progress__mark",
|
|
1551
|
+
"aria-hidden": "true",
|
|
1552
|
+
children: /* @__PURE__ */ jsx(WorkStatusMark, {
|
|
1553
|
+
status: RUN_STATUS[state] ?? "idle",
|
|
1554
|
+
idle: position + 1
|
|
1555
|
+
})
|
|
1556
|
+
}), /* @__PURE__ */ jsxs("span", { children: [node.label, /* @__PURE__ */ jsxs("span", {
|
|
1557
|
+
className: "sigvelo-visually-hidden",
|
|
1558
|
+
children: [", ", state.toLowerCase()]
|
|
1559
|
+
})] })]
|
|
1560
|
+
}, node.id);
|
|
1561
|
+
};
|
|
1562
|
+
$[3] = trace;
|
|
1563
|
+
$[4] = t2;
|
|
1564
|
+
} else t2 = $[4];
|
|
1565
|
+
t1 = nodes.map(t2);
|
|
1566
|
+
$[0] = nodes;
|
|
1567
|
+
$[1] = trace;
|
|
1568
|
+
$[2] = t1;
|
|
1569
|
+
} else t1 = $[2];
|
|
1570
|
+
let t2;
|
|
1571
|
+
if ($[5] !== t1) {
|
|
1572
|
+
t2 = /* @__PURE__ */ jsx("ol", {
|
|
1573
|
+
className: "first-run-progress",
|
|
1574
|
+
"aria-label": "Steps",
|
|
1575
|
+
children: t1
|
|
1576
|
+
});
|
|
1577
|
+
$[5] = t1;
|
|
1578
|
+
$[6] = t2;
|
|
1579
|
+
} else t2 = $[6];
|
|
1580
|
+
return t2;
|
|
881
1581
|
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
const
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1582
|
+
//#endregion
|
|
1583
|
+
//#region src/components/extension/first-run/ScheduleReview.tsx
|
|
1584
|
+
/** Review independent schedule choices together; Continue never changes their state. */
|
|
1585
|
+
function ScheduleReview(t0) {
|
|
1586
|
+
const $ = c(21);
|
|
1587
|
+
const { automations, schedules, onReviewed } = t0;
|
|
1588
|
+
const { brandName, titleId } = useFirstRun();
|
|
1589
|
+
let t1;
|
|
1590
|
+
if ($[0] !== titleId) {
|
|
1591
|
+
t1 = ["first-run-schedule", titleId];
|
|
1592
|
+
$[0] = titleId;
|
|
1593
|
+
$[1] = t1;
|
|
1594
|
+
} else t1 = $[1];
|
|
1595
|
+
const mutationKey = t1;
|
|
1596
|
+
let t2;
|
|
1597
|
+
if ($[2] !== mutationKey) {
|
|
1598
|
+
t2 = { mutationKey };
|
|
1599
|
+
$[2] = mutationKey;
|
|
1600
|
+
$[3] = t2;
|
|
1601
|
+
} else t2 = $[3];
|
|
1602
|
+
const saving = useIsMutating(t2) > 0;
|
|
1603
|
+
const t3 = automations.length ? "Choose scheduled tasks" : "No schedules suggested";
|
|
1604
|
+
const t4 = automations.length ? "Only schedules you turn on will run automatically." : `You can ask ${brandName} to schedule work anytime.`;
|
|
1605
|
+
let t5;
|
|
1606
|
+
if ($[4] !== automations || $[5] !== mutationKey || $[6] !== schedules) {
|
|
1607
|
+
t5 = automations.length ? /* @__PURE__ */ jsx(Card, {
|
|
1608
|
+
render: /* @__PURE__ */ jsx("ul", {}),
|
|
1609
|
+
className: "first-run-schedule-list",
|
|
1610
|
+
"aria-label": "Suggested schedules",
|
|
1611
|
+
children: automations.map((automation) => /* @__PURE__ */ jsx(ScheduleChoice, {
|
|
1612
|
+
automation,
|
|
1613
|
+
schedules,
|
|
1614
|
+
mutationKey
|
|
1615
|
+
}, automation.path))
|
|
1616
|
+
}) : void 0;
|
|
1617
|
+
$[4] = automations;
|
|
1618
|
+
$[5] = mutationKey;
|
|
1619
|
+
$[6] = schedules;
|
|
1620
|
+
$[7] = t5;
|
|
1621
|
+
} else t5 = $[7];
|
|
1622
|
+
let t6;
|
|
1623
|
+
if ($[8] !== saving) {
|
|
1624
|
+
t6 = /* @__PURE__ */ jsx(Back, { disabled: saving });
|
|
1625
|
+
$[8] = saving;
|
|
1626
|
+
$[9] = t6;
|
|
1627
|
+
} else t6 = $[9];
|
|
1628
|
+
let t7;
|
|
1629
|
+
if ($[10] !== onReviewed || $[11] !== saving) {
|
|
1630
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
1631
|
+
className: "first-run-actions__end",
|
|
1632
|
+
children: /* @__PURE__ */ jsx(Next, {
|
|
1633
|
+
disabled: saving,
|
|
1634
|
+
onSave: onReviewed
|
|
1635
|
+
})
|
|
1636
|
+
});
|
|
1637
|
+
$[10] = onReviewed;
|
|
1638
|
+
$[11] = saving;
|
|
1639
|
+
$[12] = t7;
|
|
1640
|
+
} else t7 = $[12];
|
|
1641
|
+
let t8;
|
|
1642
|
+
if ($[13] !== t6 || $[14] !== t7) {
|
|
1643
|
+
t8 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t7] });
|
|
1644
|
+
$[13] = t6;
|
|
1645
|
+
$[14] = t7;
|
|
1646
|
+
$[15] = t8;
|
|
1647
|
+
} else t8 = $[15];
|
|
1648
|
+
let t9;
|
|
1649
|
+
if ($[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t8) {
|
|
1650
|
+
t9 = /* @__PURE__ */ jsx(Step, {
|
|
1651
|
+
title: t3,
|
|
1652
|
+
lead: t4,
|
|
1653
|
+
body: t5,
|
|
1654
|
+
actions: t8
|
|
1655
|
+
});
|
|
1656
|
+
$[16] = t3;
|
|
1657
|
+
$[17] = t4;
|
|
1658
|
+
$[18] = t5;
|
|
1659
|
+
$[19] = t8;
|
|
1660
|
+
$[20] = t9;
|
|
1661
|
+
} else t9 = $[20];
|
|
1662
|
+
return t9;
|
|
1663
|
+
}
|
|
1664
|
+
/** Each switch is an explicit, immediately saved approval with its own pending/error state. */
|
|
1665
|
+
function ScheduleChoice(t0) {
|
|
1666
|
+
const $ = c(50);
|
|
1667
|
+
const { automation, schedules, mutationKey } = t0;
|
|
1668
|
+
const id = React.useId();
|
|
1669
|
+
let t1;
|
|
1670
|
+
if ($[0] !== automation.path) {
|
|
1671
|
+
t1 = (candidate) => "automation" in candidate.task && candidate.task.automation.path === automation.path;
|
|
1672
|
+
$[0] = automation.path;
|
|
1673
|
+
$[1] = t1;
|
|
1674
|
+
} else t1 = $[1];
|
|
1675
|
+
const schedule = schedules.list.find(t1);
|
|
1676
|
+
const enabled = schedule?.enabled ?? false;
|
|
1677
|
+
let t2;
|
|
1678
|
+
if ($[2] !== automation || $[3] !== schedules) {
|
|
1679
|
+
t2 = (value) => schedules.onChange(automation, value);
|
|
1680
|
+
$[2] = automation;
|
|
1681
|
+
$[3] = schedules;
|
|
1682
|
+
$[4] = t2;
|
|
1683
|
+
} else t2 = $[4];
|
|
1684
|
+
let t3;
|
|
1685
|
+
if ($[5] !== mutationKey || $[6] !== t2) {
|
|
1686
|
+
t3 = {
|
|
1687
|
+
mutationKey,
|
|
1688
|
+
mutationFn: t2
|
|
1689
|
+
};
|
|
1690
|
+
$[5] = mutationKey;
|
|
1691
|
+
$[6] = t2;
|
|
1692
|
+
$[7] = t3;
|
|
1693
|
+
} else t3 = $[7];
|
|
1694
|
+
const change = useMutation(t3);
|
|
1695
|
+
const next = enabled && schedule ? getThinkScheduleNextRun(schedule) : void 0;
|
|
1696
|
+
const t4 = change.isPending;
|
|
1697
|
+
let t5;
|
|
1698
|
+
if ($[8] !== automation.name) {
|
|
1699
|
+
t5 = /* @__PURE__ */ jsx("strong", { children: automation.name });
|
|
1700
|
+
$[8] = automation.name;
|
|
1701
|
+
$[9] = t5;
|
|
1702
|
+
} else t5 = $[9];
|
|
1703
|
+
let t6;
|
|
1704
|
+
if ($[10] !== id || $[11] !== t5) {
|
|
1705
|
+
t6 = /* @__PURE__ */ jsx("label", {
|
|
1706
|
+
htmlFor: id,
|
|
1707
|
+
children: t5
|
|
1708
|
+
});
|
|
1709
|
+
$[10] = id;
|
|
1710
|
+
$[11] = t5;
|
|
1711
|
+
$[12] = t6;
|
|
1712
|
+
} else t6 = $[12];
|
|
1713
|
+
const t7 = `${id}-timing`;
|
|
1714
|
+
const t8 = automation.schedule ?? "";
|
|
1715
|
+
let t9;
|
|
1716
|
+
if ($[13] !== t8) {
|
|
1717
|
+
t9 = formatThinkScheduleRepeat(t8);
|
|
1718
|
+
$[13] = t8;
|
|
1719
|
+
$[14] = t9;
|
|
1720
|
+
} else t9 = $[14];
|
|
1721
|
+
let t10;
|
|
1722
|
+
if ($[15] !== t7 || $[16] !== t9) {
|
|
1723
|
+
t10 = /* @__PURE__ */ jsx("span", {
|
|
1724
|
+
id: t7,
|
|
1725
|
+
children: t9
|
|
1726
|
+
});
|
|
1727
|
+
$[15] = t7;
|
|
1728
|
+
$[16] = t9;
|
|
1729
|
+
$[17] = t10;
|
|
1730
|
+
} else t10 = $[17];
|
|
1731
|
+
let t11;
|
|
1732
|
+
if ($[18] !== next) {
|
|
1733
|
+
t11 = next ? /* @__PURE__ */ jsxs("small", { children: ["Next ", next] }) : null;
|
|
1734
|
+
$[18] = next;
|
|
1735
|
+
$[19] = t11;
|
|
1736
|
+
} else t11 = $[19];
|
|
1737
|
+
let t12;
|
|
1738
|
+
if ($[20] !== t10 || $[21] !== t11 || $[22] !== t6) {
|
|
1739
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
1740
|
+
className: "first-run-schedule__copy",
|
|
896
1741
|
children: [
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
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
|
|
1742
|
+
t6,
|
|
1743
|
+
t10,
|
|
1744
|
+
t11
|
|
920
1745
|
]
|
|
921
|
-
})
|
|
922
|
-
|
|
1746
|
+
});
|
|
1747
|
+
$[20] = t10;
|
|
1748
|
+
$[21] = t11;
|
|
1749
|
+
$[22] = t6;
|
|
1750
|
+
$[23] = t12;
|
|
1751
|
+
} else t12 = $[23];
|
|
1752
|
+
let t13;
|
|
1753
|
+
if ($[24] !== change.isPending) {
|
|
1754
|
+
t13 = change.isPending ? /* @__PURE__ */ jsx("span", {
|
|
1755
|
+
role: "status",
|
|
1756
|
+
children: "Saving…"
|
|
1757
|
+
}) : null;
|
|
1758
|
+
$[24] = change.isPending;
|
|
1759
|
+
$[25] = t13;
|
|
1760
|
+
} else t13 = $[25];
|
|
1761
|
+
const t14 = `${id}-timing`;
|
|
1762
|
+
const t15 = change.isPending ? change.variables : enabled;
|
|
1763
|
+
let t16;
|
|
1764
|
+
if ($[26] !== change) {
|
|
1765
|
+
t16 = (value_0) => change.mutate(value_0);
|
|
1766
|
+
$[26] = change;
|
|
1767
|
+
$[27] = t16;
|
|
1768
|
+
} else t16 = $[27];
|
|
1769
|
+
let t17;
|
|
1770
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1771
|
+
t17 = /* @__PURE__ */ jsx(Switch.Thumb, {});
|
|
1772
|
+
$[28] = t17;
|
|
1773
|
+
} else t17 = $[28];
|
|
1774
|
+
let t18;
|
|
1775
|
+
if ($[29] !== automation.name || $[30] !== change.isPending || $[31] !== id || $[32] !== t14 || $[33] !== t15 || $[34] !== t16) {
|
|
1776
|
+
t18 = /* @__PURE__ */ jsx(Switch.Root, {
|
|
1777
|
+
id,
|
|
1778
|
+
"aria-label": automation.name,
|
|
1779
|
+
"aria-describedby": t14,
|
|
1780
|
+
checked: t15,
|
|
1781
|
+
disabled: change.isPending,
|
|
1782
|
+
onCheckedChange: t16,
|
|
1783
|
+
children: t17
|
|
1784
|
+
});
|
|
1785
|
+
$[29] = automation.name;
|
|
1786
|
+
$[30] = change.isPending;
|
|
1787
|
+
$[31] = id;
|
|
1788
|
+
$[32] = t14;
|
|
1789
|
+
$[33] = t15;
|
|
1790
|
+
$[34] = t16;
|
|
1791
|
+
$[35] = t18;
|
|
1792
|
+
} else t18 = $[35];
|
|
1793
|
+
let t19;
|
|
1794
|
+
if ($[36] !== t13 || $[37] !== t18) {
|
|
1795
|
+
t19 = /* @__PURE__ */ jsxs("div", {
|
|
1796
|
+
className: "first-run-schedule__control",
|
|
1797
|
+
children: [t13, t18]
|
|
1798
|
+
});
|
|
1799
|
+
$[36] = t13;
|
|
1800
|
+
$[37] = t18;
|
|
1801
|
+
$[38] = t19;
|
|
1802
|
+
} else t19 = $[38];
|
|
1803
|
+
let t20;
|
|
1804
|
+
if ($[39] !== t12 || $[40] !== t19) {
|
|
1805
|
+
t20 = /* @__PURE__ */ jsxs("div", {
|
|
1806
|
+
className: "first-run-schedule",
|
|
1807
|
+
children: [t12, t19]
|
|
1808
|
+
});
|
|
1809
|
+
$[39] = t12;
|
|
1810
|
+
$[40] = t19;
|
|
1811
|
+
$[41] = t20;
|
|
1812
|
+
} else t20 = $[41];
|
|
1813
|
+
let t21;
|
|
1814
|
+
if ($[42] !== automation.name || $[43] !== change || $[44] !== enabled) {
|
|
1815
|
+
t21 = change.isError ? /* @__PURE__ */ jsxs("div", {
|
|
1816
|
+
className: "first-run-schedule__error",
|
|
1817
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1818
|
+
role: "alert",
|
|
1819
|
+
children: [
|
|
1820
|
+
firstLine(formatErrorMessage(change.error)).replace(/[.!?]$/, ""),
|
|
1821
|
+
". The schedule is still ",
|
|
1822
|
+
enabled ? "on" : "off",
|
|
1823
|
+
"."
|
|
1824
|
+
]
|
|
1825
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1826
|
+
variant: "ghost",
|
|
1827
|
+
color: "neutral",
|
|
1828
|
+
size: "sm",
|
|
1829
|
+
"aria-label": `Retry ${automation.name}`,
|
|
1830
|
+
onClick: () => change.mutate(change.variables ?? !enabled),
|
|
1831
|
+
children: "Retry"
|
|
1832
|
+
})]
|
|
1833
|
+
}) : null;
|
|
1834
|
+
$[42] = automation.name;
|
|
1835
|
+
$[43] = change;
|
|
1836
|
+
$[44] = enabled;
|
|
1837
|
+
$[45] = t21;
|
|
1838
|
+
} else t21 = $[45];
|
|
1839
|
+
let t22;
|
|
1840
|
+
if ($[46] !== change.isPending || $[47] !== t20 || $[48] !== t21) {
|
|
1841
|
+
t22 = /* @__PURE__ */ jsxs("li", {
|
|
1842
|
+
className: "first-run-schedule-choice",
|
|
1843
|
+
"aria-busy": t4,
|
|
1844
|
+
children: [t20, t21]
|
|
1845
|
+
});
|
|
1846
|
+
$[46] = change.isPending;
|
|
1847
|
+
$[47] = t20;
|
|
1848
|
+
$[48] = t21;
|
|
1849
|
+
$[49] = t22;
|
|
1850
|
+
} else t22 = $[49];
|
|
1851
|
+
return t22;
|
|
1852
|
+
}
|
|
1853
|
+
//#endregion
|
|
1854
|
+
//#region src/components/extension/first-run/WritingStep.tsx
|
|
1855
|
+
const STYLES = [
|
|
1856
|
+
["direct", "Short and direct"],
|
|
1857
|
+
["friendly", "Warm and friendly"],
|
|
1858
|
+
["detailed", "Clear and detailed"],
|
|
1859
|
+
["formal", "Formal"]
|
|
1860
|
+
];
|
|
1861
|
+
/** Preview the selected writing style and signing identity together. */
|
|
1862
|
+
function WritingStep(t0) {
|
|
1863
|
+
const $ = c(86);
|
|
1864
|
+
const { writing, answer, onStyleChange, onSignChange, onReviewed, profileEmail } = t0;
|
|
1865
|
+
const { brandName } = useFirstRun();
|
|
1866
|
+
const profileLabel = profileEmail ?? "Current Chrome profile";
|
|
1867
|
+
let T0;
|
|
1868
|
+
let t1;
|
|
1869
|
+
let t2;
|
|
1870
|
+
let t3;
|
|
1871
|
+
let t4;
|
|
1872
|
+
let t5;
|
|
1873
|
+
let t6;
|
|
1874
|
+
let t7;
|
|
1875
|
+
let t8;
|
|
1876
|
+
if ($[0] !== answer || $[1] !== brandName || $[2] !== onSignChange || $[3] !== onStyleChange || $[4] !== profileLabel || $[5] !== writing.samples || $[6] !== writing.status || $[7] !== writing.suggested) {
|
|
1877
|
+
let t9;
|
|
1878
|
+
if ($[17] !== answer.sign || $[18] !== answer.style) {
|
|
1879
|
+
t9 = (candidate) => candidate.style === answer.style && candidate.sign === answer.sign;
|
|
1880
|
+
$[17] = answer.sign;
|
|
1881
|
+
$[18] = answer.style;
|
|
1882
|
+
$[19] = t9;
|
|
1883
|
+
} else t9 = $[19];
|
|
1884
|
+
const sample = writing.samples.find(t9);
|
|
1885
|
+
const working = writing.status === "working";
|
|
1886
|
+
T0 = Step;
|
|
1887
|
+
t6 = "writing";
|
|
1888
|
+
t7 = "Writing style";
|
|
1889
|
+
t8 = working ? `${brandName} is studying your sent emails to suggest a writing style.` : writing.status === "done" && writing.suggested ? `${brandName} recommends a tone based on your sent emails.` : "Choose a tone and signature for this Chrome profile.";
|
|
1890
|
+
t4 = "first-run-writing";
|
|
1891
|
+
let t10;
|
|
1892
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1893
|
+
t10 = /* @__PURE__ */ jsx("legend", { children: "Tone" });
|
|
1894
|
+
$[20] = t10;
|
|
1895
|
+
} else t10 = $[20];
|
|
1896
|
+
const t11 = writing.status === "done" ? writing.suggested : void 0;
|
|
1897
|
+
let t12;
|
|
1898
|
+
if ($[21] !== answer || $[22] !== onStyleChange || $[23] !== t11) {
|
|
1899
|
+
t12 = /* @__PURE__ */ jsxs("fieldset", {
|
|
1900
|
+
className: "first-run-writing__preference",
|
|
1901
|
+
children: [t10, /* @__PURE__ */ jsx(WritingChoices, {
|
|
1902
|
+
answer,
|
|
1903
|
+
onStyleChange,
|
|
1904
|
+
suggested: t11
|
|
1905
|
+
})]
|
|
1906
|
+
});
|
|
1907
|
+
$[21] = answer;
|
|
1908
|
+
$[22] = onStyleChange;
|
|
1909
|
+
$[23] = t11;
|
|
1910
|
+
$[24] = t12;
|
|
1911
|
+
} else t12 = $[24];
|
|
1912
|
+
let t13;
|
|
1913
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1914
|
+
t13 = /* @__PURE__ */ jsx("legend", { children: "Signature" });
|
|
1915
|
+
$[25] = t13;
|
|
1916
|
+
} else t13 = $[25];
|
|
1917
|
+
let t14;
|
|
1918
|
+
if ($[26] !== profileLabel) {
|
|
1919
|
+
t14 = {
|
|
1920
|
+
value: "profile",
|
|
1921
|
+
label: profileLabel
|
|
1922
|
+
};
|
|
1923
|
+
$[26] = profileLabel;
|
|
1924
|
+
$[27] = t14;
|
|
1925
|
+
} else t14 = $[27];
|
|
1926
|
+
let t15;
|
|
1927
|
+
if ($[28] !== brandName) {
|
|
1928
|
+
t15 = {
|
|
1929
|
+
value: "assistant",
|
|
1930
|
+
label: brandName
|
|
1931
|
+
};
|
|
1932
|
+
$[28] = brandName;
|
|
1933
|
+
$[29] = t15;
|
|
1934
|
+
} else t15 = $[29];
|
|
1935
|
+
let t16;
|
|
1936
|
+
if ($[30] !== t14 || $[31] !== t15) {
|
|
1937
|
+
t16 = [t14, t15];
|
|
1938
|
+
$[30] = t14;
|
|
1939
|
+
$[31] = t15;
|
|
1940
|
+
$[32] = t16;
|
|
1941
|
+
} else t16 = $[32];
|
|
1942
|
+
let t17;
|
|
1943
|
+
if ($[33] !== onSignChange) {
|
|
1944
|
+
t17 = (value) => {
|
|
1945
|
+
if (value === "profile" || value === "assistant") onSignChange(value);
|
|
1946
|
+
};
|
|
1947
|
+
$[33] = onSignChange;
|
|
1948
|
+
$[34] = t17;
|
|
1949
|
+
} else t17 = $[34];
|
|
1950
|
+
let t18;
|
|
1951
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1952
|
+
t18 = /* @__PURE__ */ jsx(Select.Value, {});
|
|
1953
|
+
$[35] = t18;
|
|
1954
|
+
} else t18 = $[35];
|
|
1955
|
+
let t19;
|
|
1956
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1957
|
+
t19 = /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
1958
|
+
className: "first-run-writing__signature-select",
|
|
1959
|
+
"aria-label": "Sign as",
|
|
1960
|
+
children: [t18, /* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })]
|
|
1961
|
+
});
|
|
1962
|
+
$[36] = t19;
|
|
1963
|
+
} else t19 = $[36];
|
|
1964
|
+
let t20;
|
|
1965
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1966
|
+
t20 = /* @__PURE__ */ jsx(Select.ItemIndicator, {});
|
|
1967
|
+
$[37] = t20;
|
|
1968
|
+
} else t20 = $[37];
|
|
1969
|
+
let t21;
|
|
1970
|
+
if ($[38] !== profileLabel) {
|
|
1971
|
+
t21 = /* @__PURE__ */ jsx(Select.ItemText, { children: profileLabel });
|
|
1972
|
+
$[38] = profileLabel;
|
|
1973
|
+
$[39] = t21;
|
|
1974
|
+
} else t21 = $[39];
|
|
1975
|
+
let t22;
|
|
1976
|
+
if ($[40] !== profileLabel || $[41] !== t21) {
|
|
1977
|
+
t22 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
1978
|
+
value: "profile",
|
|
1979
|
+
"aria-label": profileLabel,
|
|
1980
|
+
children: [t20, t21]
|
|
1981
|
+
});
|
|
1982
|
+
$[40] = profileLabel;
|
|
1983
|
+
$[41] = t21;
|
|
1984
|
+
$[42] = t22;
|
|
1985
|
+
} else t22 = $[42];
|
|
1986
|
+
let t23;
|
|
1987
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1988
|
+
t23 = /* @__PURE__ */ jsx(Select.ItemIndicator, {});
|
|
1989
|
+
$[43] = t23;
|
|
1990
|
+
} else t23 = $[43];
|
|
1991
|
+
let t24;
|
|
1992
|
+
if ($[44] !== brandName) {
|
|
1993
|
+
t24 = /* @__PURE__ */ jsx(Select.ItemText, { children: brandName });
|
|
1994
|
+
$[44] = brandName;
|
|
1995
|
+
$[45] = t24;
|
|
1996
|
+
} else t24 = $[45];
|
|
1997
|
+
let t25;
|
|
1998
|
+
if ($[46] !== brandName || $[47] !== t24) {
|
|
1999
|
+
t25 = /* @__PURE__ */ jsxs(Select.Item, {
|
|
2000
|
+
value: "assistant",
|
|
2001
|
+
"aria-label": brandName,
|
|
2002
|
+
children: [t23, t24]
|
|
2003
|
+
});
|
|
2004
|
+
$[46] = brandName;
|
|
2005
|
+
$[47] = t24;
|
|
2006
|
+
$[48] = t25;
|
|
2007
|
+
} else t25 = $[48];
|
|
2008
|
+
let t26;
|
|
2009
|
+
if ($[49] !== t22 || $[50] !== t25) {
|
|
2010
|
+
t26 = /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
2011
|
+
sideOffset: 4,
|
|
2012
|
+
alignItemWithTrigger: false,
|
|
2013
|
+
align: "start",
|
|
2014
|
+
children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsxs(Select.List, { children: [t22, t25] }) })
|
|
2015
|
+
}) });
|
|
2016
|
+
$[49] = t22;
|
|
2017
|
+
$[50] = t25;
|
|
2018
|
+
$[51] = t26;
|
|
2019
|
+
} else t26 = $[51];
|
|
2020
|
+
let t27;
|
|
2021
|
+
if ($[52] !== answer.sign || $[53] !== t16 || $[54] !== t17 || $[55] !== t26) {
|
|
2022
|
+
t27 = /* @__PURE__ */ jsxs("fieldset", {
|
|
2023
|
+
className: "first-run-writing__preference first-run-writing__signature",
|
|
2024
|
+
children: [t13, /* @__PURE__ */ jsxs(Select.Root, {
|
|
2025
|
+
items: t16,
|
|
2026
|
+
value: answer.sign,
|
|
2027
|
+
onValueChange: t17,
|
|
2028
|
+
children: [t19, t26]
|
|
2029
|
+
})]
|
|
2030
|
+
});
|
|
2031
|
+
$[52] = answer.sign;
|
|
2032
|
+
$[53] = t16;
|
|
2033
|
+
$[54] = t17;
|
|
2034
|
+
$[55] = t26;
|
|
2035
|
+
$[56] = t27;
|
|
2036
|
+
} else t27 = $[56];
|
|
2037
|
+
if ($[57] !== t12 || $[58] !== t27) {
|
|
2038
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
2039
|
+
className: "first-run-writing__preferences",
|
|
2040
|
+
children: [t12, t27]
|
|
2041
|
+
});
|
|
2042
|
+
$[57] = t12;
|
|
2043
|
+
$[58] = t27;
|
|
2044
|
+
$[59] = t5;
|
|
2045
|
+
} else t5 = $[59];
|
|
2046
|
+
t1 = "first-run-figure first-run-writing__preview";
|
|
2047
|
+
if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2048
|
+
t2 = /* @__PURE__ */ jsx("h2", {
|
|
2049
|
+
className: "sigvelo-visually-hidden",
|
|
2050
|
+
children: "Email preview"
|
|
2051
|
+
});
|
|
2052
|
+
$[60] = t2;
|
|
2053
|
+
} else t2 = $[60];
|
|
2054
|
+
t3 = working ? /* @__PURE__ */ jsx("p", {
|
|
2055
|
+
className: "first-run-live",
|
|
2056
|
+
children: "Writing your email"
|
|
2057
|
+
}) : sample ? /* @__PURE__ */ jsx(WorkspaceEntityCard, {
|
|
2058
|
+
className: "first-run-writing__email",
|
|
2059
|
+
name: "Example email",
|
|
2060
|
+
icon: /* @__PURE__ */ jsx(AppIcon.Root, {
|
|
2061
|
+
"aria-hidden": "true",
|
|
2062
|
+
size: "xs",
|
|
2063
|
+
variant: "artwork",
|
|
2064
|
+
children: /* @__PURE__ */ jsx(AppIcon.Image, {
|
|
2065
|
+
src: GMAIL_MARK,
|
|
2066
|
+
alt: "",
|
|
2067
|
+
keepMounted: true,
|
|
2068
|
+
fit: "contain",
|
|
2069
|
+
loading: "eager"
|
|
2070
|
+
})
|
|
2071
|
+
}),
|
|
2072
|
+
children: /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(DescriptionList.Root, {
|
|
2073
|
+
align: "start",
|
|
2074
|
+
density: "compact",
|
|
2075
|
+
variant: "plain",
|
|
2076
|
+
children: sample.fields.map(_temp$3)
|
|
2077
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2078
|
+
className: "connected-app-card__body first-run-email-body",
|
|
2079
|
+
children: sample.body
|
|
2080
|
+
})] })
|
|
2081
|
+
}) : null;
|
|
2082
|
+
$[0] = answer;
|
|
2083
|
+
$[1] = brandName;
|
|
2084
|
+
$[2] = onSignChange;
|
|
2085
|
+
$[3] = onStyleChange;
|
|
2086
|
+
$[4] = profileLabel;
|
|
2087
|
+
$[5] = writing.samples;
|
|
2088
|
+
$[6] = writing.status;
|
|
2089
|
+
$[7] = writing.suggested;
|
|
2090
|
+
$[8] = T0;
|
|
2091
|
+
$[9] = t1;
|
|
2092
|
+
$[10] = t2;
|
|
2093
|
+
$[11] = t3;
|
|
2094
|
+
$[12] = t4;
|
|
2095
|
+
$[13] = t5;
|
|
2096
|
+
$[14] = t6;
|
|
2097
|
+
$[15] = t7;
|
|
2098
|
+
$[16] = t8;
|
|
2099
|
+
} else {
|
|
2100
|
+
T0 = $[8];
|
|
2101
|
+
t1 = $[9];
|
|
2102
|
+
t2 = $[10];
|
|
2103
|
+
t3 = $[11];
|
|
2104
|
+
t4 = $[12];
|
|
2105
|
+
t5 = $[13];
|
|
2106
|
+
t6 = $[14];
|
|
2107
|
+
t7 = $[15];
|
|
2108
|
+
t8 = $[16];
|
|
2109
|
+
}
|
|
2110
|
+
let t9;
|
|
2111
|
+
if ($[61] !== t1 || $[62] !== t2 || $[63] !== t3) {
|
|
2112
|
+
t9 = /* @__PURE__ */ jsxs("figure", {
|
|
2113
|
+
className: t1,
|
|
2114
|
+
children: [t2, t3]
|
|
2115
|
+
});
|
|
2116
|
+
$[61] = t1;
|
|
2117
|
+
$[62] = t2;
|
|
2118
|
+
$[63] = t3;
|
|
2119
|
+
$[64] = t9;
|
|
2120
|
+
} else t9 = $[64];
|
|
2121
|
+
let t10;
|
|
2122
|
+
if ($[65] !== t4 || $[66] !== t5 || $[67] !== t9) {
|
|
2123
|
+
t10 = /* @__PURE__ */ jsxs("section", {
|
|
2124
|
+
className: t4,
|
|
2125
|
+
children: [t5, t9]
|
|
2126
|
+
});
|
|
2127
|
+
$[65] = t4;
|
|
2128
|
+
$[66] = t5;
|
|
2129
|
+
$[67] = t9;
|
|
2130
|
+
$[68] = t10;
|
|
2131
|
+
} else t10 = $[68];
|
|
2132
|
+
let t11;
|
|
2133
|
+
if ($[69] !== writing.onRetry || $[70] !== writing.status) {
|
|
2134
|
+
t11 = writing.status === "failed" ? /* @__PURE__ */ jsx(TryAgain, { onClick: writing.onRetry }) : null;
|
|
2135
|
+
$[69] = writing.onRetry;
|
|
2136
|
+
$[70] = writing.status;
|
|
2137
|
+
$[71] = t11;
|
|
2138
|
+
} else t11 = $[71];
|
|
2139
|
+
let t12;
|
|
2140
|
+
if ($[72] !== answer || $[73] !== onReviewed || $[74] !== writing) {
|
|
2141
|
+
t12 = /* @__PURE__ */ jsx(Next, { onSave: () => {
|
|
2142
|
+
writing.onSave(answer);
|
|
2143
|
+
onReviewed();
|
|
2144
|
+
} });
|
|
2145
|
+
$[72] = answer;
|
|
2146
|
+
$[73] = onReviewed;
|
|
2147
|
+
$[74] = writing;
|
|
2148
|
+
$[75] = t12;
|
|
2149
|
+
} else t12 = $[75];
|
|
2150
|
+
let t13;
|
|
2151
|
+
if ($[76] !== t11 || $[77] !== t12) {
|
|
2152
|
+
t13 = /* @__PURE__ */ jsxs(Actions, { children: [t11, t12] });
|
|
2153
|
+
$[76] = t11;
|
|
2154
|
+
$[77] = t12;
|
|
2155
|
+
$[78] = t13;
|
|
2156
|
+
} else t13 = $[78];
|
|
2157
|
+
let t14;
|
|
2158
|
+
if ($[79] !== T0 || $[80] !== t10 || $[81] !== t13 || $[82] !== t6 || $[83] !== t7 || $[84] !== t8) {
|
|
2159
|
+
t14 = /* @__PURE__ */ jsx(T0, {
|
|
2160
|
+
layout: t6,
|
|
2161
|
+
title: t7,
|
|
2162
|
+
lead: t8,
|
|
2163
|
+
body: t10,
|
|
2164
|
+
actions: t13
|
|
2165
|
+
});
|
|
2166
|
+
$[79] = T0;
|
|
2167
|
+
$[80] = t10;
|
|
2168
|
+
$[81] = t13;
|
|
2169
|
+
$[82] = t6;
|
|
2170
|
+
$[83] = t7;
|
|
2171
|
+
$[84] = t8;
|
|
2172
|
+
$[85] = t14;
|
|
2173
|
+
} else t14 = $[85];
|
|
2174
|
+
return t14;
|
|
2175
|
+
}
|
|
2176
|
+
function _temp$3(field) {
|
|
2177
|
+
return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: field.label }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: field.value })] }, field.name);
|
|
2178
|
+
}
|
|
2179
|
+
/** The writing styles available to choose from. */
|
|
2180
|
+
function WritingChoices(t0) {
|
|
2181
|
+
const $ = c(7);
|
|
2182
|
+
const { answer, onStyleChange, suggested } = t0;
|
|
2183
|
+
const { brandName } = useFirstRun();
|
|
2184
|
+
const t1 = answer.style;
|
|
2185
|
+
let t2;
|
|
2186
|
+
if ($[0] !== brandName || $[1] !== suggested) {
|
|
2187
|
+
t2 = STYLES.map((t3) => {
|
|
2188
|
+
const [style, label] = t3;
|
|
2189
|
+
return /* @__PURE__ */ jsx(Choice, {
|
|
2190
|
+
value: style,
|
|
2191
|
+
note: style === suggested ? `${brandName} recommends` : void 0,
|
|
2192
|
+
children: label
|
|
2193
|
+
}, style);
|
|
2194
|
+
});
|
|
2195
|
+
$[0] = brandName;
|
|
2196
|
+
$[1] = suggested;
|
|
2197
|
+
$[2] = t2;
|
|
2198
|
+
} else t2 = $[2];
|
|
2199
|
+
let t3;
|
|
2200
|
+
if ($[3] !== answer.style || $[4] !== onStyleChange || $[5] !== t2) {
|
|
2201
|
+
t3 = /* @__PURE__ */ jsx(RadioGroup.Root, {
|
|
2202
|
+
className: "first-run-choices",
|
|
2203
|
+
orientation: "vertical",
|
|
2204
|
+
"aria-label": "Writing style",
|
|
2205
|
+
value: t1,
|
|
2206
|
+
onValueChange: onStyleChange,
|
|
2207
|
+
children: t2
|
|
2208
|
+
});
|
|
2209
|
+
$[3] = answer.style;
|
|
2210
|
+
$[4] = onStyleChange;
|
|
2211
|
+
$[5] = t2;
|
|
2212
|
+
$[6] = t3;
|
|
2213
|
+
} else t3 = $[6];
|
|
2214
|
+
return t3;
|
|
2215
|
+
}
|
|
2216
|
+
function Choice(t0) {
|
|
2217
|
+
const $ = c(13);
|
|
2218
|
+
const { value, children, note } = t0;
|
|
2219
|
+
const noteId = React.useId();
|
|
2220
|
+
const t1 = note ? noteId : void 0;
|
|
2221
|
+
let t2;
|
|
2222
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2223
|
+
t2 = /* @__PURE__ */ jsx(Radio.Indicator, {});
|
|
2224
|
+
$[0] = t2;
|
|
2225
|
+
} else t2 = $[0];
|
|
2226
|
+
let t3;
|
|
2227
|
+
if ($[1] !== t1 || $[2] !== value) {
|
|
2228
|
+
t3 = /* @__PURE__ */ jsx(Radio.Root, {
|
|
2229
|
+
value,
|
|
2230
|
+
"aria-describedby": t1,
|
|
2231
|
+
children: t2
|
|
2232
|
+
});
|
|
2233
|
+
$[1] = t1;
|
|
2234
|
+
$[2] = value;
|
|
2235
|
+
$[3] = t3;
|
|
2236
|
+
} else t3 = $[3];
|
|
2237
|
+
let t4;
|
|
2238
|
+
if ($[4] !== note || $[5] !== noteId) {
|
|
2239
|
+
t4 = note ? /* @__PURE__ */ jsx("small", {
|
|
2240
|
+
id: noteId,
|
|
2241
|
+
className: "first-run-choice__description",
|
|
2242
|
+
"aria-hidden": "true",
|
|
2243
|
+
children: note
|
|
2244
|
+
}) : null;
|
|
2245
|
+
$[4] = note;
|
|
2246
|
+
$[5] = noteId;
|
|
2247
|
+
$[6] = t4;
|
|
2248
|
+
} else t4 = $[6];
|
|
2249
|
+
let t5;
|
|
2250
|
+
if ($[7] !== children || $[8] !== t4) {
|
|
2251
|
+
t5 = /* @__PURE__ */ jsxs("span", { children: [children, t4] });
|
|
2252
|
+
$[7] = children;
|
|
2253
|
+
$[8] = t4;
|
|
2254
|
+
$[9] = t5;
|
|
2255
|
+
} else t5 = $[9];
|
|
2256
|
+
let t6;
|
|
2257
|
+
if ($[10] !== t3 || $[11] !== t5) {
|
|
2258
|
+
t6 = /* @__PURE__ */ jsxs("label", {
|
|
2259
|
+
className: "first-run-choice",
|
|
2260
|
+
children: [t3, t5]
|
|
2261
|
+
});
|
|
2262
|
+
$[10] = t3;
|
|
2263
|
+
$[11] = t5;
|
|
2264
|
+
$[12] = t6;
|
|
2265
|
+
} else t6 = $[12];
|
|
2266
|
+
return t6;
|
|
2267
|
+
}
|
|
2268
|
+
//#endregion
|
|
2269
|
+
//#region src/components/extension/first-run/AskStep.tsx
|
|
2270
|
+
/** The product's composer, where only the mic works: it plays a spoken example. */
|
|
2271
|
+
function AskStep() {
|
|
2272
|
+
const $ = c(29);
|
|
2273
|
+
const { brandName } = useFirstRun();
|
|
2274
|
+
const [text, setText] = React.useState("");
|
|
2275
|
+
const voice = useExampleVoice(`Hey ${brandName}, every Friday at 4, recap my week…`);
|
|
2276
|
+
const t0 = `Just ask ${brandName}`;
|
|
2277
|
+
const t1 = `If you’re ever unsure how to do something in ${brandName}, just ask. ${brandName} can do everything you can do.`;
|
|
2278
|
+
const t2 = `Message ${brandName}`;
|
|
2279
|
+
const t3 = `Ask ${brandName} for anything`;
|
|
2280
|
+
let t4;
|
|
2281
|
+
if ($[0] !== t2 || $[1] !== t3) {
|
|
2282
|
+
t4 = /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
|
|
2283
|
+
readOnly: true,
|
|
2284
|
+
"aria-label": t2,
|
|
2285
|
+
placeholder: t3
|
|
2286
|
+
}) });
|
|
2287
|
+
$[0] = t2;
|
|
2288
|
+
$[1] = t3;
|
|
2289
|
+
$[2] = t4;
|
|
2290
|
+
} else t4 = $[2];
|
|
2291
|
+
let t5;
|
|
2292
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2293
|
+
t5 = /* @__PURE__ */ jsx(PromptInputTools, { children: /* @__PURE__ */ jsx(PromptInputButton, {
|
|
2294
|
+
inert: true,
|
|
2295
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
2296
|
+
}) });
|
|
2297
|
+
$[3] = t5;
|
|
2298
|
+
} else t5 = $[3];
|
|
2299
|
+
let t6;
|
|
2300
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2301
|
+
t6 = () => setText("");
|
|
2302
|
+
$[4] = t6;
|
|
2303
|
+
} else t6 = $[4];
|
|
2304
|
+
const t7 = voice.played || voice.isListening ? void 0 : "";
|
|
2305
|
+
let t8;
|
|
2306
|
+
if ($[5] !== t7 || $[6] !== voice) {
|
|
2307
|
+
t8 = /* @__PURE__ */ jsx(PromptInputDictation, {
|
|
2308
|
+
voice,
|
|
2309
|
+
beforeStart: t6,
|
|
2310
|
+
"data-target": t7
|
|
2311
|
+
});
|
|
2312
|
+
$[5] = t7;
|
|
2313
|
+
$[6] = voice;
|
|
2314
|
+
$[7] = t8;
|
|
2315
|
+
} else t8 = $[7];
|
|
2316
|
+
let t9;
|
|
2317
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2318
|
+
t9 = /* @__PURE__ */ jsx(PromptInputSubmit, { disabled: true });
|
|
2319
|
+
$[8] = t9;
|
|
2320
|
+
} else t9 = $[8];
|
|
2321
|
+
let t10;
|
|
2322
|
+
if ($[9] !== t8) {
|
|
2323
|
+
t10 = /* @__PURE__ */ jsxs(PromptInputFooter, { children: [t5, /* @__PURE__ */ jsxs(PromptInputFooterEnd, { children: [t8, t9] })] });
|
|
2324
|
+
$[9] = t8;
|
|
2325
|
+
$[10] = t10;
|
|
2326
|
+
} else t10 = $[10];
|
|
2327
|
+
let t11;
|
|
2328
|
+
if ($[11] !== t10 || $[12] !== t4) {
|
|
2329
|
+
t11 = /* @__PURE__ */ jsxs(PromptInput, { children: [t4, t10] });
|
|
2330
|
+
$[11] = t10;
|
|
2331
|
+
$[12] = t4;
|
|
2332
|
+
$[13] = t11;
|
|
2333
|
+
} else t11 = $[13];
|
|
2334
|
+
let t12;
|
|
2335
|
+
if ($[14] !== t11 || $[15] !== text) {
|
|
2336
|
+
t12 = /* @__PURE__ */ jsx(PromptInputProvider, {
|
|
2337
|
+
value: text,
|
|
2338
|
+
onValueChange: setText,
|
|
2339
|
+
children: t11
|
|
2340
|
+
});
|
|
2341
|
+
$[14] = t11;
|
|
2342
|
+
$[15] = text;
|
|
2343
|
+
$[16] = t12;
|
|
2344
|
+
} else t12 = $[16];
|
|
2345
|
+
const t13 = voice.isListening ? "Playing an example" : voice.played ? "Click the mic to see it again" : "Click the mic to see an example";
|
|
2346
|
+
let t14;
|
|
2347
|
+
if ($[17] !== t13) {
|
|
2348
|
+
t14 = /* @__PURE__ */ jsx("figcaption", { children: t13 });
|
|
2349
|
+
$[17] = t13;
|
|
2350
|
+
$[18] = t14;
|
|
2351
|
+
} else t14 = $[18];
|
|
2352
|
+
let t15;
|
|
2353
|
+
if ($[19] !== t12 || $[20] !== t14) {
|
|
2354
|
+
t15 = /* @__PURE__ */ jsxs("figure", {
|
|
2355
|
+
className: "first-run-figure",
|
|
2356
|
+
children: [t12, t14]
|
|
2357
|
+
});
|
|
2358
|
+
$[19] = t12;
|
|
2359
|
+
$[20] = t14;
|
|
2360
|
+
$[21] = t15;
|
|
2361
|
+
} else t15 = $[21];
|
|
2362
|
+
let t16;
|
|
2363
|
+
if ($[22] !== voice.played) {
|
|
2364
|
+
t16 = /* @__PURE__ */ jsx(Actions, { children: voice.played ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsx(NotNow, {}) });
|
|
2365
|
+
$[22] = voice.played;
|
|
2366
|
+
$[23] = t16;
|
|
2367
|
+
} else t16 = $[23];
|
|
2368
|
+
let t17;
|
|
2369
|
+
if ($[24] !== t0 || $[25] !== t1 || $[26] !== t15 || $[27] !== t16) {
|
|
2370
|
+
t17 = /* @__PURE__ */ jsx(Step, {
|
|
2371
|
+
narrow: true,
|
|
2372
|
+
title: t0,
|
|
2373
|
+
lead: t1,
|
|
2374
|
+
body: t15,
|
|
2375
|
+
actions: t16
|
|
2376
|
+
});
|
|
2377
|
+
$[24] = t0;
|
|
2378
|
+
$[25] = t1;
|
|
2379
|
+
$[26] = t15;
|
|
2380
|
+
$[27] = t16;
|
|
2381
|
+
$[28] = t17;
|
|
2382
|
+
} else t17 = $[28];
|
|
2383
|
+
return t17;
|
|
2384
|
+
}
|
|
2385
|
+
const EXAMPLE_WORD_MS = 450;
|
|
2386
|
+
const EXAMPLE_LEVEL_MS = 120;
|
|
2387
|
+
/**
|
|
2388
|
+
* A voice input that speaks `line` one word at a time, the way dictation
|
|
2389
|
+
* delivers final transcripts, with a moving level while it plays.
|
|
2390
|
+
*/
|
|
2391
|
+
function useExampleVoice(line) {
|
|
2392
|
+
const $ = c(21);
|
|
2393
|
+
let t0;
|
|
2394
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2395
|
+
t0 = {
|
|
2396
|
+
transcript: "",
|
|
2397
|
+
said: 0,
|
|
2398
|
+
listening: false,
|
|
2399
|
+
level: 0,
|
|
2400
|
+
played: false
|
|
2401
|
+
};
|
|
2402
|
+
$[0] = t0;
|
|
2403
|
+
} else t0 = $[0];
|
|
2404
|
+
const [state, setState] = React.useState(t0);
|
|
2405
|
+
let t1;
|
|
2406
|
+
if ($[1] !== line || $[2] !== state.listening) {
|
|
2407
|
+
t1 = () => {
|
|
2408
|
+
if (!state.listening) return;
|
|
2409
|
+
const words = line.split(" ");
|
|
2410
|
+
const timer = window.setTimeout(() => setState((previous) => previous.said < words.length ? {
|
|
2411
|
+
...previous,
|
|
2412
|
+
transcript: words[previous.said],
|
|
2413
|
+
said: previous.said + 1
|
|
2414
|
+
} : {
|
|
2415
|
+
...previous,
|
|
2416
|
+
listening: false,
|
|
2417
|
+
level: 0,
|
|
2418
|
+
played: true
|
|
2419
|
+
}), EXAMPLE_WORD_MS);
|
|
2420
|
+
return () => window.clearTimeout(timer);
|
|
2421
|
+
};
|
|
2422
|
+
$[1] = line;
|
|
2423
|
+
$[2] = state.listening;
|
|
2424
|
+
$[3] = t1;
|
|
2425
|
+
} else t1 = $[3];
|
|
2426
|
+
let t2;
|
|
2427
|
+
if ($[4] !== line || $[5] !== state.listening || $[6] !== state.said) {
|
|
2428
|
+
t2 = [
|
|
2429
|
+
state.listening,
|
|
2430
|
+
state.said,
|
|
2431
|
+
line
|
|
2432
|
+
];
|
|
2433
|
+
$[4] = line;
|
|
2434
|
+
$[5] = state.listening;
|
|
2435
|
+
$[6] = state.said;
|
|
2436
|
+
$[7] = t2;
|
|
2437
|
+
} else t2 = $[7];
|
|
2438
|
+
React.useEffect(t1, t2);
|
|
2439
|
+
let t3;
|
|
2440
|
+
let t4;
|
|
2441
|
+
if ($[8] !== state.listening) {
|
|
2442
|
+
t3 = () => {
|
|
2443
|
+
if (!state.listening) return;
|
|
2444
|
+
const timer_0 = window.setInterval(() => setState(_temp$2), EXAMPLE_LEVEL_MS);
|
|
2445
|
+
return () => window.clearInterval(timer_0);
|
|
2446
|
+
};
|
|
2447
|
+
t4 = [state.listening];
|
|
2448
|
+
$[8] = state.listening;
|
|
2449
|
+
$[9] = t3;
|
|
2450
|
+
$[10] = t4;
|
|
2451
|
+
} else {
|
|
2452
|
+
t3 = $[9];
|
|
2453
|
+
t4 = $[10];
|
|
2454
|
+
}
|
|
2455
|
+
React.useEffect(t3, t4);
|
|
2456
|
+
let t5;
|
|
2457
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2458
|
+
t5 = () => setState(_temp2$2);
|
|
2459
|
+
$[11] = t5;
|
|
2460
|
+
} else t5 = $[11];
|
|
2461
|
+
let t6;
|
|
2462
|
+
if ($[12] !== line) {
|
|
2463
|
+
t6 = () => setState((previous_2) => ({
|
|
2464
|
+
...previous_2,
|
|
2465
|
+
transcript: line.split(" ").slice(previous_2.said).join(" "),
|
|
2466
|
+
listening: false,
|
|
2467
|
+
level: 0,
|
|
2468
|
+
played: true
|
|
2469
|
+
}));
|
|
2470
|
+
$[12] = line;
|
|
2471
|
+
$[13] = t6;
|
|
2472
|
+
} else t6 = $[13];
|
|
2473
|
+
let t7;
|
|
2474
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2475
|
+
t7 = () => setState(_temp3$1);
|
|
2476
|
+
$[14] = t7;
|
|
2477
|
+
} else t7 = $[14];
|
|
2478
|
+
let t8;
|
|
2479
|
+
if ($[15] !== state.level || $[16] !== state.listening || $[17] !== state.played || $[18] !== state.transcript || $[19] !== t6) {
|
|
2480
|
+
t8 = {
|
|
2481
|
+
transcript: state.transcript,
|
|
2482
|
+
interimTranscript: null,
|
|
2483
|
+
isListening: state.listening,
|
|
2484
|
+
audioLevel: state.level,
|
|
2485
|
+
error: null,
|
|
2486
|
+
played: state.played,
|
|
2487
|
+
start: t5,
|
|
2488
|
+
stop: t6,
|
|
2489
|
+
clear: t7
|
|
2490
|
+
};
|
|
2491
|
+
$[15] = state.level;
|
|
2492
|
+
$[16] = state.listening;
|
|
2493
|
+
$[17] = state.played;
|
|
2494
|
+
$[18] = state.transcript;
|
|
2495
|
+
$[19] = t6;
|
|
2496
|
+
$[20] = t8;
|
|
2497
|
+
} else t8 = $[20];
|
|
2498
|
+
return t8;
|
|
2499
|
+
}
|
|
2500
|
+
function _temp3$1(previous_3) {
|
|
2501
|
+
return {
|
|
2502
|
+
...previous_3,
|
|
2503
|
+
transcript: ""
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
function _temp2$2(previous_1) {
|
|
2507
|
+
return {
|
|
2508
|
+
...previous_1,
|
|
2509
|
+
transcript: "",
|
|
2510
|
+
said: 0,
|
|
2511
|
+
listening: true
|
|
2512
|
+
};
|
|
2513
|
+
}
|
|
2514
|
+
function _temp$2(previous_0) {
|
|
2515
|
+
return {
|
|
2516
|
+
...previous_0,
|
|
2517
|
+
level: Math.random() * .08
|
|
2518
|
+
};
|
|
2519
|
+
}
|
|
2520
|
+
//#endregion
|
|
2521
|
+
//#region src/components/extension/first-run/steps.tsx
|
|
2522
|
+
function WelcomeStep() {
|
|
2523
|
+
const $ = c(17);
|
|
2524
|
+
const { brandName, brandLogo, next } = useFirstRun();
|
|
2525
|
+
const welcome = React.useRef(null);
|
|
2526
|
+
let t0;
|
|
2527
|
+
if ($[0] !== next) {
|
|
2528
|
+
t0 = () => {
|
|
2529
|
+
for (const animation of welcome.current?.getAnimations({ subtree: true }) ?? []) if (animation.effect?.getComputedTiming().endTime !== Infinity) animation.finish();
|
|
2530
|
+
next();
|
|
2531
|
+
};
|
|
2532
|
+
$[0] = next;
|
|
2533
|
+
$[1] = t0;
|
|
2534
|
+
} else t0 = $[1];
|
|
2535
|
+
const getStarted = t0;
|
|
2536
|
+
let t1;
|
|
2537
|
+
if ($[2] !== brandLogo) {
|
|
2538
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
2539
|
+
className: "first-run-welcome__art",
|
|
2540
|
+
"aria-hidden": "true",
|
|
2541
|
+
children: /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
2542
|
+
name: "first-run-mark",
|
|
2543
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
2544
|
+
className: "first-run-welcome__mark",
|
|
2545
|
+
children: brandLogo
|
|
2546
|
+
})
|
|
2547
|
+
})
|
|
2548
|
+
});
|
|
2549
|
+
$[2] = brandLogo;
|
|
2550
|
+
$[3] = t1;
|
|
2551
|
+
} else t1 = $[3];
|
|
2552
|
+
let t2;
|
|
2553
|
+
if ($[4] !== brandName) {
|
|
2554
|
+
t2 = /* @__PURE__ */ jsxs("h1", { children: ["Meet ", brandName] });
|
|
2555
|
+
$[4] = brandName;
|
|
2556
|
+
$[5] = t2;
|
|
2557
|
+
} else t2 = $[5];
|
|
2558
|
+
let t3;
|
|
2559
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2560
|
+
t3 = /* @__PURE__ */ jsx("p", { children: "Let’s set up your new employee." });
|
|
2561
|
+
$[6] = t3;
|
|
2562
|
+
} else t3 = $[6];
|
|
2563
|
+
let t4;
|
|
2564
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2565
|
+
t4 = /* @__PURE__ */ jsx(ArrowRightIcon, {});
|
|
2566
|
+
$[7] = t4;
|
|
2567
|
+
} else t4 = $[7];
|
|
2568
|
+
let t5;
|
|
2569
|
+
if ($[8] !== getStarted) {
|
|
2570
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
2571
|
+
className: "first-run-welcome__action",
|
|
2572
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
2573
|
+
size: "xl",
|
|
2574
|
+
onClick: getStarted,
|
|
2575
|
+
children: ["Get started", t4]
|
|
2576
|
+
})
|
|
2577
|
+
});
|
|
2578
|
+
$[8] = getStarted;
|
|
2579
|
+
$[9] = t5;
|
|
2580
|
+
} else t5 = $[9];
|
|
2581
|
+
let t6;
|
|
2582
|
+
if ($[10] !== t1 || $[11] !== t2 || $[12] !== t5) {
|
|
2583
|
+
t6 = /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
2584
|
+
name: "first-run-welcome",
|
|
2585
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2586
|
+
className: "first-run-welcome__content",
|
|
2587
|
+
children: [
|
|
2588
|
+
t1,
|
|
2589
|
+
t2,
|
|
2590
|
+
t3,
|
|
2591
|
+
t5
|
|
2592
|
+
]
|
|
2593
|
+
})
|
|
2594
|
+
});
|
|
2595
|
+
$[10] = t1;
|
|
2596
|
+
$[11] = t2;
|
|
2597
|
+
$[12] = t5;
|
|
2598
|
+
$[13] = t6;
|
|
2599
|
+
} else t6 = $[13];
|
|
2600
|
+
let t7;
|
|
2601
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2602
|
+
t7 = /* @__PURE__ */ jsx(PoweredBy, {});
|
|
2603
|
+
$[14] = t7;
|
|
2604
|
+
} else t7 = $[14];
|
|
2605
|
+
let t8;
|
|
2606
|
+
if ($[15] !== t6) {
|
|
2607
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
2608
|
+
ref: welcome,
|
|
2609
|
+
className: "first-run-welcome",
|
|
2610
|
+
children: [t6, t7]
|
|
2611
|
+
});
|
|
2612
|
+
$[15] = t6;
|
|
2613
|
+
$[16] = t8;
|
|
2614
|
+
} else t8 = $[16];
|
|
2615
|
+
return t8;
|
|
2616
|
+
}
|
|
2617
|
+
function SignInStep(t0) {
|
|
2618
|
+
const $ = c(24);
|
|
2619
|
+
const { status, onSignIn, modelConnection } = t0;
|
|
2620
|
+
const { brandName } = useFirstRun();
|
|
2621
|
+
const done = status === "done";
|
|
2622
|
+
useAutoAdvance(done);
|
|
2623
|
+
const t1 = `${brandName} uses it for everything, starting with the rest of setup.`;
|
|
2624
|
+
let t2;
|
|
2625
|
+
if ($[0] !== modelConnection.connected || $[1] !== onSignIn || $[2] !== status) {
|
|
2626
|
+
t2 = /* @__PURE__ */ jsx(ChatGptProviderChoice, {
|
|
2627
|
+
status,
|
|
2628
|
+
onSignIn,
|
|
2629
|
+
modelConnected: modelConnection.connected
|
|
2630
|
+
});
|
|
2631
|
+
$[0] = modelConnection.connected;
|
|
2632
|
+
$[1] = onSignIn;
|
|
2633
|
+
$[2] = status;
|
|
2634
|
+
$[3] = t2;
|
|
2635
|
+
} else t2 = $[3];
|
|
2636
|
+
let t3;
|
|
2637
|
+
if ($[4] !== modelConnection) {
|
|
2638
|
+
t3 = /* @__PURE__ */ jsx(OtherProviderChoice, { connection: modelConnection });
|
|
2639
|
+
$[4] = modelConnection;
|
|
2640
|
+
$[5] = t3;
|
|
2641
|
+
} else t3 = $[5];
|
|
2642
|
+
let t4;
|
|
2643
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
2644
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
2645
|
+
className: "first-run-provider-choices",
|
|
2646
|
+
children: [t2, t3]
|
|
2647
|
+
});
|
|
2648
|
+
$[6] = t2;
|
|
2649
|
+
$[7] = t3;
|
|
2650
|
+
$[8] = t4;
|
|
2651
|
+
} else t4 = $[8];
|
|
2652
|
+
let t5;
|
|
2653
|
+
if ($[9] !== status) {
|
|
2654
|
+
t5 = status === "failed" ? /* @__PURE__ */ jsx("p", {
|
|
2655
|
+
role: "alert",
|
|
2656
|
+
className: "chatgpt-sign-in__error",
|
|
2657
|
+
children: "Sign-in didn’t finish. Try again."
|
|
2658
|
+
}) : null;
|
|
2659
|
+
$[9] = status;
|
|
2660
|
+
$[10] = t5;
|
|
2661
|
+
} else t5 = $[10];
|
|
2662
|
+
let t6;
|
|
2663
|
+
if ($[11] !== t4 || $[12] !== t5) {
|
|
2664
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [t4, t5] });
|
|
2665
|
+
$[11] = t4;
|
|
2666
|
+
$[12] = t5;
|
|
2667
|
+
$[13] = t6;
|
|
2668
|
+
} else t6 = $[13];
|
|
2669
|
+
let t7;
|
|
2670
|
+
if ($[14] !== done || $[15] !== modelConnection.connected) {
|
|
2671
|
+
t7 = done || modelConnection.connected ? /* @__PURE__ */ jsx(Next, {}) : null;
|
|
2672
|
+
$[14] = done;
|
|
2673
|
+
$[15] = modelConnection.connected;
|
|
2674
|
+
$[16] = t7;
|
|
2675
|
+
} else t7 = $[16];
|
|
2676
|
+
let t8;
|
|
2677
|
+
if ($[17] !== t7) {
|
|
2678
|
+
t8 = /* @__PURE__ */ jsx(Actions, { children: t7 });
|
|
2679
|
+
$[17] = t7;
|
|
2680
|
+
$[18] = t8;
|
|
2681
|
+
} else t8 = $[18];
|
|
2682
|
+
const t9 = status === "waiting" ? "Waiting for ChatGPT" : done ? "Signed in with ChatGPT" : "";
|
|
2683
|
+
let t10;
|
|
2684
|
+
if ($[19] !== t1 || $[20] !== t6 || $[21] !== t8 || $[22] !== t9) {
|
|
2685
|
+
t10 = /* @__PURE__ */ jsx(Step, {
|
|
2686
|
+
title: "Connect your AI",
|
|
2687
|
+
lead: t1,
|
|
2688
|
+
body: t6,
|
|
2689
|
+
actions: t8,
|
|
2690
|
+
announce: t9
|
|
2691
|
+
});
|
|
2692
|
+
$[19] = t1;
|
|
2693
|
+
$[20] = t6;
|
|
2694
|
+
$[21] = t8;
|
|
2695
|
+
$[22] = t9;
|
|
2696
|
+
$[23] = t10;
|
|
2697
|
+
} else t10 = $[23];
|
|
2698
|
+
return t10;
|
|
2699
|
+
}
|
|
2700
|
+
function ChatGptProviderChoice(t0) {
|
|
2701
|
+
const $ = c(27);
|
|
2702
|
+
const { status, onSignIn, modelConnected } = t0;
|
|
2703
|
+
const { brandName, go } = useFirstRun();
|
|
2704
|
+
const descriptionId = React.useId();
|
|
2705
|
+
const done = status === "done";
|
|
2706
|
+
const label = status === "waiting" ? "Waiting for ChatGPT…" : done ? modelConnected ? "Use ChatGPT" : "Already signed in" : "Sign in with ChatGPT";
|
|
2707
|
+
const t1 = status === "waiting";
|
|
2708
|
+
const t2 = status === "waiting";
|
|
2709
|
+
const t3 = status === "waiting" ? "Waiting for ChatGPT" : done && !modelConnected ? "Use ChatGPT, already signed in" : label;
|
|
2710
|
+
let t4;
|
|
2711
|
+
if ($[0] !== done || $[1] !== go || $[2] !== onSignIn) {
|
|
2712
|
+
t4 = () => {
|
|
2713
|
+
onSignIn();
|
|
2714
|
+
if (done) go("chrome-profile");
|
|
2715
|
+
};
|
|
2716
|
+
$[0] = done;
|
|
2717
|
+
$[1] = go;
|
|
2718
|
+
$[2] = onSignIn;
|
|
2719
|
+
$[3] = t4;
|
|
2720
|
+
} else t4 = $[3];
|
|
2721
|
+
let t5;
|
|
2722
|
+
if ($[4] !== status) {
|
|
2723
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
2724
|
+
className: "first-run-provider-logo",
|
|
2725
|
+
"aria-hidden": "true",
|
|
2726
|
+
children: status === "waiting" ? /* @__PURE__ */ jsx(SpinnerIcon, {
|
|
2727
|
+
className: "sigvelo-icon--spinner",
|
|
2728
|
+
size: 80,
|
|
2729
|
+
strokeWidth: 1.75
|
|
2730
|
+
}) : /* @__PURE__ */ jsx(ProviderLogo, {
|
|
2731
|
+
provider: "openai",
|
|
2732
|
+
width: 80,
|
|
2733
|
+
height: 80
|
|
2734
|
+
})
|
|
2735
|
+
});
|
|
2736
|
+
$[4] = status;
|
|
2737
|
+
$[5] = t5;
|
|
2738
|
+
} else t5 = $[5];
|
|
2739
|
+
let t6;
|
|
2740
|
+
if ($[6] !== done || $[7] !== status) {
|
|
2741
|
+
t6 = !done && status !== "waiting" ? /* @__PURE__ */ jsx(ArrowUpRightIcon, { "aria-hidden": "true" }) : null;
|
|
2742
|
+
$[6] = done;
|
|
2743
|
+
$[7] = status;
|
|
2744
|
+
$[8] = t6;
|
|
2745
|
+
} else t6 = $[8];
|
|
2746
|
+
let t7;
|
|
2747
|
+
if ($[9] !== label || $[10] !== t6) {
|
|
2748
|
+
t7 = /* @__PURE__ */ jsxs("span", {
|
|
2749
|
+
className: "first-run-provider-label first-run-provider-label--external",
|
|
2750
|
+
children: [label, t6]
|
|
2751
|
+
});
|
|
2752
|
+
$[9] = label;
|
|
2753
|
+
$[10] = t6;
|
|
2754
|
+
$[11] = t7;
|
|
2755
|
+
} else t7 = $[11];
|
|
2756
|
+
let t8;
|
|
2757
|
+
if ($[12] !== descriptionId || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t7) {
|
|
2758
|
+
t8 = /* @__PURE__ */ jsxs(Button, {
|
|
2759
|
+
className: "first-run-provider-action",
|
|
2760
|
+
variant: "ghost",
|
|
2761
|
+
color: "neutral",
|
|
2762
|
+
disabled: t1,
|
|
2763
|
+
"aria-busy": t2,
|
|
2764
|
+
"aria-describedby": descriptionId,
|
|
2765
|
+
"aria-label": t3,
|
|
2766
|
+
onClick: t4,
|
|
2767
|
+
children: [t5, t7]
|
|
2768
|
+
});
|
|
2769
|
+
$[12] = descriptionId;
|
|
2770
|
+
$[13] = t1;
|
|
2771
|
+
$[14] = t2;
|
|
2772
|
+
$[15] = t3;
|
|
2773
|
+
$[16] = t4;
|
|
2774
|
+
$[17] = t5;
|
|
2775
|
+
$[18] = t7;
|
|
2776
|
+
$[19] = t8;
|
|
2777
|
+
} else t8 = $[19];
|
|
2778
|
+
let t9;
|
|
2779
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2780
|
+
t9 = /* @__PURE__ */ jsx("a", {
|
|
2781
|
+
href: "https://help.openai.com/en/articles/7730893-data-controls-faq",
|
|
2782
|
+
target: "_blank",
|
|
2783
|
+
rel: "noopener noreferrer",
|
|
2784
|
+
children: "data controls"
|
|
2785
|
+
});
|
|
2786
|
+
$[20] = t9;
|
|
2787
|
+
} else t9 = $[20];
|
|
2788
|
+
let t10;
|
|
2789
|
+
if ($[21] !== brandName || $[22] !== descriptionId) {
|
|
2790
|
+
t10 = /* @__PURE__ */ jsxs("p", {
|
|
2791
|
+
id: descriptionId,
|
|
2792
|
+
className: "first-run-provider-subtitle",
|
|
923
2793
|
children: [
|
|
924
|
-
"Anything you can ask ",
|
|
925
2794
|
brandName,
|
|
926
|
-
"
|
|
2795
|
+
" never sees your password. Control how OpenAI uses your conversations for model training in ChatGPT’s",
|
|
2796
|
+
" ",
|
|
2797
|
+
t9,
|
|
2798
|
+
"."
|
|
927
2799
|
]
|
|
928
|
-
})
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
2800
|
+
});
|
|
2801
|
+
$[21] = brandName;
|
|
2802
|
+
$[22] = descriptionId;
|
|
2803
|
+
$[23] = t10;
|
|
2804
|
+
} else t10 = $[23];
|
|
2805
|
+
let t11;
|
|
2806
|
+
if ($[24] !== t10 || $[25] !== t8) {
|
|
2807
|
+
t11 = /* @__PURE__ */ jsxs(Card, {
|
|
2808
|
+
className: "first-run-provider-choice first-run-provider-choice--linked",
|
|
2809
|
+
children: [t8, t10]
|
|
2810
|
+
});
|
|
2811
|
+
$[24] = t10;
|
|
2812
|
+
$[25] = t8;
|
|
2813
|
+
$[26] = t11;
|
|
2814
|
+
} else t11 = $[26];
|
|
2815
|
+
return t11;
|
|
937
2816
|
}
|
|
938
|
-
|
|
939
|
-
|
|
2817
|
+
function OtherProviderChoice(t0) {
|
|
2818
|
+
const $ = c(18);
|
|
2819
|
+
const { connection: modelConnection } = t0;
|
|
2820
|
+
const { go } = useFirstRun();
|
|
2821
|
+
const descriptionId = React.useId();
|
|
2822
|
+
const t1 = modelConnection.connected ? `Configure ${modelConnection.value.model}` : "Use a different provider";
|
|
2823
|
+
let t2;
|
|
2824
|
+
if ($[0] !== go) {
|
|
2825
|
+
t2 = () => go("model-connection");
|
|
2826
|
+
$[0] = go;
|
|
2827
|
+
$[1] = t2;
|
|
2828
|
+
} else t2 = $[1];
|
|
2829
|
+
let t3;
|
|
2830
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2831
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
2832
|
+
className: "first-run-provider-logo",
|
|
2833
|
+
"aria-hidden": "true",
|
|
2834
|
+
children: /* @__PURE__ */ jsx(LaptopIcon, {
|
|
2835
|
+
size: 48,
|
|
2836
|
+
strokeWidth: 1.5
|
|
2837
|
+
})
|
|
2838
|
+
});
|
|
2839
|
+
$[2] = t3;
|
|
2840
|
+
} else t3 = $[2];
|
|
2841
|
+
const t4 = modelConnection.connected ? modelConnection.value.model : "Use a different provider";
|
|
2842
|
+
let t5;
|
|
2843
|
+
if ($[3] !== t4) {
|
|
2844
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
2845
|
+
className: "first-run-provider-label",
|
|
2846
|
+
children: t4
|
|
2847
|
+
});
|
|
2848
|
+
$[3] = t4;
|
|
2849
|
+
$[4] = t5;
|
|
2850
|
+
} else t5 = $[4];
|
|
2851
|
+
let t6;
|
|
2852
|
+
if ($[5] !== descriptionId || $[6] !== t1 || $[7] !== t2 || $[8] !== t5) {
|
|
2853
|
+
t6 = /* @__PURE__ */ jsxs(Button, {
|
|
2854
|
+
className: "first-run-provider-action",
|
|
2855
|
+
variant: "ghost",
|
|
2856
|
+
color: "neutral",
|
|
2857
|
+
"aria-describedby": descriptionId,
|
|
2858
|
+
"aria-label": t1,
|
|
2859
|
+
onClick: t2,
|
|
2860
|
+
children: [t3, t5]
|
|
2861
|
+
});
|
|
2862
|
+
$[5] = descriptionId;
|
|
2863
|
+
$[6] = t1;
|
|
2864
|
+
$[7] = t2;
|
|
2865
|
+
$[8] = t5;
|
|
2866
|
+
$[9] = t6;
|
|
2867
|
+
} else t6 = $[9];
|
|
2868
|
+
let t7;
|
|
2869
|
+
if ($[10] !== modelConnection.connected) {
|
|
2870
|
+
t7 = modelConnection.connected ? "Your model is connected." : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2871
|
+
"Choose another AI provider, or keep processing on this computer with",
|
|
2872
|
+
" ",
|
|
2873
|
+
/* @__PURE__ */ jsx("a", {
|
|
2874
|
+
href: "https://docs.ollama.com/api/openai-compatibility",
|
|
2875
|
+
target: "_blank",
|
|
2876
|
+
rel: "noopener noreferrer",
|
|
2877
|
+
children: "local AI"
|
|
2878
|
+
}),
|
|
2879
|
+
"."
|
|
2880
|
+
] });
|
|
2881
|
+
$[10] = modelConnection.connected;
|
|
2882
|
+
$[11] = t7;
|
|
2883
|
+
} else t7 = $[11];
|
|
2884
|
+
let t8;
|
|
2885
|
+
if ($[12] !== descriptionId || $[13] !== t7) {
|
|
2886
|
+
t8 = /* @__PURE__ */ jsx("p", {
|
|
2887
|
+
id: descriptionId,
|
|
2888
|
+
className: "first-run-provider-subtitle",
|
|
2889
|
+
children: t7
|
|
2890
|
+
});
|
|
2891
|
+
$[12] = descriptionId;
|
|
2892
|
+
$[13] = t7;
|
|
2893
|
+
$[14] = t8;
|
|
2894
|
+
} else t8 = $[14];
|
|
2895
|
+
let t9;
|
|
2896
|
+
if ($[15] !== t6 || $[16] !== t8) {
|
|
2897
|
+
t9 = /* @__PURE__ */ jsxs(Card, {
|
|
2898
|
+
className: "first-run-provider-choice first-run-provider-choice--linked",
|
|
2899
|
+
children: [t6, t8]
|
|
2900
|
+
});
|
|
2901
|
+
$[15] = t6;
|
|
2902
|
+
$[16] = t8;
|
|
2903
|
+
$[17] = t9;
|
|
2904
|
+
} else t9 = $[17];
|
|
2905
|
+
return t9;
|
|
2906
|
+
}
|
|
2907
|
+
function ChromeProfileStep(t0) {
|
|
2908
|
+
const $ = c(32);
|
|
2909
|
+
const { email, signedIn } = t0;
|
|
940
2910
|
const { brandName } = useFirstRun();
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
2911
|
+
let t1;
|
|
2912
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2913
|
+
t1 = /* @__PURE__ */ jsx("img", {
|
|
2914
|
+
src: CHROME_MARK,
|
|
2915
|
+
alt: "",
|
|
2916
|
+
"aria-hidden": "true",
|
|
2917
|
+
width: 24,
|
|
2918
|
+
height: 24
|
|
2919
|
+
});
|
|
2920
|
+
$[0] = t1;
|
|
2921
|
+
} else t1 = $[0];
|
|
2922
|
+
let t2;
|
|
2923
|
+
if ($[1] !== brandName) {
|
|
2924
|
+
t2 = /* @__PURE__ */ jsxs("span", {
|
|
2925
|
+
className: "first-run-profile-heading",
|
|
2926
|
+
children: [t1, /* @__PURE__ */ jsxs("span", { children: [brandName, " runs in a Chrome profile"] })]
|
|
2927
|
+
});
|
|
2928
|
+
$[1] = brandName;
|
|
2929
|
+
$[2] = t2;
|
|
2930
|
+
} else t2 = $[2];
|
|
2931
|
+
const t3 = `${brandName} doesn’t retain your data. Everything stays on this device except task information sent to your AI provider or connected apps.`;
|
|
2932
|
+
let t4;
|
|
2933
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2934
|
+
t4 = /* @__PURE__ */ jsx("section", {});
|
|
2935
|
+
$[3] = t4;
|
|
2936
|
+
} else t4 = $[3];
|
|
2937
|
+
const t5 = signedIn ? email : void 0;
|
|
2938
|
+
let t6;
|
|
2939
|
+
if ($[4] !== t5) {
|
|
2940
|
+
t6 = /* @__PURE__ */ jsx(Avatar.Root, {
|
|
2941
|
+
size: "lg",
|
|
2942
|
+
shape: "circle",
|
|
2943
|
+
"aria-hidden": "true",
|
|
2944
|
+
children: /* @__PURE__ */ jsx(ProfileInitial, { email: t5 })
|
|
2945
|
+
});
|
|
2946
|
+
$[4] = t5;
|
|
2947
|
+
$[5] = t6;
|
|
2948
|
+
} else t6 = $[5];
|
|
2949
|
+
const t7 = signedIn ? email || "Your Chrome profile" : "Not signed in";
|
|
2950
|
+
let t8;
|
|
2951
|
+
if ($[6] !== t7) {
|
|
2952
|
+
t8 = /* @__PURE__ */ jsx("strong", { children: t7 });
|
|
2953
|
+
$[6] = t7;
|
|
2954
|
+
$[7] = t8;
|
|
2955
|
+
} else t8 = $[7];
|
|
2956
|
+
let t9;
|
|
2957
|
+
if ($[8] !== brandName || $[9] !== signedIn) {
|
|
2958
|
+
t9 = signedIn ? `${brandName} will use this signed-in Chrome profile.` : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2959
|
+
/* @__PURE__ */ jsx("a", {
|
|
2960
|
+
href: "https://support.google.com/chrome/answer/185277",
|
|
2961
|
+
target: "_blank",
|
|
2962
|
+
rel: "noopener noreferrer",
|
|
2963
|
+
children: "Sign in with a Google Account"
|
|
2964
|
+
}),
|
|
2965
|
+
", or",
|
|
2966
|
+
" ",
|
|
2967
|
+
/* @__PURE__ */ jsx("a", {
|
|
2968
|
+
href: "https://support.google.com/accounts/answer/27441",
|
|
2969
|
+
target: "_blank",
|
|
2970
|
+
rel: "noopener noreferrer",
|
|
2971
|
+
children: "create one"
|
|
2972
|
+
}),
|
|
2973
|
+
" ",
|
|
2974
|
+
"with a Gmail address or an existing email address from Microsoft or another provider. You can also continue without signing in."
|
|
2975
|
+
] });
|
|
2976
|
+
$[8] = brandName;
|
|
2977
|
+
$[9] = signedIn;
|
|
2978
|
+
$[10] = t9;
|
|
2979
|
+
} else t9 = $[10];
|
|
2980
|
+
let t10;
|
|
2981
|
+
if ($[11] !== t9) {
|
|
2982
|
+
t10 = /* @__PURE__ */ jsx("span", { children: t9 });
|
|
2983
|
+
$[11] = t9;
|
|
2984
|
+
$[12] = t10;
|
|
2985
|
+
} else t10 = $[12];
|
|
2986
|
+
let t11;
|
|
2987
|
+
if ($[13] !== t10 || $[14] !== t8) {
|
|
2988
|
+
t11 = /* @__PURE__ */ jsxs("div", {
|
|
2989
|
+
className: "first-run-profile-card__identity",
|
|
2990
|
+
children: [t8, t10]
|
|
2991
|
+
});
|
|
2992
|
+
$[13] = t10;
|
|
2993
|
+
$[14] = t8;
|
|
2994
|
+
$[15] = t11;
|
|
2995
|
+
} else t11 = $[15];
|
|
2996
|
+
let t12;
|
|
2997
|
+
if ($[16] !== t11 || $[17] !== t6) {
|
|
2998
|
+
t12 = /* @__PURE__ */ jsxs(Card, {
|
|
2999
|
+
render: t4,
|
|
3000
|
+
className: "first-run-profile-card",
|
|
3001
|
+
size: "sm",
|
|
3002
|
+
"aria-label": "Chrome profile",
|
|
3003
|
+
children: [t6, t11]
|
|
3004
|
+
});
|
|
3005
|
+
$[16] = t11;
|
|
3006
|
+
$[17] = t6;
|
|
3007
|
+
$[18] = t12;
|
|
3008
|
+
} else t12 = $[18];
|
|
3009
|
+
let t13;
|
|
3010
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3011
|
+
t13 = /* @__PURE__ */ jsx(ShieldCheck, {
|
|
3012
|
+
size: 16,
|
|
3013
|
+
strokeWidth: 1.75
|
|
3014
|
+
});
|
|
3015
|
+
$[19] = t13;
|
|
3016
|
+
} else t13 = $[19];
|
|
3017
|
+
let t14;
|
|
3018
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3019
|
+
t14 = /* @__PURE__ */ jsx("a", {
|
|
3020
|
+
href: "https://support.google.com/chrome/a/answer/7532419",
|
|
3021
|
+
target: "_blank",
|
|
3022
|
+
rel: "noopener noreferrer",
|
|
3023
|
+
children: "managed Chrome settings"
|
|
3024
|
+
});
|
|
3025
|
+
$[20] = t14;
|
|
3026
|
+
} else t14 = $[20];
|
|
3027
|
+
let t15;
|
|
3028
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3029
|
+
t15 = /* @__PURE__ */ jsx("a", {
|
|
3030
|
+
href: "https://support.google.com/a/answer/7281227",
|
|
3031
|
+
target: "_blank",
|
|
3032
|
+
rel: "noopener noreferrer",
|
|
3033
|
+
children: "Google Workspace app controls"
|
|
3034
|
+
});
|
|
3035
|
+
$[21] = t15;
|
|
3036
|
+
} else t15 = $[21];
|
|
3037
|
+
let t16;
|
|
3038
|
+
if ($[22] !== brandName) {
|
|
3039
|
+
t16 = /* @__PURE__ */ jsx("div", {
|
|
3040
|
+
className: "first-run-notes",
|
|
3041
|
+
children: /* @__PURE__ */ jsxs(Note, {
|
|
3042
|
+
icon: t13,
|
|
3043
|
+
children: [
|
|
3044
|
+
"An administrator can use",
|
|
3045
|
+
" ",
|
|
3046
|
+
t14,
|
|
3047
|
+
" ",
|
|
3048
|
+
"to limit the sites ",
|
|
3049
|
+
brandName,
|
|
3050
|
+
" can visit, and",
|
|
3051
|
+
" ",
|
|
3052
|
+
t15,
|
|
3053
|
+
" ",
|
|
3054
|
+
"to manage Google app connections."
|
|
3055
|
+
]
|
|
3056
|
+
})
|
|
3057
|
+
});
|
|
3058
|
+
$[22] = brandName;
|
|
3059
|
+
$[23] = t16;
|
|
3060
|
+
} else t16 = $[23];
|
|
3061
|
+
let t17;
|
|
3062
|
+
if ($[24] !== t12 || $[25] !== t16) {
|
|
3063
|
+
t17 = /* @__PURE__ */ jsxs(Fragment, { children: [t12, t16] });
|
|
3064
|
+
$[24] = t12;
|
|
3065
|
+
$[25] = t16;
|
|
3066
|
+
$[26] = t17;
|
|
3067
|
+
} else t17 = $[26];
|
|
3068
|
+
let t18;
|
|
3069
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3070
|
+
t18 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsx(Next, {}) });
|
|
3071
|
+
$[27] = t18;
|
|
3072
|
+
} else t18 = $[27];
|
|
3073
|
+
let t19;
|
|
3074
|
+
if ($[28] !== t17 || $[29] !== t2 || $[30] !== t3) {
|
|
3075
|
+
t19 = /* @__PURE__ */ jsx(Step, {
|
|
3076
|
+
title: t2,
|
|
3077
|
+
lead: t3,
|
|
3078
|
+
body: t17,
|
|
3079
|
+
actions: t18
|
|
3080
|
+
});
|
|
3081
|
+
$[28] = t17;
|
|
3082
|
+
$[29] = t2;
|
|
3083
|
+
$[30] = t3;
|
|
3084
|
+
$[31] = t19;
|
|
3085
|
+
} else t19 = $[31];
|
|
3086
|
+
return t19;
|
|
3087
|
+
}
|
|
3088
|
+
/** A Chrome profile's avatar: its email's first letter, or a person when signed out. */
|
|
3089
|
+
function ProfileInitial(t0) {
|
|
3090
|
+
const $ = c(4);
|
|
3091
|
+
const { email } = t0;
|
|
3092
|
+
let t1;
|
|
3093
|
+
if ($[0] !== email) {
|
|
3094
|
+
t1 = email ? Array.from(email)[0].toUpperCase() : /* @__PURE__ */ jsx(UserIcon, {});
|
|
3095
|
+
$[0] = email;
|
|
3096
|
+
$[1] = t1;
|
|
3097
|
+
} else t1 = $[1];
|
|
3098
|
+
let t2;
|
|
3099
|
+
if ($[2] !== t1) {
|
|
3100
|
+
t2 = /* @__PURE__ */ jsx(Avatar.Fallback, { children: t1 });
|
|
3101
|
+
$[2] = t1;
|
|
3102
|
+
$[3] = t2;
|
|
3103
|
+
} else t2 = $[3];
|
|
3104
|
+
return t2;
|
|
3105
|
+
}
|
|
3106
|
+
function HistoryChoiceStep(t0) {
|
|
3107
|
+
const $ = c(39);
|
|
3108
|
+
const { history, skipTo } = t0;
|
|
3109
|
+
const { brandName, go, titleId } = useFirstRun();
|
|
3110
|
+
const t1 = `How should ${brandName} get started?`;
|
|
3111
|
+
const t2 = `Choose whether ${brandName} should prepare work from this Chrome profile.`;
|
|
3112
|
+
const t3 = `Choose how ${brandName} gets started`;
|
|
3113
|
+
const t4 = `${titleId}-history-choice`;
|
|
3114
|
+
const t5 = `${titleId}-history-description`;
|
|
3115
|
+
let t6;
|
|
3116
|
+
if ($[0] !== go || $[1] !== history) {
|
|
3117
|
+
t6 = () => {
|
|
3118
|
+
history.onSetUpFromHistory();
|
|
3119
|
+
go("preparation");
|
|
3120
|
+
};
|
|
3121
|
+
$[0] = go;
|
|
3122
|
+
$[1] = history;
|
|
3123
|
+
$[2] = t6;
|
|
3124
|
+
} else t6 = $[2];
|
|
3125
|
+
let t7;
|
|
3126
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3127
|
+
t7 = /* @__PURE__ */ jsx("span", {
|
|
3128
|
+
className: "first-run-provider-logo",
|
|
3129
|
+
"aria-hidden": "true",
|
|
3130
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
3131
|
+
src: CHROME_MARK,
|
|
3132
|
+
alt: "",
|
|
3133
|
+
width: 48,
|
|
3134
|
+
height: 48
|
|
3135
|
+
})
|
|
3136
|
+
});
|
|
3137
|
+
$[3] = t7;
|
|
3138
|
+
} else t7 = $[3];
|
|
3139
|
+
const t8 = `${titleId}-history-choice`;
|
|
3140
|
+
let t9;
|
|
3141
|
+
if ($[4] !== t8) {
|
|
3142
|
+
t9 = /* @__PURE__ */ jsx("span", {
|
|
3143
|
+
id: t8,
|
|
3144
|
+
className: "first-run-provider-label",
|
|
3145
|
+
children: "Set up from history"
|
|
3146
|
+
});
|
|
3147
|
+
$[4] = t8;
|
|
3148
|
+
$[5] = t9;
|
|
3149
|
+
} else t9 = $[5];
|
|
3150
|
+
const t10 = `${titleId}-history-description`;
|
|
3151
|
+
let t11;
|
|
3152
|
+
if ($[6] !== t10) {
|
|
3153
|
+
t11 = /* @__PURE__ */ jsx("span", {
|
|
3154
|
+
id: t10,
|
|
3155
|
+
className: "first-run-provider-subtitle",
|
|
3156
|
+
children: "Use your Chrome profile’s history and sent emails to suggest projects, people, writing preferences, automations and schedules before your first task."
|
|
3157
|
+
});
|
|
3158
|
+
$[6] = t10;
|
|
3159
|
+
$[7] = t11;
|
|
3160
|
+
} else t11 = $[7];
|
|
3161
|
+
let t12;
|
|
3162
|
+
if ($[8] !== t11 || $[9] !== t4 || $[10] !== t5 || $[11] !== t6 || $[12] !== t9) {
|
|
3163
|
+
t12 = /* @__PURE__ */ jsxs(Button, {
|
|
3164
|
+
type: "button",
|
|
3165
|
+
className: "first-run-provider-choice",
|
|
3166
|
+
variant: "surface",
|
|
3167
|
+
color: "neutral",
|
|
3168
|
+
size: "sm",
|
|
3169
|
+
"aria-labelledby": t4,
|
|
3170
|
+
"aria-describedby": t5,
|
|
3171
|
+
onClick: t6,
|
|
3172
|
+
children: [
|
|
3173
|
+
t7,
|
|
3174
|
+
t9,
|
|
3175
|
+
t11
|
|
3176
|
+
]
|
|
3177
|
+
});
|
|
3178
|
+
$[8] = t11;
|
|
3179
|
+
$[9] = t4;
|
|
3180
|
+
$[10] = t5;
|
|
3181
|
+
$[11] = t6;
|
|
3182
|
+
$[12] = t9;
|
|
3183
|
+
$[13] = t12;
|
|
3184
|
+
} else t12 = $[13];
|
|
3185
|
+
const t13 = `${titleId}-skip-choice`;
|
|
3186
|
+
const t14 = `${titleId}-skip-description`;
|
|
3187
|
+
let t15;
|
|
3188
|
+
if ($[14] !== go || $[15] !== history || $[16] !== skipTo) {
|
|
3189
|
+
t15 = () => {
|
|
3190
|
+
history.onSkipForNow();
|
|
3191
|
+
if (skipTo) go(skipTo);
|
|
3192
|
+
};
|
|
3193
|
+
$[14] = go;
|
|
3194
|
+
$[15] = history;
|
|
3195
|
+
$[16] = skipTo;
|
|
3196
|
+
$[17] = t15;
|
|
3197
|
+
} else t15 = $[17];
|
|
3198
|
+
let t16;
|
|
3199
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3200
|
+
t16 = /* @__PURE__ */ jsx("span", {
|
|
3201
|
+
className: "first-run-provider-logo",
|
|
3202
|
+
"aria-hidden": "true",
|
|
3203
|
+
children: /* @__PURE__ */ jsx(LaptopIcon, {
|
|
3204
|
+
size: 48,
|
|
3205
|
+
strokeWidth: 1.5
|
|
3206
|
+
})
|
|
3207
|
+
});
|
|
3208
|
+
$[18] = t16;
|
|
3209
|
+
} else t16 = $[18];
|
|
3210
|
+
const t17 = `${titleId}-skip-choice`;
|
|
3211
|
+
let t18;
|
|
3212
|
+
if ($[19] !== t17) {
|
|
3213
|
+
t18 = /* @__PURE__ */ jsx("span", {
|
|
3214
|
+
id: t17,
|
|
3215
|
+
className: "first-run-provider-label",
|
|
3216
|
+
children: "Skip for now"
|
|
3217
|
+
});
|
|
3218
|
+
$[19] = t17;
|
|
3219
|
+
$[20] = t18;
|
|
3220
|
+
} else t18 = $[20];
|
|
3221
|
+
const t19 = `${titleId}-skip-description`;
|
|
3222
|
+
let t20;
|
|
3223
|
+
if ($[21] !== brandName || $[22] !== t19) {
|
|
3224
|
+
t20 = /* @__PURE__ */ jsxs("span", {
|
|
3225
|
+
id: t19,
|
|
3226
|
+
className: "first-run-provider-subtitle",
|
|
3227
|
+
children: [
|
|
3228
|
+
"Skip browser history for setup. ",
|
|
3229
|
+
brandName,
|
|
3230
|
+
" will still learn what you need as you work."
|
|
3231
|
+
]
|
|
3232
|
+
});
|
|
3233
|
+
$[21] = brandName;
|
|
3234
|
+
$[22] = t19;
|
|
3235
|
+
$[23] = t20;
|
|
3236
|
+
} else t20 = $[23];
|
|
3237
|
+
let t21;
|
|
3238
|
+
if ($[24] !== t13 || $[25] !== t14 || $[26] !== t15 || $[27] !== t18 || $[28] !== t20) {
|
|
3239
|
+
t21 = /* @__PURE__ */ jsxs(Button, {
|
|
3240
|
+
type: "button",
|
|
3241
|
+
className: "first-run-provider-choice",
|
|
3242
|
+
variant: "surface",
|
|
3243
|
+
color: "neutral",
|
|
3244
|
+
size: "sm",
|
|
3245
|
+
"aria-labelledby": t13,
|
|
3246
|
+
"aria-describedby": t14,
|
|
3247
|
+
onClick: t15,
|
|
3248
|
+
children: [
|
|
3249
|
+
t16,
|
|
3250
|
+
t18,
|
|
3251
|
+
t20
|
|
3252
|
+
]
|
|
3253
|
+
});
|
|
3254
|
+
$[24] = t13;
|
|
3255
|
+
$[25] = t14;
|
|
3256
|
+
$[26] = t15;
|
|
3257
|
+
$[27] = t18;
|
|
3258
|
+
$[28] = t20;
|
|
3259
|
+
$[29] = t21;
|
|
3260
|
+
} else t21 = $[29];
|
|
3261
|
+
let t22;
|
|
3262
|
+
if ($[30] !== t12 || $[31] !== t21 || $[32] !== t3) {
|
|
3263
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
3264
|
+
className: "first-run-provider-choices",
|
|
3265
|
+
role: "group",
|
|
3266
|
+
"aria-label": t3,
|
|
3267
|
+
children: [t12, t21]
|
|
3268
|
+
});
|
|
3269
|
+
$[30] = t12;
|
|
3270
|
+
$[31] = t21;
|
|
3271
|
+
$[32] = t3;
|
|
3272
|
+
$[33] = t22;
|
|
3273
|
+
} else t22 = $[33];
|
|
3274
|
+
let t23;
|
|
3275
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3276
|
+
t23 = /* @__PURE__ */ jsx(Back, {});
|
|
3277
|
+
$[34] = t23;
|
|
3278
|
+
} else t23 = $[34];
|
|
3279
|
+
let t24;
|
|
3280
|
+
if ($[35] !== t1 || $[36] !== t2 || $[37] !== t22) {
|
|
3281
|
+
t24 = /* @__PURE__ */ jsx(Step, {
|
|
3282
|
+
title: t1,
|
|
3283
|
+
lead: t2,
|
|
3284
|
+
body: t22,
|
|
3285
|
+
actions: t23
|
|
3286
|
+
});
|
|
3287
|
+
$[35] = t1;
|
|
3288
|
+
$[36] = t2;
|
|
3289
|
+
$[37] = t22;
|
|
3290
|
+
$[38] = t24;
|
|
3291
|
+
} else t24 = $[38];
|
|
3292
|
+
return t24;
|
|
958
3293
|
}
|
|
959
3294
|
/**
|
|
960
3295
|
* A drawing of Chrome's toolbar and Extensions menu that says where to click.
|
|
961
3296
|
* Chrome's own toolbar is where it happens; the host reports `pinned`.
|
|
962
3297
|
*/
|
|
963
|
-
function PinStep(
|
|
3298
|
+
function PinStep(t0) {
|
|
3299
|
+
const $ = c(27);
|
|
3300
|
+
const { pinned, email } = t0;
|
|
964
3301
|
const { brandName, brandLogo } = useFirstRun();
|
|
965
3302
|
useAutoAdvance(pinned);
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
3303
|
+
let t1;
|
|
3304
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3305
|
+
t1 = /* @__PURE__ */ jsx("span", { className: "first-run-pin__omnibox" });
|
|
3306
|
+
$[0] = t1;
|
|
3307
|
+
} else t1 = $[0];
|
|
3308
|
+
let t2;
|
|
3309
|
+
if ($[1] !== brandLogo || $[2] !== pinned) {
|
|
3310
|
+
t2 = pinned ? /* @__PURE__ */ jsx("span", {
|
|
3311
|
+
className: "first-run-pin__tool",
|
|
3312
|
+
children: brandLogo
|
|
3313
|
+
}) : null;
|
|
3314
|
+
$[1] = brandLogo;
|
|
3315
|
+
$[2] = pinned;
|
|
3316
|
+
$[3] = t2;
|
|
3317
|
+
} else t2 = $[3];
|
|
3318
|
+
const t3 = pinned ? void 0 : "";
|
|
3319
|
+
let t4;
|
|
3320
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3321
|
+
t4 = /* @__PURE__ */ jsx(PuzzleIcon, {});
|
|
3322
|
+
$[4] = t4;
|
|
3323
|
+
} else t4 = $[4];
|
|
3324
|
+
let t5;
|
|
3325
|
+
if ($[5] !== t3) {
|
|
3326
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
3327
|
+
className: "first-run-pin__tool",
|
|
3328
|
+
"data-target": t3,
|
|
3329
|
+
children: t4
|
|
3330
|
+
});
|
|
3331
|
+
$[5] = t3;
|
|
3332
|
+
$[6] = t5;
|
|
3333
|
+
} else t5 = $[6];
|
|
3334
|
+
let t6;
|
|
3335
|
+
if ($[7] !== email) {
|
|
3336
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
3337
|
+
className: "first-run-pin__tool",
|
|
3338
|
+
children: /* @__PURE__ */ jsx(Avatar.Root, {
|
|
3339
|
+
size: "sm",
|
|
3340
|
+
"aria-hidden": "true",
|
|
3341
|
+
children: /* @__PURE__ */ jsx(ProfileInitial, { email })
|
|
990
3342
|
})
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
3343
|
+
});
|
|
3344
|
+
$[7] = email;
|
|
3345
|
+
$[8] = t6;
|
|
3346
|
+
} else t6 = $[8];
|
|
3347
|
+
let t7;
|
|
3348
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3349
|
+
t7 = /* @__PURE__ */ jsx("span", {
|
|
3350
|
+
className: "first-run-pin__tool",
|
|
3351
|
+
children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {})
|
|
3352
|
+
});
|
|
3353
|
+
$[9] = t7;
|
|
3354
|
+
} else t7 = $[9];
|
|
3355
|
+
let t8;
|
|
3356
|
+
if ($[10] !== t2 || $[11] !== t5 || $[12] !== t6) {
|
|
3357
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
3358
|
+
className: "first-run-pin__toolbar",
|
|
3359
|
+
children: [
|
|
3360
|
+
t1,
|
|
3361
|
+
t2,
|
|
3362
|
+
t5,
|
|
3363
|
+
t6,
|
|
3364
|
+
t7
|
|
3365
|
+
]
|
|
3366
|
+
});
|
|
3367
|
+
$[10] = t2;
|
|
3368
|
+
$[11] = t5;
|
|
3369
|
+
$[12] = t6;
|
|
3370
|
+
$[13] = t8;
|
|
3371
|
+
} else t8 = $[13];
|
|
3372
|
+
const toolbar = t8;
|
|
3373
|
+
const t9 = `Keep ${brandName} one click away`;
|
|
3374
|
+
const t10 = `Click the puzzle piece at the top right of Chrome, then the pin next to ${brandName}.`;
|
|
3375
|
+
let t11;
|
|
3376
|
+
if ($[14] !== brandLogo || $[15] !== brandName || $[16] !== pinned || $[17] !== toolbar) {
|
|
3377
|
+
t11 = pinned ? /* @__PURE__ */ jsx("figure", {
|
|
997
3378
|
className: "first-run-figure first-run-pin",
|
|
998
3379
|
role: "img",
|
|
999
3380
|
"aria-label": `Chrome’s toolbar with ${brandName} pinned`,
|
|
1000
3381
|
children: toolbar
|
|
1001
|
-
})
|
|
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", {
|
|
3382
|
+
}) : /* @__PURE__ */ jsxs("figure", {
|
|
1009
3383
|
className: "first-run-figure first-run-pin",
|
|
1010
3384
|
role: "img",
|
|
1011
3385
|
"aria-label": `Chrome’s toolbar: the puzzle piece opens Extensions, where ${brandName} has a pin`,
|
|
@@ -1024,136 +3398,65 @@ function PinStep({ pinned, email }) {
|
|
|
1024
3398
|
]
|
|
1025
3399
|
})]
|
|
1026
3400
|
})]
|
|
1027
|
-
})
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
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
|
-
};
|
|
3401
|
+
});
|
|
3402
|
+
$[14] = brandLogo;
|
|
3403
|
+
$[15] = brandName;
|
|
3404
|
+
$[16] = pinned;
|
|
3405
|
+
$[17] = toolbar;
|
|
3406
|
+
$[18] = t11;
|
|
3407
|
+
} else t11 = $[18];
|
|
3408
|
+
let t12;
|
|
3409
|
+
if ($[19] !== pinned) {
|
|
3410
|
+
t12 = /* @__PURE__ */ jsx(Actions, { children: pinned ? /* @__PURE__ */ jsx(Next, {}) : /* @__PURE__ */ jsx(NotNow, {}) });
|
|
3411
|
+
$[19] = pinned;
|
|
3412
|
+
$[20] = t12;
|
|
3413
|
+
} else t12 = $[20];
|
|
3414
|
+
const t13 = pinned ? "Pinned" : "";
|
|
3415
|
+
let t14;
|
|
3416
|
+
if ($[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t13 || $[25] !== t9) {
|
|
3417
|
+
t14 = /* @__PURE__ */ jsx(Step, {
|
|
3418
|
+
title: t9,
|
|
3419
|
+
lead: t10,
|
|
3420
|
+
body: t11,
|
|
3421
|
+
actions: t12,
|
|
3422
|
+
announce: t13
|
|
3423
|
+
});
|
|
3424
|
+
$[21] = t10;
|
|
3425
|
+
$[22] = t11;
|
|
3426
|
+
$[23] = t12;
|
|
3427
|
+
$[24] = t13;
|
|
3428
|
+
$[25] = t9;
|
|
3429
|
+
$[26] = t14;
|
|
3430
|
+
} else t14 = $[26];
|
|
3431
|
+
return t14;
|
|
1129
3432
|
}
|
|
1130
|
-
function ReadyStep(
|
|
3433
|
+
function ReadyStep(t0) {
|
|
3434
|
+
const $ = c(23);
|
|
3435
|
+
const { schedules, shortcut, onOpen } = t0;
|
|
1131
3436
|
const { brandName, brandLogo } = useFirstRun();
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
3437
|
+
let T0;
|
|
3438
|
+
let t1;
|
|
3439
|
+
let t2;
|
|
3440
|
+
let t3;
|
|
3441
|
+
let t4;
|
|
3442
|
+
let t5;
|
|
3443
|
+
if ($[0] !== brandLogo || $[1] !== brandName || $[2] !== schedules || $[3] !== shortcut) {
|
|
3444
|
+
const on = schedules.filter(_temp$1);
|
|
3445
|
+
T0 = Step;
|
|
3446
|
+
t1 = true;
|
|
3447
|
+
if ($[10] !== brandLogo) {
|
|
3448
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
3449
|
+
className: "first-run-hero first-run-hero__brand",
|
|
3450
|
+
children: brandLogo
|
|
3451
|
+
});
|
|
3452
|
+
$[10] = brandLogo;
|
|
3453
|
+
$[11] = t2;
|
|
3454
|
+
} else t2 = $[11];
|
|
3455
|
+
t3 = `${brandName} is ready`;
|
|
3456
|
+
t4 = `${on.length ? "Here’s what it does next. " : "Nothing is scheduled. "}Ask it for anything in the side panel.`;
|
|
3457
|
+
t5 = on.length || shortcut ? /* @__PURE__ */ jsxs(Fragment, { children: [on.length ? /* @__PURE__ */ jsxs("figure", {
|
|
1142
3458
|
className: "first-run-figure",
|
|
1143
|
-
children: [/* @__PURE__ */ jsx("figcaption", { children: "Schedules" }), on.map(
|
|
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
|
-
})]
|
|
3459
|
+
children: [/* @__PURE__ */ jsx("figcaption", { children: "Schedules" }), on.map(_temp2$1)]
|
|
1157
3460
|
}) : null, shortcut ? /* @__PURE__ */ jsxs(Note, {
|
|
1158
3461
|
icon: /* @__PURE__ */ jsx(KeyboardIcon, {}),
|
|
1159
3462
|
children: [
|
|
@@ -1163,13 +3466,532 @@ function ReadyStep({ schedules, shortcut, onOpen }) {
|
|
|
1163
3466
|
brandName,
|
|
1164
3467
|
" anytime."
|
|
1165
3468
|
]
|
|
1166
|
-
}) : null] }) : void 0
|
|
1167
|
-
|
|
3469
|
+
}) : null] }) : void 0;
|
|
3470
|
+
$[0] = brandLogo;
|
|
3471
|
+
$[1] = brandName;
|
|
3472
|
+
$[2] = schedules;
|
|
3473
|
+
$[3] = shortcut;
|
|
3474
|
+
$[4] = T0;
|
|
3475
|
+
$[5] = t1;
|
|
3476
|
+
$[6] = t2;
|
|
3477
|
+
$[7] = t3;
|
|
3478
|
+
$[8] = t4;
|
|
3479
|
+
$[9] = t5;
|
|
3480
|
+
} else {
|
|
3481
|
+
T0 = $[4];
|
|
3482
|
+
t1 = $[5];
|
|
3483
|
+
t2 = $[6];
|
|
3484
|
+
t3 = $[7];
|
|
3485
|
+
t4 = $[8];
|
|
3486
|
+
t5 = $[9];
|
|
3487
|
+
}
|
|
3488
|
+
let t6;
|
|
3489
|
+
if ($[12] !== brandName || $[13] !== onOpen) {
|
|
3490
|
+
t6 = /* @__PURE__ */ jsx(Actions, { children: /* @__PURE__ */ jsxs(Button, {
|
|
1168
3491
|
size: "md",
|
|
1169
3492
|
onClick: onOpen,
|
|
1170
3493
|
children: ["Open ", brandName]
|
|
1171
|
-
}) })
|
|
3494
|
+
}) });
|
|
3495
|
+
$[12] = brandName;
|
|
3496
|
+
$[13] = onOpen;
|
|
3497
|
+
$[14] = t6;
|
|
3498
|
+
} else t6 = $[14];
|
|
3499
|
+
let t7;
|
|
3500
|
+
if ($[15] !== T0 || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 || $[21] !== t6) {
|
|
3501
|
+
t7 = /* @__PURE__ */ jsx(T0, {
|
|
3502
|
+
narrow: t1,
|
|
3503
|
+
hero: t2,
|
|
3504
|
+
title: t3,
|
|
3505
|
+
lead: t4,
|
|
3506
|
+
body: t5,
|
|
3507
|
+
actions: t6
|
|
3508
|
+
});
|
|
3509
|
+
$[15] = T0;
|
|
3510
|
+
$[16] = t1;
|
|
3511
|
+
$[17] = t2;
|
|
3512
|
+
$[18] = t3;
|
|
3513
|
+
$[19] = t4;
|
|
3514
|
+
$[20] = t5;
|
|
3515
|
+
$[21] = t6;
|
|
3516
|
+
$[22] = t7;
|
|
3517
|
+
} else t7 = $[22];
|
|
3518
|
+
return t7;
|
|
3519
|
+
}
|
|
3520
|
+
function _temp2$1(schedule_0) {
|
|
3521
|
+
const next = getThinkScheduleNextRun(schedule_0);
|
|
3522
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3523
|
+
className: "first-run-schedule",
|
|
3524
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3525
|
+
className: "think-schedule__schedule-copy",
|
|
3526
|
+
children: [
|
|
3527
|
+
/* @__PURE__ */ jsx("strong", { children: schedule_0.name }),
|
|
3528
|
+
/* @__PURE__ */ jsx("span", { children: formatThinkScheduleRepeat(schedule_0.task.schedule, "timezone" in schedule_0.task ? schedule_0.task.timezone : void 0) }),
|
|
3529
|
+
/* @__PURE__ */ jsx("small", { children: next ? `Next ${next}` : "On" })
|
|
3530
|
+
]
|
|
3531
|
+
})
|
|
3532
|
+
}, schedule_0.id);
|
|
3533
|
+
}
|
|
3534
|
+
function _temp$1(schedule) {
|
|
3535
|
+
return schedule.enabled;
|
|
3536
|
+
}
|
|
3537
|
+
//#endregion
|
|
3538
|
+
//#region src/components/extension/FirstRunSetup.tsx
|
|
3539
|
+
const sigveloLogo = /* @__PURE__ */ jsx("img", {
|
|
3540
|
+
src: SIGVELO_LOGO,
|
|
3541
|
+
alt: "",
|
|
3542
|
+
width: 96,
|
|
3543
|
+
height: 96
|
|
3544
|
+
});
|
|
3545
|
+
/**
|
|
3546
|
+
* Full-screen first run of the agent, one screen at a time: connect a
|
|
3547
|
+
* model, confirm the Chrome profile, choose whether to use history, and set up projects, people, writing, and
|
|
3548
|
+
* automations from the person's own work, try
|
|
3549
|
+
* an automation, schedule the ones that suggest it, see the skills it wrote,
|
|
3550
|
+
* and pin the product. The lists are the product's own rows. Controlled: the
|
|
3551
|
+
* host owns `step` and gets each answer as the person leaves its screen;
|
|
3552
|
+
* moving between screens animates through React view transitions.
|
|
3553
|
+
*/
|
|
3554
|
+
function FirstRunSetup(t0) {
|
|
3555
|
+
const $ = c(68);
|
|
3556
|
+
let automations;
|
|
3557
|
+
let className;
|
|
3558
|
+
let email;
|
|
3559
|
+
let history;
|
|
3560
|
+
let modelConnection;
|
|
3561
|
+
let onOpen;
|
|
3562
|
+
let onStepChange;
|
|
3563
|
+
let people;
|
|
3564
|
+
let pinned;
|
|
3565
|
+
let projects;
|
|
3566
|
+
let props;
|
|
3567
|
+
let schedules;
|
|
3568
|
+
let shortcut;
|
|
3569
|
+
let signIn;
|
|
3570
|
+
let skills;
|
|
3571
|
+
let step;
|
|
3572
|
+
let t1;
|
|
3573
|
+
let t2;
|
|
3574
|
+
let t3;
|
|
3575
|
+
let writing;
|
|
3576
|
+
if ($[0] !== t0) {
|
|
3577
|
+
({step, onStepChange, brandName: t1, brandLogo: t2, email, chromeSignedIn: t3, shortcut, signIn, modelConnection, history, projects, people, writing, automations, schedules, skills, pinned, onOpen, className, ...props} = t0);
|
|
3578
|
+
$[0] = t0;
|
|
3579
|
+
$[1] = automations;
|
|
3580
|
+
$[2] = className;
|
|
3581
|
+
$[3] = email;
|
|
3582
|
+
$[4] = history;
|
|
3583
|
+
$[5] = modelConnection;
|
|
3584
|
+
$[6] = onOpen;
|
|
3585
|
+
$[7] = onStepChange;
|
|
3586
|
+
$[8] = people;
|
|
3587
|
+
$[9] = pinned;
|
|
3588
|
+
$[10] = projects;
|
|
3589
|
+
$[11] = props;
|
|
3590
|
+
$[12] = schedules;
|
|
3591
|
+
$[13] = shortcut;
|
|
3592
|
+
$[14] = signIn;
|
|
3593
|
+
$[15] = skills;
|
|
3594
|
+
$[16] = step;
|
|
3595
|
+
$[17] = t1;
|
|
3596
|
+
$[18] = t2;
|
|
3597
|
+
$[19] = t3;
|
|
3598
|
+
$[20] = writing;
|
|
3599
|
+
} else {
|
|
3600
|
+
automations = $[1];
|
|
3601
|
+
className = $[2];
|
|
3602
|
+
email = $[3];
|
|
3603
|
+
history = $[4];
|
|
3604
|
+
modelConnection = $[5];
|
|
3605
|
+
onOpen = $[6];
|
|
3606
|
+
onStepChange = $[7];
|
|
3607
|
+
people = $[8];
|
|
3608
|
+
pinned = $[9];
|
|
3609
|
+
projects = $[10];
|
|
3610
|
+
props = $[11];
|
|
3611
|
+
schedules = $[12];
|
|
3612
|
+
shortcut = $[13];
|
|
3613
|
+
signIn = $[14];
|
|
3614
|
+
skills = $[15];
|
|
3615
|
+
step = $[16];
|
|
3616
|
+
t1 = $[17];
|
|
3617
|
+
t2 = $[18];
|
|
3618
|
+
t3 = $[19];
|
|
3619
|
+
writing = $[20];
|
|
3620
|
+
}
|
|
3621
|
+
const brandName = t1 === void 0 ? "Rook" : t1;
|
|
3622
|
+
const brandLogo = t2 === void 0 ? sigveloLogo : t2;
|
|
3623
|
+
const chromeSignedIn = t3 === void 0 ? Boolean(email) : t3;
|
|
3624
|
+
const titleId = React.useId();
|
|
3625
|
+
let t4;
|
|
3626
|
+
if ($[21] !== titleId) {
|
|
3627
|
+
t4 = { mutationKey: ["first-run-schedule", titleId] };
|
|
3628
|
+
$[21] = titleId;
|
|
3629
|
+
$[22] = t4;
|
|
3630
|
+
} else t4 = $[22];
|
|
3631
|
+
const saving = useIsMutating(t4) > 0;
|
|
3632
|
+
const [arrival, setArrival] = React.useState(true);
|
|
3633
|
+
const [style, setStyle] = React.useState();
|
|
3634
|
+
const [sign, setSign] = React.useState("assistant");
|
|
3635
|
+
const [workTab, setWorkTab] = React.useState("projects");
|
|
3636
|
+
const [schedulesReviewed, setSchedulesReviewed] = React.useState(false);
|
|
3637
|
+
const [writingReviewed, setWritingReviewed] = React.useState(false);
|
|
3638
|
+
const reading = history.choice === "history";
|
|
3639
|
+
const automationEntries = useQuery({
|
|
3640
|
+
...automations.source.queryOptions,
|
|
3641
|
+
enabled: reading
|
|
3642
|
+
}).data ?? [];
|
|
3643
|
+
const automationsReady = reading && automations.status === "done";
|
|
3644
|
+
let t5;
|
|
3645
|
+
if ($[23] !== automationEntries || $[24] !== automationsReady) {
|
|
3646
|
+
t5 = automationsReady ? automationEntries.filter(_temp) : [];
|
|
3647
|
+
$[23] = automationEntries;
|
|
3648
|
+
$[24] = automationsReady;
|
|
3649
|
+
$[25] = t5;
|
|
3650
|
+
} else t5 = $[25];
|
|
3651
|
+
const scheduled = t5;
|
|
3652
|
+
let t6;
|
|
3653
|
+
if ($[26] !== automationEntries || $[27] !== automations.source.onRun || $[28] !== automationsReady) {
|
|
3654
|
+
t6 = automationsReady && automations.source.onRun ? automationEntries.find(_temp3) : void 0;
|
|
3655
|
+
$[26] = automationEntries;
|
|
3656
|
+
$[27] = automations.source.onRun;
|
|
3657
|
+
$[28] = automationsReady;
|
|
3658
|
+
$[29] = t6;
|
|
3659
|
+
} else t6 = $[29];
|
|
3660
|
+
const trial = t6;
|
|
3661
|
+
const preparation = preparationState([
|
|
3662
|
+
projects,
|
|
3663
|
+
people,
|
|
3664
|
+
automations,
|
|
3665
|
+
skills,
|
|
3666
|
+
writing
|
|
3667
|
+
]);
|
|
3668
|
+
const flow = {
|
|
3669
|
+
step,
|
|
3670
|
+
history: history.choice,
|
|
3671
|
+
pinned,
|
|
3672
|
+
trial: Boolean(trial),
|
|
3673
|
+
preparation: preparation.status
|
|
3674
|
+
};
|
|
3675
|
+
const current = currentStep(flow);
|
|
3676
|
+
const currentRank = rank(current);
|
|
3677
|
+
const [furthestRank, setFurthestRank] = React.useState(currentRank);
|
|
3678
|
+
if (currentRank > furthestRank) setFurthestRank(currentRank);
|
|
3679
|
+
const navigation = {
|
|
3680
|
+
...flow,
|
|
3681
|
+
furthest: furthestRank,
|
|
3682
|
+
saving,
|
|
3683
|
+
reviewed: {
|
|
3684
|
+
writing: writingReviewed,
|
|
3685
|
+
schedules: schedulesReviewed
|
|
3686
|
+
}
|
|
3687
|
+
};
|
|
3688
|
+
const t7 = style ?? writing.suggested ?? "direct";
|
|
3689
|
+
let t8;
|
|
3690
|
+
if ($[30] !== sign || $[31] !== t7) {
|
|
3691
|
+
t8 = {
|
|
3692
|
+
style: t7,
|
|
3693
|
+
sign
|
|
3694
|
+
};
|
|
3695
|
+
$[30] = sign;
|
|
3696
|
+
$[31] = t7;
|
|
3697
|
+
$[32] = t8;
|
|
3698
|
+
} else t8 = $[32];
|
|
3699
|
+
const answer = t8;
|
|
3700
|
+
const go = (to) => {
|
|
3701
|
+
if (!to || to === current) return;
|
|
3702
|
+
const back = rank(to) < rank(current);
|
|
3703
|
+
React.startTransition(() => {
|
|
3704
|
+
React.addTransitionType(back ? "first-run-back" : "first-run-forward");
|
|
3705
|
+
setArrival(false);
|
|
3706
|
+
onStepChange(to);
|
|
3707
|
+
});
|
|
3708
|
+
};
|
|
3709
|
+
const context = {
|
|
3710
|
+
brandName,
|
|
3711
|
+
brandLogo,
|
|
3712
|
+
titleId,
|
|
3713
|
+
arrival,
|
|
3714
|
+
go,
|
|
3715
|
+
next: () => go(nextStep(flow)),
|
|
3716
|
+
back: () => go(previousStep(flow))
|
|
3717
|
+
};
|
|
3718
|
+
let t9;
|
|
3719
|
+
if ($[33] !== modelConnection || $[34] !== signIn) {
|
|
3720
|
+
t9 = () => /* @__PURE__ */ jsx(SignInStep, {
|
|
3721
|
+
...signIn,
|
|
3722
|
+
modelConnection
|
|
3723
|
+
});
|
|
3724
|
+
$[33] = modelConnection;
|
|
3725
|
+
$[34] = signIn;
|
|
3726
|
+
$[35] = t9;
|
|
3727
|
+
} else t9 = $[35];
|
|
3728
|
+
let t10;
|
|
3729
|
+
if ($[36] !== modelConnection) {
|
|
3730
|
+
t10 = () => /* @__PURE__ */ jsx(ModelConnectionStep, { connection: modelConnection });
|
|
3731
|
+
$[36] = modelConnection;
|
|
3732
|
+
$[37] = t10;
|
|
3733
|
+
} else t10 = $[37];
|
|
3734
|
+
let t11;
|
|
3735
|
+
if ($[38] !== chromeSignedIn || $[39] !== email) {
|
|
3736
|
+
t11 = () => /* @__PURE__ */ jsx(ChromeProfileStep, {
|
|
3737
|
+
email,
|
|
3738
|
+
signedIn: chromeSignedIn
|
|
3739
|
+
});
|
|
3740
|
+
$[38] = chromeSignedIn;
|
|
3741
|
+
$[39] = email;
|
|
3742
|
+
$[40] = t11;
|
|
3743
|
+
} else t11 = $[40];
|
|
3744
|
+
let t12;
|
|
3745
|
+
if ($[41] !== answer || $[42] !== chromeSignedIn || $[43] !== email || $[44] !== writing) {
|
|
3746
|
+
t12 = () => /* @__PURE__ */ jsx(WritingStep, {
|
|
3747
|
+
writing,
|
|
3748
|
+
answer,
|
|
3749
|
+
onStyleChange: setStyle,
|
|
3750
|
+
onSignChange: setSign,
|
|
3751
|
+
onReviewed: () => setWritingReviewed(true),
|
|
3752
|
+
profileEmail: chromeSignedIn ? email : void 0
|
|
3753
|
+
});
|
|
3754
|
+
$[41] = answer;
|
|
3755
|
+
$[42] = chromeSignedIn;
|
|
3756
|
+
$[43] = email;
|
|
3757
|
+
$[44] = writing;
|
|
3758
|
+
$[45] = t12;
|
|
3759
|
+
} else t12 = $[45];
|
|
3760
|
+
let t13;
|
|
3761
|
+
if ($[46] !== scheduled || $[47] !== schedules) {
|
|
3762
|
+
t13 = () => /* @__PURE__ */ jsx(ScheduleReview, {
|
|
3763
|
+
automations: scheduled,
|
|
3764
|
+
schedules,
|
|
3765
|
+
onReviewed: () => setSchedulesReviewed(true)
|
|
3766
|
+
});
|
|
3767
|
+
$[46] = scheduled;
|
|
3768
|
+
$[47] = schedules;
|
|
3769
|
+
$[48] = t13;
|
|
3770
|
+
} else t13 = $[48];
|
|
3771
|
+
let t14;
|
|
3772
|
+
if ($[49] !== automations.source || $[50] !== trial) {
|
|
3773
|
+
t14 = () => trial ? /* @__PURE__ */ jsx(WorkTrial, {
|
|
3774
|
+
automation: trial,
|
|
3775
|
+
source: automations.source
|
|
3776
|
+
}) : null;
|
|
3777
|
+
$[49] = automations.source;
|
|
3778
|
+
$[50] = trial;
|
|
3779
|
+
$[51] = t14;
|
|
3780
|
+
} else t14 = $[51];
|
|
3781
|
+
let t15;
|
|
3782
|
+
if ($[52] !== email || $[53] !== pinned) {
|
|
3783
|
+
t15 = () => /* @__PURE__ */ jsx(PinStep, {
|
|
3784
|
+
pinned,
|
|
3785
|
+
email
|
|
3786
|
+
});
|
|
3787
|
+
$[52] = email;
|
|
3788
|
+
$[53] = pinned;
|
|
3789
|
+
$[54] = t15;
|
|
3790
|
+
} else t15 = $[54];
|
|
3791
|
+
let t16;
|
|
3792
|
+
if ($[55] !== onOpen || $[56] !== schedules || $[57] !== shortcut) {
|
|
3793
|
+
t16 = () => /* @__PURE__ */ jsx(ReadyStep, {
|
|
3794
|
+
schedules: schedules.list,
|
|
3795
|
+
shortcut,
|
|
3796
|
+
onOpen
|
|
3797
|
+
});
|
|
3798
|
+
$[55] = onOpen;
|
|
3799
|
+
$[56] = schedules;
|
|
3800
|
+
$[57] = shortcut;
|
|
3801
|
+
$[58] = t16;
|
|
3802
|
+
} else t16 = $[58];
|
|
3803
|
+
const screen = {
|
|
3804
|
+
welcome: _temp4,
|
|
3805
|
+
"sign-in": t9,
|
|
3806
|
+
"model-connection": t10,
|
|
3807
|
+
"chrome-profile": t11,
|
|
3808
|
+
history: () => /* @__PURE__ */ jsx(HistoryChoiceStep, {
|
|
3809
|
+
history,
|
|
3810
|
+
skipTo: nextStep({
|
|
3811
|
+
...flow,
|
|
3812
|
+
history: "skip"
|
|
3813
|
+
})
|
|
3814
|
+
}),
|
|
3815
|
+
preparation: () => /* @__PURE__ */ jsx(WorkPreparation, {
|
|
3816
|
+
tab: workTab,
|
|
3817
|
+
onTabChange: setWorkTab,
|
|
3818
|
+
preparation: preparation.status,
|
|
3819
|
+
projects,
|
|
3820
|
+
people,
|
|
3821
|
+
automations,
|
|
3822
|
+
skills,
|
|
3823
|
+
writing
|
|
3824
|
+
}),
|
|
3825
|
+
writing: t12,
|
|
3826
|
+
schedules: t13,
|
|
3827
|
+
try: t14,
|
|
3828
|
+
pin: t15,
|
|
3829
|
+
ask: _temp5,
|
|
3830
|
+
ready: t16
|
|
3831
|
+
}[current]();
|
|
3832
|
+
const items = navigationItems(navigation);
|
|
3833
|
+
const preparing = reading && preparation.status === "working";
|
|
3834
|
+
let t17;
|
|
3835
|
+
if ($[59] !== className) {
|
|
3836
|
+
t17 = cx("first-run", className);
|
|
3837
|
+
$[59] = className;
|
|
3838
|
+
$[60] = t17;
|
|
3839
|
+
} else t17 = $[60];
|
|
3840
|
+
const t18 = `Set up ${brandName}`;
|
|
3841
|
+
const t19 = arrival ? "" : void 0;
|
|
3842
|
+
const t20 = "fill-host computer-wallpaper";
|
|
3843
|
+
const t21 = current === "welcome" ? screen : /* @__PURE__ */ jsxs("div", {
|
|
3844
|
+
className: "first-run__page",
|
|
3845
|
+
children: [
|
|
3846
|
+
/* @__PURE__ */ jsx("header", {
|
|
3847
|
+
className: "first-run-top",
|
|
3848
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
3849
|
+
className: "first-run-brand",
|
|
3850
|
+
children: [/* @__PURE__ */ jsx(React.ViewTransition, {
|
|
3851
|
+
name: "first-run-mark",
|
|
3852
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3853
|
+
className: "first-run-brand__mark",
|
|
3854
|
+
children: brandLogo
|
|
3855
|
+
})
|
|
3856
|
+
}), /* @__PURE__ */ jsx(React.ViewTransition, {
|
|
3857
|
+
name: "first-run-brand-name",
|
|
3858
|
+
children: /* @__PURE__ */ jsx("span", { children: brandName })
|
|
3859
|
+
})]
|
|
3860
|
+
})
|
|
3861
|
+
}),
|
|
3862
|
+
/* @__PURE__ */ jsxs(Card, {
|
|
3863
|
+
className: "first-run-frame",
|
|
3864
|
+
children: [/* @__PURE__ */ jsxs("nav", {
|
|
3865
|
+
className: "first-run-navigation",
|
|
3866
|
+
"aria-label": "Setup steps",
|
|
3867
|
+
children: [/* @__PURE__ */ jsxs(Select.Root, {
|
|
3868
|
+
items,
|
|
3869
|
+
value: navigationValue(flow),
|
|
3870
|
+
onValueChange: (value, details) => {
|
|
3871
|
+
if (details.reason === "none") {
|
|
3872
|
+
details.cancel();
|
|
3873
|
+
return;
|
|
3874
|
+
}
|
|
3875
|
+
if (value && canVisit(value, navigation)) go(value);
|
|
3876
|
+
},
|
|
3877
|
+
children: [/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
3878
|
+
className: "first-run-navigation__picker",
|
|
3879
|
+
size: "md",
|
|
3880
|
+
"aria-label": "Setup step",
|
|
3881
|
+
disabled: saving,
|
|
3882
|
+
children: [
|
|
3883
|
+
/* @__PURE__ */ jsx(Select.Value, {}),
|
|
3884
|
+
preparing && section(current)?.[0] === "Work" ? /* @__PURE__ */ jsxs("span", {
|
|
3885
|
+
className: "first-run-work__activity",
|
|
3886
|
+
"aria-hidden": "true",
|
|
3887
|
+
children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "first-run-work__activity-spin" }), /* @__PURE__ */ jsxs("span", {
|
|
3888
|
+
className: "first-run-work__activity-count",
|
|
3889
|
+
children: [
|
|
3890
|
+
preparation.done,
|
|
3891
|
+
"/",
|
|
3892
|
+
preparation.total
|
|
3893
|
+
]
|
|
3894
|
+
})]
|
|
3895
|
+
}) : null,
|
|
3896
|
+
/* @__PURE__ */ jsx(Select.Icon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
3897
|
+
]
|
|
3898
|
+
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
3899
|
+
sideOffset: 4,
|
|
3900
|
+
alignItemWithTrigger: false,
|
|
3901
|
+
align: "start",
|
|
3902
|
+
children: /* @__PURE__ */ jsx(Select.Popup, {
|
|
3903
|
+
className: "first-run-navigation__menu",
|
|
3904
|
+
children: /* @__PURE__ */ jsx(Select.List, {
|
|
3905
|
+
"aria-label": "Setup steps",
|
|
3906
|
+
children: items.map((t22, position) => {
|
|
3907
|
+
const { label, value: value_0, disabled, completed, completionText } = t22;
|
|
3908
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
3909
|
+
value: value_0,
|
|
3910
|
+
className: "first-run-navigation__step",
|
|
3911
|
+
"aria-label": label,
|
|
3912
|
+
"aria-describedby": completed ? `${titleId}-${value_0}-status` : void 0,
|
|
3913
|
+
disabled,
|
|
3914
|
+
children: [
|
|
3915
|
+
/* @__PURE__ */ jsx("span", {
|
|
3916
|
+
className: "first-run-navigation__mark",
|
|
3917
|
+
"aria-hidden": "true",
|
|
3918
|
+
children: completed ? /* @__PURE__ */ jsx(CheckIcon, {}) : position + 1
|
|
3919
|
+
}),
|
|
3920
|
+
/* @__PURE__ */ jsx(Select.ItemText, { children: label }),
|
|
3921
|
+
completed ? /* @__PURE__ */ jsx("span", {
|
|
3922
|
+
id: `${titleId}-${value_0}-status`,
|
|
3923
|
+
className: "sigvelo-visually-hidden",
|
|
3924
|
+
children: completionText
|
|
3925
|
+
}) : null
|
|
3926
|
+
]
|
|
3927
|
+
}, value_0);
|
|
3928
|
+
})
|
|
3929
|
+
})
|
|
3930
|
+
})
|
|
3931
|
+
}) })]
|
|
3932
|
+
}), current === "preparation" && preparing ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
3933
|
+
className: "first-run-navigation__open",
|
|
3934
|
+
variant: "ghost",
|
|
3935
|
+
color: "neutral",
|
|
3936
|
+
onClick: onOpen,
|
|
3937
|
+
"aria-describedby": `${titleId}-open-background`,
|
|
3938
|
+
children: [
|
|
3939
|
+
"Open ",
|
|
3940
|
+
brandName,
|
|
3941
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {})
|
|
3942
|
+
]
|
|
3943
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
3944
|
+
id: `${titleId}-open-background`,
|
|
3945
|
+
className: "sigvelo-visually-hidden",
|
|
3946
|
+
children: [brandName, " will keep preparing your work in the background."]
|
|
3947
|
+
})] }) : null]
|
|
3948
|
+
}), /* @__PURE__ */ jsx("section", {
|
|
3949
|
+
className: "first-run-screen",
|
|
3950
|
+
"aria-labelledby": titleId,
|
|
3951
|
+
children: /* @__PURE__ */ jsx(React.Fragment, { children: screen }, current)
|
|
3952
|
+
})]
|
|
3953
|
+
}),
|
|
3954
|
+
/* @__PURE__ */ jsx(PoweredBy, {})
|
|
3955
|
+
]
|
|
1172
3956
|
});
|
|
3957
|
+
let t23;
|
|
3958
|
+
if ($[61] !== current || $[62] !== props || $[63] !== t17 || $[64] !== t18 || $[65] !== t19 || $[66] !== t21) {
|
|
3959
|
+
t23 = /* @__PURE__ */ jsx("main", {
|
|
3960
|
+
...props,
|
|
3961
|
+
className: t17,
|
|
3962
|
+
"aria-label": t18,
|
|
3963
|
+
"data-screen": current,
|
|
3964
|
+
"data-arrival": t19,
|
|
3965
|
+
"data-recipe": t20,
|
|
3966
|
+
children: t21
|
|
3967
|
+
});
|
|
3968
|
+
$[61] = current;
|
|
3969
|
+
$[62] = props;
|
|
3970
|
+
$[63] = t17;
|
|
3971
|
+
$[64] = t18;
|
|
3972
|
+
$[65] = t19;
|
|
3973
|
+
$[66] = t21;
|
|
3974
|
+
$[67] = t23;
|
|
3975
|
+
} else t23 = $[67];
|
|
3976
|
+
return /* @__PURE__ */ jsx(FirstRunContext, {
|
|
3977
|
+
value: context,
|
|
3978
|
+
children: t23
|
|
3979
|
+
});
|
|
3980
|
+
}
|
|
3981
|
+
function _temp5() {
|
|
3982
|
+
return /* @__PURE__ */ jsx(AskStep, {});
|
|
3983
|
+
}
|
|
3984
|
+
function _temp4() {
|
|
3985
|
+
return /* @__PURE__ */ jsx(WelcomeStep, {});
|
|
3986
|
+
}
|
|
3987
|
+
function _temp3(item_0) {
|
|
3988
|
+
return !item_0.parameters.some(_temp2);
|
|
3989
|
+
}
|
|
3990
|
+
function _temp2(parameter) {
|
|
3991
|
+
return parameter.required;
|
|
3992
|
+
}
|
|
3993
|
+
function _temp(item) {
|
|
3994
|
+
return item.schedule;
|
|
1173
3995
|
}
|
|
1174
3996
|
//#endregion
|
|
1175
3997
|
export { FirstRunSetup };
|