diff options
| author | Shehab <[email protected]> | 2025-08-07 20:26:55 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-07 17:26:55 +0000 |
| commit | 7596481a9d537715ce74309b2b3da85d192d059a (patch) | |
| tree | 4f9a1718ce876410ecd1a31226307a6b7355f61c /packages/cli/src/ui/components/AuthInProgress.tsx | |
| parent | 8bac9e7d048c7ff97f0942b23edb0167ee6ca83e (diff) | |
feat(cli): Allow Exiting Authentication Menu with CTRL+C (SIGINT) (#4482)
Co-authored-by: Seth Troisi <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/AuthInProgress.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/AuthInProgress.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
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> )} |
