import type { FC } from 'react' import { memo } from 'react' import type { ChatItem, } from '../../types' import { Markdown } from '@/app/components/base/markdown' import Thought from '@/app/components/base/chat/chat/thought' import { FileList } from '@/app/components/base/file-uploader' import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils' type AgentContentProps = { item: ChatItem responding?: boolean content?: string } const AgentContent: FC = ({ item, responding, content, }) => { const { annotation, agent_thoughts, } = item if (annotation?.logAnnotation) return return (
{content ? : agent_thoughts?.map((thought, index) => (
{thought.thought && ( )} {/* {item.tool} */} {/* perhaps not use tool */} {!!thought.tool && ( )} { !!thought.message_files?.length && ( ({ ...item, related_id: item.id })))} showDeleteAction={false} showDownloadAction={true} canPreview={true} /> ) }
))}
) } export default memo(AgentContent)