From eed1f15646cdecc9c895827002c48bad06d81e31 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sat, 9 Aug 2025 01:26:39 +0000 Subject: [PATCH] fix: add X button to stop/close task during save/reject prompts - Added a stop/close button (X icon) that remains visible when approval buttons are shown - Button allows users to terminate tasks during save/reject phase as requested - Fixes issue where users could not stop tasks when prompted to save/reject changes Fixes #6865 --- webview-ui/src/components/chat/ChatView.tsx | 47 +++++++++++++++------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 9b8c96dea1..b3935f7841 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -1942,25 +1942,46 @@ const ChatViewComponent: React.ForwardRefRenderFunction )} - {(secondaryButtonText || isStreaming) && ( + {(secondaryButtonText || isStreaming) && !isStreaming && ( handleSecondaryButtonClick(inputValue, selectedImages)}> - {isStreaming ? t("chat:cancel.title") : secondaryButtonText} + {secondaryButtonText} + + + )} + {isStreaming && ( + + handleSecondaryButtonClick(inputValue, selectedImages)}> + {t("chat:cancel.title")} + + + )} + {/* Add stop/close button when not streaming but showing approval buttons */} + {!isStreaming && enableButtons && primaryButtonText && ( + + startNewTask()}> + )}