From 0e1b61075778826b5e590864d977df15ed28cbb4 Mon Sep 17 00:00:00 2001 From: Tahier Hussain Date: Fri, 17 Apr 2026 01:26:55 +0530 Subject: [PATCH 1/3] fix: hide Stop button once response streaming begins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a prompt is running, the Stop button was shown throughout the entire process (thought chain + response streaming). Now the Stop button is only shown during the thought chain phase. Once the response starts streaming, the Send button is displayed instead. Changes: - Add isResponseStreaming computed state in ExistingChat.jsx - Thread isResponseStreaming prop through InputPrompt, PromptInput - Update button condition in MonacoPromptInput and DefaultPromptInput 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend/src/ide/chat-ai/DefaultPromptInput.jsx | 4 +++- frontend/src/ide/chat-ai/ExistingChat.jsx | 8 ++++++++ frontend/src/ide/chat-ai/InputPrompt.jsx | 3 +++ frontend/src/ide/chat-ai/MonacoPromptInput.jsx | 5 +++-- frontend/src/ide/chat-ai/PromptInput.jsx | 4 ++++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/frontend/src/ide/chat-ai/DefaultPromptInput.jsx b/frontend/src/ide/chat-ai/DefaultPromptInput.jsx index ceefb64..82d106e 100644 --- a/frontend/src/ide/chat-ai/DefaultPromptInput.jsx +++ b/frontend/src/ide/chat-ai/DefaultPromptInput.jsx @@ -6,6 +6,7 @@ import { Sender } from "@ant-design/x"; function DefaultPromptInput({ value, isPromptRunning, + isResponseStreaming, onSenderChange, onSubmit, onCancel, @@ -25,7 +26,7 @@ function DefaultPromptInput({ actions={(_, info) => { const { SendButton, LoadingButton } = info.components; - if (isPromptRunning) { + if (isPromptRunning && !isResponseStreaming) { return ( @@ -64,6 +65,7 @@ function DefaultPromptInput({ DefaultPromptInput.propTypes = { value: PropTypes.string.isRequired, isPromptRunning: PropTypes.bool.isRequired, + isResponseStreaming: PropTypes.bool, onSenderChange: PropTypes.func.isRequired, onSubmit: PropTypes.func.isRequired, onCancel: PropTypes.func.isRequired, diff --git a/frontend/src/ide/chat-ai/ExistingChat.jsx b/frontend/src/ide/chat-ai/ExistingChat.jsx index edc2b51..eafeaf2 100644 --- a/frontend/src/ide/chat-ai/ExistingChat.jsx +++ b/frontend/src/ide/chat-ai/ExistingChat.jsx @@ -246,6 +246,13 @@ const ExistingChat = memo(function ExistingChat({ return -1; }, [chatMessages, chatIntents]); + // Check if response is actively streaming (thought chain done, response started) + const isResponseStreaming = useMemo(() => { + if (!chatMessages?.length) return false; + const lastMessage = chatMessages?.[chatMessages.length - 1]; + return isPromptRunning && lastMessage?.response?.length > 0; + }, [chatMessages, isPromptRunning]); + useEffect(() => { if (chatMessages.length) { setLastChatMessageId( @@ -454,6 +461,7 @@ const ExistingChat = memo(function ExistingChat({ {editorContent} -
- {isPromptRunning ? ( + {isPromptRunning && !isResponseStreaming ? (