File tree Expand file tree Collapse file tree 1 file changed +13
-20
lines changed Expand file tree Collapse file tree 1 file changed +13
-20
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) Microsoft Corporation.
2- // Licensed under the MIT License.
3-
41import {
52 CancellationToken ,
63 NotebookCell ,
74 NotebookCellExecution ,
85 NotebookCellOutput ,
9- NotebookCellOutputItem ,
10- NotebookController
6+ NotebookCellOutputItem
117} from 'vscode' ;
128
139import { KernelController } from '../kernelController' ;
1410
15- /**
16- * DeepnoteController extends KernelController to intercept cell execution
17- * and prepend initialization code to each cell execution.
18- */
19- export class DeepnoteController extends KernelController {
20- constructor ( controller : NotebookController ) {
21- super ( controller ) ;
22- }
23-
24- public override createNotebookCellExecution ( cell : NotebookCell ) : NotebookCellExecution {
25- const execution = super . createNotebookCellExecution ( cell ) ;
26- return new DeepnoteNotebookCellExecution ( execution , cell ) ;
27- }
28- }
29-
3011/**
3112 * Wrapper around NotebookCellExecution that prepends initialization code.
3213 * This is implemented by delegating all calls to the underlying execution object.
@@ -89,3 +70,15 @@ class DeepnoteNotebookCellExecution implements NotebookCellExecution {
8970 return this . execution . appendOutputItems ( items , output ) ;
9071 }
9172}
73+
74+ /**
75+ * DeepnoteController extends KernelController to intercept cell execution
76+ * and prepend initialization code to each cell execution.
77+ */
78+ export class DeepnoteController extends KernelController {
79+ public override createNotebookCellExecution ( cell : NotebookCell ) : NotebookCellExecution {
80+ const execution = super . createNotebookCellExecution ( cell ) ;
81+
82+ return new DeepnoteNotebookCellExecution ( execution , cell ) ;
83+ }
84+ }
You can’t perform that action at this time.
0 commit comments