// Inspired by Chatbot-UI and modified to fit the needs of this project // @see https://github.com/mckaywrigley/chatbot-ui/blob/main/components/Chat/ChatMessage.tsx import Image from 'next/image' import { Message } from 'ai' import remarkGfm from 'remark-gfm' import remarkMath from 'remark-math' import { MessageActionType } from '@/lib/types' import { cn } from '@/lib/utils' import { CodeBlock } from '@/components/ui/codeblock' import { IconUser } from '@/components/ui/icons' import { ChatMessageActions } from '@/components/chat-message-actions' import { MemoizedReactMarkdown } from '@/components/markdown' export interface ChatMessageProps { message: Message handleMessageAction: (messageId: string, action: MessageActionType) => void } export function ChatMessage({ message, handleMessageAction, ...props }: ChatMessageProps) { return (
{children}
)
}
return (