feat(cli): support single Ctrl+C to cancel streaming, preserving double Ctrl+C to exit (#5838)

This commit is contained in:
JAYADITYA
2025-08-12 09:43:57 +05:30
committed by GitHub
parent f9efb2e24f
commit 2d1a6af890
3 changed files with 40 additions and 21 deletions

View File

@@ -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);
}
});