import { useId } from "react"; import { Checkbox } from "./components/ui/checkbox.js"; import { Input } from "./components/ui/input.js"; import { NativeSelect, NativeSelectOption } from "./components/ui/native-select.js"; export function ModelThinkingOptions({ reasoning, onReasoningChange, supportsImages, onSupportsImagesChange, maxImagesPerPrompt, onMaxImagesPerPromptChange, disabled, advancedLabel, thinkingLabel, thinkingLevel, onThinkingLevelChange, thinkingLevelOptions, thinkingLevelLabel, thinkingLevelDefaultLabel, maxTokens, onMaxTokensChange, maxTokensLabel, contextWindow, onContextWindowChange, contextWindowLabel, imagesLabel, maxImagesLabel, }: { reasoning: boolean; onReasoningChange: (reasoning: boolean) => void; supportsImages?: boolean; onSupportsImagesChange?: (supportsImages: boolean) => void; maxImagesPerPrompt?: string; onMaxImagesPerPromptChange?: (maxImagesPerPrompt: string) => void; disabled?: boolean; advancedLabel: string; thinkingLabel: string; thinkingLevel?: string | null; onThinkingLevelChange?: (thinkingLevel: string | null) => void; thinkingLevelOptions?: ReadonlyArray<{ value: string; label: string }>; thinkingLevelLabel?: string; thinkingLevelDefaultLabel?: string; maxTokens?: string; onMaxTokensChange?: (maxTokens: string) => void; maxTokensLabel?: string; contextWindow?: string; onContextWindowChange?: (contextWindow: string) => void; contextWindowLabel?: string; imagesLabel?: string; maxImagesLabel?: string; }) { const id = useId(); const thinkingLevelId = useId(); const maxTokensId = useId(); const contextWindowId = useId(); const imagesId = useId(); const maxImagesId = useId(); return (
{advancedLabel} {reasoning && onThinkingLevelChange && thinkingLevelOptions && thinkingLevelOptions.length > 0 ? ( ) : null} {onMaxTokensChange && maxTokensLabel ? ( ) : null} {onContextWindowChange && contextWindowLabel ? ( ) : null} {onSupportsImagesChange ? ( ) : null} {supportsImages && onMaxImagesPerPromptChange ? ( ) : null}
); }