diff --git a/app/src/components/views/setup-view.tsx b/app/src/components/views/setup-view.tsx index b3c1af99..331dbc0a 100644 --- a/app/src/components/views/setup-view.tsx +++ b/app/src/components/views/setup-view.tsx @@ -1,1605 +1,14 @@ "use client"; -import { useState, useEffect, useCallback } from "react"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/components/ui/card"; -import { useSetupStore, type CodexAuthStatus } from "@/store/setup-store"; +import { useSetupStore } from "@/store/setup-store"; import { useAppStore } from "@/store/app-store"; -import { getElectronAPI } from "@/lib/electron"; +import { StepIndicator } from "./setup-view/components"; import { - CheckCircle2, - XCircle, - Loader2, - Terminal, - Key, - Sparkles, - ArrowRight, - ArrowLeft, - ExternalLink, - Copy, - AlertCircle, - RefreshCw, - Download, - Shield, -} from "lucide-react"; -import { toast } from "sonner"; -import { SetupTokenModal } from "./setup-token-modal"; - -// Step indicator component -function StepIndicator({ - currentStep, - totalSteps, -}: { - currentStep: number; - totalSteps: number; -}) { - return ( -
- - Let's set up your development environment. We'll check for - required CLI tools and help you configure them. -
-- Anthropic's powerful AI assistant for code generation and - analysis -
-- OpenAI's GPT-5.1 Codex for advanced code generation tasks -
-- Configure Claude for code generation -
-
- curl -fsSL https://claude.ai/install.sh | bash
-
-
-
- irm https://claude.ai/install.ps1 | iex
-
-
- - Subscription Token -
-- Use your Claude subscription (no API charges) -
- - {claudeCliStatus?.installed ? ( - <> - {/* Primary: Automated OAuth setup */} - - - {/* Divider */} -
-
API Key
-- Pay-per-use with your Anthropic API key -
- -
- Get your API key from{" "}
-
- console.anthropic.com
-
- Claude is ready to use! -
-- {getAuthMethodLabel() && `Using ${getAuthMethodLabel()}. `}You - can proceed to the next step -
-- OpenAI's GPT-5.1 Codex for advanced code generation -
-
- npm install -g @openai/codex
-
-
- - Requires Node.js to be installed. If the auto-install fails, - try running the command manually in your terminal. -
-- Authenticate via CLI -
-- Run this command in your terminal: -
-
- codex auth login
-
-
-
- Get your API key from{" "}
-
- platform.openai.com
-
- Codex is ready to use! -
-- {getAuthMethodLabel() && - `Authenticated via ${getAuthMethodLabel()}. `} - You can proceed to complete setup -
-- Your development environment is configured. You're ready to start - building with AI-powered assistance. -
-Claude
-- {claudeReady ? "Ready to use" : "Configure later in settings"} -
-Codex
-- {codexReady ? "Ready to use" : "Configure later in settings"} -
-- Your credentials are secure -
-- API keys are stored locally and never sent to our servers -
-+ {warningMessage} +
+
+ {command}
+
+
+ {title}
+{description}
+