diff --git a/src/renderer/src/components/settings/BrowserUsePane.tsx b/src/renderer/src/components/settings/BrowserUsePane.tsx index 1ba862b8a..34bbb7a57 100644 --- a/src/renderer/src/components/settings/BrowserUsePane.tsx +++ b/src/renderer/src/components/settings/BrowserUsePane.tsx @@ -17,6 +17,7 @@ import { useInstalledAgentSkill } from '@/hooks/useInstalledAgentSkills' import { useMountedRef } from '@/hooks/useMountedRef' +import { cn } from '@/lib/utils' import { Button } from '../ui/button' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' import { @@ -184,6 +185,8 @@ export function BrowserUseSetup({ const showStep2 = matchesSettingsSearch(searchQuery, [BROWSER_USE_PANE_SEARCH_ENTRIES[1]]) const showStep3 = matchesSettingsSearch(searchQuery, [BROWSER_USE_PANE_SEARCH_ENTRIES[2]]) const completedCount = [cliEnabled, skillDetected, cookiesImported].filter(Boolean).length + const step2Blocked = !cliEnabled && !skillDetected + const step3Blocked = !cookiesImported && (!cliEnabled || !skillDetected) const sourceLabel = defaultProfile?.source ? `${BROWSER_FAMILY_LABELS[defaultProfile.source.browserFamily] ?? defaultProfile.source.browserFamily}${defaultProfile.source.profileName ? ` (${defaultProfile.source.profileName})` : ''}` @@ -300,16 +303,17 @@ export function BrowserUseSetup({ title="Install Browser Use Skill" description="Install the Browser Use skill so agents can operate Orca's browser." keywords={BROWSER_USE_PANE_SEARCH_ENTRIES[1].keywords} - className={`rounded-xl border border-border/60 bg-card/50 p-4 ${ - cliEnabled ? '' : 'opacity-60' - }`} + className={cn( + 'rounded-xl border border-border/60 bg-card/50 p-4', + step2Blocked && 'opacity-60' + )} > { useAppStore.getState().recordFeatureInteraction('agent-browser-setup') @@ -327,9 +331,10 @@ export function BrowserUseSetup({ title="Import Browser Cookies" description="Import cookies from Chrome, Edge, or other browsers so agents can reuse your logins." keywords={BROWSER_USE_PANE_SEARCH_ENTRIES[2].keywords} - className={`rounded-xl border border-border/60 bg-card/50 p-4 ${ - cliEnabled && skillDetected ? '' : 'opacity-60' - }`} + className={cn( + 'rounded-xl border border-border/60 bg-card/50 p-4', + step3Blocked && 'opacity-60' + )} >
=> { setCliBusy(true) @@ -97,124 +99,115 @@ export function MobileEmulatorAgentControlRow(): React.JSX.Element { } return ( -
-
-
-
-

Agent Mobile Emulator Control

+
+
+
+

Agent Mobile Emulator Control

+

+ Let coding agents control the active mobile emulator with Orca CLI commands. +

+
+ + {completedCount}/2 + +
+ +
+
+ +
+

Enable Orca CLI

- Let coding agents control the active mobile emulator with Orca CLI commands. + Registers the Orca CLI command so agents can control the active emulator from their + shell.

+ {cliInstallStatus?.commandPath && cliEnabled ? ( +

+ Installed at{' '} + {cliInstallStatus.commandPath} +

+ ) : null} + {!cliEnabled && cliInstallStatus?.detail ? ( +

{cliInstallStatus.detail}

+ ) : null}
- - {completedCount}/2 - + + + + + + + + {!cliSupported && !cliLoading && cliInstallStatus?.detail ? ( + + {cliInstallStatus.detail} + + ) : null} + +
-
-
-
- -
-

Enable Orca CLI

-

- Registers the Orca CLI command so agents can control the active emulator from - their shell. -

- {cliInstallStatus?.commandPath && cliEnabled ? ( -

- Installed at{' '} - - {cliInstallStatus.commandPath} - -

- ) : null} - {!cliEnabled && cliInstallStatus?.detail ? ( -

{cliInstallStatus.detail}

- ) : null} -
- - - - - - - - {!cliSupported && !cliLoading && cliInstallStatus?.detail ? ( - - {cliInstallStatus.detail} - - ) : null} - - -
-
- -
- } - preInstallNotice={AGENT_SKILL_CLI_PREREQUISITE_NOTICE} - onBeforeOpenTerminal={async () => { - await ensureOrcaCliAvailableForAgentSkillTerminal({ - onStatusChange: setCliInstallStatus - }) - }} - onRecheck={refreshCliSkill} - /> -
- -
-
- -

Common emulator commands

-
-

- Commands target the active emulator for the current worktree. Coordinates are - normalized from 0..1. -

-
- {EMULATOR_CLI_COMMANDS.map((command) => ( - - {command} - - ))} -
-
- - +
+ } + preInstallNotice={AGENT_SKILL_CLI_PREREQUISITE_NOTICE} + onBeforeOpenTerminal={async () => { + await ensureOrcaCliAvailableForAgentSkillTerminal({ + onStatusChange: setCliInstallStatus + }) + }} + onRecheck={refreshCliSkill} + />
+ +
+
+ +

Common emulator commands

+
+

+ Commands target the active emulator for the current worktree. Coordinates are normalized + from 0..1. +

+
+ {EMULATOR_CLI_COMMANDS.map((command) => ( + + {command} + + ))} +
+
+ +
) diff --git a/src/renderer/src/components/settings/MobileEmulatorExamples.tsx b/src/renderer/src/components/settings/MobileEmulatorExamples.tsx index eff6d851c..d6bcecfe9 100644 --- a/src/renderer/src/components/settings/MobileEmulatorExamples.tsx +++ b/src/renderer/src/components/settings/MobileEmulatorExamples.tsx @@ -1,5 +1,6 @@ import { Copy, Sparkles } from 'lucide-react' import { toast } from 'sonner' +import { cn } from '@/lib/utils' import { Button } from '../ui/button' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' @@ -18,9 +19,19 @@ async function copyPrompt(prompt: string): Promise { } } -export function MobileEmulatorExamples(): React.JSX.Element { +type MobileEmulatorExamplesProps = { + variant?: 'card' | 'inline' +} + +export function MobileEmulatorExamples({ + variant = 'card' +}: MobileEmulatorExamplesProps): React.JSX.Element { return ( -
+

Try it — example prompts

@@ -33,7 +44,7 @@ export function MobileEmulatorExamples(): React.JSX.Element { {EMULATOR_EXAMPLE_PROMPTS.map((prompt) => (
  • “{prompt}” diff --git a/src/renderer/src/components/settings/MobileEmulatorSettingsPane.tsx b/src/renderer/src/components/settings/MobileEmulatorSettingsPane.tsx index fb036d401..1b5b9ee92 100644 --- a/src/renderer/src/components/settings/MobileEmulatorSettingsPane.tsx +++ b/src/renderer/src/components/settings/MobileEmulatorSettingsPane.tsx @@ -211,9 +211,17 @@ export function MobileEmulatorSettingsPane({ } /> - - {enabled ? : null} + + {enabled ? ( + + + + ) : null}

  • ) }