import { IconAlertCircle, IconRefresh } from "@tabler/icons-react"; import { Button } from "@/components/ui/button"; import { useChatStore } from "@/stores"; import { cn } from "@/lib/utils"; import type { InlineError as InlineErrorType } from "../stores/chat.store"; interface InlineErrorProps { error: InlineErrorType; } export function InlineError({ error }: InlineErrorProps) { const { retryLastMessage, isStreaming } = useChatStore(); // 如果 detail 和 message 不同,则显示详细错误信息 const showDetail = error.detail && error.detail !== error.message; return (