import type { FC } from 'react' import { useEffect, useRef, useState } from 'react' import { useClickAway } from 'ahooks' import { RiCloseLine } from '@remixicon/react' import Card from './card' import { CopyFeedbackNew } from '@/app/components/base/copy-feedback' import type { IChatItem } from '@/app/components/base/chat/chat/type' type PromptLogModalProps = { currentLogItem?: IChatItem width: number onCancel: () => void } const PromptLogModal: FC = ({ currentLogItem, width, onCancel, }) => { const ref = useRef(null) const [mounted, setMounted] = useState(false) useClickAway(() => { if (mounted) onCancel() }, ref) useEffect(() => { setMounted(true) }, []) if (!currentLogItem || !currentLogItem.log) return null return (
PROMPT LOG
{ currentLogItem.log?.length === 1 && ( <>
) }
) } export default PromptLogModal