Studio: slim the GLM-5.2 thinking menu width (#6631)

* Studio: slim the GLM-5.2 thinking menu width

The high|max effort menu has short labels, so drop it from min-w-44 to
min-w-40 for GLM-5.2 only. Other models keep the wider dropdown.

* Studio: keep Preserve thinking menus at full width

Only narrow the effort menu when it has no Preserve thinking row. That
row is longer than the high|max labels and wraps to two lines at the
min-w-40 floor, so gate the skinnier width on no preserve-thinking.
This commit is contained in:
Michael Han 2026-06-24 03:46:57 -07:00 committed by GitHub
commit 53c6ccc768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -612,6 +612,12 @@ export function SharedComposer({
const isEffort =
effectiveReasoningStyle === "reasoning_effort" ||
effectiveReasoningStyle === "enable_thinking_effort";
// GLM-5.2's effort menu (Off, high, max) has short rows, so it can sit a
// touch skinnier. Skip the narrower floor when a Preserve thinking row is
// present, since that longer label needs the wider width to stay one line.
const narrowEffortMenu =
effectiveReasoningStyle === "enable_thinking_effort" &&
!supportsPreserveThinking;
const thinkingActiveLook = isEffort
? reasoningLockedOn || (effectiveReasoningVisualEnabled && !reasoningDisabled)
: reasoningLockedOn || (effectiveReasoningEnabled && !reasoningDisabled);
@ -1785,7 +1791,10 @@ export function SharedComposer({
<DropdownMenuContent
side="top"
align="end"
className="unsloth-plus-menu min-w-44"
className={cn(
"unsloth-plus-menu",
narrowEffortMenu ? "min-w-40" : "min-w-44",
)}
>
{isEffort ? (
<>