We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3c4c1d commit 9f5b967Copy full SHA for 9f5b967
src/features/copilotTools.ts
@@ -61,8 +61,7 @@ export class GetEnvironmentInfoTool implements LanguageModelTool<IResourceRefere
61
if (parameters.resourcePath === undefined || parameters.resourcePath === '') {
62
throw new Error('Invalid input: resourcePath is required');
63
}
64
-
65
- const projects = this.api.getPythonProjects();
+ const projects = this.api.getPythonProjects() || [];
66
let root = projects.length > 0 ? projects[0].uri.fsPath : undefined;
67
const resourcePath: Uri | undefined = getResourceUri(parameters.resourcePath, root);
68
if (!resourcePath) {
0 commit comments