From 4145f45c7c3ccbc90864eaa7481f498a44a5c59f Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Thu, 4 Dec 2025 12:47:18 +0800 Subject: [PATCH] fix(vscode-ide-companion): fix send/stop button state timing issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show stop button immediately when request is submitted (isWaitingForResponse=true) - Prevent confusing state where send button appears disabled instead of stop button - Improve UX by providing immediate visual feedback on request submission 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/vscode-ide-companion/src/webview/App.tsx | 1 + .../vscode-ide-companion/src/webview/components/InputForm.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vscode-ide-companion/src/webview/App.tsx b/packages/vscode-ide-companion/src/webview/App.tsx index 1b2bec3d..1df61679 100644 --- a/packages/vscode-ide-companion/src/webview/App.tsx +++ b/packages/vscode-ide-companion/src/webview/App.tsx @@ -624,6 +624,7 @@ export const App: React.FC = () => { inputText={inputText} inputFieldRef={inputFieldRef} isStreaming={messageHandling.isStreaming} + isWaitingForResponse={messageHandling.isWaitingForResponse} isComposing={isComposing} editMode={editMode} thinkingEnabled={thinkingEnabled} diff --git a/packages/vscode-ide-companion/src/webview/components/InputForm.tsx b/packages/vscode-ide-companion/src/webview/components/InputForm.tsx index 16abca3f..3e9b1950 100644 --- a/packages/vscode-ide-companion/src/webview/components/InputForm.tsx +++ b/packages/vscode-ide-companion/src/webview/components/InputForm.tsx @@ -27,6 +27,7 @@ interface InputFormProps { // generic should be `HTMLDivElement` (not `HTMLDivElement | null`). inputFieldRef: React.RefObject; isStreaming: boolean; + isWaitingForResponse: boolean; isComposing: boolean; editMode: EditMode; thinkingEnabled: boolean; @@ -235,7 +236,7 @@ export const InputForm: React.FC = ({ {/* Send/Stop button */} - {isStreaming ? ( + {isStreaming || isWaitingForResponse ? (