re #104262. add log for execution and cancel.
This commit is contained in:
parent
03467e96ff
commit
391bca591e
|
@ -474,10 +474,10 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
await this._proxy.$resolveNotebookEditor(viewType, uri, editorId);
|
||||
},
|
||||
executeNotebookByAttachedKernel: async (viewType: string, uri: URI) => {
|
||||
return this.executeNotebookByAttachedKernel(viewType, uri);
|
||||
return this.executeNotebookByAttachedKernel(viewType, uri, undefined);
|
||||
},
|
||||
cancelNotebookByAttachedKernel: async (viewType: string, uri: URI) => {
|
||||
return this.cancelNotebookByAttachedKernel(viewType, uri);
|
||||
return this.cancelNotebookByAttachedKernel(viewType, uri, undefined);
|
||||
},
|
||||
onDidReceiveMessage: (editorId: string, rendererType: string | undefined, message: unknown) => {
|
||||
this._proxy.$onDidReceiveMessage(editorId, rendererType, message);
|
||||
|
@ -486,10 +486,10 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
return this.removeNotebookTextModel(uri);
|
||||
},
|
||||
executeNotebookCell: async (uri: URI, handle: number) => {
|
||||
return this._proxy.$executeNotebookByAttachedKernel(_viewType, uri, handle);
|
||||
return this.executeNotebookByAttachedKernel(_viewType, uri, handle);
|
||||
},
|
||||
cancelNotebookCell: async (uri: URI, handle: number) => {
|
||||
return this._proxy.$cancelNotebookByAttachedKernel(_viewType, uri, handle);
|
||||
return this.cancelNotebookByAttachedKernel(_viewType, uri, handle);
|
||||
},
|
||||
save: async (uri: URI, token: CancellationToken) => {
|
||||
return this._proxy.$saveNotebook(_viewType, uri, token);
|
||||
|
@ -519,7 +519,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
}
|
||||
|
||||
async $registerNotebookKernel(extension: NotebookExtensionDescription, id: string, label: string, selectors: (string | IRelativePattern)[], preloads: UriComponents[]): Promise<void> {
|
||||
const kernel = new MainThreadNotebookKernel(this._proxy, id, label, selectors, extension.id, URI.revive(extension.location), preloads.map(preload => URI.revive(preload)));
|
||||
const kernel = new MainThreadNotebookKernel(this._proxy, id, label, selectors, extension.id, URI.revive(extension.location), preloads.map(preload => URI.revive(preload)), this.logService);
|
||||
this._notebookKernels.set(id, kernel);
|
||||
this._notebookService.registerNotebookKernel(kernel);
|
||||
return;
|
||||
|
@ -552,9 +552,11 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
return that._proxy.$resolveNotebookKernel(handle, editorId, uri, kernelId, token);
|
||||
},
|
||||
executeNotebook: (uri: URI, kernelId: string, cellHandle: number | undefined) => {
|
||||
this.logService.debug('MainthreadNotebooks.registerNotebookKernelProvider#executeNotebook', uri.path, kernelId, cellHandle);
|
||||
return that._proxy.$executeNotebookKernelFromProvider(handle, uri, kernelId, cellHandle);
|
||||
},
|
||||
cancelNotebook: (uri: URI, kernelId: string, cellHandle: number | undefined) => {
|
||||
this.logService.debug('MainthreadNotebooks.registerNotebookKernelProvider#cancelNotebook', uri.path, kernelId, cellHandle);
|
||||
return that._proxy.$cancelNotebookKernelFromProvider(handle, uri, kernelId, cellHandle);
|
||||
},
|
||||
});
|
||||
|
@ -611,12 +613,14 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
}
|
||||
}
|
||||
|
||||
async executeNotebookByAttachedKernel(viewType: string, uri: URI): Promise<void> {
|
||||
return this._proxy.$executeNotebookByAttachedKernel(viewType, uri, undefined);
|
||||
async executeNotebookByAttachedKernel(viewType: string, uri: URI, handle: number | undefined): Promise<void> {
|
||||
this.logService.debug('MainthreadNotebooks#executeNotebookByAttachedKernel', uri.path, handle);
|
||||
return this._proxy.$executeNotebookByAttachedKernel(viewType, uri, handle);
|
||||
}
|
||||
|
||||
async cancelNotebookByAttachedKernel(viewType: string, uri: URI): Promise<void> {
|
||||
return this._proxy.$cancelNotebookByAttachedKernel(viewType, uri, undefined);
|
||||
async cancelNotebookByAttachedKernel(viewType: string, uri: URI, handle: number | undefined): Promise<void> {
|
||||
this.logService.debug('MainthreadNotebooks#cancelNotebookByAttachedKernel', uri.path, handle);
|
||||
return this._proxy.$cancelNotebookByAttachedKernel(viewType, uri, handle);
|
||||
}
|
||||
|
||||
async $postMessage(editorId: string, forRendererId: string | undefined, value: any): Promise<boolean> {
|
||||
|
@ -655,11 +659,13 @@ export class MainThreadNotebookKernel implements INotebookKernelInfo {
|
|||
readonly selectors: (string | IRelativePattern)[],
|
||||
readonly extension: ExtensionIdentifier,
|
||||
readonly extensionLocation: URI,
|
||||
readonly preloads: URI[]
|
||||
readonly preloads: URI[],
|
||||
readonly logService: ILogService
|
||||
) {
|
||||
}
|
||||
|
||||
async executeNotebook(viewType: string, uri: URI, handle: number | undefined): Promise<void> {
|
||||
this.logService.debug('MainThreadNotebookKernel#executeNotebook', uri.path, handle);
|
||||
return this._proxy.$executeNotebook2(this.id, viewType, uri, handle);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue