mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat: Allow Esc to exit shell mode
- Update InputPrompt.tsx to handle Esc key for exiting shell mode. - Modify ShellModeIndicator.tsx to reflect the new keybinding. Fixes https://buganizer.corp.google.com/issues/419087952
This commit is contained in:
committed by
N. Taylor Mullen
parent
02ab0c234c
commit
872f308536
@@ -189,6 +189,10 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (key.escape) {
|
if (key.escape) {
|
||||||
|
if (shellModeActive) {
|
||||||
|
setShellModeActive(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
completion.resetCompletionState();
|
completion.resetCompletionState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const ShellModeIndicator: React.FC = () => (
|
|||||||
<Box>
|
<Box>
|
||||||
<Text color={Colors.AccentYellow}>
|
<Text color={Colors.AccentYellow}>
|
||||||
shell mode enabled
|
shell mode enabled
|
||||||
<Text color={Colors.SubtleComment}> (! to toggle)</Text>
|
<Text color={Colors.SubtleComment}> (esc to disable)</Text>
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user