import type { FC } from 'react' import { useEffect, useRef, useState } from 'react' import { useClickAway } from 'ahooks' import Card from './card' import { CopyFeedbackNew } from '@/app/components/base/copy-feedback' import { XClose } from '@/app/components/base/icons/src/vender/line/general' type PromptLogModalProps = { log: { role: string; text: string }[] width: number onCancel: () => void } const PromptLogModal: FC = ({ log, width, onCancel, }) => { const ref = useRef(null) const [mounted, setMounted] = useState(false) useClickAway(() => { if (mounted) onCancel() }, ref) useEffect(() => { setMounted(true) }, []) return (
PROMPT LOG
{ log.length === 1 && ( <>
) }
) } export default PromptLogModal