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