import type { FC, ReactNode, } from 'react' import { memo, } from 'react' import type { ChatItem } from '../types' import type { Theme } from '../embedded-chatbot/theme/theme-context' import { CssTransform } from '../embedded-chatbot/theme/utils' import { User } from '@/app/components/base/icons/src/public/avatar' import { Markdown } from '@/app/components/base/markdown' import { FileList } from '@/app/components/base/file-uploader' type QuestionProps = { item: ChatItem questionIcon?: ReactNode theme: Theme | null | undefined } const Question: FC = ({ item, questionIcon, theme, }) => { const { content, message_files, } = item return (
{ !!message_files?.length && ( ) }
{ questionIcon || (
) }
) } export default memo(Question)