-
Notifications
You must be signed in to change notification settings - Fork 297
Extensibility for other extensions
Rich Chiodo edited this page Jan 14, 2021
·
4 revisions
The ms-toolsai.jupyter extension has a number of extensibility points for external partners to interface with. The definition of these extensibility points can be found here:
Some of the sub parts of that API are described in more detail below.
This api is called by an external extension to register a remote Jupyter server URI provider. This provider has the capability to inject UI into this command here:
(in that example, the Azure Compute entry was added).
When implementing the IJupyterUriQuickPicker
, you have a number of responsibilities:
- Add a
pythonRemoteServerProvider
to your package.jsoncontributes
section. Like so:
"contributes": {
"pythonRemoteServerProvider": []
},
- Call
registerRemoteServerProvider
in your extension'sactivate
function. - Provide an entry point for the dialog above. You do this with the call to
getQuickPickEntryItems
. - Provide
handleQuickPick
. This function is called if the user picks one of your entries you provided ingetQuickPickEntryItems
. -
handleQuickPick
can put up more UI to ask the user to pick from a number of choices. Its end result should be a handle to a choice or 'back'. That handle is a string value that will be used later to identify the choices the user made in your UI. -
getServerUri
should be able to take a handle returned fromhandleNextSteps
and provide an authorization header and a URL for final connection to a Jupyter server. At this point you might ask for a user name/password.
An example of implementing IJupyterUriQuickPicker
can be found here:
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension