import { AnimatePresence, motion } from 'framer-motion'; import type { ActionAlert } from '~/types/actions'; import { classNames } from '~/utils/classNames'; interface Props { alert: ActionAlert; clearAlert: () => void; postMessage: (message: string) => void; } export default function ChatAlert({ alert, clearAlert, postMessage }: Props) { const { description, content, source } = alert; const isPreview = source === 'preview'; const title = isPreview ? 'Preview Error' : 'Terminal Error'; const message = isPreview ? 'We encountered an error while running the preview. Would you like Bolt to analyze and help resolve this issue?' : 'We encountered an error while running terminal commands. Would you like Bolt to analyze and help resolve this issue?'; return (
{/* Icon */}
{/* Content */}
{title}

{message}

{description && (
Error: {description}
)}
{/* Actions */}
); }