fix: add consistent CTRL-C and ESC handling to all dialogs (#426)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-29 21:19:57 -08:00
committed by GitHub
parent f5a1a5e400
commit 397eb5e390
19 changed files with 302 additions and 171 deletions

View File

@@ -114,7 +114,16 @@ export const OAuthCodeDialog = memo(
}, [onComplete]);
// Handle keyboard input
useInput((_input, key) => {
useInput((input, key) => {
// CTRL-C: cancel at any cancelable state
if (key.ctrl && input === "c") {
if (flowState === "waiting_for_code" || flowState === "select_model") {
settingsManager.clearOAuthState();
onCancel();
}
return;
}
if (key.escape && flowState === "waiting_for_code") {
settingsManager.clearOAuthState();
onCancel();