Split up NotebookProvider into separate providers for handling file serialization and cell execution. (#17176)

This commit is contained in:
Cory Rivera
2021-09-29 16:15:28 -07:00
committed by GitHub
parent dfc2635aa7
commit 14904bb671
51 changed files with 1426 additions and 971 deletions

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata';
import { URI } from 'vs/base/common/uri';
import { Event } from 'vs/base/common/event';
import { IContentManager } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import { IContentLoader } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import { IStandardKernelWithProvider } from 'sql/workbench/services/notebook/browser/models/notebookUtils';
export interface INotebookInput {
@@ -14,11 +14,12 @@ export interface INotebookInput {
isDirty(): boolean;
setDirty(boolean);
readonly notebookUri: URI;
updateModel(): void;
updateModel(): Promise<void>;
readonly editorOpenedTimestamp: number;
readonly layoutChanged: Event<void>;
readonly contentManager: IContentManager;
readonly contentLoader: IContentLoader;
readonly standardKernels: IStandardKernelWithProvider[];
readonly providersLoaded: Promise<void>;
}
export function isINotebookInput(value: any): value is INotebookInput {
@@ -29,7 +30,7 @@ export function isINotebookInput(value: any): value is INotebookInput {
typeof value.isDirty === 'function' &&
typeof value.layoutChanged === 'function' &&
typeof value.editorOpenedTimestamp === 'number' &&
typeof value.contentManager === 'object' &&
typeof value.contentLoader === 'object' &&
typeof value.standardKernels === 'object') {
return true;
}