import type { FC, ReactNode, } from 'react' import { memo, } from 'react' import type { ChatItem } from '../types' import { QuestionTriangle } from '@/app/components/base/icons/src/vender/solid/general' import { User } from '@/app/components/base/icons/src/public/avatar' import { Markdown } from '@/app/components/base/markdown' import ImageGallery from '@/app/components/base/image-gallery' type QuestionProps = { item: ChatItem questionIcon?: ReactNode } const Question: FC = ({ item, questionIcon, }) => { const { content, message_files, } = item const imgSrcs = message_files?.length ? message_files.map(item => item.url) : [] return (
{ !!imgSrcs.length && ( ) }
{ questionIcon || (
) }
) } export default memo(Question)