'use client'; import { motion } from 'framer-motion'; import { CheckCircle2, Cpu, HardDrive, Zap, AlertCircle, ArrowRight } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardFooter, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { useHardware } from '@/hooks/use-hardware'; import { cn } from '@/lib/utils'; // Componente Skeleton simples para loading function Skeleton({ className }: { className?: string }) { return (
); } interface SystemCheckStepProps { onNext: () => void; } export function SystemCheckStep({ onNext }: SystemCheckStepProps) { const { specs, loading } = useHardware(); const status = loading ? 'checking' : (specs ? 'success' : 'error'); const ramGB = specs ? (specs.total_memory / (1024 * 1024 * 1024)).toFixed(1) : 0; const isCompatible = specs ? specs.total_memory >= 4 * 1024 * 1024 * 1024 : false; // Mínimo 4GB return (
Verificação de Hardware Analisando compatibilidade para execução de IA local.
{status === 'success' && isCompatible && ( Compatível )}
{/* Estado de Carregamento ou Grid de Specs */} {status === 'checking' ? (
) : specs ? ( {/* Card RAM */}

Memória RAM

{ramGB} GB

Mínimo recomendado: 16GB

{/* Card CPU */}

Processador

{specs.cpu_count} Núcleos

Alta capacidade de threads

) : null} {/* Feedback Visual */}
{status === 'checking' && (

Escaneando componentes...

)} {status === 'success' && ( Hardware detectado com sucesso. Pronto para instalar o Ollama. )} {status === 'error' && (
Não foi possível detectar o hardware. Verifique as permissões.
)}
); }