From 99f81d8da16e6dfe56e09dd7a9138eeb025f1189 Mon Sep 17 00:00:00 2001 From: cpacker Date: Sat, 25 Oct 2025 14:04:04 -0700 Subject: [PATCH] feat: esc to cancel --- src/cli/components/ApprovalDialogRich.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cli/components/ApprovalDialogRich.tsx b/src/cli/components/ApprovalDialogRich.tsx index 1fce149..368871f 100644 --- a/src/cli/components/ApprovalDialogRich.tsx +++ b/src/cli/components/ApprovalDialogRich.tsx @@ -255,6 +255,13 @@ export function ApprovalDialog({ return; } + if (key.escape) { + // Shortcut: ESC immediately opens the deny reason prompt + setSelectedOption(options.length - 1); + setIsEnteringReason(true); + return; + } + // Navigate with arrow keys if (key.upArrow) { setSelectedOption((prev) => (prev > 0 ? prev - 1 : options.length - 1));