import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' import { AlertTriangle } from 'lucide-react' import { useTranslation } from '@/i18n/react-i18next-compat' import { useModelLoad } from '@/hooks/useModelLoad' import { toast } from 'sonner' export default function LoadModelErrorDialog() { const { t } = useTranslation() const { modelLoadError, setModelLoadError } = useModelLoad() const handleCopy = () => { navigator.clipboard.writeText(modelLoadError ?? '') toast.success('Copy successful', { id: 'copy-model', description: 'Model load error information copied to clipboard', }) } const handleDialogOpen = (open: boolean) => { setModelLoadError(open ? modelLoadError : undefined) } return (
{t('common:error')} Failed to load model

{ if (el) { el.scrollTop = el.scrollHeight } }} > {modelLoadError}

) }