import { ChevronDown, ChevronUp, EyeOff, LoaderCircle, Plus, } from "lucide-react"; import type { TFunction } from "i18next"; import { ProviderIcon } from "../../Settings/Models/components/ProviderIconComponent"; import type { CandidateModel } from "./modelSelectorModels"; import { modelKey } from "./modelSelectorModels"; import styles from "./index.module.less"; interface CandidateModelSectionProps { candidates: CandidateModel[]; expanded: boolean; controlsId: string; searchActive: boolean; addingKey: string | null; visibilityKey: string | null; t: TFunction; onToggle: () => void; onAdd: (candidate: CandidateModel) => void; onHide: (candidate: CandidateModel) => void; } export function CandidateModelSection({ candidates, expanded, controlsId, searchActive, addingKey, visibilityKey, t, onToggle, onAdd, onHide, }: CandidateModelSectionProps) { if (candidates.length === 0) return null; return (
{expanded && (
{candidates.map((candidate) => { const key = modelKey(candidate.provider.id, candidate.model.id); return (
{candidate.model.name || candidate.model.id}
); })}
)}
); }