import type { ComponentProps } from 'react' import ReactMarkdown, { type ExtraProps } from 'react-markdown' import rehypeHighlight from 'rehype-highlight' import remarkGfm from 'remark-gfm' import { cn } from '@/client/lib/cn' const remarkPlugins = [remarkGfm] const rehypePlugins = [rehypeHighlight] const components = { code({ node: _node, className, children, ...props }: ComponentProps<'code'> & ExtraProps) { return ( {children} ) }, pre({ children }: ComponentProps<'pre'>) { return (
          {children}
        
) } } type MarkdownContentProps = { size?: 'sm' content: string } type PlainMarkdownTextProps = { content: string } export function MarkdownContent({ size = 'sm', content }: MarkdownContentProps) { return (
{content}
) } export function PlainMarkdownText({ content }: PlainMarkdownTextProps) { return ( {content} ) }