mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
fix: advertise the escalation shortcut only while the control is live
Codex on the e2e head, one P2: the tooltip appended the chord hint even while the button was disabled, advertising a shortcut that does nothing during an approval pause. The flagged control (InterruptNowButton) was since replaced by the shared EscalateNowButton, which inherited the pattern; the successor now omits the chord whenever the control is disabled, matching the rule the during-run hovercard already follows.
This commit is contained in:
parent
0e0aa51656
commit
814cbff086
1 changed files with 3 additions and 1 deletions
|
|
@ -136,7 +136,9 @@ export function EscalateNowButton({
|
|||
}
|
||||
/>
|
||||
<Ariakit.Tooltip className="z-50 rounded-lg bg-surface-tertiary px-2 py-1 text-xs text-text-primary shadow-lg">
|
||||
{chord ? `${label} · ${chord}` : label}
|
||||
{/* A disabled control's shortcut does nothing right now, so the
|
||||
* chord is only advertised while the escalation is live. */}
|
||||
{chord && !disabled ? `${label} · ${chord}` : label}
|
||||
</Ariakit.Tooltip>
|
||||
</Ariakit.TooltipProvider>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue