import React, { useMemo } from 'react'; import { EModelEndpoint } from 'librechat-data-provider'; import type { TMessage } from 'librechat-data-provider'; import MessageIcon from '~/components/Share/MessageIcon'; import { useAgentsMapContext } from '~/Providers'; import { useLocalize } from '~/hooks'; interface AgentUpdateProps { currentAgentId: string; } const AgentUpdate: React.FC = ({ currentAgentId }) => { const localize = useLocalize(); const agentsMap = useAgentsMapContext(); const currentAgent = useMemo(() => agentsMap?.[currentAgentId], [agentsMap, currentAgentId]); if (!currentAgentId) { return null; } return (
{currentAgent?.name || localize('com_ui_agent')}
); }; export default AgentUpdate;