mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02: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 <github@multica.ai>
This commit is contained in:
@@ -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