"use client"; import { useState } from "react"; import { Check, ChevronsUpDown, Loader2 } from "lucide-react"; import { Button } from "./ui/button"; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./ui/command"; import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover"; import { cn } from "@/lib/utils"; import { Switch } from "./ui/switch"; interface OllamaModel { label: string; value: string; description: string; size: string; icon: string; } interface OllamaConfigProps { ollamaModel: string; ollamaUrl: string; useCustomUrl: boolean; ollamaModels: OllamaModel[]; ollamaModelsLoading?: boolean; onInputChange: (value: string, field: string) => void; onUseCustomUrlChange: (checked: boolean) => void; openModelSelect: boolean; onOpenModelSelectChange: (open: boolean) => void; onModelSelect?: (modelName: string) => void; } export default function OllamaConfig({ ollamaModel, ollamaUrl, useCustomUrl, ollamaModels, ollamaModelsLoading = false, onInputChange, onUseCustomUrlChange, openModelSelect, onOpenModelSelectChange, onModelSelect, }: OllamaConfigProps) { return ( <>
No models available. Please check your Ollama connection.
)}Change this if you are using a custom Ollama instance