fix: revert add full file when selection is empty

This commit is contained in:
uinstinct 2025-11-20 21:47:09 +05:30
parent 90d54f3f66
commit 1fbb545aeb

View file

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