import { useEffect } from 'react'; import { AgentPanelProvider, useAgentPanelContext } from '~/Providers/AgentPanelContext'; import VersionPanel from './Version/VersionPanel'; import { useChatContext } from '~/Providers'; import ActionsPanel from './ActionsPanel'; import AgentPanel from './AgentPanel'; import MCPPanel from './MCPPanel'; import { Panel } from '~/common'; export default function AgentPanelSwitch() { return ( ); } function AgentPanelSwitchWithContext() { const { conversation } = useChatContext(); const { activePanel, setCurrentAgentId } = useAgentPanelContext(); useEffect(() => { const agent_id = conversation?.agent_id ?? ''; if (agent_id) { setCurrentAgentId(agent_id); } }, [setCurrentAgentId, conversation?.agent_id]); if (!conversation?.endpoint) { return null; } if (activePanel === Panel.actions) { return ; } if (activePanel === Panel.version) { return ; } if (activePanel === Panel.mcp) { return ; } return ; }