mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-10 18:36:45 +08:00
fix(agent): preserve unknown thinking_level in picker label
Stale persisted values (model swap, CLI catalog shrink) used to render as 'Default' even though the backend would still ship the orphaned token. Fall back to the raw value when no entry matches so the user sees what's actually saved and can clear it. Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
co-authored by
multica-agent
parent
688ebe1c9f
commit
3452fae3f9
@@ -44,9 +44,13 @@ export function ThinkingPicker({
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const selected = value ? levels.find((l) => l.value === value) : undefined;
|
||||
// Unknown-but-set value (model swap that dropped the option, CLI upgrade
|
||||
// that trimmed the catalog): show the raw token so the user can see what
|
||||
// is actually persisted and clear it, rather than silently labelling it
|
||||
// "Default" when the backend would still send the stale value.
|
||||
const triggerLabel = selected
|
||||
? selected.label
|
||||
: t(($) => $.pickers.thinking_default);
|
||||
: value || t(($) => $.pickers.thinking_default);
|
||||
const triggerTitle = t(($) => $.pickers.thinking_tooltip, {
|
||||
value: triggerLabel,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user