diff --git a/app/components/model-row.tsx b/app/components/model-row.tsx index 8cecbad3..c6a2b05d 100644 --- a/app/components/model-row.tsx +++ b/app/components/model-row.tsx @@ -7,7 +7,6 @@ interface ModelRowProps { baseModel: string; variants: string[]; isExpanded: boolean; - hasSingleVariant: boolean; determineModelIcon: (model: string) => JSX.Element; extractModelDetails: (model: string) => { displayName: string; @@ -22,40 +21,29 @@ const ModelRow: React.FC = ({ baseModel, variants, isExpanded, - hasSingleVariant, determineModelIcon, extractModelDetails, onSelectModel, onClose, handleToggleExpand, }) => { - const { quantBadge } = hasSingleVariant - ? extractModelDetails(variants[0]) - : { quantBadge: null }; - return (
{ - if (hasSingleVariant) { - onSelectModel(variants[0]); - onClose(); - } else { - handleToggleExpand(baseModel); - } + handleToggleExpand(baseModel); }} >
{determineModelIcon(variants[0])} {baseModel} - {hasSingleVariant && quantBadge && {quantBadge}}
- {!hasSingleVariant && (isExpanded ? : )} + {isExpanded ? : }
- {isExpanded && !hasSingleVariant && ( + {isExpanded && (
{variants.map((variant) => { const { quantBadge } = extractModelDetails(variant); diff --git a/app/components/model-select.tsx b/app/components/model-select.tsx index 26ed441a..2bd46412 100644 --- a/app/components/model-select.tsx +++ b/app/components/model-select.tsx @@ -245,7 +245,6 @@ const ModelSelect: React.FC = ({ baseModel={model[0]} variants={model[1]} isExpanded={expandedModels.has(model[0])} - hasSingleVariant={model[1].length === 1} determineModelIcon={determineModelIcon} extractModelDetails={extractModelDetails} onSelectModel={onSelectModel}