import { memo, useMemo } from 'react'; import { ProviderIcon } from '@librechat/client'; import type { ProviderId } from 'librechat-data-provider'; import { URLIcon } from '~/components/Endpoints/URLIcon'; import { isImageURL } from '~/utils/icons'; interface ConvoIconURLProps { iconURL?: string; modelLabel?: string | null; provider?: ProviderId | null; assistantName?: string; agentName?: string; context?: 'landing' | 'menu-item' | 'nav' | 'message'; assistantAvatar?: string; agentAvatar?: string; } const classMap = { 'menu-item': 'relative flex h-full items-center justify-center overflow-hidden rounded-full', message: 'icon-md', default: 'icon-xl relative flex h-full overflow-hidden rounded-full', }; const styleMap = { 'menu-item': { width: '20px', height: '20px' }, default: { width: '100%', height: '100%' }, }; const styleImageMap = { default: { width: '100%', height: '100%' }, }; const ConvoIconURL: React.FC = ({ iconURL = '', modelLabel = '', provider, context, }) => { const isURL = useMemo(() => isImageURL(iconURL), [iconURL]); if (isURL) { return ( ); } return (
); }; export default memo(ConvoIconURL);