fix(agent): constrain model logo size and handle long model names in select dropdown

main
sp mac bookpro 2605 2026-05-25 23:18:47 +08:00
parent 7cf68160a8
commit c23df17355
1 changed files with 4 additions and 4 deletions

View File

@ -490,11 +490,11 @@ export default function AgentEditor() {
value: m.model_name,
label: (
<div className="flex items-center justify-between w-full py-1">
<div className="flex items-center gap-2">
<img src={m.icon} alt={m.model_name} className="w-5 h-5 object-contain rounded" />
<span className="font-medium text-gray-800">{m.model_name}</span>
<div className="flex items-center gap-2" style={{ flex: 1, minWidth: 0 }}>
<img src={m.icon} alt={m.model_name} style={{ width: 20, height: 20, objectFit: 'contain', borderRadius: 4, flexShrink: 0 }} />
<span className="font-medium text-gray-800" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{m.model_name}</span>
</div>
<div className="flex flex-col items-end justify-center text-[10px] text-gray-400">
<div className="flex flex-col items-end justify-center text-[10px] text-gray-400" style={{ flexShrink: 0, marginLeft: 8 }}>
<span>: ${inputPrice.toFixed(2)}/M</span>
<span>: ${outputPrice.toFixed(2)}/M</span>
</div>