diff options
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 4 | ||||
| -rw-r--r-- | packages/cli/src/ui/components/AuthInProgress.tsx | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index 2be681e5..d311facf 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -632,6 +632,10 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { ) { setShowIDEContextDetail((prev) => !prev); } else if (key.ctrl && (input === 'c' || input === 'C')) { + if (isAuthenticating) { + // Let AuthInProgress component handle the input. + return; + } handleExit(ctrlCPressedOnce, setCtrlCPressedOnce, ctrlCTimerRef); } else if (key.ctrl && (input === 'd' || input === 'D')) { if (buffer.text.length > 0) { diff --git a/packages/cli/src/ui/components/AuthInProgress.tsx b/packages/cli/src/ui/components/AuthInProgress.tsx index 196097f2..f05efe1d 100644 --- a/packages/cli/src/ui/components/AuthInProgress.tsx +++ b/packages/cli/src/ui/components/AuthInProgress.tsx @@ -18,8 +18,8 @@ export function AuthInProgress({ }: AuthInProgressProps): React.JSX.Element { const [timedOut, setTimedOut] = useState(false); - useInput((_, key) => { - if (key.escape) { + useInput((input, key) => { + if (key.escape || (key.ctrl && (input === 'c' || input === 'C'))) { onTimeout(); } }); @@ -48,7 +48,8 @@ export function AuthInProgress({ ) : ( <Box> <Text> - <Spinner type="dots" /> Waiting for auth... (Press ESC to cancel) + <Spinner type="dots" /> Waiting for auth... (Press ESC or CTRL+C to + cancel) </Text> </Box> )} |
