import React, { lazy, Suspense } from 'react'; import { cn } from '../../lib/utils'; import { LazyLoadBoundary } from '../ui/lazy-load-boundary'; type LazyMessageResponseProps = { children?: React.ReactNode; className?: string; isAnimating?: boolean; }; const MessageResponse = lazy(() => import('./messageResponse').then((module) => ({ default: module.MessageResponse })), ); const PlainTextFallback = ({ children, className }: LazyMessageResponseProps) => (
{children}
); export function LazyMessageResponse(props: LazyMessageResponseProps) { const resetKey = typeof props.children === 'string' ? props.children : undefined; return ( } resetKey={resetKey}> }> ); }