mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 17:23:42 -05:00
Notebooks: Adding Change Kernel API, 3 Integration Tests (#5287)
* Notebook change kernel * Fix notifying of k change too many times add tests * Fix broken unit test * Deal with comment
This commit is contained in:
@@ -264,8 +264,11 @@ export class ClientSession implements IClientSession {
|
||||
private async updateCachedKernelSpec(): Promise<void> {
|
||||
this._cachedKernelSpec = undefined;
|
||||
let kernel = this.kernel;
|
||||
if (kernel && kernel.isReady) {
|
||||
this._cachedKernelSpec = await this.kernel.getSpec();
|
||||
if (kernel) {
|
||||
await kernel.ready;
|
||||
if (kernel.isReady) {
|
||||
this._cachedKernelSpec = await kernel.getSpec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -332,6 +332,11 @@ export interface INotebookModel {
|
||||
*/
|
||||
readonly contentChanged: Event<NotebookContentChange>;
|
||||
|
||||
/**
|
||||
* Event fired on notebook provider change
|
||||
*/
|
||||
readonly onProviderIdChange: Event<string>;
|
||||
|
||||
/**
|
||||
* The trusted mode of the Notebook
|
||||
*/
|
||||
|
||||
@@ -457,10 +457,6 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
}
|
||||
}
|
||||
this._onClientSessionReady.fire(clientSession);
|
||||
this._kernelChangedEmitter.fire({
|
||||
oldValue: undefined,
|
||||
newValue: clientSession.kernel
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user