From 1fbb545aeb76fe89d3873eb2c14237405f0ab4e6 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:47:09 +0530 Subject: [PATCH] fix: revert add full file when selection is empty --- extensions/vscode/src/util/addCode.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/src/util/addCode.ts b/extensions/vscode/src/util/addCode.ts index 05d9c3afe..61147c183 100644 --- a/extensions/vscode/src/util/addCode.ts +++ b/extensions/vscode/src/util/addCode.ts @@ -94,7 +94,10 @@ export function getRangeInFileWithContents( export async function addHighlightedCodeToContext( webviewProtocol: VsCodeWebviewProtocol | undefined, ) { - const rangeInFileWithContents = getRangeInFileWithContents(true); + // the passed argument below was set to true in https://github.com/continuedev/continue/pull/6711 + // which would add the entire file contents when selection is empty + // currently this behaviour is reverted and needs further investigation + const rangeInFileWithContents = getRangeInFileWithContents(false); if (rangeInFileWithContents) { webviewProtocol?.request("highlightedCode", { rangeInFileWithContents,