Skip to content

Commit 2fe163e

Browse files
committed
Updates
1 parent 46dafc1 commit 2fe163e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/client/interpreter/configuration/recommededEnvironmentService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { inject, injectable } from 'inversify';
55
import { IRecommendedEnvironmentService } from './types';
66
import { PythonExtension, ResolvedEnvironment } from '../../api/types';
77
import { IExtensionContext, Resource } from '../../common/types';
8-
import { Uri, workspace } from 'vscode';
8+
import { commands, Uri, workspace } from 'vscode';
99
import { getWorkspaceStateValue, updateWorkspaceStateValue } from '../../common/persistentState';
1010
import { traceError } from '../../logging';
1111

@@ -18,6 +18,11 @@ export class RecommendedEnvironmentService implements IRecommendedEnvironmentSer
1818

1919
registerEnvApi(api: PythonExtension['environments']) {
2020
this.api = api;
21+
this.extensionContext.subscriptions.push(
22+
commands.registerCommand('python.getRecommendedEnvironment', async (resource: Resource) => {
23+
return this.getRecommededEnvironment(resource);
24+
}),
25+
);
2126
}
2227

2328
trackUserSelectedEnvironment(environmentPath: string | undefined, uri: Uri | undefined) {

0 commit comments

Comments
 (0)