Skip to content

Commit

Permalink
Add entire file to context when no text is selected
Browse files Browse the repository at this point in the history
Handles empty selection case
Calls addEntireFileToContext function
Improves user experience
Maintains existing functionality
  • Loading branch information
Andrew Oseen authored and Fryingpannn committed Oct 9, 2024
1 parent 46a6347 commit 46365c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions extensions/vscode/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46365c2

Please sign in to comment.