/** * Setup Wizard Page * First-time setup experience for new users */ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { motion, AnimatePresence } from 'framer-motion'; import { Check, ChevronLeft, ChevronRight } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; interface SetupStep { id: string; title: string; description: string; } const steps: SetupStep[] = [ { id: 'welcome', title: 'Welcome to ClawX', description: 'Your AI assistant is ready to be configured', }, { id: 'runtime', title: 'Environment Check', description: 'Verifying system requirements', }, { id: 'provider', title: 'AI Provider', description: 'Configure your AI service', }, { id: 'channel', title: 'Connect Channel', description: 'Link a messaging app', }, { id: 'skills', title: 'Choose Skills', description: 'Select your skill bundles', }, { id: 'complete', title: 'All Set!', description: 'ClawX is ready to use', }, ]; export function Setup() { const navigate = useNavigate(); const [currentStep, setCurrentStep] = useState(0); const step = steps[currentStep]; const isFirstStep = currentStep === 0; const isLastStep = currentStep === steps.length - 1; const handleNext = () => { if (isLastStep) { // Complete setup and go to dashboard navigate('/'); } else { setCurrentStep((i) => i + 1); } }; const handleBack = () => { setCurrentStep((i) => Math.max(i - 1, 0)); }; const handleSkip = () => { navigate('/'); }; return (
{/* Progress Indicator */}
{steps.map((s, i) => (
{i < currentStep ? ( ) : ( {i + 1} )}
{i < steps.length - 1 && (
)}
))}
{/* Step Content */}

{step.title}

{step.description}

{/* Step-specific content */}
{currentStep === 0 && } {currentStep === 1 && } {currentStep === 2 && } {currentStep === 3 && } {currentStep === 4 && } {currentStep === 5 && }
{/* Navigation */}
{!isFirstStep && ( )}
{!isLastStep && ( )}
); } // Step content components (simplified versions) function WelcomeContent() { return (
🤖

Welcome to ClawX

ClawX is a graphical interface for OpenClaw, making it easy to use AI assistants across your favorite messaging platforms.

); } function RuntimeContent() { return (

Checking Environment

Node.js Runtime ✓ Installed
OpenClaw Package ✓ Ready
Gateway Service ✓ Running
); } function ProviderContent() { return (

Select AI Provider

Choose your preferred AI model provider

{[ { id: 'anthropic', name: 'Anthropic', model: 'Claude', icon: '🤖' }, { id: 'openai', name: 'OpenAI', model: 'GPT-4', icon: '💚' }, { id: 'google', name: 'Google', model: 'Gemini', icon: '🔷' }, ].map((provider) => ( ))}
); } function ChannelContent() { return (

Connect a Channel

Link a messaging app to start chatting with your AI

{[ { type: 'whatsapp', name: 'WhatsApp', icon: '📱' }, { type: 'telegram', name: 'Telegram', icon: '✈️' }, { type: 'discord', name: 'Discord', icon: '🎮' }, { type: 'slack', name: 'Slack', icon: '💼' }, ].map((channel) => ( ))}

You can add more channels later in Settings

); } function SkillsContent() { return (

Choose Skill Bundles

Select pre-configured skill packages

{[ { id: 'productivity', name: 'Productivity', icon: '📋', recommended: true }, { id: 'developer', name: 'Developer', icon: '💻', recommended: true }, { id: 'smart-home', name: 'Smart Home', icon: '🏠' }, { id: 'media', name: 'Media', icon: '🎨' }, ].map((bundle) => ( ))}
); } function CompleteContent() { return (
🎉

Setup Complete!

ClawX is configured and ready to use. You can now start chatting with your AI assistant.

✅ AI Provider configured

✅ Channel connected

✅ Skills enabled

✅ Gateway running

); } export default Setup;