import React, { useState } from "react"; import { Button, Collapse } from "antd"; import ReactMarkdown from "react-markdown"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { coy } from 'react-syntax-highlighter/dist/esm/styles/prism'; import { DownOutlined, RightOutlined, BulbOutlined } from "@ant-design/icons"; interface ReasoningContentProps { reasoningContent: string; } const ReasoningContent: React.FC = ({ reasoningContent }) => { const [isExpanded, setIsExpanded] = useState(true); if (!reasoningContent) return null; return (
{isExpanded && (
& { inline?: boolean; node?: any; }) { const match = /language-(\w+)/.exec(className || ''); return !inline && match ? ( {String(children).replace(/\n$/, '')} ) : ( {children} ); } }} > {reasoningContent}
)}
); }; export default ReasoningContent;