MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / addRemoteJupyterServer

Function addRemoteJupyterServer

src/standalone/api/unstable/index.ts:94–117  ·  view source on GitHub ↗
(providerId: string, handle: string, serviceContainer: IServiceContainer)

Source from the content-addressed store, hash-verified

92 return kernelServiceFactory.getService();
93}
94export async function addRemoteJupyterServer(providerId: string, handle: string, serviceContainer: IServiceContainer) {
95 const extensions = serviceContainer.get<IExtensions>(IExtensions);
96 logger.error(
97 'The API addRemoteJupyterServer has being deprecated and will be removed soon, please use createJupyterServerCollection.'
98 );
99 const extensionId = extensions.determineExtensionFromCallStack().extensionId;
100 if (extensionId.toLowerCase() != CodespaceExtensionId.toLowerCase()) {
101 throw new Error('Deprecated API');
102 }
103 sendTelemetryEvent(Telemetry.JupyterApiUsage, undefined, {
104 clientExtId: extensionId,
105 pemUsed: 'addRemoteJupyterServer'
106 });
107
108 const selector = serviceContainer.get<CodespacesJupyterServerSelector>(CodespacesJupyterServerSelector);
109
110 const controllerRegistration = serviceContainer.get<IControllerRegistration>(IControllerRegistration);
111 const controllerCreatedPromise = waitForNotebookControllersCreationForServer(
112 { id: providerId, handle },
113 controllerRegistration
114 );
115 await selector.addJupyterServer({ id: providerId, handle, extensionId });
116 await controllerCreatedPromise;
117}
118
119export async function openNotebook(
120 uri: Uri,

Callers 1

buildApiFunction · 0.90

Calls 6

sendTelemetryEventFunction · 0.90
addJupyterServerMethod · 0.80
getMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected