import { useState, useEffect } from 'react'; import { X, Snail, Rocket, SkipForward } from 'lucide-react'; interface WebGPUFallbackDialogProps { isOpen: boolean; onClose: () => void; onUseCPU: () => void; onSkip: () => void; nodeCount: number; } /** * Fun dialog shown when WebGPU isn't available * Lets user choose: CPU fallback (slow) or skip embeddings */ export const WebGPUFallbackDialog = ({ isOpen, onClose, onUseCPU, onSkip, nodeCount, }: WebGPUFallbackDialogProps) => { const [isAnimating, setIsAnimating] = useState(true); const [isVisible, setIsVisible] = useState(false); useEffect(() => { if (isOpen) { // Trigger animation after mount requestAnimationFrame(() => setIsVisible(true)); } else { setIsVisible(false); } }, [isOpen]); if (!isOpen) return null; // Estimate time based on node count (rough: ~50ms per node on CPU) const estimatedMinutes = Math.ceil((nodeCount * 50) / 60000); const isSmallCodebase = nodeCount < 200; return (
Your browser doesn't support GPU acceleration
Couldn't create embeddings with WebGPU, so semantic search (Graph RAG) won't be as smart. The graph still works fine though!
Your options:
💡 Tip: Try Chrome or Edge for WebGPU support