"use client"; import { useState } from "react"; import { ChevronDown } from "lucide-react"; import { useChatStore } from "@/lib/store"; import { MODELS } from "@/lib/constants"; import { SettingRow, SectionHeader, Slider } from "./SettingRow"; import { cn } from "@/lib/utils"; export function ModelSettings() { const { settings, updateSettings, resetSettings } = useChatStore(); const [showAdvanced, setShowAdvanced] = useState(false); const selectedModel = MODELS.find((m) => m.id === settings.model); return (
resetSettings("model")} /> {selectedModel && (
{selectedModel.label} {" — "}{selectedModel.description}
)}
updateSettings({ maxTokens: v })} showValue={false} className="flex-1" /> updateSettings({ maxTokens: Number(e.target.value) })} className={cn( "w-24 bg-surface-800 border border-surface-700 rounded-md px-2 py-1 text-sm text-right", "text-surface-200 focus:outline-none focus:ring-1 focus:ring-brand-500 font-mono" )} />