"use client"; import { useEffect } from "react"; import { AlertTriangle, RefreshCw } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useI18n } from "@/i18n/i18n-context"; /** * Error boundary for the `/chat` route. Streaming chat failures are * usually surfaced inline by the QaChatPanel's `error` prop; this * boundary only fires for synchronous render errors (config provider, * history hook, mount sheet) that the inline error UI cannot recover. */ export default function ChatError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { const { t } = useI18n(); useEffect(() => { console.error("Chat route error:", error); }, [error]); return (

{t("chat.page.errorTitle")}

{error.message || t("chat.page.errorFallback")}

); }