fix: add consistent CTRL-C and ESC handling to all dialogs (#426)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user