'use client'; import { cn } from '@/lib/utils'; import { type ComponentProps, memo } from 'react'; import { Streamdown } from 'streamdown'; type ResponseProps = ComponentProps; export const Response = memo( ({ className, ...props }: ResponseProps) => ( *:first-child]:mt-0 [&>*:last-child]:mb-0 [&_pre]:overflow-x-auto [&_pre]:max-w-full [&_code]:break-words [&_code]:whitespace-pre-wrap', className, )} {...props} /> ), (prevProps, nextProps) => prevProps.children === nextProps.children, ); Response.displayName = 'Response';