fix: update model icon

pull/12560/head
Yi 1 year ago
parent 130cfaf2a4
commit 2f5da1f6aa

@ -28,11 +28,11 @@ const ModelIcon: FC<ModelIconProps> = ({
if (provider?.icon_small) { if (provider?.icon_small) {
return ( return (
<div className={`flex items-center justify-center ${isDeprecated ? 'opacity-50' : ''}`}> <div className={`flex items-center justify-center w-5 h-5 ${isDeprecated ? 'opacity-50' : ''}`}>
<img <img
alt='model-icon' alt='model-icon'
src={`${provider.icon_small[language] || provider.icon_small.en_US}`} src={`${provider.icon_small[language] || provider.icon_small.en_US}`}
className={cn('w-5 h-5', className)} className={cn('w-4.5 h-4.5', className)}
/> />
</div> </div>
) )

@ -107,7 +107,7 @@ const AgentModelTrigger: FC<AgentModelTriggerProps> = ({
{modelId ? ( {modelId ? (
<> <>
<ModelIcon <ModelIcon
className="m-0.5" className='p-0.5'
provider={currentProvider || modelProvider} provider={currentProvider || modelProvider}
modelName={currentModel?.model || modelId} modelName={currentModel?.model || modelId}
isDeprecated={hasDeprecated} isDeprecated={hasDeprecated}

@ -34,20 +34,18 @@ const ModelTrigger: FC<ModelTriggerProps> = ({
return ( return (
<div <div
className={cn( className={cn(
'group flex items-center p-1 gap-0.5 rounded-lg bg-components-input-bg-normal', 'group flex items-center p-1 h-6 gap-0.5 rounded-lg bg-components-input-bg-normal',
!readonly && 'hover:bg-components-input-bg-hover cursor-pointer', !readonly && 'hover:bg-components-input-bg-hover cursor-pointer',
open && 'bg-components-input-bg-hover', open && 'bg-components-input-bg-hover',
model.status !== ModelStatusEnum.active && 'bg-components-input-bg-disabled hover:bg-components-input-bg-disabled', model.status !== ModelStatusEnum.active && 'bg-components-input-bg-disabled hover:bg-components-input-bg-disabled',
className, className,
)} )}
> >
<div className='flex items-center justify-center w-6 h-6'> <ModelIcon
<ModelIcon className='p-0.5'
className='w-5 h-5 m-0.5' provider={provider}
provider={provider} modelName={model.model}
modelName={model.model} />
/>
</div>
<div className='flex px-1 py-[3px] items-center gap-1 grow truncate'> <div className='flex px-1 py-[3px] items-center gap-1 grow truncate'>
<ModelName <ModelName
className='grow' className='grow'

Loading…
Cancel
Save