Skip to content

Commit 9f5b967

Browse files
committed
fix: build
1 parent b3c4c1d commit 9f5b967

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/features/copilotTools.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ export class GetEnvironmentInfoTool implements LanguageModelTool<IResourceRefere
6161
if (parameters.resourcePath === undefined || parameters.resourcePath === '') {
6262
throw new Error('Invalid input: resourcePath is required');
6363
}
64-
65-
const projects = this.api.getPythonProjects();
64+
const projects = this.api.getPythonProjects() || [];
6665
let root = projects.length > 0 ? projects[0].uri.fsPath : undefined;
6766
const resourcePath: Uri | undefined = getResourceUri(parameters.resourcePath, root);
6867
if (!resourcePath) {

0 commit comments

Comments
 (0)