From 2ea83a901b820348e246c0f9eff4f46d7db430b2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 12:35:35 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20improve=20prompting=20for?= =?UTF-8?q?=20context=20menu=20quick=20edits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/activation/activate.ts | 2 +- extensions/vscode/src/commands.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 1d086d879..2e62fea3e 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -78,7 +78,7 @@ export async function activateExtension(context: vscode.ExtensionContext) { const vscodeExtension = new VsCodeExtension(context); - migrate("showWelcome", () => { + migrate("showWelcome_1", () => { vscode.commands.executeCommand( "markdown.showPreview", vscode.Uri.file( diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 307d35dfb..09aef12d1 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -232,10 +232,14 @@ const commandsMap: ( } }, "continue.writeCommentsForCode": async () => { - await verticalDiffManager.streamEdit("Write comments for this code"); + await verticalDiffManager.streamEdit( + "Write comments for this code. Do not change anything about the code itself." + ); }, "continue.writeDocstringForCode": async () => { - await verticalDiffManager.streamEdit("Write a docstring for this code"); + await verticalDiffManager.streamEdit( + "Write a docstring for this code. Do not change anything about the code itself." + ); }, "continue.fixCode": async () => { await verticalDiffManager.streamEdit("Fix this code"); @@ -245,7 +249,7 @@ const commandsMap: ( }, "continue.fixGrammar": async () => { await verticalDiffManager.streamEdit( - "If there are any grammar or spelling mistakes in this writing, fix them" + "If there are any grammar or spelling mistakes in this writing, fix them. Do not make other large changes to the writing." ); }, "continue.viewLogs": async () => { @@ -264,7 +268,7 @@ const commandsMap: ( const terminalContents = await ide.getTerminalContents(); vscode.commands.executeCommand("continue.continueGUIView.focus"); sidebar.webviewProtocol?.request("userInput", { - input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents}`, + input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents.trim()}`, }); }, "continue.hideInlineTip": () => {