import React, { useCallback, useState } from 'react'; import { Cloud, ChevronDown, ChevronRight, User } from 'lucide-react'; export default function LLMSelector({ providers, neonModels, selections, onSelectionsChange }) { const [openGroups, setOpenGroups] = useState({}); const toggleGroup = (key) => { setOpenGroups(prev => ({ ...prev, [key]: !prev[key] })); }; const handleClick = useCallback((modelId) => { onSelectionsChange(prev => { const isSelected = prev.includes(modelId); const isBoth = prev.length === 2 && prev[0] === modelId && prev[1] === modelId; if (isBoth) return []; if (isSelected) return [modelId, modelId]; if (prev.length < 2) return [...prev, modelId]; return [prev[1], modelId]; }); }, [onSelectionsChange]); const getIndicatorClass = (modelId) => { const [a, b] = selections; if (a === modelId && b === modelId) return 'select-indicator double-selected'; if (a === modelId) return 'select-indicator selected-a'; if (b === modelId) return 'select-indicator selected-b'; return 'select-indicator'; }; const getLabel = (modelId) => { const [a, b] = selections; if (a === modelId && b === modelId) return 'AB'; if (a === modelId) return 'A'; if (b === modelId) return 'B'; return ''; }; const shortName = (name) => name.split('/').pop() || name; const renderModel = (model) => ( ); const renderNeonPersona = (persona) => ( ); return (
Neon.ai Models