Skip to content

Extensibility for other extensions

Rich Chiodo edited this page Jan 14, 2021 · 4 revisions

Extensibility Points

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:

Api.ts

Some of the sub parts of that API are described in more detail below.

Datascience:registerRemoteServerProvider

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:

azure compute example

(in that example, the Azure Compute entry was added).

When implementing the IJupyterUriQuickPicker, you have a number of responsibilities:

  1. Add a pythonRemoteServerProvider to your package.json contributes section. Like so:
	"contributes": {
		"pythonRemoteServerProvider": []
	},

  1. Call registerRemoteServerProvider in your extension's activate function.
  2. Provide an entry point for the dialog above. You do this with the call to getQuickPickEntryItems.
  3. Provide handleQuickPick. This function is called if the user picks one of your entries you provided in getQuickPickEntryItems.
  4. 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.
  5. getServerUri should be able to take a handle returned from handleNextSteps 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:

Example extension

Clone this wiki locally