import { type ReactNode } from "react"; import { ImageSettingsTheme } from "@/components/image-settings-panel"; import { type CanvasTheme } from "@/lib/canvas-theme"; import type { AiConfig, ReasoningEffort } from "@/stores/use-config-store"; const reasoningEffortOptions: Array<{ value: ReasoningEffort; label: string }> = [ { value: "auto", label: "自动" }, { value: "low", label: "低" }, { value: "medium", label: "中" }, { value: "high", label: "高" }, { value: "xhigh", label: "极高" }, ]; type TextSettingsPanelProps = { config: AiConfig; onConfigChange: (key: "reasoningEffort", value: ReasoningEffort) => void; theme: CanvasTheme; className?: string; }; export function TextSettingsPanel({ config, onConfigChange, theme, className = "space-y-4" }: TextSettingsPanelProps) { return (
event.stopPropagation()}>
文本设置
推理强度
{reasoningEffortOptions.map((item) => ( onConfigChange("reasoningEffort", item.value)}> {item.label} ))}
); } export function reasoningEffortLabel(value: ReasoningEffort) { return reasoningEffortOptions.find((item) => item.value === value)?.label || value; } function OptionPill({ selected, theme, onClick, children }: { selected: boolean; theme: CanvasTheme; onClick: () => void; children: ReactNode }) { return ( ); }