From 39e790af0f3841e97797eb850d90dd12dbfcf88e Mon Sep 17 00:00:00 2001 From: Sannidhya Sah Date: Sun, 15 Jun 2025 17:54:36 +0530 Subject: [PATCH] Fixed double messages after edit --- src/core/webview/webviewMessageHandler.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 1bee0b0fba..87a0638560 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -1132,15 +1132,8 @@ export const webviewMessageHandler = async ( // Force a state update to ensure the webview reflects the changes await provider.postStateToWebview() - // Auto-resume the task after editing - // Use setTimeout to ensure the task is fully initialized and the ask dialog is ready - setTimeout(async () => { - const currentCline = provider.getCurrentCline() - if (currentCline && currentCline.isInitialized) { - // Simulate clicking "Resume Task" by sending the response directly - currentCline.handleWebviewAskResponse("messageResponse", message.text, message.images) - } - }, 100) // Small delay to ensure proper initialization + // Note: Removed auto-resume logic to prevent duplicate messages. + // The user will manually send the edited message when ready. } } }