diff options
| author | Adam Malczewski <[email protected]> | 2026-06-02 13:18:57 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-02 13:18:57 +0900 |
| commit | 3671b82cc624117476e30b95eaf7d2bc3b34ae28 (patch) | |
| tree | e0a8976ae129e64b8b7033bad8df6d6ab1293ce9 /packages/frontend/src/lib/components/ModelSelector.svelte | |
| parent | 2503eba38b7885ab92a9c0e4f082323d1b3a8679 (diff) | |
| download | dispatch-3671b82cc624117476e30b95eaf7d2bc3b34ae28.tar.gz dispatch-3671b82cc624117476e30b95eaf7d2bc3b34ae28.zip | |
fix(frontend): honest effort display in agent UI (gemini review)
Address two UI-accuracy issues found in review:
- AgentBuilder: the per-model effort select no longer disguises an unset
value as 'High'. Adds an explicit 'Inherit' option; choosing it strips
the effort key so the saved TOML omits it (and the call site falls back
to per-tab → default), matching displayed intent to persisted state.
- ModelSelector: effort badges for models without an explicit override now
reflect the actual effective effort (per-tab selector → default) instead
of always showing the default constant, mirroring backend resolution.
Diffstat (limited to 'packages/frontend/src/lib/components/ModelSelector.svelte')
| -rw-r--r-- | packages/frontend/src/lib/components/ModelSelector.svelte | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/frontend/src/lib/components/ModelSelector.svelte b/packages/frontend/src/lib/components/ModelSelector.svelte index c328511..8601795 100644 --- a/packages/frontend/src/lib/components/ModelSelector.svelte +++ b/packages/frontend/src/lib/components/ModelSelector.svelte @@ -37,12 +37,16 @@ const modelCache = new Map<string, string[]>(); } /** - * Human-readable effort label for a (possibly-unset / arbitrary) effort - * string. Falls back to the default level's label when unset/invalid so the - * displayed badge always reflects what will actually be used. + * Human-readable effort label for a (possibly-unset) per-model effort. When + * the model has no explicit override, the badge reflects what will ACTUALLY + * run: the per-tab selector if valid, else the system default. This mirrors + * the backend resolution order (per-model → per-tab → default) so the UI + * never misrepresents the effective effort. */ function effortLabel(effort: string | undefined): string { - return REASONING_EFFORT_LABELS[isReasoningEffort(effort) ? effort : DEFAULT_REASONING_EFFORT]; + if (isReasoningEffort(effort)) return REASONING_EFFORT_LABELS[effort]; + const tab = isReasoningEffort(reasoningEffort) ? reasoningEffort : DEFAULT_REASONING_EFFORT; + return REASONING_EFFORT_LABELS[tab]; } const { |
