import type { FC } from 'react' import { useTranslation } from 'react-i18next' import { RiCloseLine } from '@remixicon/react' import { useEffect, useRef, useState } from 'react' import { useClickAway } from 'ahooks' import AgentLogDetail from './detail' import cn from '@/utils/classnames' import type { IChatItem } from '@/app/components/base/chat/chat/type' type AgentLogModalProps = { currentLogItem?: IChatItem width: number onCancel: () => void } const AgentLogModal: FC = ({ currentLogItem, width, onCancel, }) => { const { t } = useTranslation() const ref = useRef(null) const [mounted, setMounted] = useState(false) useClickAway(() => { if (mounted) onCancel() }, ref) useEffect(() => { setMounted(true) }, []) if (!currentLogItem || !currentLogItem.conversationId) return null return (

{t('appLog.runDetail.workflowTitle')}

) } export default AgentLogModal