import { ChatContext } from '@/app/chat-context'; import { StarsSvg } from '@/components/icons'; import Icon, { AppstoreFilled } from '@ant-design/icons'; import { Radio } from 'antd'; import { useContext } from 'react'; import './index.css'; export default function ModeTab() { const { isContract, setIsContract, scene } = useContext(ChatContext); const isShow = scene && ['chat_with_db_execute', 'chat_dashboard'].includes(scene as string); if (!isShow) { return null; } return ( { setIsContract(!isContract); }} > Preview Editor ); }