import React, { useContext, useEffect } from 'react'; import classnames from 'classnames'; import { useProviderContext } from '@agentscope-ai/chat'; import { Drawer } from 'antd'; import { useResponsive } from 'ahooks'; import { useChatAnywhere } from '../hooks/ChatAnywhereProvider'; import Style from './style'; interface IProps { top?: React.ReactNode; left?: React.ReactNode; right?: React.ReactNode; } function Left(props: IProps) { const { sessionListShow, setSessionListShow, } = useChatAnywhere(v => ({ sessionListShow: v.sessionListShow, setSessionListShow: v.setSessionListShow })) const { getPrefixCls } = useProviderContext(); const prefixCls = getPrefixCls('chat-anywhere-layout'); const isMobile = isMobileHook(); useEffect(() => { setSessionListShow(!isMobile) }, [isMobile]) if (!props.left) return null; if (!isMobile) return