import React from 'react'; import { isDesktopShell, isTauriShell, startDesktopWindowDrag } from '@/lib/desktop'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; import { Icon } from "@/components/icon/Icon"; import { updateDesktopSettings } from '@/lib/persistence'; import { copyTextToClipboard } from '@/lib/clipboard'; import { restartDesktopApp } from '@/lib/desktop'; import { cn } from '@/lib/utils'; import { RemoteConnectionForm } from './RemoteConnectionForm'; import { desktopHostsGet, desktopHostsSet } from '@/lib/desktopHosts'; import { useI18n } from '@/lib/i18n'; const INSTALL_COMMAND = 'curl -fsSL https://opencode.ai/install | bash'; const DOCS_URL = 'https://opencode.ai/docs'; const WINDOWS_WSL_DOCS_URL = 'https://opencode.ai/docs/windows-wsl'; const POLL_INTERVAL_MS = 2500; type OnboardingPlatform = 'macos' | 'linux' | 'windows' | 'unknown'; type ChooserScreenProps = { /** Callback when CLI becomes available */ onCliAvailable?: () => void; }; function BashCommand({ onCopy, copyTitle }: { onCopy: () => void; copyTitle: string }) { return (
curl
-fsSL
https://opencode.ai/install
|
bash
{t('onboarding.chooser.description')}
wsl --install {t('onboarding.localSetup.windows.stepInstallWslSuffix')}{t('onboarding.localSetup.intro')}
{t('onboarding.localSetup.helper.saveAndReload')}