diff --git a/frontend/src/app/onboarding/model-selector.tsx b/frontend/src/app/onboarding/model-selector.tsx new file mode 100644 index 00000000..27926318 --- /dev/null +++ b/frontend/src/app/onboarding/model-selector.tsx @@ -0,0 +1,100 @@ +import { CheckIcon, ChevronsUpDownIcon } from "lucide-react"; +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; +import { cn } from "@/lib/utils"; + +export function ModelSelector({ + options, + value, + onValueChange, + icon, +}: { + options: { + value: string; + label: string; + default?: boolean; + }[]; + value: string; + icon?: React.ReactNode; + onValueChange: (value: string) => void; +}) { + const [open, setOpen] = useState(false); + return ( + + + + + + + + + No model found. + + {options.map((option) => ( + { + if (currentValue !== value) { + onValueChange(currentValue); + } + setOpen(false); + }} + > + +
+ {option.label} + {option.default && ( + + Default + + )} +
+
+ ))} +
+
+
+
+
+ ); +}