From 2d1a6af890da1e9437cd1a1774e2c7fc7ad32957 Mon Sep 17 00:00:00 2001
From: JAYADITYA <96861162+JayadityaGit@users.noreply.github.com>
Date: Tue, 12 Aug 2025 09:43:57 +0530
Subject: feat(cli): support single Ctrl+C to cancel streaming, preserving
 double Ctrl+C to exit (#5838)

---
 packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx')

diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
index fcdb743f..88b25b86 100644
--- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
+++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
@@ -56,9 +56,9 @@ export const ToolConfirmationMessage: React.FC<
     onConfirm(outcome);
   };
 
-  useInput((_, key) => {
+  useInput((input, key) => {
     if (!isFocused) return;
-    if (key.escape) {
+    if (key.escape || (key.ctrl && (input === 'c' || input === 'C'))) {
       handleConfirm(ToolConfirmationOutcome.Cancel);
     }
   });
-- 
cgit v1.2.3

