Focus textbox and add newlines after adding to context (#8877)

This commit is contained in:
Matt Rubens 2025-10-27 23:26:34 -04:00 • committed by GitHub
parent 49fde41616
commit 0d3817505e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}