fix(frontend): default reasoning-effort label to Medium when unset (#4373)

The reasoning-effort selector trigger only appended a value for the four
explicit efforts; when reasoning_effort was unset it rendered
"Reasoning Effort:" with an empty value. The dropdown already treats an
unset effort as medium (highlighted and checked), so the trigger and the
menu disagreed on the default. Show "Medium" in the trigger when unset to
match the dropdown's existing default.
This commit is contained in:
Aari 2026-07-22 20:04:27 +08:00 committed by GitHub
parent 44990ff194
commit 1db84354bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2492,7 +2492,8 @@ export function InputBox({
" " + t.inputBox.reasoningEffortMinimal}
{context.reasoning_effort === "low" &&
" " + t.inputBox.reasoningEffortLow}
{context.reasoning_effort === "medium" &&
{(context.reasoning_effort === "medium" ||
!context.reasoning_effort) &&
" " + t.inputBox.reasoningEffortMedium}
{context.reasoning_effort === "high" &&
" " + t.inputBox.reasoningEffortHigh}