import React from "react"; import type { HardwareInfo, ModelRecommendation } from "@/lib/tauriCommands"; import { Badge, Progress } from "@/components/ui"; import { Cpu, HardDrive, Monitor } from "lucide-react"; interface HardwareReportProps { hardware: HardwareInfo | null; recommendations: ModelRecommendation[]; } export function HardwareReport({ hardware, recommendations }: HardwareReportProps) { if (!hardware) { return (
Loading hardware information...
); } const maxRamDisplay = 64; const ramPercentage = Math.min(100, (hardware.total_ram_gb / maxRamDisplay) * 100); return (
{/* Hardware Info */}
{/* CPU */}

CPU

{hardware.cpu_arch}
{/* RAM */}

RAM

{hardware.total_ram_gb.toFixed(1)} GB / {maxRamDisplay} GB

{/* GPU */}

GPU

{hardware.gpu_vendor ? ( <>

{hardware.gpu_vendor}

{hardware.gpu_vram_gb && (

{hardware.gpu_vram_gb} GB VRAM

)} ) : (

No GPU detected

)}
{/* Model Recommendations */} {recommendations.length > 0 && (

Model Recommendations

{recommendations.map((rec) => (
{rec.recommended && ( RECOMMENDED )}

{rec.name}

{rec.size} | Min RAM: {rec.min_ram_gb} GB

{rec.description}

))}
)}
); }