From 2cfb7638b67ec4c35502d40461b99d502809ec2a Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Mon, 27 Oct 2025 23:20:42 -0400 Subject: [PATCH] Focus textbox and add newlines after adding to context --- src/core/webview/ClineProvider.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 600915f2756..ec1781d79fa 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -677,7 +677,12 @@ export class ClineProvider const prompt = supportPrompt.create(promptType, params, customSupportPrompts) if (command === "addToContext") { - await visibleProvider.postMessageToWebview({ type: "invoke", invoke: "setChatBoxMessage", text: prompt }) + await visibleProvider.postMessageToWebview({ + type: "invoke", + invoke: "setChatBoxMessage", + text: `${prompt}\n\n`, + }) + await visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" }) return } @@ -701,7 +706,12 @@ export class ClineProvider const prompt = supportPrompt.create(promptType, params, customSupportPrompts) if (command === "terminalAddToContext") { - await visibleProvider.postMessageToWebview({ type: "invoke", invoke: "setChatBoxMessage", text: prompt }) + await visibleProvider.postMessageToWebview({ + type: "invoke", + invoke: "setChatBoxMessage", + text: `${prompt}\n\n`, + }) + await visibleProvider.postMessageToWebview({ type: "action", action: "focusInput" }) return }