From 7a974f2dff094c1ce858036dd8f912f1da792bcc Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 4 Aug 2025 14:23:35 -0400 Subject: [PATCH] Fixed selection output to include triple backticks and language tag --- src/vs/workbench/contrib/void/common/prompt/prompts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/common/prompt/prompts.ts b/src/vs/workbench/contrib/void/common/prompt/prompts.ts index 9c737193..973dc493 100644 --- a/src/vs/workbench/contrib/void/common/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/common/prompt/prompts.ts @@ -579,7 +579,7 @@ export const messageOfSelection = async ( const { val } = await readFile(opts.fileService, s.uri, DEFAULT_FILE_SIZE_LIMIT) const lineNumAdd = lineNumAddition(s.range) const lines = val?.split('\n') - const selection = lines?.slice(s.range[0] - 1, s.range[1]).join('\n') + const selection = `${tripleTick[0]}${s.language}\n${lines?.slice(s.range[0] - 1, s.range[1]).join('\n')}\n${tripleTick[1]}` const content = selection ?? 'null' const str = `${s.uri.fsPath}${lineNumAdd}:\n${content}` return str