Python New Commands for new VS Code Getting Started APIs #16054
Labels
area-editor-*
User-facing catch-all
feature-request
Request for new features or functionality
needs proposal
Need to make some design decisions
partner ask
Will need some new commands and additions in the Python extension to support VS Code's new Getting Started API's for extensions
2 New Commands Needed
A command to create a new python file, "Python: Create new file". Should just do the same logic we have in the existing start page but made into a command so it can be called in the new getting started APIs from VS Code
A new command named "Python: Create New Project" that has the following steps.
First, it opens a file picker like this.
and then it shows this Quick pick input that says "Enter a name for the new Python project". This will create a name for their Python workspace. By default, the placeholder will be the name of the folder they selected.
and finally show the python interpeter list from the "Python: Select Interpreter" command.
Once that is all selected, open a new VS Code window with that workspace (name of the workspace was entered by the user in "Enter name for python project") and have their interpreter setting saved so its automatically selected. A new untitled python file will be opened by default using the command "Python: Create file" (outlined in the next section).
If at any point during the steps, if the user exits, then nothing happens
2 New "When Clauses" Needed
Documentation about "When clauses": (https://code.visualstudio.com/api/references/when-clause-contexts#add-a-custom-when-clause-context)
For if we detect the user has Python installed or not in their system. This will dictate the logic of whether to show the "install python" flow on the getting started page
To check whether the user has ever set their Python interpreter. This will dictate the logic of whether to show the "select interpreter" section of the getting started page
The text was updated successfully, but these errors were encountered: