mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
[Notebook] Open Kernel Alias (Kusto) notebook with Kernel Alias (Kusto) as selected kernel (#14504)
* Open kernel alias notebook with kernel alias as selected kernel * Add language info test * fix test Co-authored-by: Vasu Bhog <bhogvu@mail.uc.edu>
This commit is contained in:
@@ -288,6 +288,10 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
return this._selectedKernelDisplayName;
|
||||
}
|
||||
|
||||
public set selectedKernelDisplayName(kernel: string) {
|
||||
this._selectedKernelDisplayName = kernel;
|
||||
}
|
||||
|
||||
public set trustedMode(isTrusted: boolean) {
|
||||
this._trustedMode = isTrusted;
|
||||
|
||||
@@ -951,6 +955,11 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
|
||||
private async updateKernelInfoOnKernelChange(kernel: nb.IKernel, kernelAlias?: string) {
|
||||
await this.updateKernelInfo(kernel);
|
||||
this.kernelAliases.forEach(kernel => {
|
||||
if (this._defaultLanguageInfo?.name === kernel.toLowerCase()) {
|
||||
kernelAlias = kernel;
|
||||
}
|
||||
});
|
||||
if (kernel.info) {
|
||||
this.updateLanguageInfo(kernel.info.language_info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user