@codingame/monaco-vscode-notebook-service-override 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +26 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +56 -112
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
|
@@ -6,16 +6,19 @@ import { isEqual, extname } from 'vscode/vscode/vs/base/common/resources';
|
|
|
6
6
|
import { assertType } from 'vscode/vscode/vs/base/common/types';
|
|
7
7
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
8
|
import { toFormattedString } from 'vscode/vscode/vs/base/common/jsonFormatter';
|
|
9
|
+
import { DefaultEndOfLine } from 'vscode/vscode/vs/editor/common/model';
|
|
9
10
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
10
11
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
11
12
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
12
13
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
13
14
|
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
14
15
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
16
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
15
17
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
16
19
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
17
20
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
18
|
-
import { Extensions as Extensions$1, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
21
|
+
import { Extensions as Extensions$1, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
19
22
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
20
23
|
import { NotebookEditor } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditor';
|
|
21
24
|
import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
@@ -41,20 +44,9 @@ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.serv
|
|
|
41
44
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
42
45
|
import './services/notebookRendererMessagingServiceImpl.js';
|
|
43
46
|
import 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
47
|
+
import 'vscode/vscode/vs/workbench/services/outline/browser/outline';
|
|
44
48
|
import 'vscode/vscode/vs/editor/contrib/documentSymbols/browser/outlineModel';
|
|
45
|
-
import '
|
|
46
|
-
import 'vscode/vscode/vs/base/browser/dompurify/dompurify';
|
|
47
|
-
import 'vscode/vscode/vs/base/browser/browser';
|
|
48
|
-
import 'vscode/vscode/vs/base/common/keyCodes';
|
|
49
|
-
import 'vscode/vscode/vs/base/common/platform';
|
|
50
|
-
import 'vscode/vscode/vs/base/common/themables';
|
|
51
|
-
import 'vscode/vscode/vs/base/common/filters';
|
|
52
|
-
import 'vscode/vscode/vs/base/common/strings';
|
|
53
|
-
import 'vscode/external/vscode-marked/lib/marked.esm.js';
|
|
54
|
-
import 'vscode/vscode/vs/base/common/codicons';
|
|
55
|
-
import 'vscode/vscode/vs/platform/markers/common/markers';
|
|
56
|
-
import 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
57
|
-
import 'vscode/vscode/vs/editor/common/languages';
|
|
49
|
+
import './viewModel/notebookOutlineEntryFactory.js';
|
|
58
50
|
import 'vscode/vscode/vs/base/common/async';
|
|
59
51
|
import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
60
52
|
import './controller/insertCellActions.js';
|
|
@@ -65,7 +57,7 @@ import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/editActio
|
|
|
65
57
|
import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/cellOutputActions';
|
|
66
58
|
import './controller/apiActions.js';
|
|
67
59
|
import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/foldingController';
|
|
68
|
-
import './controller/chat/
|
|
60
|
+
import './controller/chat/notebook.chat.contribution.js';
|
|
69
61
|
import './contrib/editorHint/emptyCellEditorHint.js';
|
|
70
62
|
import './contrib/clipboard/notebookClipboard.js';
|
|
71
63
|
import './contrib/find/notebookFind.js';
|
|
@@ -82,7 +74,7 @@ import './contrib/cellStatusBar/contributedStatusBarItemController.js';
|
|
|
82
74
|
import 'vscode/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController';
|
|
83
75
|
import './contrib/editorStatusBar/editorStatusBar.js';
|
|
84
76
|
import './contrib/undoRedo/notebookUndoRedo.js';
|
|
85
|
-
import '
|
|
77
|
+
import './contrib/cellCommands/cellCommands.js';
|
|
86
78
|
import './contrib/viewportWarmup/viewportWarmup.js';
|
|
87
79
|
import './contrib/troubleshoot/layout.js';
|
|
88
80
|
import './contrib/debug/notebookBreakpoints.js';
|
|
@@ -90,6 +82,9 @@ import './contrib/debug/notebookCellPausing.js';
|
|
|
90
82
|
import './contrib/debug/notebookDebugDecorations.js';
|
|
91
83
|
import './contrib/execute/executionEditorProgress.js';
|
|
92
84
|
import './contrib/kernelDetection/notebookKernelDetection.js';
|
|
85
|
+
import './contrib/cellDiagnostics/cellDiagnosticEditorContrib.js';
|
|
86
|
+
import './contrib/cellDiagnostics/cellDiagnosticsActions.js';
|
|
87
|
+
import './contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js';
|
|
93
88
|
import './diff/notebookDiffActions.js';
|
|
94
89
|
import { editorOptionsRegistry } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
95
90
|
import './services/notebookExecutionStateServiceImpl.js';
|
|
@@ -102,12 +97,11 @@ import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/cod
|
|
|
102
97
|
import './services/notebookKernelHistoryServiceImpl.js';
|
|
103
98
|
import './services/notebookLoggingServiceImpl.js';
|
|
104
99
|
import product$1 from 'vscode/vscode/vs/platform/product/common/product';
|
|
105
|
-
import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
106
|
-
import { runAccessibilityHelpAction, showAccessibleOutput } from './notebookAccessibility.js';
|
|
107
|
-
import { IAccessibleViewService } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleView.service';
|
|
108
|
-
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
109
|
-
import { AccessibilityHelpAction, AccessibleViewAction } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewActions';
|
|
110
100
|
import { NotebookVariables } from './contrib/notebookVariables/notebookVariables.js';
|
|
101
|
+
import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
102
|
+
import { NotebookAccessibilityHelp } from './notebookAccessibilityHelp.js';
|
|
103
|
+
import { NotebookAccessibleView } from './notebookAccessibleView.js';
|
|
104
|
+
import { DefaultFormatter } from 'vscode/vscode/vs/workbench/contrib/format/browser/formatActionsMultiple';
|
|
111
105
|
|
|
112
106
|
var NotebookContribution_1;
|
|
113
107
|
const _moduleId = "vs/workbench/contrib/notebook/browser/notebook.contribution";
|
|
@@ -262,7 +256,7 @@ let CellContentProvider = class CellContentProvider {
|
|
|
262
256
|
if (( (cell.uri.toString())) === ( (resource.toString()))) {
|
|
263
257
|
const bufferFactory = {
|
|
264
258
|
create: (defaultEOL) => {
|
|
265
|
-
const newEOL = (defaultEOL ===
|
|
259
|
+
const newEOL = (defaultEOL === DefaultEndOfLine.CRLF ? '\r\n' : '\n');
|
|
266
260
|
cell.textBuffer.setEOL(newEOL);
|
|
267
261
|
return { textBuffer: cell.textBuffer, disposable: Disposable.None };
|
|
268
262
|
},
|
|
@@ -566,43 +560,17 @@ NotebookLanguageSelectorScoreRefine = ( (__decorate([
|
|
|
566
560
|
( (__param(0, INotebookService))),
|
|
567
561
|
( (__param(1, ILanguageFeaturesService)))
|
|
568
562
|
], NotebookLanguageSelectorScoreRefine)));
|
|
569
|
-
class NotebookAccessibilityHelpContribution extends Disposable {
|
|
570
|
-
constructor() {
|
|
571
|
-
super();
|
|
572
|
-
this._register(AccessibilityHelpAction.addImplementation(105, 'notebook', async (accessor) => {
|
|
573
|
-
const activeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor()
|
|
574
|
-
|| accessor.get(ICodeEditorService).getFocusedCodeEditor()
|
|
575
|
-
|| accessor.get(IEditorService).activeEditorPane;
|
|
576
|
-
if (activeEditor) {
|
|
577
|
-
runAccessibilityHelpAction(accessor, activeEditor);
|
|
578
|
-
}
|
|
579
|
-
}, NOTEBOOK_IS_ACTIVE_EDITOR));
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
class NotebookAccessibleViewContribution extends Disposable {
|
|
583
|
-
constructor() {
|
|
584
|
-
super();
|
|
585
|
-
this._register(AccessibleViewAction.addImplementation(100, 'notebook', accessor => {
|
|
586
|
-
const accessibleViewService = accessor.get(IAccessibleViewService);
|
|
587
|
-
const editorService = accessor.get(IEditorService);
|
|
588
|
-
return showAccessibleOutput(accessibleViewService, editorService);
|
|
589
|
-
}, ( (ContextKeyExpr.and(
|
|
590
|
-
NOTEBOOK_OUTPUT_FOCUSED,
|
|
591
|
-
(ContextKeyExpr.equals('resourceExtname', '.ipynb'))
|
|
592
|
-
)))));
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
563
|
const workbenchContributionsRegistry = ( (Registry.as(Extensions$1.Workbench)));
|
|
596
|
-
registerWorkbenchContribution2(NotebookContribution.ID, NotebookContribution,
|
|
597
|
-
registerWorkbenchContribution2(CellContentProvider.ID, CellContentProvider,
|
|
598
|
-
registerWorkbenchContribution2(CellInfoContentProvider.ID, CellInfoContentProvider,
|
|
599
|
-
registerWorkbenchContribution2(RegisterSchemasContribution.ID, RegisterSchemasContribution,
|
|
600
|
-
registerWorkbenchContribution2(NotebookEditorManager.ID, NotebookEditorManager,
|
|
601
|
-
registerWorkbenchContribution2(NotebookLanguageSelectorScoreRefine.ID, NotebookLanguageSelectorScoreRefine,
|
|
602
|
-
registerWorkbenchContribution2(SimpleNotebookWorkingCopyEditorHandler.ID, SimpleNotebookWorkingCopyEditorHandler,
|
|
603
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(
|
|
604
|
-
|
|
605
|
-
|
|
564
|
+
registerWorkbenchContribution2(NotebookContribution.ID, NotebookContribution, WorkbenchPhase.BlockStartup);
|
|
565
|
+
registerWorkbenchContribution2(CellContentProvider.ID, CellContentProvider, WorkbenchPhase.BlockStartup);
|
|
566
|
+
registerWorkbenchContribution2(CellInfoContentProvider.ID, CellInfoContentProvider, WorkbenchPhase.BlockStartup);
|
|
567
|
+
registerWorkbenchContribution2(RegisterSchemasContribution.ID, RegisterSchemasContribution, WorkbenchPhase.BlockStartup);
|
|
568
|
+
registerWorkbenchContribution2(NotebookEditorManager.ID, NotebookEditorManager, WorkbenchPhase.BlockRestore);
|
|
569
|
+
registerWorkbenchContribution2(NotebookLanguageSelectorScoreRefine.ID, NotebookLanguageSelectorScoreRefine, WorkbenchPhase.BlockRestore);
|
|
570
|
+
registerWorkbenchContribution2(SimpleNotebookWorkingCopyEditorHandler.ID, SimpleNotebookWorkingCopyEditorHandler, WorkbenchPhase.BlockRestore);
|
|
571
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(NotebookVariables, LifecyclePhase.Eventually);
|
|
572
|
+
AccessibleViewRegistry.register(( (new NotebookAccessibleView())));
|
|
573
|
+
AccessibleViewRegistry.register(( (new NotebookAccessibilityHelp())));
|
|
606
574
|
const schemas = {};
|
|
607
575
|
function isConfigurationPropertySchema(x) {
|
|
608
576
|
return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined');
|
|
@@ -887,11 +855,23 @@ configurationRegistry.registerConfiguration({
|
|
|
887
855
|
default: 0,
|
|
888
856
|
tags: ['notebookLayout']
|
|
889
857
|
},
|
|
858
|
+
[NotebookSetting.markdownLineHeight]: {
|
|
859
|
+
markdownDescription: ( localizeWithPath(
|
|
860
|
+
_moduleId,
|
|
861
|
+
37,
|
|
862
|
+
"Controls the line height in pixels of markdown cells in notebooks. When set to {0}, {1} will be used",
|
|
863
|
+
'`0`',
|
|
864
|
+
'`normal`'
|
|
865
|
+
)),
|
|
866
|
+
type: 'number',
|
|
867
|
+
default: 0,
|
|
868
|
+
tags: ['notebookLayout']
|
|
869
|
+
},
|
|
890
870
|
[NotebookSetting.cellEditorOptionsCustomizations]: editorOptionsCustomizationSchema,
|
|
891
871
|
[NotebookSetting.interactiveWindowCollapseCodeCells]: {
|
|
892
872
|
markdownDescription: ( localizeWithPath(
|
|
893
873
|
_moduleId,
|
|
894
|
-
|
|
874
|
+
38,
|
|
895
875
|
"Controls whether code cells in the interactive window are collapsed by default."
|
|
896
876
|
)),
|
|
897
877
|
type: 'string',
|
|
@@ -901,7 +881,7 @@ configurationRegistry.registerConfiguration({
|
|
|
901
881
|
[NotebookSetting.outputLineHeight]: {
|
|
902
882
|
markdownDescription: ( localizeWithPath(
|
|
903
883
|
_moduleId,
|
|
904
|
-
|
|
884
|
+
39,
|
|
905
885
|
"Line height of the output text within notebook cells.\n - When set to 0, editor line height is used.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values."
|
|
906
886
|
)),
|
|
907
887
|
type: 'number',
|
|
@@ -911,7 +891,7 @@ configurationRegistry.registerConfiguration({
|
|
|
911
891
|
[NotebookSetting.outputFontSize]: {
|
|
912
892
|
markdownDescription: ( localizeWithPath(
|
|
913
893
|
_moduleId,
|
|
914
|
-
|
|
894
|
+
40,
|
|
915
895
|
"Font size for the output text within notebook cells. When set to 0, {0} is used.",
|
|
916
896
|
'`#editor.fontSize#`'
|
|
917
897
|
)),
|
|
@@ -922,7 +902,7 @@ configurationRegistry.registerConfiguration({
|
|
|
922
902
|
[NotebookSetting.outputFontFamily]: {
|
|
923
903
|
markdownDescription: ( localizeWithPath(
|
|
924
904
|
_moduleId,
|
|
925
|
-
|
|
905
|
+
41,
|
|
926
906
|
"The font family of the output text within notebook cells. When set to empty, the {0} is used.",
|
|
927
907
|
'`#editor.fontFamily#`'
|
|
928
908
|
)),
|
|
@@ -932,7 +912,7 @@ configurationRegistry.registerConfiguration({
|
|
|
932
912
|
[NotebookSetting.outputScrolling]: {
|
|
933
913
|
markdownDescription: ( localizeWithPath(
|
|
934
914
|
_moduleId,
|
|
935
|
-
|
|
915
|
+
42,
|
|
936
916
|
"Initially render notebook outputs in a scrollable region when longer than the limit."
|
|
937
917
|
)),
|
|
938
918
|
type: 'boolean',
|
|
@@ -940,15 +920,27 @@ configurationRegistry.registerConfiguration({
|
|
|
940
920
|
default: typeof product$1.quality === 'string' && product$1.quality !== 'stable'
|
|
941
921
|
},
|
|
942
922
|
[NotebookSetting.outputWordWrap]: {
|
|
943
|
-
markdownDescription: ( localizeWithPath(_moduleId,
|
|
923
|
+
markdownDescription: ( localizeWithPath(_moduleId, 43, "Controls whether the lines in output should wrap.")),
|
|
944
924
|
type: 'boolean',
|
|
945
925
|
tags: ['notebookLayout', 'notebookOutputLayout'],
|
|
946
926
|
default: false
|
|
947
927
|
},
|
|
928
|
+
[NotebookSetting.defaultFormatter]: {
|
|
929
|
+
description: ( localizeWithPath(
|
|
930
|
+
_moduleId,
|
|
931
|
+
44,
|
|
932
|
+
"Defines a default notebook formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter."
|
|
933
|
+
)),
|
|
934
|
+
type: ['string', 'null'],
|
|
935
|
+
default: null,
|
|
936
|
+
enum: DefaultFormatter.extensionIds,
|
|
937
|
+
enumItemLabels: DefaultFormatter.extensionItemLabels,
|
|
938
|
+
markdownEnumDescriptions: DefaultFormatter.extensionDescriptions
|
|
939
|
+
},
|
|
948
940
|
[NotebookSetting.formatOnSave]: {
|
|
949
941
|
markdownDescription: ( localizeWithPath(
|
|
950
942
|
_moduleId,
|
|
951
|
-
|
|
943
|
+
45,
|
|
952
944
|
"Format a notebook on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down."
|
|
953
945
|
)),
|
|
954
946
|
type: 'boolean',
|
|
@@ -958,7 +950,7 @@ configurationRegistry.registerConfiguration({
|
|
|
958
950
|
[NotebookSetting.insertFinalNewline]: {
|
|
959
951
|
markdownDescription: ( localizeWithPath(
|
|
960
952
|
_moduleId,
|
|
961
|
-
|
|
953
|
+
46,
|
|
962
954
|
"When enabled, insert a final new line into the end of code cells when saving a notebook."
|
|
963
955
|
)),
|
|
964
956
|
type: 'boolean',
|
|
@@ -968,20 +960,20 @@ configurationRegistry.registerConfiguration({
|
|
|
968
960
|
[NotebookSetting.codeActionsOnSave]: {
|
|
969
961
|
markdownDescription: ( localizeWithPath(
|
|
970
962
|
_moduleId,
|
|
971
|
-
|
|
963
|
+
47,
|
|
972
964
|
'Run a series of Code Actions for a notebook on save. Code Actions must be specified, the file must not be saved after delay, and the editor must not be shutting down. Example: `"notebook.source.organizeImports": "explicit"`'
|
|
973
965
|
)),
|
|
974
966
|
type: 'object',
|
|
975
967
|
additionalProperties: {
|
|
976
968
|
type: ['string', 'boolean'],
|
|
977
969
|
enum: ['explicit', 'never', true, false],
|
|
978
|
-
enumDescriptions: [( localizeWithPath(_moduleId,
|
|
970
|
+
enumDescriptions: [( localizeWithPath(_moduleId, 48, 'Triggers Code Actions only when explicitly saved.')), ( localizeWithPath(_moduleId, 49, 'Never triggers Code Actions on save.')), ( localizeWithPath(
|
|
979
971
|
_moduleId,
|
|
980
|
-
|
|
972
|
+
50,
|
|
981
973
|
'Triggers Code Actions only when explicitly saved. This value will be deprecated in favor of "explicit".'
|
|
982
974
|
)), ( localizeWithPath(
|
|
983
975
|
_moduleId,
|
|
984
|
-
|
|
976
|
+
51,
|
|
985
977
|
'Triggers Code Actions only when explicitly saved. This value will be deprecated in favor of "never".'
|
|
986
978
|
))],
|
|
987
979
|
},
|
|
@@ -990,7 +982,7 @@ configurationRegistry.registerConfiguration({
|
|
|
990
982
|
[NotebookSetting.formatOnCellExecution]: {
|
|
991
983
|
markdownDescription: ( localizeWithPath(
|
|
992
984
|
_moduleId,
|
|
993
|
-
|
|
985
|
+
52,
|
|
994
986
|
"Format a notebook cell upon execution. A formatter must be available."
|
|
995
987
|
)),
|
|
996
988
|
type: 'boolean',
|
|
@@ -999,16 +991,16 @@ configurationRegistry.registerConfiguration({
|
|
|
999
991
|
[NotebookSetting.confirmDeleteRunningCell]: {
|
|
1000
992
|
markdownDescription: ( localizeWithPath(
|
|
1001
993
|
_moduleId,
|
|
1002
|
-
|
|
994
|
+
53,
|
|
1003
995
|
"Control whether a confirmation prompt is required to delete a running cell."
|
|
1004
996
|
)),
|
|
1005
997
|
type: 'boolean',
|
|
1006
998
|
default: true
|
|
1007
999
|
},
|
|
1008
|
-
[NotebookSetting.
|
|
1000
|
+
[NotebookSetting.findFilters]: {
|
|
1009
1001
|
markdownDescription: ( localizeWithPath(
|
|
1010
1002
|
_moduleId,
|
|
1011
|
-
|
|
1003
|
+
54,
|
|
1012
1004
|
"Customize the Find Widget behavior for searching within notebook cells. When both markup source and markup preview are enabled, the Find Widget will search either the source code or preview based on the current state of the cell."
|
|
1013
1005
|
)),
|
|
1014
1006
|
type: 'object',
|
|
@@ -1038,40 +1030,50 @@ configurationRegistry.registerConfiguration({
|
|
|
1038
1030
|
},
|
|
1039
1031
|
tags: ['notebookLayout']
|
|
1040
1032
|
},
|
|
1033
|
+
[NotebookSetting.findScope]: {
|
|
1034
|
+
markdownDescription: ( localizeWithPath(
|
|
1035
|
+
_moduleId,
|
|
1036
|
+
55,
|
|
1037
|
+
"Enables the user to search within a selection of cells in the notebook. When enabled, the user will see a \"Find in Cell Selection\" icon in the notebook find widget."
|
|
1038
|
+
)),
|
|
1039
|
+
type: 'boolean',
|
|
1040
|
+
default: false,
|
|
1041
|
+
},
|
|
1041
1042
|
[NotebookSetting.remoteSaving]: {
|
|
1042
1043
|
markdownDescription: ( localizeWithPath(
|
|
1043
1044
|
_moduleId,
|
|
1044
|
-
|
|
1045
|
-
"Enables the incremental saving of notebooks
|
|
1045
|
+
56,
|
|
1046
|
+
"Enables the incremental saving of notebooks between processes and across Remote connections. When enabled, only the changes to the notebook are sent to the extension host, improving performance for large notebooks and slow network connections."
|
|
1046
1047
|
)),
|
|
1047
1048
|
type: 'boolean',
|
|
1048
|
-
default: typeof product$1.quality === 'string' && product$1.quality !== 'stable'
|
|
1049
|
+
default: typeof product$1.quality === 'string' && product$1.quality !== 'stable',
|
|
1050
|
+
tags: ['experimental']
|
|
1049
1051
|
},
|
|
1050
1052
|
[NotebookSetting.scrollToRevealCell]: {
|
|
1051
1053
|
markdownDescription: ( localizeWithPath(
|
|
1052
1054
|
_moduleId,
|
|
1053
|
-
|
|
1055
|
+
57,
|
|
1054
1056
|
"How far to scroll when revealing the next cell upon running {0}.",
|
|
1055
1057
|
'notebook.cell.executeAndSelectBelow'
|
|
1056
1058
|
)),
|
|
1057
1059
|
type: 'string',
|
|
1058
1060
|
enum: ['fullCell', 'firstLine', 'none'],
|
|
1059
1061
|
markdownEnumDescriptions: [
|
|
1060
|
-
( localizeWithPath(_moduleId,
|
|
1061
|
-
( localizeWithPath(_moduleId,
|
|
1062
|
-
( localizeWithPath(_moduleId,
|
|
1062
|
+
( localizeWithPath(_moduleId, 58, 'Scroll to fully reveal the next cell.')),
|
|
1063
|
+
( localizeWithPath(_moduleId, 59, 'Scroll to reveal the first line of the next cell.')),
|
|
1064
|
+
( localizeWithPath(_moduleId, 60, 'Do not scroll.')),
|
|
1063
1065
|
],
|
|
1064
1066
|
default: 'fullCell'
|
|
1065
1067
|
},
|
|
1066
1068
|
[NotebookSetting.cellChat]: {
|
|
1067
|
-
markdownDescription: ( localizeWithPath(_moduleId,
|
|
1069
|
+
markdownDescription: ( localizeWithPath(_moduleId, 61, "Enable experimental floating chat widget in notebooks.")),
|
|
1068
1070
|
type: 'boolean',
|
|
1069
1071
|
default: false
|
|
1070
1072
|
},
|
|
1071
1073
|
[NotebookSetting.cellGenerate]: {
|
|
1072
1074
|
markdownDescription: ( localizeWithPath(
|
|
1073
1075
|
_moduleId,
|
|
1074
|
-
|
|
1076
|
+
62,
|
|
1075
1077
|
"Enable experimental generate action to create code cell with inline chat enabled."
|
|
1076
1078
|
)),
|
|
1077
1079
|
type: 'boolean',
|
|
@@ -1081,21 +1083,21 @@ configurationRegistry.registerConfiguration({
|
|
|
1081
1083
|
[NotebookSetting.notebookVariablesView]: {
|
|
1082
1084
|
markdownDescription: ( localizeWithPath(
|
|
1083
1085
|
_moduleId,
|
|
1084
|
-
|
|
1086
|
+
63,
|
|
1085
1087
|
"Enable the experimental notebook variables view within the debug panel."
|
|
1086
1088
|
)),
|
|
1087
1089
|
type: 'boolean',
|
|
1088
1090
|
default: false
|
|
1089
1091
|
},
|
|
1090
1092
|
[NotebookSetting.cellFailureDiagnostics]: {
|
|
1091
|
-
markdownDescription: ( localizeWithPath(_moduleId,
|
|
1093
|
+
markdownDescription: ( localizeWithPath(_moduleId, 64, "Show available diagnostics for cell failures.")),
|
|
1092
1094
|
type: 'boolean',
|
|
1093
1095
|
default: true
|
|
1094
1096
|
},
|
|
1095
1097
|
[NotebookSetting.outputBackupSizeLimit]: {
|
|
1096
1098
|
markdownDescription: ( localizeWithPath(
|
|
1097
1099
|
_moduleId,
|
|
1098
|
-
|
|
1100
|
+
65,
|
|
1099
1101
|
"The limit of notebook output size in kilobytes (KB) where notebook files will no longer be backed up for hot reload. Use 0 for unlimited."
|
|
1100
1102
|
)),
|
|
1101
1103
|
type: 'number',
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { NOTEBOOK_IS_ACTIVE_EDITOR } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
2
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { AccessibleViewType, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
4
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
5
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
6
|
+
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
7
|
+
|
|
8
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp";
|
|
9
|
+
class NotebookAccessibilityHelp {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.priority = 105;
|
|
12
|
+
this.name = 'notebook';
|
|
13
|
+
this.when = NOTEBOOK_IS_ACTIVE_EDITOR;
|
|
14
|
+
this.type = AccessibleViewType.Help;
|
|
15
|
+
}
|
|
16
|
+
getProvider(accessor) {
|
|
17
|
+
const activeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor()
|
|
18
|
+
|| accessor.get(ICodeEditorService).getFocusedCodeEditor()
|
|
19
|
+
|| accessor.get(IEditorService).activeEditorPane;
|
|
20
|
+
if (activeEditor) {
|
|
21
|
+
return runAccessibilityHelpAction(accessor, activeEditor);
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
dispose() { }
|
|
26
|
+
}
|
|
27
|
+
function getAccessibilityHelpText() {
|
|
28
|
+
return [
|
|
29
|
+
( localizeWithPath(
|
|
30
|
+
_moduleId,
|
|
31
|
+
0,
|
|
32
|
+
'The notebook view is a collection of code and markdown cells. Code cells can be executed and will produce output directly below the cell.'
|
|
33
|
+
)),
|
|
34
|
+
( localizeWithPath(
|
|
35
|
+
_moduleId,
|
|
36
|
+
1,
|
|
37
|
+
'The Edit Cell command<keybinding:notebook.cell.edit> will focus on the cell input.'
|
|
38
|
+
)),
|
|
39
|
+
( localizeWithPath(
|
|
40
|
+
_moduleId,
|
|
41
|
+
2,
|
|
42
|
+
'The Quit Edit command<keybinding:notebook.cell.quitEdit> will set focus on the cell container. The default (Escape) key may need to be pressed twice first exit the virtual cursor if active.'
|
|
43
|
+
)),
|
|
44
|
+
( localizeWithPath(
|
|
45
|
+
_moduleId,
|
|
46
|
+
3,
|
|
47
|
+
'The Focus Output command<keybinding:notebook.cell.focusInOutput> will set focus in the cell\'s output.'
|
|
48
|
+
)),
|
|
49
|
+
( localizeWithPath(
|
|
50
|
+
_moduleId,
|
|
51
|
+
4,
|
|
52
|
+
'The Focus Next Cell Editor command<keybinding:notebook.focusNextEditor> will set focus in the next cell\'s editor.'
|
|
53
|
+
)),
|
|
54
|
+
( localizeWithPath(
|
|
55
|
+
_moduleId,
|
|
56
|
+
5,
|
|
57
|
+
'The Focus Previous Cell Editor command<keybinding:notebook.focusPreviousEditor> will set focus in the previous cell\'s editor.'
|
|
58
|
+
)),
|
|
59
|
+
( localizeWithPath(
|
|
60
|
+
_moduleId,
|
|
61
|
+
6,
|
|
62
|
+
'The up and down arrows will also move focus between cells while focused on the outer cell container.'
|
|
63
|
+
)),
|
|
64
|
+
( localizeWithPath(
|
|
65
|
+
_moduleId,
|
|
66
|
+
7,
|
|
67
|
+
'The Execute Cell command<keybinding:notebook.cell.executeAndFocusContainer> executes the cell that currently has focus.'
|
|
68
|
+
)),
|
|
69
|
+
( localizeWithPath(
|
|
70
|
+
_moduleId,
|
|
71
|
+
8,
|
|
72
|
+
'The Insert Cell Above/Below commands will create new empty code cells'
|
|
73
|
+
)),
|
|
74
|
+
( localizeWithPath(
|
|
75
|
+
_moduleId,
|
|
76
|
+
9,
|
|
77
|
+
'The Change Cell to Code/Markdown commands are used to switch between cell types.'
|
|
78
|
+
))
|
|
79
|
+
].join('\n\n');
|
|
80
|
+
}
|
|
81
|
+
function runAccessibilityHelpAction(accessor, editor) {
|
|
82
|
+
const helpText = getAccessibilityHelpText();
|
|
83
|
+
return {
|
|
84
|
+
id: AccessibleViewProviderId.Notebook,
|
|
85
|
+
verbositySettingKey: AccessibilityVerbositySettingId.Notebook,
|
|
86
|
+
provideContent: () => helpText,
|
|
87
|
+
onClose: () => {
|
|
88
|
+
editor.focus();
|
|
89
|
+
},
|
|
90
|
+
options: { type: AccessibleViewType.Help }
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { NotebookAccessibilityHelp, getAccessibilityHelpText, runAccessibilityHelpAction };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AccessibleViewType, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
2
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
4
|
+
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
5
|
+
import { NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
6
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
7
|
+
|
|
8
|
+
class NotebookAccessibleView {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.priority = 100;
|
|
11
|
+
this.name = 'notebook';
|
|
12
|
+
this.type = AccessibleViewType.View;
|
|
13
|
+
this.when = ( ContextKeyExpr.and(NOTEBOOK_OUTPUT_FOCUSED, ( ContextKeyExpr.equals('resourceExtname', '.ipynb'))));
|
|
14
|
+
}
|
|
15
|
+
getProvider(accessor) {
|
|
16
|
+
const editorService = accessor.get(IEditorService);
|
|
17
|
+
return showAccessibleOutput(editorService);
|
|
18
|
+
}
|
|
19
|
+
dispose() { }
|
|
20
|
+
}
|
|
21
|
+
function showAccessibleOutput(editorService) {
|
|
22
|
+
const activePane = editorService.activeEditorPane;
|
|
23
|
+
const notebookEditor = getNotebookEditorFromEditorPane(activePane);
|
|
24
|
+
const notebookViewModel = notebookEditor?.getViewModel();
|
|
25
|
+
const selections = notebookViewModel?.getSelections();
|
|
26
|
+
const notebookDocument = notebookViewModel?.notebookDocument;
|
|
27
|
+
if (!selections || !notebookDocument || !notebookEditor?.textModel) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const viewCell = notebookViewModel.viewCells[selections[0].start];
|
|
31
|
+
let outputContent = '';
|
|
32
|
+
const decoder = ( new TextDecoder());
|
|
33
|
+
for (let i = 0; i < viewCell.outputsViewModels.length; i++) {
|
|
34
|
+
const outputViewModel = viewCell.outputsViewModels[i];
|
|
35
|
+
const outputTextModel = viewCell.model.outputs[i];
|
|
36
|
+
const [mimeTypes, pick] = outputViewModel.resolveMimeTypes(notebookEditor.textModel, undefined);
|
|
37
|
+
const mimeType = mimeTypes[pick].mimeType;
|
|
38
|
+
let buffer = outputTextModel.outputs.find(output => output.mime === mimeType);
|
|
39
|
+
if (!buffer || mimeType.startsWith('image')) {
|
|
40
|
+
buffer = outputTextModel.outputs.find(output => !output.mime.startsWith('image'));
|
|
41
|
+
}
|
|
42
|
+
let text = `${mimeType}`;
|
|
43
|
+
if (buffer) {
|
|
44
|
+
const charLimit = 100_000;
|
|
45
|
+
text = decoder.decode(buffer.data.slice(0, charLimit).buffer);
|
|
46
|
+
if (buffer.data.byteLength > charLimit) {
|
|
47
|
+
text = text + '...(truncated)';
|
|
48
|
+
}
|
|
49
|
+
if (mimeType.endsWith('error')) {
|
|
50
|
+
text = text.replace(/\\u001b\[[0-9;]*m/gi, '').replaceAll('\\n', '\n');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const index = viewCell.outputsViewModels.length > 1
|
|
54
|
+
? `Cell output ${i + 1} of ${viewCell.outputsViewModels.length}\n`
|
|
55
|
+
: '';
|
|
56
|
+
outputContent = outputContent.concat(`${index}${text}\n`);
|
|
57
|
+
}
|
|
58
|
+
if (!outputContent) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
id: AccessibleViewProviderId.Notebook,
|
|
63
|
+
verbositySettingKey: AccessibilityVerbositySettingId.Notebook,
|
|
64
|
+
provideContent() { return outputContent; },
|
|
65
|
+
onClose() {
|
|
66
|
+
notebookEditor?.setFocus(selections[0]);
|
|
67
|
+
activePane?.focus();
|
|
68
|
+
},
|
|
69
|
+
options: { type: AccessibleViewType.View }
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { NotebookAccessibleView, showAccessibleOutput };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js
CHANGED
|
@@ -6,6 +6,7 @@ import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor
|
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { NotebookEditorInput, isCompositeNotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
8
8
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
+
import { GroupModelChangeKind } from 'vscode/vscode/vs/workbench/common/editor';
|
|
9
10
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
10
11
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
11
12
|
import { InteractiveWindowOpen } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
@@ -73,12 +74,12 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
|
|
|
73
74
|
}));
|
|
74
75
|
const interactiveWindowOpen = InteractiveWindowOpen.bindTo(contextKeyService);
|
|
75
76
|
this._disposables.add(editorService.onDidEditorsChange(e => {
|
|
76
|
-
if (e.event.kind ===
|
|
77
|
+
if (e.event.kind === GroupModelChangeKind.EDITOR_OPEN && !interactiveWindowOpen.get()) {
|
|
77
78
|
if (editorService.editors.find(editor => editor.editorId === 'interactive')) {
|
|
78
79
|
interactiveWindowOpen.set(true);
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
else if (e.event.kind ===
|
|
82
|
+
else if (e.event.kind === GroupModelChangeKind.EDITOR_CLOSE && interactiveWindowOpen.get()) {
|
|
82
83
|
if (!editorService.editors.find(editor => editor.editorId === 'interactive')) {
|
|
83
84
|
interactiveWindowOpen.set(false);
|
|
84
85
|
}
|
|
@@ -8,7 +8,7 @@ import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySign
|
|
|
8
8
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
9
9
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
10
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
|
-
import { CellUri, NotebookCellExecutionState, NotebookExecutionState } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
|
+
import { CellUri, NotebookCellExecutionState, CellEditType, NotebookExecutionState } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { CellExecutionUpdateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
|
|
13
13
|
import { INotebookExecutionService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService.service';
|
|
14
14
|
import { NotebookExecutionType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
@@ -334,7 +334,7 @@ NotebookExecutionListeners = ( __decorate([
|
|
|
334
334
|
function updateToEdit(update, cellHandle) {
|
|
335
335
|
if (update.editType === CellExecutionUpdateType.Output) {
|
|
336
336
|
return {
|
|
337
|
-
editType:
|
|
337
|
+
editType: CellEditType.Output,
|
|
338
338
|
handle: update.cellHandle,
|
|
339
339
|
append: update.append,
|
|
340
340
|
outputs: update.outputs,
|
|
@@ -342,7 +342,7 @@ function updateToEdit(update, cellHandle) {
|
|
|
342
342
|
}
|
|
343
343
|
else if (update.editType === CellExecutionUpdateType.OutputItems) {
|
|
344
344
|
return {
|
|
345
|
-
editType:
|
|
345
|
+
editType: CellEditType.OutputItems,
|
|
346
346
|
items: update.items,
|
|
347
347
|
append: update.append,
|
|
348
348
|
outputId: update.outputId
|
|
@@ -357,7 +357,7 @@ function updateToEdit(update, cellHandle) {
|
|
|
357
357
|
newInternalMetadata.runStartTime = update.runStartTime;
|
|
358
358
|
}
|
|
359
359
|
return {
|
|
360
|
-
editType:
|
|
360
|
+
editType: CellEditType.PartialInternalMetadata,
|
|
361
361
|
handle: cellHandle,
|
|
362
362
|
internalMetadata: newInternalMetadata
|
|
363
363
|
};
|
|
@@ -393,7 +393,7 @@ let CellExecution = class CellExecution extends Disposable {
|
|
|
393
393
|
}
|
|
394
394
|
initialize() {
|
|
395
395
|
const startExecuteEdit = {
|
|
396
|
-
editType:
|
|
396
|
+
editType: CellEditType.PartialInternalMetadata,
|
|
397
397
|
handle: this.cellHandle,
|
|
398
398
|
internalMetadata: {
|
|
399
399
|
executionId: generateUuid(),
|
|
@@ -449,7 +449,7 @@ let CellExecution = class CellExecution extends Disposable {
|
|
|
449
449
|
}
|
|
450
450
|
else {
|
|
451
451
|
const edit = {
|
|
452
|
-
editType:
|
|
452
|
+
editType: CellEditType.PartialInternalMetadata,
|
|
453
453
|
handle: this.cellHandle,
|
|
454
454
|
internalMetadata: {
|
|
455
455
|
lastRunSuccess: completionData.lastRunSuccess,
|