diff --git a/src/sql/workbench/common/constants.ts b/src/sql/workbench/common/constants.ts index de84bfa360..03e71e653a 100644 --- a/src/sql/workbench/common/constants.ts +++ b/src/sql/workbench/common/constants.ts @@ -51,7 +51,7 @@ export const NBFORMAT = 4; export const NBFORMAT_MINOR = 2; export const enum NotebookLanguage { - Notebook = 'Notebook', + Notebook = 'notebook', Ipynb = 'ipynb' } export interface INotebookSearchConfigurationProperties { diff --git a/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts b/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts index 34339cc907..966a201cf3 100644 --- a/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts +++ b/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts @@ -303,14 +303,14 @@ export class NotebookService extends Disposable implements INotebookService { } } if (isUntitled && path.isAbsolute(uri.fsPath)) { - const model = this._untitledEditorService.create({ associatedResource: uri, mode: languageMode, initialValue: initialStringContents }); + const model = this._untitledEditorService.create({ associatedResource: uri, languageId: languageMode, initialValue: initialStringContents }); fileInput = this._instantiationService.createInstance(UntitledTextEditorInput, model); } else { if (isUntitled) { - const model = this._untitledEditorService.create({ untitledResource: uri, mode: languageMode, initialValue: initialStringContents }); + const model = this._untitledEditorService.create({ untitledResource: uri, languageId: languageMode, initialValue: initialStringContents }); fileInput = this._instantiationService.createInstance(UntitledTextEditorInput, model); } else { - let input: any = { forceFile: true, resource: uri, mode: languageMode }; + let input: any = { forceFile: true, resource: uri, languageId: languageMode }; fileInput = await this._editorService.createEditorInput(input); } }