mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
fix(footer): suppress hint when status line active, hide on exit prompts
- Hide "? for shortcuts" when a custom status line is configured (status line already occupies the top row, hint is redundant) - Hide status line during Ctrl+C/D exit prompts to keep footer at one row during exit flow - Matches upstream Claude Code suppressHint + exitMessage behavior
This commit is contained in:
parent
63a14ae909
commit
2a28132fed
1 changed files with 12 additions and 7 deletions
|
|
@ -52,8 +52,11 @@ export const Footer: React.FC = () => {
|
||||||
const contextWindowSize =
|
const contextWindowSize =
|
||||||
config.getContentGeneratorConfig()?.contextWindowSize;
|
config.getContentGeneratorConfig()?.contextWindowSize;
|
||||||
|
|
||||||
|
// Hide "? for shortcuts" when a custom status line is active (it already
|
||||||
|
// occupies the top row, so the hint is redundant). Matches upstream behavior.
|
||||||
|
const suppressHint = !!statusLineText;
|
||||||
|
|
||||||
// Left bottom row: high-priority messages > approval mode > hint.
|
// Left bottom row: high-priority messages > approval mode > hint.
|
||||||
// Matches upstream layout where status line and hints coexist vertically.
|
|
||||||
const leftBottomContent = uiState.ctrlCPressedOnce ? (
|
const leftBottomContent = uiState.ctrlCPressedOnce ? (
|
||||||
<Text color={theme.status.warning}>{t('Press Ctrl+C again to exit.')}</Text>
|
<Text color={theme.status.warning}>{t('Press Ctrl+C again to exit.')}</Text>
|
||||||
) : uiState.ctrlDPressedOnce ? (
|
) : uiState.ctrlDPressedOnce ? (
|
||||||
|
|
@ -67,7 +70,7 @@ export const Footer: React.FC = () => {
|
||||||
) : showAutoAcceptIndicator !== undefined &&
|
) : showAutoAcceptIndicator !== undefined &&
|
||||||
showAutoAcceptIndicator !== ApprovalMode.DEFAULT ? (
|
showAutoAcceptIndicator !== ApprovalMode.DEFAULT ? (
|
||||||
<AutoAcceptIndicator approvalMode={showAutoAcceptIndicator} />
|
<AutoAcceptIndicator approvalMode={showAutoAcceptIndicator} />
|
||||||
) : (
|
) : suppressHint ? null : (
|
||||||
<Text color={theme.text.secondary}>{t('? for shortcuts')}</Text>
|
<Text color={theme.text.secondary}>{t('? for shortcuts')}</Text>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -117,11 +120,13 @@ export const Footer: React.FC = () => {
|
||||||
>
|
>
|
||||||
{/* Left column — status line on top, hints/mode on bottom */}
|
{/* Left column — status line on top, hints/mode on bottom */}
|
||||||
<Box flexDirection="column" flexShrink={isNarrow ? 0 : 1}>
|
<Box flexDirection="column" flexShrink={isNarrow ? 0 : 1}>
|
||||||
{statusLineText && (
|
{statusLineText &&
|
||||||
<Text dimColor wrap="truncate">
|
!uiState.ctrlCPressedOnce &&
|
||||||
{statusLineText}
|
!uiState.ctrlDPressedOnce && (
|
||||||
</Text>
|
<Text dimColor wrap="truncate">
|
||||||
)}
|
{statusLineText}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
<Text wrap="truncate">{leftBottomContent}</Text>
|
<Text wrap="truncate">{leftBottomContent}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue