File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -369,8 +369,23 @@ export async function addPythonProjectCommand(
369369 name : resource . fsPath ,
370370 rootUri : resource ,
371371 } ;
372+
373+ // When a URI is provided (right-click in explorer), directly use the existingProjects creator
374+ const existingProjectsCreator = pc . getProjectCreators ( ) . find ( ( c ) => c . name === 'existingProjects' ) ;
375+ if ( existingProjectsCreator ) {
376+ try {
377+ await existingProjectsCreator . create ( options ) ;
378+ return ;
379+ } catch ( ex ) {
380+ if ( ex === QuickInputButtons . Back ) {
381+ return addPythonProjectCommand ( resource , wm , em , pc ) ;
382+ }
383+ throw ex ;
384+ }
385+ }
372386 }
373387
388+ // If not a URI or existingProjectsCreator not found, fall back to picker
374389 const creator : PythonProjectCreator | undefined = await pickCreator ( pc . getProjectCreators ( ) ) ;
375390 if ( ! creator ) {
376391 return ;
You can’t perform that action at this time.
0 commit comments