"use client"; import { Select } from "antd"; import { Cpu } from "lucide-react"; import styles from "./model-picker.module.css"; import type { AiConfig } from "@/stores/use-config-store"; type ModelPickerProps = { config: AiConfig; value?: string; onChange: (model: string) => void; className?: string; fullWidth?: boolean; placeholder?: string; onMissingConfig?: () => void; }; export function ModelPicker({ config, value, onChange, className, fullWidth = false, placeholder = "选择模型", onMissingConfig }: ModelPickerProps) { const options = Array.from(new Set([value, ...config.models].filter(Boolean))).map((model) => ({ value: model, label: })); const width = fullWidth ? "100%" : `min(${Math.max(156, (value || placeholder).length * 8 + 64)}px, 100%)`; return (