Skip to content

Commit

Permalink
Merge pull request #241092 from microsoft/tyriar/241090
Browse files Browse the repository at this point in the history
Make sure folders are requested when files are
  • Loading branch information
Tyriar authored Feb 19, 2025
2 parents edac0c5 + f77ee08 commit 8261885
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,13 @@ export class TerminalCompletionService extends Disposable implements ITerminalCo
// for tests, make sure the right path separator is used
promptValue = promptValue.replaceAll(/[\\/]/g, resourceRequestConfig.pathSeparator);
}
const cwd = URI.revive(resourceRequestConfig.cwd);
const foldersRequested = resourceRequestConfig.foldersRequested ?? false;

// Files requested implies folders requested since the file could be in any folder. We could
// provide diagnostics when a folder is provided where a file is expected.
const foldersRequested = (resourceRequestConfig.foldersRequested || resourceRequestConfig.filesRequested) ?? false;
const filesRequested = resourceRequestConfig.filesRequested ?? false;

const cwd = URI.revive(resourceRequestConfig.cwd);
if (!cwd || (!foldersRequested && !filesRequested)) {
return;
}
Expand Down

0 comments on commit 8261885

Please sign in to comment.