From 46365c2cd3ed4590408902ccf0a58fa6e793e1c4 Mon Sep 17 00:00:00 2001 From: Andrew Oseen Date: Sat, 14 Sep 2024 13:13:12 -0600 Subject: [PATCH] Add entire file to context when no text is selected Handles empty selection case Calls addEntireFileToContext function Improves user experience Maintains existing functionality --- extensions/vscode/src/commands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index c9069b48a0..66fe5368f9 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -92,6 +92,7 @@ async function addHighlightedCodeToContext( if (editor) { const selection = editor.selection; if (selection.isEmpty) { + await addEntireFileToContext(editor.document.uri, false, webviewProtocol); return; } // adjust starting position to include indentation