From dc5b730119ef2a35674e29fc9e495a1e109fa7a9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 25 Aug 2025 16:27:09 -0500 Subject: [PATCH] Remove onboarding for now --- src/components/onboarding/AISettingsStep.tsx | 124 ---------------- .../onboarding/OnboardingDialog.tsx | 136 ------------------ src/components/onboarding/ProjectStep.tsx | 114 --------------- src/components/onboarding/WelcomeStep.tsx | 83 ----------- src/components/onboarding/index.ts | 4 - src/hooks/useOnboarding.ts | 48 ------- src/pages/Index.tsx | 54 +------ 7 files changed, 2 insertions(+), 561 deletions(-) delete mode 100644 src/components/onboarding/AISettingsStep.tsx delete mode 100644 src/components/onboarding/OnboardingDialog.tsx delete mode 100644 src/components/onboarding/ProjectStep.tsx delete mode 100644 src/components/onboarding/WelcomeStep.tsx delete mode 100644 src/components/onboarding/index.ts delete mode 100644 src/hooks/useOnboarding.ts diff --git a/src/components/onboarding/AISettingsStep.tsx b/src/components/onboarding/AISettingsStep.tsx deleted file mode 100644 index 26e3b8f5..00000000 --- a/src/components/onboarding/AISettingsStep.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import { useState } from 'react'; -import { Button } from '@/components/ui/button'; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import { ArrowLeft, ArrowRight, Settings, Bot } from 'lucide-react'; -import { useAISettings } from '@/hooks/useAISettings'; -import type { AIConnection } from '@/contexts/AISettingsContext'; - -interface AISettingsStepProps { - onNext: () => void; - onPrevious: () => void; - onSkip: () => void; -} - -export function AISettingsStep({ onNext, onPrevious, onSkip }: AISettingsStepProps) { - const { settings, updateProvider } = useAISettings(); - const [localProvider, setLocalProvider] = useState( - settings.providers.openrouter || { baseURL: 'https://openrouter.ai/api/v1', apiKey: '' } - ); - - const handleSave = () => { - updateProvider('openrouter', localProvider); - onNext(); - }; - - const isValid = localProvider.apiKey.trim() && localProvider.baseURL.trim(); - - return ( -
-
-
- -
-

- Configure AI Settings -

-

- Set up your AI provider to start building with AI assistance. -

-
- - - -
- - OpenRouter Provider -
- - We recommend OpenRouter for easy setup with multiple models - -
- -
-
- - setLocalProvider({ ...localProvider, apiKey: e.target.value })} - className="font-mono text-xs sm:text-sm h-8 sm:h-9" - /> -

- Stored locally, never shared -

-
- -
- - setLocalProvider({ ...localProvider, baseURL: e.target.value })} - className="text-xs sm:text-sm h-8 sm:h-9" - /> -
-
- -
-

Usage in chat:

-

- Use openrouter/anthropic/claude-sonnet-4 to specify model -

-
-
-
- -
- - -
- -
- -
-
- ); -} \ No newline at end of file diff --git a/src/components/onboarding/OnboardingDialog.tsx b/src/components/onboarding/OnboardingDialog.tsx deleted file mode 100644 index 4f14f0ec..00000000 --- a/src/components/onboarding/OnboardingDialog.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import { useState, useEffect } from 'react'; -import { Dialog, DialogContent, DialogTitle, DialogDescription } from '@/components/ui/dialog'; -import { Progress } from '@/components/ui/progress'; -import { WelcomeStep } from './WelcomeStep'; -import { AISettingsStep } from './AISettingsStep'; -import { ProjectStep } from './ProjectStep'; - -interface OnboardingDialogProps { - open: boolean; - onOpenChange: (open: boolean) => void; - onProjectCreated?: (projectId: string) => void; - onComplete: () => void; - currentStep: number; - onNextStep: () => void; - onPreviousStep: () => void; - initialPrompt?: string; -} - -const STEPS = [ - { id: 'welcome', title: 'Welcome' }, - { id: 'ai-settings', title: 'AI Settings' }, - { id: 'project', title: 'Create Project' }, -]; - -export function OnboardingDialog({ - open, - onOpenChange, - onProjectCreated, - onComplete, - currentStep: propCurrentStep, - onNextStep, - onPreviousStep, - initialPrompt = '' -}: OnboardingDialogProps) { - const [localStep, setLocalStep] = useState(propCurrentStep); - - // Sync local step with prop when it changes - useEffect(() => { - setLocalStep(propCurrentStep); - }, [propCurrentStep]); - - const currentStep = Math.min(localStep, STEPS.length - 1); - const progress = ((currentStep + 1) / STEPS.length) * 100; - - const handleNext = () => { - if (currentStep < STEPS.length - 1) { - setLocalStep(prev => prev + 1); - onNextStep(); - } - }; - - const handlePrevious = () => { - if (currentStep > 0) { - setLocalStep(prev => prev - 1); - onPreviousStep(); - } - }; - - const handleSkip = () => { - onComplete(); - onOpenChange(false); - }; - - const handleComplete = () => { - onComplete(); - onOpenChange(false); - }; - - const renderStep = () => { - switch (STEPS[currentStep]?.id) { - case 'welcome': - return ( - - ); - case 'ai-settings': - return ( - - ); - case 'project': - return ( - - ); - default: - return null; - } - }; - - return ( - - -
- Getting Started Onboarding - Complete the onboarding process to get started with Shakespeare -
-
-

Getting Started

- - {currentStep + 1} / {STEPS.length} - -
-
- -
-
- {STEPS.map((step, index) => ( - - {step.title} - - ))} -
-
-
- -
- {renderStep()} -
-
-
- ); -} \ No newline at end of file diff --git a/src/components/onboarding/ProjectStep.tsx b/src/components/onboarding/ProjectStep.tsx deleted file mode 100644 index ae0d1f90..00000000 --- a/src/components/onboarding/ProjectStep.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import { useState } from 'react'; -import { Button } from '@/components/ui/button'; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; -import { Textarea } from '@/components/ui/textarea'; -import { ArrowLeft, Plus, Sparkles } from 'lucide-react'; -import { useProjectsManager } from '@/hooks/useProjectsManager'; -import { useNavigate } from 'react-router-dom'; - -interface ProjectStepProps { - onNext: () => void; - onPrevious: () => void; - onComplete: () => void; - onProjectCreated?: (projectId: string) => void; - initialPrompt?: string; -} - -export function ProjectStep({ onPrevious, onComplete, onProjectCreated, initialPrompt = '' }: ProjectStepProps) { - const [prompt, setPrompt] = useState(initialPrompt); - const [isCreating, setIsCreating] = useState(false); - const projectsManager = useProjectsManager(); - const navigate = useNavigate(); - - const handleCreateProject = async () => { - if (!prompt.trim()) return; - - setIsCreating(true); - try { - const project = await projectsManager.createProject(prompt.trim()); - onProjectCreated?.(project.id); - onComplete(); - navigate(`/project/${project.id}`); - } catch (error) { - console.error('Failed to create project:', error); - } finally { - setIsCreating(false); - } - }; - - return ( -
-
-
- -
-

- Create Your First Project -

-

- Our AI will help you create it step by step. -

-
- - - -
- - Project Description -
- - Be as detailed as possible about what you want to build - -
- -