From 3325e4d854a88e8a7e6ee8291a15cff3211685e9 Mon Sep 17 00:00:00 2001 From: Kevin Cunnane Date: Fri, 7 Dec 2018 12:14:57 -0800 Subject: [PATCH] Fix #3422 Notebooks opened from within ADS should be Trusted by default. (#3498) --- .../api/node/mainThreadNotebookDocumentsAndEditors.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/api/node/mainThreadNotebookDocumentsAndEditors.ts b/src/sql/workbench/api/node/mainThreadNotebookDocumentsAndEditors.ts index 813834ef84..d3f184c1fd 100644 --- a/src/sql/workbench/api/node/mainThreadNotebookDocumentsAndEditors.ts +++ b/src/sql/workbench/api/node/mainThreadNotebookDocumentsAndEditors.ts @@ -14,6 +14,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorG import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITextEditorOptions } from 'vs/platform/editor/common/editor'; import { viewColumnToEditorGroup } from 'vs/workbench/api/shared/editor'; +import { Schemas } from 'vs/base/common/network'; import { SqlMainContext, MainThreadNotebookDocumentsAndEditorsShape, SqlExtHostContext, ExtHostNotebookDocumentsAndEditorsShape, @@ -293,7 +294,8 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements preserveFocus: options.preserveFocus, pinned: !options.preview }; - let model = new NotebookInputModel(uri, undefined, false, undefined); + let trusted = uri.scheme === Schemas.untitled; + let model = new NotebookInputModel(uri, undefined, trusted, undefined); let providerId = options.providerId; if(!providerId) {