We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f5da1a commit 40cf40dCopy full SHA for 40cf40d
src/features/envCommands.ts
@@ -460,7 +460,15 @@ export async function createTerminalCommand(
460
api: PythonEnvironmentApi,
461
tm: TerminalManager,
462
): Promise<Terminal | undefined> {
463
- if (context instanceof Uri) {
+ if (context === undefined) {
464
+ const pw = await pickProject(api.getPythonProjects());
465
+ if (pw) {
466
+ const env = await api.getEnvironment(pw.uri);
467
+ if (env) {
468
+ return await tm.create(env, { cwd: pw.uri });
469
+ }
470
471
+ } else if (context instanceof Uri) {
472
const uri = context as Uri;
473
const env = await api.getEnvironment(uri);
474
const pw = api.getPythonProject(uri);
0 commit comments