reply.tsx 766 Bytes
import type { FC } from 'react'
import { memo } from 'react'
import { RiEditLine } from '@remixicon/react'
import ActionButton from '@/app/components/base/action-button'
import { useOperationContext } from '@/app/components/base/chat/chat/answer/context/operation'
import { useChatConfigContext } from '@/app/components/base/chat/chat-with-history/context/chat-config-context'
const Reply: FC = memo(() => {
  const { setIsShowReplyModal } = useOperationContext()
  const { annotation_reply,supportAnnotation } = useChatConfigContext()
  if (!supportAnnotation || !annotation_reply?.enabled) return null
  return (
    <ActionButton onClick={() => setIsShowReplyModal(true)}>
      <RiEditLine className="h-4 w-4" />
    </ActionButton>
  )
})

export default Reply