import type { ThinkingDraft } from "../../lib/personaThinking"; import { THINKING_EFFORTS, THINKING_MODES, thinkingValidationError, } from "../../lib/personaThinking"; import { Tag } from "../../components/primitives"; /** The panel's four `thinking` controls (design/01 §2.1). Split out of Personas.tsx * (which is near its size ceiling) and kept dumb: it renders + validates the form * draft, the request mapping lives in lib/personaThinking.ts. * * It deliberately does NOT claim a capability: `effort` is offered from the union * of the values the providers behind the API recognize, but whether the *active* * provider honors the value is decided by the backend (it validates against the * provider whitelist and WARNs when it drops one). The hint says so instead of * pretending the knob is on. */ const inputCls = "w-full rounded-[var(--mu-radius)] bg-[var(--mu-surface-2)] px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-[var(--mu-accent)]"; export function ThinkingFields({ value, onChange, }: { value: ThinkingDraft; onChange: (next: ThinkingDraft) => void; }): React.ReactNode { const set = (key: K, v: ThinkingDraft[K]) => onChange({ ...value, [key]: v }); const err = thinkingValidationError(value); return (
思考配置 thinking 只描述呈现/资源,不构成能力边界(design/01 §2.1);留空 = 不配置

effort 的有效取值随当前生效 provider 而定(OpenAI 兼容系 none/minimal/low/medium/high/xhigh/max;DeepSeek none/low/high/max,别名 minimal→low、medium→high、xhigh→high、ultra→max;未知 provider 不支持)。面板只做前端枚举校验; 该值在上游是否真生效,由后端按 provider 校验并记 WARN 决定,此处不代为承诺。

{err ? ( {err} ) : null}
); }