import type { FC } from 'react' import type { SegmentListContextValue } from '..' import * as React from 'react' import { Markdown } from '@/app/components/base/markdown' import { cn } from '@/utils/classnames' import { useSegmentListContext } from '..' type ChunkContentProps = { detail: { answer?: string content: string sign_content: string } isFullDocMode: boolean className?: string } const selectIsCollapsed = (s: SegmentListContextValue) => s.isCollapsed const ChunkContent: FC = ({ detail, isFullDocMode, className, }) => { const { answer, content, sign_content } = detail const isCollapsed = useSegmentListContext(selectIsCollapsed) if (answer) { return (
Q
A
) } return ( ) } export default React.memo(ChunkContent)