@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.0.1
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/index.js +2 -2
- package/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +28 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
|
@@ -28,14 +28,14 @@ import { NotebookSetting, CellUri, CellKind, NotebookCellsChangeType, NotebookMe
|
|
|
28
28
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
29
29
|
import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
30
30
|
import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
|
|
31
|
-
import { NotebookDiffEditorInput } from '
|
|
32
|
-
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-
|
|
31
|
+
import { NotebookDiffEditorInput } from '../common/notebookDiffEditorInput.js';
|
|
32
|
+
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
|
|
33
33
|
import './services/notebookWorkerServiceImpl.js';
|
|
34
34
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
35
35
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
36
36
|
import './services/notebookEditorServiceImpl.js';
|
|
37
37
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
38
|
-
import { getStreamOutputData, getFormattedOutputJSON } from '@codingame/monaco-vscode-
|
|
38
|
+
import { getStreamOutputData, getFormattedOutputJSON } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel';
|
|
39
39
|
import '../common/notebookEditorModelResolverServiceImpl.js';
|
|
40
40
|
import './services/notebookKernelServiceImpl.js';
|
|
41
41
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
@@ -46,7 +46,7 @@ import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
46
46
|
import './services/notebookRendererMessagingServiceImpl.js';
|
|
47
47
|
import './viewModel/notebookOutlineDataSourceFactory.js';
|
|
48
48
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
49
|
-
import '
|
|
49
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/insertCellActions';
|
|
50
50
|
import './controller/executeActions.js';
|
|
51
51
|
import './controller/sectionActions.js';
|
|
52
52
|
import './controller/layoutActions.js';
|
|
@@ -54,7 +54,6 @@ import './controller/editActions.js';
|
|
|
54
54
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/cellOutputActions';
|
|
55
55
|
import './controller/apiActions.js';
|
|
56
56
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/foldingController';
|
|
57
|
-
import './controller/chat/notebook.chat.contribution.js';
|
|
58
57
|
import './controller/variablesActions.js';
|
|
59
58
|
import './contrib/editorHint/emptyCellEditorHint.js';
|
|
60
59
|
import './contrib/clipboard/notebookClipboard.js';
|
|
@@ -69,7 +68,7 @@ import './contrib/outline/notebookOutline.js';
|
|
|
69
68
|
import './contrib/profile/notebookProfile.js';
|
|
70
69
|
import './contrib/cellStatusBar/statusBarProviders.js';
|
|
71
70
|
import './contrib/cellStatusBar/contributedStatusBarItemController.js';
|
|
72
|
-
import '@codingame/monaco-vscode-
|
|
71
|
+
import '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController';
|
|
73
72
|
import './contrib/editorStatusBar/editorStatusBar.js';
|
|
74
73
|
import './contrib/undoRedo/notebookUndoRedo.js';
|
|
75
74
|
import './contrib/cellCommands/cellCommands.js';
|
|
@@ -103,27 +102,32 @@ import { AccessibleViewRegistry } from '@codingame/monaco-vscode-api/vscode/vs/p
|
|
|
103
102
|
import { NotebookAccessibilityHelp } from './notebookAccessibilityHelp.js';
|
|
104
103
|
import { NotebookAccessibleView } from './notebookAccessibleView.js';
|
|
105
104
|
import { DefaultFormatter } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/format/browser/formatActionsMultiple';
|
|
106
|
-
import { NotebookMultiTextDiffEditor } from '
|
|
107
|
-
import { NotebookMultiDiffEditorInput } from '
|
|
105
|
+
import { NotebookMultiTextDiffEditor } from './diff/notebookMultiDiffEditor.js';
|
|
106
|
+
import { NotebookMultiDiffEditorInput } from './diff/notebookMultiDiffEditorInput.js';
|
|
108
107
|
import { getFormattedMetadataJSON } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
|
109
108
|
import './viewModel/notebookOutlineEntryFactory.js';
|
|
110
|
-
import { getFormattedNotebookMetadataJSON } from '@codingame/monaco-vscode-
|
|
109
|
+
import { getFormattedNotebookMetadataJSON } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel';
|
|
111
110
|
import { NotebookOutputEditor } from './outputEditor/notebookOutputEditor.js';
|
|
112
111
|
import { NotebookOutputEditorInput } from './outputEditor/notebookOutputEditorInput.js';
|
|
113
112
|
|
|
114
113
|
var NotebookContribution_1;
|
|
115
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
116
|
-
(
|
|
117
|
-
]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
( new SyncDescriptor(
|
|
126
|
-
|
|
114
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
115
|
+
EditorPaneDescriptor.create(NotebookEditor, NotebookEditor.ID, "Notebook Editor"),
|
|
116
|
+
[( new SyncDescriptor(NotebookEditorInput))]
|
|
117
|
+
);
|
|
118
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
119
|
+
EditorPaneDescriptor.create(NotebookTextDiffEditor, NotebookTextDiffEditor.ID, "Notebook Diff Editor"),
|
|
120
|
+
[( new SyncDescriptor(NotebookDiffEditorInput))]
|
|
121
|
+
);
|
|
122
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
123
|
+
EditorPaneDescriptor.create(NotebookOutputEditor, NotebookOutputEditor.ID, "Notebook Output Editor"),
|
|
124
|
+
[( new SyncDescriptor(NotebookOutputEditorInput))]
|
|
125
|
+
);
|
|
126
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(
|
|
127
|
+
NotebookMultiTextDiffEditor,
|
|
128
|
+
NotebookMultiTextDiffEditor.ID,
|
|
129
|
+
"Notebook Diff Editor"
|
|
130
|
+
), [( new SyncDescriptor(NotebookMultiDiffEditorInput))]);
|
|
127
131
|
let NotebookDiffEditorSerializer = class NotebookDiffEditorSerializer {
|
|
128
132
|
constructor(_configurationService) {
|
|
129
133
|
this._configurationService = _configurationService;
|
|
@@ -139,7 +143,7 @@ let NotebookDiffEditorSerializer = class NotebookDiffEditorSerializer {
|
|
|
139
143
|
name: input.getName(),
|
|
140
144
|
originalName: input.original.getName(),
|
|
141
145
|
textDiffName: input.getName(),
|
|
142
|
-
viewType: input.viewType
|
|
146
|
+
viewType: input.viewType
|
|
143
147
|
});
|
|
144
148
|
}
|
|
145
149
|
deserialize(instantiationService, raw) {
|
|
@@ -147,24 +151,40 @@ let NotebookDiffEditorSerializer = class NotebookDiffEditorSerializer {
|
|
|
147
151
|
if (!data) {
|
|
148
152
|
return undefined;
|
|
149
153
|
}
|
|
150
|
-
const {
|
|
151
|
-
|
|
154
|
+
const {
|
|
155
|
+
resource,
|
|
156
|
+
originalResource,
|
|
157
|
+
name,
|
|
158
|
+
viewType
|
|
159
|
+
} = data;
|
|
160
|
+
if (!data || !URI.isUri(resource) || !URI.isUri(originalResource) || typeof name !== "string" || typeof viewType !== "string") {
|
|
152
161
|
return undefined;
|
|
153
162
|
}
|
|
154
|
-
if (this._configurationService.getValue(
|
|
155
|
-
return NotebookMultiDiffEditorInput.create(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
if (this._configurationService.getValue("notebook.experimental.enableNewDiffEditor")) {
|
|
164
|
+
return NotebookMultiDiffEditorInput.create(
|
|
165
|
+
instantiationService,
|
|
166
|
+
resource,
|
|
167
|
+
name,
|
|
168
|
+
undefined,
|
|
169
|
+
originalResource,
|
|
170
|
+
viewType
|
|
171
|
+
);
|
|
172
|
+
} else {
|
|
173
|
+
return NotebookDiffEditorInput.create(
|
|
174
|
+
instantiationService,
|
|
175
|
+
resource,
|
|
176
|
+
name,
|
|
177
|
+
undefined,
|
|
178
|
+
originalResource,
|
|
179
|
+
viewType
|
|
180
|
+
);
|
|
159
181
|
}
|
|
160
182
|
}
|
|
161
183
|
static canResolveBackup(editorInput, backupResource) {
|
|
162
184
|
return false;
|
|
163
185
|
}
|
|
164
186
|
};
|
|
165
|
-
NotebookDiffEditorSerializer = ( __decorate([
|
|
166
|
-
( __param(0, IConfigurationService))
|
|
167
|
-
], NotebookDiffEditorSerializer));
|
|
187
|
+
NotebookDiffEditorSerializer = ( __decorate([( __param(0, IConfigurationService))], NotebookDiffEditorSerializer));
|
|
168
188
|
class NotebookEditorSerializer {
|
|
169
189
|
canSerialize(input) {
|
|
170
190
|
return input.typeId === NotebookEditorInput.ID;
|
|
@@ -184,8 +204,13 @@ class NotebookEditorSerializer {
|
|
|
184
204
|
if (!data) {
|
|
185
205
|
return undefined;
|
|
186
206
|
}
|
|
187
|
-
const {
|
|
188
|
-
|
|
207
|
+
const {
|
|
208
|
+
resource,
|
|
209
|
+
preferredResource,
|
|
210
|
+
viewType,
|
|
211
|
+
options
|
|
212
|
+
} = data;
|
|
213
|
+
if (!data || !URI.isUri(resource) || typeof viewType !== "string") {
|
|
189
214
|
return undefined;
|
|
190
215
|
}
|
|
191
216
|
const input = NotebookEditorInput.getOrCreate(instantiationService, resource, preferredResource, viewType, options);
|
|
@@ -209,7 +234,13 @@ class NotebookOutputEditorSerializer {
|
|
|
209
234
|
if (!data) {
|
|
210
235
|
return undefined;
|
|
211
236
|
}
|
|
212
|
-
const input = instantiationService.createInstance(
|
|
237
|
+
const input = instantiationService.createInstance(
|
|
238
|
+
NotebookOutputEditorInput,
|
|
239
|
+
data.notebookUri,
|
|
240
|
+
data.cellIndex,
|
|
241
|
+
undefined,
|
|
242
|
+
data.outputIndex
|
|
243
|
+
);
|
|
213
244
|
return input;
|
|
214
245
|
}
|
|
215
246
|
}
|
|
@@ -217,8 +248,12 @@ class NotebookOutputEditorSerializer {
|
|
|
217
248
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(NotebookDiffEditorInput.ID, NotebookDiffEditorSerializer);
|
|
218
249
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(NotebookOutputEditorInput.ID, NotebookOutputEditorSerializer);
|
|
219
250
|
let NotebookContribution = class NotebookContribution extends Disposable {
|
|
220
|
-
static {
|
|
221
|
-
|
|
251
|
+
static {
|
|
252
|
+
NotebookContribution_1 = this;
|
|
253
|
+
}
|
|
254
|
+
static {
|
|
255
|
+
this.ID = "workbench.contrib.notebook";
|
|
256
|
+
}
|
|
222
257
|
constructor(undoRedoService, configurationService, codeEditorService) {
|
|
223
258
|
super();
|
|
224
259
|
this.codeEditorService = codeEditorService;
|
|
@@ -228,14 +263,16 @@ let NotebookContribution = class NotebookContribution extends Disposable {
|
|
|
228
263
|
this.updateCellUndoRedoComparisonKey(configurationService, undoRedoService);
|
|
229
264
|
}
|
|
230
265
|
}));
|
|
231
|
-
this._register(
|
|
266
|
+
this._register(
|
|
267
|
+
this.codeEditorService.registerDecorationType("comment-controller", COMMENTEDITOR_DECORATION_KEY, {})
|
|
268
|
+
);
|
|
232
269
|
}
|
|
233
270
|
updateCellUndoRedoComparisonKey(configurationService, undoRedoService) {
|
|
234
271
|
const undoRedoPerCell = configurationService.getValue(NotebookSetting.undoRedoPerCell);
|
|
235
272
|
if (!undoRedoPerCell) {
|
|
236
273
|
if (!this._uriComparisonKeyComputer) {
|
|
237
274
|
this._uriComparisonKeyComputer = undoRedoService.registerUriComparisonKeyComputer(CellUri.scheme, {
|
|
238
|
-
getComparisonKey:
|
|
275
|
+
getComparisonKey: uri => {
|
|
239
276
|
if (undoRedoPerCell) {
|
|
240
277
|
return ( uri.toString());
|
|
241
278
|
}
|
|
@@ -243,8 +280,7 @@ let NotebookContribution = class NotebookContribution extends Disposable {
|
|
|
243
280
|
}
|
|
244
281
|
});
|
|
245
282
|
}
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
283
|
+
} else {
|
|
248
284
|
this._uriComparisonKeyComputer?.dispose();
|
|
249
285
|
this._uriComparisonKeyComputer = undefined;
|
|
250
286
|
}
|
|
@@ -261,14 +297,17 @@ let NotebookContribution = class NotebookContribution extends Disposable {
|
|
|
261
297
|
this._uriComparisonKeyComputer?.dispose();
|
|
262
298
|
}
|
|
263
299
|
};
|
|
264
|
-
NotebookContribution = NotebookContribution_1 = ( __decorate([
|
|
265
|
-
( __param(0, IUndoRedoService)),
|
|
266
|
-
( __param(1, IConfigurationService)),
|
|
267
|
-
( __param(2, ICodeEditorService))
|
|
268
|
-
], NotebookContribution));
|
|
300
|
+
NotebookContribution = NotebookContribution_1 = ( __decorate([( __param(0, IUndoRedoService)), ( __param(1, IConfigurationService)), ( __param(2, ICodeEditorService))], NotebookContribution));
|
|
269
301
|
let CellContentProvider = class CellContentProvider {
|
|
270
|
-
static {
|
|
271
|
-
|
|
302
|
+
static {
|
|
303
|
+
this.ID = "workbench.contrib.cellContentProvider";
|
|
304
|
+
}
|
|
305
|
+
constructor(
|
|
306
|
+
textModelService,
|
|
307
|
+
_modelService,
|
|
308
|
+
_languageService,
|
|
309
|
+
_notebookModelResolverService
|
|
310
|
+
) {
|
|
272
311
|
this._modelService = _modelService;
|
|
273
312
|
this._languageService = _languageService;
|
|
274
313
|
this._notebookModelResolverService = _notebookModelResolverService;
|
|
@@ -294,15 +333,18 @@ let CellContentProvider = class CellContentProvider {
|
|
|
294
333
|
for (const cell of ref.object.notebook.cells) {
|
|
295
334
|
if (( cell.uri.toString()) === ( resource.toString())) {
|
|
296
335
|
const bufferFactory = {
|
|
297
|
-
create:
|
|
298
|
-
return {
|
|
336
|
+
create: defaultEOL => {
|
|
337
|
+
return {
|
|
338
|
+
textBuffer: cell.textBuffer,
|
|
339
|
+
disposable: Disposable.None
|
|
340
|
+
};
|
|
299
341
|
},
|
|
300
|
-
getFirstLineText:
|
|
342
|
+
getFirstLineText: limit => {
|
|
301
343
|
return cell.textBuffer.getLineContent(1).substring(0, limit);
|
|
302
344
|
}
|
|
303
345
|
};
|
|
304
346
|
const languageId = this._languageService.getLanguageIdByLanguageName(cell.language);
|
|
305
|
-
const languageSelection = languageId ? this._languageService.createById(languageId) : (cell.cellKind === CellKind.Markup ? this._languageService.createById(
|
|
347
|
+
const languageSelection = languageId ? this._languageService.createById(languageId) : (cell.cellKind === CellKind.Markup ? this._languageService.createById("markdown") : this._languageService.createByFilepathOrFirstLine(resource, cell.textBuffer.getLineContent(1)));
|
|
306
348
|
result = this._modelService.createModel(bufferFactory, languageSelection, resource);
|
|
307
349
|
break;
|
|
308
350
|
}
|
|
@@ -318,38 +360,45 @@ let CellContentProvider = class CellContentProvider {
|
|
|
318
360
|
return result;
|
|
319
361
|
}
|
|
320
362
|
};
|
|
321
|
-
CellContentProvider = ( __decorate([
|
|
322
|
-
( __param(0, ITextModelService)),
|
|
323
|
-
( __param(1, IModelService)),
|
|
324
|
-
( __param(2, ILanguageService)),
|
|
325
|
-
( __param(3, INotebookEditorModelResolverService))
|
|
326
|
-
], CellContentProvider));
|
|
363
|
+
CellContentProvider = ( __decorate([( __param(0, ITextModelService)), ( __param(1, IModelService)), ( __param(2, ILanguageService)), ( __param(3, INotebookEditorModelResolverService))], CellContentProvider));
|
|
327
364
|
let CellInfoContentProvider = class CellInfoContentProvider {
|
|
328
|
-
static {
|
|
329
|
-
|
|
365
|
+
static {
|
|
366
|
+
this.ID = "workbench.contrib.cellInfoContentProvider";
|
|
367
|
+
}
|
|
368
|
+
constructor(
|
|
369
|
+
textModelService,
|
|
370
|
+
_modelService,
|
|
371
|
+
_languageService,
|
|
372
|
+
_labelService,
|
|
373
|
+
_notebookModelResolverService
|
|
374
|
+
) {
|
|
330
375
|
this._modelService = _modelService;
|
|
331
376
|
this._languageService = _languageService;
|
|
332
377
|
this._labelService = _labelService;
|
|
333
378
|
this._notebookModelResolverService = _notebookModelResolverService;
|
|
334
379
|
this._disposables = [];
|
|
335
|
-
this._disposables.push(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
380
|
+
this._disposables.push(
|
|
381
|
+
textModelService.registerTextModelContentProvider(Schemas.vscodeNotebookCellMetadata, {
|
|
382
|
+
provideTextContent: this.provideMetadataTextContent.bind(this)
|
|
383
|
+
})
|
|
384
|
+
);
|
|
385
|
+
this._disposables.push(
|
|
386
|
+
textModelService.registerTextModelContentProvider(Schemas.vscodeNotebookCellOutput, {
|
|
387
|
+
provideTextContent: this.provideOutputTextContent.bind(this)
|
|
388
|
+
})
|
|
389
|
+
);
|
|
341
390
|
this._disposables.push(this._labelService.registerFormatter({
|
|
342
391
|
scheme: Schemas.vscodeNotebookCellMetadata,
|
|
343
392
|
formatting: {
|
|
344
|
-
label:
|
|
345
|
-
separator:
|
|
393
|
+
label: "${path} (metadata)",
|
|
394
|
+
separator: "/"
|
|
346
395
|
}
|
|
347
396
|
}));
|
|
348
397
|
this._disposables.push(this._labelService.registerFormatter({
|
|
349
398
|
scheme: Schemas.vscodeNotebookCellOutput,
|
|
350
399
|
formatting: {
|
|
351
|
-
label:
|
|
352
|
-
separator:
|
|
400
|
+
label: "${path} (output)",
|
|
401
|
+
separator: "/"
|
|
353
402
|
}
|
|
354
403
|
}));
|
|
355
404
|
}
|
|
@@ -367,18 +416,28 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
367
416
|
}
|
|
368
417
|
const ref = await this._notebookModelResolverService.resolve(data.notebook);
|
|
369
418
|
let result = null;
|
|
370
|
-
const mode = this._languageService.createById(
|
|
419
|
+
const mode = this._languageService.createById("json");
|
|
371
420
|
const disposables = ( new DisposableStore());
|
|
372
421
|
for (const cell of ref.object.notebook.cells) {
|
|
373
422
|
if (cell.handle === data.handle) {
|
|
374
423
|
const cellIndex = ref.object.notebook.cells.indexOf(cell);
|
|
375
|
-
const metadataSource = getFormattedMetadataJSON(
|
|
424
|
+
const metadataSource = getFormattedMetadataJSON(
|
|
425
|
+
ref.object.notebook.transientOptions.transientCellMetadata,
|
|
426
|
+
cell.metadata,
|
|
427
|
+
cell.language,
|
|
428
|
+
true
|
|
429
|
+
);
|
|
376
430
|
result = this._modelService.createModel(metadataSource, mode, resource);
|
|
377
431
|
this._disposables.push(disposables.add(ref.object.notebook.onDidChangeContent(e => {
|
|
378
432
|
if (result && ( e.rawEvents.some(
|
|
379
433
|
event => (event.kind === NotebookCellsChangeType.ChangeCellMetadata || event.kind === NotebookCellsChangeType.ChangeCellLanguage) && event.index === cellIndex
|
|
380
434
|
))) {
|
|
381
|
-
const value = getFormattedMetadataJSON(
|
|
435
|
+
const value = getFormattedMetadataJSON(
|
|
436
|
+
ref.object.notebook.transientOptions.transientCellMetadata,
|
|
437
|
+
cell.metadata,
|
|
438
|
+
cell.language,
|
|
439
|
+
true
|
|
440
|
+
);
|
|
382
441
|
if (result.getValue() !== value) {
|
|
383
442
|
result.setValue(value);
|
|
384
443
|
}
|
|
@@ -413,8 +472,10 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
413
472
|
}
|
|
414
473
|
_getResult(data, cell) {
|
|
415
474
|
let result = undefined;
|
|
416
|
-
const mode = this._languageService.createById(
|
|
417
|
-
const op = cell.outputs.find(
|
|
475
|
+
const mode = this._languageService.createById("json");
|
|
476
|
+
const op = cell.outputs.find(
|
|
477
|
+
op => op.outputId === data.outputId || op.alternativeOutputId === data.outputId
|
|
478
|
+
);
|
|
418
479
|
const streamOutputData = this.parseStreamOutput(op);
|
|
419
480
|
if (streamOutputData) {
|
|
420
481
|
result = streamOutputData;
|
|
@@ -449,9 +510,12 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
449
510
|
ref.dispose();
|
|
450
511
|
return null;
|
|
451
512
|
}
|
|
452
|
-
const mode = this._languageService.createById(
|
|
513
|
+
const mode = this._languageService.createById("json");
|
|
453
514
|
const model = this._modelService.createModel(getFormattedOutputJSON(cell.outputs || []), mode, resource, true);
|
|
454
|
-
const cellModelListener = Event.any(
|
|
515
|
+
const cellModelListener = Event.any(
|
|
516
|
+
cell.onDidChangeOutputs ?? Event.None,
|
|
517
|
+
cell.onDidChangeOutputItems ?? Event.None
|
|
518
|
+
)(() => {
|
|
455
519
|
model.setValue(getFormattedOutputJSON(cell.outputs || []));
|
|
456
520
|
});
|
|
457
521
|
const once = model.onWillDispose(() => {
|
|
@@ -471,7 +535,9 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
471
535
|
return this.provideOutputsTextContent(resource);
|
|
472
536
|
}
|
|
473
537
|
const ref = await this._notebookModelResolverService.resolve(data.notebook);
|
|
474
|
-
const cell = ref.object.notebook.cells.find(cell => !!cell.outputs.find(
|
|
538
|
+
const cell = ref.object.notebook.cells.find(cell => !!cell.outputs.find(
|
|
539
|
+
op => op.outputId === data.outputId || op.alternativeOutputId === data.outputId
|
|
540
|
+
));
|
|
475
541
|
if (!cell) {
|
|
476
542
|
ref.dispose();
|
|
477
543
|
return null;
|
|
@@ -482,7 +548,10 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
482
548
|
return null;
|
|
483
549
|
}
|
|
484
550
|
const model = this._modelService.createModel(result.content, result.mode, resource);
|
|
485
|
-
const cellModelListener = Event.any(
|
|
551
|
+
const cellModelListener = Event.any(
|
|
552
|
+
cell.onDidChangeOutputs ?? Event.None,
|
|
553
|
+
cell.onDidChangeOutputItems ?? Event.None
|
|
554
|
+
)(() => {
|
|
486
555
|
const newResult = this._getResult(data, cell);
|
|
487
556
|
if (!newResult) {
|
|
488
557
|
return;
|
|
@@ -498,29 +567,33 @@ let CellInfoContentProvider = class CellInfoContentProvider {
|
|
|
498
567
|
return model;
|
|
499
568
|
}
|
|
500
569
|
};
|
|
501
|
-
CellInfoContentProvider = ( __decorate([
|
|
502
|
-
( __param(0, ITextModelService)),
|
|
503
|
-
( __param(1, IModelService)),
|
|
504
|
-
( __param(2, ILanguageService)),
|
|
505
|
-
( __param(3, ILabelService)),
|
|
506
|
-
( __param(4, INotebookEditorModelResolverService))
|
|
507
|
-
], CellInfoContentProvider));
|
|
570
|
+
CellInfoContentProvider = ( __decorate([( __param(0, ITextModelService)), ( __param(1, IModelService)), ( __param(2, ILanguageService)), ( __param(3, ILabelService)), ( __param(4, INotebookEditorModelResolverService))], CellInfoContentProvider));
|
|
508
571
|
let NotebookMetadataContentProvider = class NotebookMetadataContentProvider {
|
|
509
|
-
static {
|
|
510
|
-
|
|
572
|
+
static {
|
|
573
|
+
this.ID = "workbench.contrib.notebookMetadataContentProvider";
|
|
574
|
+
}
|
|
575
|
+
constructor(
|
|
576
|
+
textModelService,
|
|
577
|
+
_modelService,
|
|
578
|
+
_languageService,
|
|
579
|
+
_labelService,
|
|
580
|
+
_notebookModelResolverService
|
|
581
|
+
) {
|
|
511
582
|
this._modelService = _modelService;
|
|
512
583
|
this._languageService = _languageService;
|
|
513
584
|
this._labelService = _labelService;
|
|
514
585
|
this._notebookModelResolverService = _notebookModelResolverService;
|
|
515
586
|
this._disposables = [];
|
|
516
|
-
this._disposables.push(
|
|
517
|
-
|
|
518
|
-
|
|
587
|
+
this._disposables.push(
|
|
588
|
+
textModelService.registerTextModelContentProvider(Schemas.vscodeNotebookMetadata, {
|
|
589
|
+
provideTextContent: this.provideMetadataTextContent.bind(this)
|
|
590
|
+
})
|
|
591
|
+
);
|
|
519
592
|
this._disposables.push(this._labelService.registerFormatter({
|
|
520
593
|
scheme: Schemas.vscodeNotebookMetadata,
|
|
521
594
|
formatting: {
|
|
522
|
-
label:
|
|
523
|
-
separator:
|
|
595
|
+
label: "${path} (metadata)",
|
|
596
|
+
separator: "/"
|
|
524
597
|
}
|
|
525
598
|
}));
|
|
526
599
|
}
|
|
@@ -538,9 +611,12 @@ let NotebookMetadataContentProvider = class NotebookMetadataContentProvider {
|
|
|
538
611
|
}
|
|
539
612
|
const ref = await this._notebookModelResolverService.resolve(data);
|
|
540
613
|
let result = null;
|
|
541
|
-
const mode = this._languageService.createById(
|
|
614
|
+
const mode = this._languageService.createById("json");
|
|
542
615
|
const disposables = ( new DisposableStore());
|
|
543
|
-
const metadataSource = getFormattedNotebookMetadataJSON(
|
|
616
|
+
const metadataSource = getFormattedNotebookMetadataJSON(
|
|
617
|
+
ref.object.notebook.transientOptions.transientDocumentMetadata,
|
|
618
|
+
ref.object.notebook.metadata
|
|
619
|
+
);
|
|
544
620
|
result = this._modelService.createModel(metadataSource, mode, resource);
|
|
545
621
|
if (!result) {
|
|
546
622
|
ref.dispose();
|
|
@@ -550,7 +626,10 @@ let NotebookMetadataContentProvider = class NotebookMetadataContentProvider {
|
|
|
550
626
|
if (result && ( e.rawEvents.some(
|
|
551
627
|
event => (event.kind === NotebookCellsChangeType.ChangeCellContent || event.kind === NotebookCellsChangeType.ChangeDocumentMetadata || event.kind === NotebookCellsChangeType.ModelChange)
|
|
552
628
|
))) {
|
|
553
|
-
const value = getFormattedNotebookMetadataJSON(
|
|
629
|
+
const value = getFormattedNotebookMetadataJSON(
|
|
630
|
+
ref.object.notebook.transientOptions.transientDocumentMetadata,
|
|
631
|
+
ref.object.notebook.metadata
|
|
632
|
+
);
|
|
554
633
|
if (result.getValue() !== value) {
|
|
555
634
|
result.setValue(value);
|
|
556
635
|
}
|
|
@@ -564,15 +643,11 @@ let NotebookMetadataContentProvider = class NotebookMetadataContentProvider {
|
|
|
564
643
|
return result;
|
|
565
644
|
}
|
|
566
645
|
};
|
|
567
|
-
NotebookMetadataContentProvider = ( __decorate([
|
|
568
|
-
( __param(0, ITextModelService)),
|
|
569
|
-
( __param(1, IModelService)),
|
|
570
|
-
( __param(2, ILanguageService)),
|
|
571
|
-
( __param(3, ILabelService)),
|
|
572
|
-
( __param(4, INotebookEditorModelResolverService))
|
|
573
|
-
], NotebookMetadataContentProvider));
|
|
646
|
+
NotebookMetadataContentProvider = ( __decorate([( __param(0, ITextModelService)), ( __param(1, IModelService)), ( __param(2, ILanguageService)), ( __param(3, ILabelService)), ( __param(4, INotebookEditorModelResolverService))], NotebookMetadataContentProvider));
|
|
574
647
|
class RegisterSchemasContribution extends Disposable {
|
|
575
|
-
static {
|
|
648
|
+
static {
|
|
649
|
+
this.ID = "workbench.contrib.registerCellSchemas";
|
|
650
|
+
}
|
|
576
651
|
constructor() {
|
|
577
652
|
super();
|
|
578
653
|
this.registerMetadataSchemas();
|
|
@@ -581,28 +656,36 @@ class RegisterSchemasContribution extends Disposable {
|
|
|
581
656
|
const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
582
657
|
const metadataSchema = {
|
|
583
658
|
properties: {
|
|
584
|
-
[
|
|
585
|
-
type:
|
|
586
|
-
description:
|
|
659
|
+
["language"]: {
|
|
660
|
+
type: "string",
|
|
661
|
+
description: "The language for the cell"
|
|
587
662
|
}
|
|
588
663
|
},
|
|
589
664
|
additionalProperties: true,
|
|
590
665
|
allowTrailingCommas: true,
|
|
591
666
|
allowComments: true
|
|
592
667
|
};
|
|
593
|
-
jsonRegistry.registerSchema(
|
|
668
|
+
jsonRegistry.registerSchema("vscode://schemas/notebook/cellmetadata", metadataSchema);
|
|
594
669
|
}
|
|
595
670
|
}
|
|
596
671
|
let NotebookEditorManager = class NotebookEditorManager {
|
|
597
|
-
static {
|
|
672
|
+
static {
|
|
673
|
+
this.ID = "workbench.contrib.notebookEditorManager";
|
|
674
|
+
}
|
|
598
675
|
constructor(_editorService, _notebookEditorModelService, editorGroups) {
|
|
599
676
|
this._editorService = _editorService;
|
|
600
677
|
this._notebookEditorModelService = _notebookEditorModelService;
|
|
601
678
|
this._disposables = ( new DisposableStore());
|
|
602
|
-
this._disposables.add(Event.debounce(
|
|
679
|
+
this._disposables.add(Event.debounce(
|
|
680
|
+
this._notebookEditorModelService.onDidChangeDirty,
|
|
681
|
+
(last, current) => !last ? [current] : [...last, current],
|
|
682
|
+
100
|
|
683
|
+
)(this._openMissingDirtyNotebookEditors, this));
|
|
603
684
|
this._disposables.add(_notebookEditorModelService.onWillFailWithConflict(e => {
|
|
604
685
|
for (const group of editorGroups.groups) {
|
|
605
|
-
const conflictInputs = group.editors.filter(
|
|
686
|
+
const conflictInputs = group.editors.filter(
|
|
687
|
+
input => input instanceof NotebookEditorInput && input.viewType !== e.viewType && isEqual(input.resource, e.resource)
|
|
688
|
+
);
|
|
606
689
|
const p = group.closeEditors(conflictInputs);
|
|
607
690
|
e.waitUntil(p);
|
|
608
691
|
}
|
|
@@ -614,10 +697,19 @@ let NotebookEditorManager = class NotebookEditorManager {
|
|
|
614
697
|
_openMissingDirtyNotebookEditors(models) {
|
|
615
698
|
const result = [];
|
|
616
699
|
for (const model of models) {
|
|
617
|
-
if (model.isDirty() && !this._editorService.isOpened({
|
|
700
|
+
if (model.isDirty() && !this._editorService.isOpened({
|
|
701
|
+
resource: model.resource,
|
|
702
|
+
typeId: NotebookEditorInput.ID,
|
|
703
|
+
editorId: model.viewType
|
|
704
|
+
}) && extname(model.resource) !== ".interactive") {
|
|
618
705
|
result.push({
|
|
619
706
|
resource: model.resource,
|
|
620
|
-
options: {
|
|
707
|
+
options: {
|
|
708
|
+
inactive: true,
|
|
709
|
+
preserveFocus: true,
|
|
710
|
+
pinned: true,
|
|
711
|
+
override: model.viewType
|
|
712
|
+
}
|
|
621
713
|
});
|
|
622
714
|
}
|
|
623
715
|
}
|
|
@@ -626,14 +718,17 @@ let NotebookEditorManager = class NotebookEditorManager {
|
|
|
626
718
|
}
|
|
627
719
|
}
|
|
628
720
|
};
|
|
629
|
-
NotebookEditorManager = ( __decorate([
|
|
630
|
-
( __param(0, IEditorService)),
|
|
631
|
-
( __param(1, INotebookEditorModelResolverService)),
|
|
632
|
-
( __param(2, IEditorGroupsService))
|
|
633
|
-
], NotebookEditorManager));
|
|
721
|
+
NotebookEditorManager = ( __decorate([( __param(0, IEditorService)), ( __param(1, INotebookEditorModelResolverService)), ( __param(2, IEditorGroupsService))], NotebookEditorManager));
|
|
634
722
|
let SimpleNotebookWorkingCopyEditorHandler = class SimpleNotebookWorkingCopyEditorHandler extends Disposable {
|
|
635
|
-
static {
|
|
636
|
-
|
|
723
|
+
static {
|
|
724
|
+
this.ID = "workbench.contrib.simpleNotebookWorkingCopyEditorHandler";
|
|
725
|
+
}
|
|
726
|
+
constructor(
|
|
727
|
+
_instantiationService,
|
|
728
|
+
_workingCopyEditorService,
|
|
729
|
+
_extensionService,
|
|
730
|
+
_notebookService
|
|
731
|
+
) {
|
|
637
732
|
super();
|
|
638
733
|
this._instantiationService = _instantiationService;
|
|
639
734
|
this._workingCopyEditorService = _workingCopyEditorService;
|
|
@@ -650,7 +745,7 @@ let SimpleNotebookWorkingCopyEditorHandler = class SimpleNotebookWorkingCopyEdit
|
|
|
650
745
|
}
|
|
651
746
|
handlesSync(workingCopy) {
|
|
652
747
|
const viewType = this._getViewType(workingCopy);
|
|
653
|
-
if (!viewType || viewType ===
|
|
748
|
+
if (!viewType || viewType === "interactive") {
|
|
654
749
|
return undefined;
|
|
655
750
|
}
|
|
656
751
|
return viewType;
|
|
@@ -662,7 +757,12 @@ let SimpleNotebookWorkingCopyEditorHandler = class SimpleNotebookWorkingCopyEdit
|
|
|
662
757
|
return editor instanceof NotebookEditorInput && editor.viewType === this._getViewType(workingCopy) && isEqual(workingCopy.resource, editor.resource);
|
|
663
758
|
}
|
|
664
759
|
createEditor(workingCopy) {
|
|
665
|
-
return NotebookEditorInput.getOrCreate(
|
|
760
|
+
return NotebookEditorInput.getOrCreate(
|
|
761
|
+
this._instantiationService,
|
|
762
|
+
workingCopy.resource,
|
|
763
|
+
undefined,
|
|
764
|
+
this._getViewType(workingCopy)
|
|
765
|
+
);
|
|
666
766
|
}
|
|
667
767
|
async _installHandler() {
|
|
668
768
|
await this._extensionService.whenInstalledExtensionsRegistered();
|
|
@@ -676,14 +776,11 @@ let SimpleNotebookWorkingCopyEditorHandler = class SimpleNotebookWorkingCopyEdit
|
|
|
676
776
|
return undefined;
|
|
677
777
|
}
|
|
678
778
|
};
|
|
679
|
-
SimpleNotebookWorkingCopyEditorHandler = ( __decorate([
|
|
680
|
-
( __param(0, IInstantiationService)),
|
|
681
|
-
( __param(1, IWorkingCopyEditorService)),
|
|
682
|
-
( __param(2, IExtensionService)),
|
|
683
|
-
( __param(3, INotebookService))
|
|
684
|
-
], SimpleNotebookWorkingCopyEditorHandler));
|
|
779
|
+
SimpleNotebookWorkingCopyEditorHandler = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IWorkingCopyEditorService)), ( __param(2, IExtensionService)), ( __param(3, INotebookService))], SimpleNotebookWorkingCopyEditorHandler));
|
|
685
780
|
let NotebookLanguageSelectorScoreRefine = class NotebookLanguageSelectorScoreRefine {
|
|
686
|
-
static {
|
|
781
|
+
static {
|
|
782
|
+
this.ID = "workbench.contrib.notebookLanguageSelectorScoreRefine";
|
|
783
|
+
}
|
|
687
784
|
constructor(_notebookService, languageFeaturesService) {
|
|
688
785
|
this._notebookService = _notebookService;
|
|
689
786
|
languageFeaturesService.setNotebookTypeResolver(this._getNotebookInfo.bind(this));
|
|
@@ -703,33 +800,53 @@ let NotebookLanguageSelectorScoreRefine = class NotebookLanguageSelectorScoreRef
|
|
|
703
800
|
};
|
|
704
801
|
}
|
|
705
802
|
};
|
|
706
|
-
NotebookLanguageSelectorScoreRefine = ( __decorate([
|
|
707
|
-
( __param(0, INotebookService)),
|
|
708
|
-
( __param(1, ILanguageFeaturesService))
|
|
709
|
-
], NotebookLanguageSelectorScoreRefine));
|
|
803
|
+
NotebookLanguageSelectorScoreRefine = ( __decorate([( __param(0, INotebookService)), ( __param(1, ILanguageFeaturesService))], NotebookLanguageSelectorScoreRefine));
|
|
710
804
|
const workbenchContributionsRegistry = ( Registry.as(Extensions$1.Workbench));
|
|
711
805
|
registerWorkbenchContribution2(NotebookContribution.ID, NotebookContribution, WorkbenchPhase.BlockStartup);
|
|
712
806
|
registerWorkbenchContribution2(CellContentProvider.ID, CellContentProvider, WorkbenchPhase.BlockStartup);
|
|
713
|
-
registerWorkbenchContribution2(
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
registerWorkbenchContribution2(
|
|
807
|
+
registerWorkbenchContribution2(
|
|
808
|
+
CellInfoContentProvider.ID,
|
|
809
|
+
CellInfoContentProvider,
|
|
810
|
+
WorkbenchPhase.BlockStartup
|
|
811
|
+
);
|
|
812
|
+
registerWorkbenchContribution2(
|
|
813
|
+
NotebookMetadataContentProvider.ID,
|
|
814
|
+
NotebookMetadataContentProvider,
|
|
815
|
+
WorkbenchPhase.BlockStartup
|
|
816
|
+
);
|
|
817
|
+
registerWorkbenchContribution2(
|
|
818
|
+
RegisterSchemasContribution.ID,
|
|
819
|
+
RegisterSchemasContribution,
|
|
820
|
+
WorkbenchPhase.BlockStartup
|
|
821
|
+
);
|
|
822
|
+
registerWorkbenchContribution2(
|
|
823
|
+
NotebookEditorManager.ID,
|
|
824
|
+
NotebookEditorManager,
|
|
825
|
+
WorkbenchPhase.BlockRestore
|
|
826
|
+
);
|
|
827
|
+
registerWorkbenchContribution2(
|
|
828
|
+
NotebookLanguageSelectorScoreRefine.ID,
|
|
829
|
+
NotebookLanguageSelectorScoreRefine,
|
|
830
|
+
WorkbenchPhase.BlockRestore
|
|
831
|
+
);
|
|
832
|
+
registerWorkbenchContribution2(
|
|
833
|
+
SimpleNotebookWorkingCopyEditorHandler.ID,
|
|
834
|
+
SimpleNotebookWorkingCopyEditorHandler,
|
|
835
|
+
WorkbenchPhase.BlockRestore
|
|
836
|
+
);
|
|
719
837
|
workbenchContributionsRegistry.registerWorkbenchContribution(NotebookVariables, LifecyclePhase.Eventually);
|
|
720
838
|
AccessibleViewRegistry.register(( new NotebookAccessibleView()));
|
|
721
839
|
AccessibleViewRegistry.register(( new NotebookAccessibilityHelp()));
|
|
722
840
|
const schemas = {};
|
|
723
841
|
function isConfigurationPropertySchema(x) {
|
|
724
|
-
return (typeof x.type !==
|
|
842
|
+
return (typeof x.type !== "undefined" || typeof x.anyOf !== "undefined");
|
|
725
843
|
}
|
|
726
844
|
for (const editorOption of editorOptionsRegistry) {
|
|
727
845
|
const schema = editorOption.schema;
|
|
728
846
|
if (schema) {
|
|
729
847
|
if (isConfigurationPropertySchema(schema)) {
|
|
730
848
|
schemas[`editor.${editorOption.name}`] = schema;
|
|
731
|
-
}
|
|
732
|
-
else {
|
|
849
|
+
} else {
|
|
733
850
|
for (const key in schema) {
|
|
734
851
|
if (Object.hasOwnProperty.call(schema, key)) {
|
|
735
852
|
schemas[key] = schema[key];
|
|
@@ -740,331 +857,311 @@ for (const editorOption of editorOptionsRegistry) {
|
|
|
740
857
|
}
|
|
741
858
|
const editorOptionsCustomizationSchema = {
|
|
742
859
|
description: ( localize(
|
|
743
|
-
|
|
744
|
-
|
|
860
|
+
9827,
|
|
861
|
+
"Settings for code editors used in notebooks. This can be used to customize most editor.* settings."
|
|
745
862
|
)),
|
|
746
863
|
default: {},
|
|
747
864
|
allOf: [
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
]
|
|
752
|
-
tags: ['notebookLayout']
|
|
865
|
+
{
|
|
866
|
+
properties: schemas
|
|
867
|
+
}],
|
|
868
|
+
tags: ["notebookLayout"]
|
|
753
869
|
};
|
|
754
870
|
const configurationRegistry = ( Registry.as(Extensions$2.Configuration));
|
|
755
871
|
configurationRegistry.registerConfiguration({
|
|
756
|
-
id:
|
|
872
|
+
id: "notebook",
|
|
757
873
|
order: 100,
|
|
758
|
-
title: ( localize(
|
|
759
|
-
type:
|
|
874
|
+
title: ( localize(9828, "Notebook")),
|
|
875
|
+
type: "object",
|
|
760
876
|
properties: {
|
|
761
877
|
[NotebookSetting.displayOrder]: {
|
|
762
|
-
description: ( localize(
|
|
763
|
-
type:
|
|
878
|
+
description: ( localize(9829, "Priority list for output mime types")),
|
|
879
|
+
type: "array",
|
|
764
880
|
items: {
|
|
765
|
-
type:
|
|
881
|
+
type: "string"
|
|
766
882
|
},
|
|
767
883
|
default: []
|
|
768
884
|
},
|
|
769
885
|
[NotebookSetting.cellToolbarLocation]: {
|
|
770
886
|
description: ( localize(
|
|
771
|
-
|
|
887
|
+
9830,
|
|
772
888
|
"Where the cell toolbar should be shown, or whether it should be hidden."
|
|
773
889
|
)),
|
|
774
|
-
type:
|
|
890
|
+
type: "object",
|
|
775
891
|
additionalProperties: {
|
|
776
|
-
markdownDescription: ( localize(
|
|
777
|
-
type:
|
|
778
|
-
enum: [
|
|
892
|
+
markdownDescription: ( localize(9831, "Configure the cell toolbar position for for specific file types")),
|
|
893
|
+
type: "string",
|
|
894
|
+
enum: ["left", "right", "hidden"]
|
|
779
895
|
},
|
|
780
896
|
default: {
|
|
781
|
-
|
|
897
|
+
"default": "right"
|
|
782
898
|
},
|
|
783
|
-
tags: [
|
|
899
|
+
tags: ["notebookLayout"]
|
|
784
900
|
},
|
|
785
901
|
[NotebookSetting.showCellStatusBar]: {
|
|
786
|
-
description: ( localize(
|
|
787
|
-
type:
|
|
788
|
-
enum: [
|
|
789
|
-
enumDescriptions: [
|
|
790
|
-
|
|
791
|
-
( localize(9514, "The cell status bar is always visible.")),
|
|
792
|
-
( localize(
|
|
793
|
-
9515,
|
|
902
|
+
description: ( localize(9832, "Whether the cell status bar should be shown.")),
|
|
903
|
+
type: "string",
|
|
904
|
+
enum: ["hidden", "visible", "visibleAfterExecute"],
|
|
905
|
+
enumDescriptions: [( localize(9833, "The cell status bar is always hidden.")), ( localize(9834, "The cell status bar is always visible.")), ( localize(
|
|
906
|
+
9835,
|
|
794
907
|
"The cell status bar is hidden until the cell has executed. Then it becomes visible to show the execution status."
|
|
795
|
-
))
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
tags: ['notebookLayout']
|
|
908
|
+
))],
|
|
909
|
+
default: "visible",
|
|
910
|
+
tags: ["notebookLayout"]
|
|
799
911
|
},
|
|
800
912
|
[NotebookSetting.cellExecutionTimeVerbosity]: {
|
|
801
913
|
description: ( localize(
|
|
802
|
-
|
|
914
|
+
9836,
|
|
803
915
|
"Controls the verbosity of the cell execution time in the cell status bar."
|
|
804
916
|
)),
|
|
805
|
-
type:
|
|
806
|
-
enum: [
|
|
807
|
-
enumDescriptions: [
|
|
808
|
-
|
|
809
|
-
9517,
|
|
917
|
+
type: "string",
|
|
918
|
+
enum: ["default", "verbose"],
|
|
919
|
+
enumDescriptions: [( localize(
|
|
920
|
+
9837,
|
|
810
921
|
"The cell execution duration is visible, with advanced information in the hover tooltip."
|
|
811
|
-
)),
|
|
812
|
-
|
|
813
|
-
9518,
|
|
922
|
+
)), ( localize(
|
|
923
|
+
9838,
|
|
814
924
|
"The cell last execution timestamp and duration are visible, with advanced information in the hover tooltip."
|
|
815
|
-
))
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
tags: ['notebookLayout']
|
|
925
|
+
))],
|
|
926
|
+
default: "default",
|
|
927
|
+
tags: ["notebookLayout"]
|
|
819
928
|
},
|
|
820
929
|
[NotebookSetting.textDiffEditorPreview]: {
|
|
821
|
-
description: ( localize(
|
|
822
|
-
type:
|
|
930
|
+
description: ( localize(9839, "Whether to use the enhanced text diff editor for notebook.")),
|
|
931
|
+
type: "boolean",
|
|
823
932
|
default: true,
|
|
824
|
-
tags: [
|
|
933
|
+
tags: ["notebookLayout"]
|
|
825
934
|
},
|
|
826
935
|
[NotebookSetting.diffOverviewRuler]: {
|
|
827
936
|
description: ( localize(
|
|
828
|
-
|
|
937
|
+
9840,
|
|
829
938
|
"Whether to render the overview ruler in the diff editor for notebook."
|
|
830
939
|
)),
|
|
831
|
-
type:
|
|
940
|
+
type: "boolean",
|
|
832
941
|
default: false,
|
|
833
|
-
tags: [
|
|
942
|
+
tags: ["notebookLayout"]
|
|
834
943
|
},
|
|
835
944
|
[NotebookSetting.cellToolbarVisibility]: {
|
|
836
|
-
markdownDescription: ( localize(
|
|
837
|
-
type:
|
|
838
|
-
enum: [
|
|
839
|
-
default:
|
|
840
|
-
tags: [
|
|
945
|
+
markdownDescription: ( localize(9841, "Whether the cell toolbar should appear on hover or click.")),
|
|
946
|
+
type: "string",
|
|
947
|
+
enum: ["hover", "click"],
|
|
948
|
+
default: "click",
|
|
949
|
+
tags: ["notebookLayout"]
|
|
841
950
|
},
|
|
842
951
|
[NotebookSetting.undoRedoPerCell]: {
|
|
843
|
-
description: ( localize(
|
|
844
|
-
type:
|
|
952
|
+
description: ( localize(9842, "Whether to use separate undo/redo stack for each cell.")),
|
|
953
|
+
type: "boolean",
|
|
845
954
|
default: true,
|
|
846
|
-
tags: [
|
|
955
|
+
tags: ["notebookLayout"]
|
|
847
956
|
},
|
|
848
957
|
[NotebookSetting.compactView]: {
|
|
849
958
|
description: ( localize(
|
|
850
|
-
|
|
959
|
+
9843,
|
|
851
960
|
"Control whether the notebook editor should be rendered in a compact form. For example, when turned on, it will decrease the left margin width."
|
|
852
961
|
)),
|
|
853
|
-
type:
|
|
962
|
+
type: "boolean",
|
|
854
963
|
default: true,
|
|
855
|
-
tags: [
|
|
964
|
+
tags: ["notebookLayout"]
|
|
856
965
|
},
|
|
857
966
|
[NotebookSetting.focusIndicator]: {
|
|
858
967
|
description: ( localize(
|
|
859
|
-
|
|
968
|
+
9844,
|
|
860
969
|
"Controls where the focus indicator is rendered, either along the cell borders or on the left gutter."
|
|
861
970
|
)),
|
|
862
|
-
type:
|
|
863
|
-
enum: [
|
|
864
|
-
default:
|
|
865
|
-
tags: [
|
|
971
|
+
type: "string",
|
|
972
|
+
enum: ["border", "gutter"],
|
|
973
|
+
default: "gutter",
|
|
974
|
+
tags: ["notebookLayout"]
|
|
866
975
|
},
|
|
867
976
|
[NotebookSetting.insertToolbarLocation]: {
|
|
868
|
-
description: ( localize(
|
|
869
|
-
type:
|
|
870
|
-
enum: [
|
|
871
|
-
enumDescriptions: [
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
( localize(9528, "Both toolbars.")),
|
|
875
|
-
( localize(9529, "The insert actions don't appear anywhere.")),
|
|
876
|
-
],
|
|
877
|
-
default: 'both',
|
|
878
|
-
tags: ['notebookLayout']
|
|
977
|
+
description: ( localize(9845, "Control where the insert cell actions should appear.")),
|
|
978
|
+
type: "string",
|
|
979
|
+
enum: ["betweenCells", "notebookToolbar", "both", "hidden"],
|
|
980
|
+
enumDescriptions: [( localize(9846, "A toolbar that appears on hover between cells.")), ( localize(9847, "The toolbar at the top of the notebook editor.")), ( localize(9848, "Both toolbars.")), ( localize(9849, "The insert actions don't appear anywhere."))],
|
|
981
|
+
default: "both",
|
|
982
|
+
tags: ["notebookLayout"]
|
|
879
983
|
},
|
|
880
984
|
[NotebookSetting.globalToolbar]: {
|
|
881
985
|
description: ( localize(
|
|
882
|
-
|
|
986
|
+
9850,
|
|
883
987
|
"Control whether to render a global toolbar inside the notebook editor."
|
|
884
988
|
)),
|
|
885
|
-
type:
|
|
989
|
+
type: "boolean",
|
|
886
990
|
default: true,
|
|
887
|
-
tags: [
|
|
991
|
+
tags: ["notebookLayout"]
|
|
888
992
|
},
|
|
889
993
|
[NotebookSetting.stickyScrollEnabled]: {
|
|
890
994
|
description: ( localize(
|
|
891
|
-
|
|
995
|
+
9851,
|
|
892
996
|
"Experimental. Control whether to render notebook Sticky Scroll headers in the notebook editor."
|
|
893
997
|
)),
|
|
894
|
-
type:
|
|
998
|
+
type: "boolean",
|
|
895
999
|
default: false,
|
|
896
|
-
tags: [
|
|
1000
|
+
tags: ["notebookLayout"]
|
|
897
1001
|
},
|
|
898
1002
|
[NotebookSetting.stickyScrollMode]: {
|
|
899
1003
|
description: ( localize(
|
|
900
|
-
|
|
1004
|
+
9852,
|
|
901
1005
|
"Control whether nested sticky lines appear to stack flat or indented."
|
|
902
1006
|
)),
|
|
903
|
-
type:
|
|
904
|
-
enum: [
|
|
905
|
-
enumDescriptions: [
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
],
|
|
909
|
-
default: 'indented',
|
|
910
|
-
tags: ['notebookLayout']
|
|
1007
|
+
type: "string",
|
|
1008
|
+
enum: ["flat", "indented"],
|
|
1009
|
+
enumDescriptions: [( localize(9853, "Nested sticky lines appear flat.")), ( localize(9854, "Nested sticky lines appear indented."))],
|
|
1010
|
+
default: "indented",
|
|
1011
|
+
tags: ["notebookLayout"]
|
|
911
1012
|
},
|
|
912
1013
|
[NotebookSetting.consolidatedOutputButton]: {
|
|
913
1014
|
description: ( localize(
|
|
914
|
-
|
|
1015
|
+
9855,
|
|
915
1016
|
"Control whether outputs action should be rendered in the output toolbar."
|
|
916
1017
|
)),
|
|
917
|
-
type:
|
|
1018
|
+
type: "boolean",
|
|
918
1019
|
default: true,
|
|
919
|
-
tags: [
|
|
1020
|
+
tags: ["notebookLayout"]
|
|
920
1021
|
},
|
|
921
1022
|
[NotebookSetting.showFoldingControls]: {
|
|
922
|
-
description: ( localize(
|
|
923
|
-
type:
|
|
924
|
-
enum: [
|
|
925
|
-
enumDescriptions: [
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
( localize(9539, "The folding controls are visible only on mouseover.")),
|
|
929
|
-
],
|
|
930
|
-
default: 'mouseover',
|
|
931
|
-
tags: ['notebookLayout']
|
|
1023
|
+
description: ( localize(9856, "Controls when the Markdown header folding arrow is shown.")),
|
|
1024
|
+
type: "string",
|
|
1025
|
+
enum: ["always", "never", "mouseover"],
|
|
1026
|
+
enumDescriptions: [( localize(9857, "The folding controls are always visible.")), ( localize(9858, "Never show the folding controls and reduce the gutter size.")), ( localize(9859, "The folding controls are visible only on mouseover."))],
|
|
1027
|
+
default: "mouseover",
|
|
1028
|
+
tags: ["notebookLayout"]
|
|
932
1029
|
},
|
|
933
1030
|
[NotebookSetting.dragAndDropEnabled]: {
|
|
934
1031
|
description: ( localize(
|
|
935
|
-
|
|
1032
|
+
9860,
|
|
936
1033
|
"Control whether the notebook editor should allow moving cells through drag and drop."
|
|
937
1034
|
)),
|
|
938
|
-
type:
|
|
1035
|
+
type: "boolean",
|
|
939
1036
|
default: true,
|
|
940
|
-
tags: [
|
|
1037
|
+
tags: ["notebookLayout"]
|
|
941
1038
|
},
|
|
942
1039
|
[NotebookSetting.consolidatedRunButton]: {
|
|
943
1040
|
description: ( localize(
|
|
944
|
-
|
|
1041
|
+
9861,
|
|
945
1042
|
"Control whether extra actions are shown in a dropdown next to the run button."
|
|
946
1043
|
)),
|
|
947
|
-
type:
|
|
1044
|
+
type: "boolean",
|
|
948
1045
|
default: false,
|
|
949
|
-
tags: [
|
|
1046
|
+
tags: ["notebookLayout"]
|
|
950
1047
|
},
|
|
951
1048
|
[NotebookSetting.globalToolbarShowLabel]: {
|
|
952
1049
|
description: ( localize(
|
|
953
|
-
|
|
1050
|
+
9862,
|
|
954
1051
|
"Control whether the actions on the notebook toolbar should render label or not."
|
|
955
1052
|
)),
|
|
956
|
-
type:
|
|
957
|
-
enum: [
|
|
958
|
-
default:
|
|
959
|
-
tags: [
|
|
1053
|
+
type: "string",
|
|
1054
|
+
enum: ["always", "never", "dynamic"],
|
|
1055
|
+
default: "always",
|
|
1056
|
+
tags: ["notebookLayout"]
|
|
960
1057
|
},
|
|
961
1058
|
[NotebookSetting.textOutputLineLimit]: {
|
|
962
1059
|
markdownDescription: ( localize(
|
|
963
|
-
|
|
1060
|
+
9863,
|
|
964
1061
|
"Controls how many lines of text are displayed in a text output. If {0} is enabled, this setting is used to determine the scroll height of the output.",
|
|
965
|
-
|
|
1062
|
+
"`#notebook.output.scrolling#`"
|
|
966
1063
|
)),
|
|
967
|
-
type:
|
|
1064
|
+
type: "number",
|
|
968
1065
|
default: 30,
|
|
969
|
-
tags: [
|
|
970
|
-
minimum: 1
|
|
1066
|
+
tags: ["notebookLayout", "notebookOutputLayout"],
|
|
1067
|
+
minimum: 1
|
|
971
1068
|
},
|
|
972
1069
|
[NotebookSetting.LinkifyOutputFilePaths]: {
|
|
973
1070
|
description: ( localize(
|
|
974
|
-
|
|
1071
|
+
9864,
|
|
975
1072
|
"Control whether to disable filepath links in the output of notebook cells."
|
|
976
1073
|
)),
|
|
977
|
-
type:
|
|
1074
|
+
type: "boolean",
|
|
978
1075
|
default: true,
|
|
979
|
-
tags: [
|
|
1076
|
+
tags: ["notebookOutputLayout"]
|
|
980
1077
|
},
|
|
981
1078
|
[NotebookSetting.minimalErrorRendering]: {
|
|
982
|
-
description: ( localize(
|
|
983
|
-
type:
|
|
1079
|
+
description: ( localize(9865, "Control whether to render error output in a minimal style.")),
|
|
1080
|
+
type: "boolean",
|
|
984
1081
|
default: false,
|
|
985
|
-
tags: [
|
|
1082
|
+
tags: ["notebookOutputLayout"]
|
|
986
1083
|
},
|
|
987
1084
|
[NotebookSetting.markupFontSize]: {
|
|
988
1085
|
markdownDescription: ( localize(
|
|
989
|
-
|
|
1086
|
+
9866,
|
|
990
1087
|
"Controls the font size in pixels of rendered markup in notebooks. When set to {0}, 120% of {1} is used.",
|
|
991
|
-
|
|
992
|
-
|
|
1088
|
+
"`0`",
|
|
1089
|
+
"`#editor.fontSize#`"
|
|
993
1090
|
)),
|
|
994
|
-
type:
|
|
1091
|
+
type: "number",
|
|
995
1092
|
default: 0,
|
|
996
|
-
tags: [
|
|
1093
|
+
tags: ["notebookLayout"]
|
|
997
1094
|
},
|
|
998
1095
|
[NotebookSetting.markdownLineHeight]: {
|
|
999
1096
|
markdownDescription: ( localize(
|
|
1000
|
-
|
|
1097
|
+
9867,
|
|
1001
1098
|
"Controls the line height in pixels of markdown cells in notebooks. When set to {0}, {1} will be used",
|
|
1002
|
-
|
|
1003
|
-
|
|
1099
|
+
"`0`",
|
|
1100
|
+
"`normal`"
|
|
1004
1101
|
)),
|
|
1005
|
-
type:
|
|
1102
|
+
type: "number",
|
|
1006
1103
|
default: 0,
|
|
1007
|
-
tags: [
|
|
1104
|
+
tags: ["notebookLayout"]
|
|
1008
1105
|
},
|
|
1009
1106
|
[NotebookSetting.cellEditorOptionsCustomizations]: editorOptionsCustomizationSchema,
|
|
1010
1107
|
[NotebookSetting.interactiveWindowCollapseCodeCells]: {
|
|
1011
1108
|
markdownDescription: ( localize(
|
|
1012
|
-
|
|
1109
|
+
9868,
|
|
1013
1110
|
"Controls whether code cells in the interactive window are collapsed by default."
|
|
1014
1111
|
)),
|
|
1015
|
-
type:
|
|
1016
|
-
enum: [
|
|
1017
|
-
default:
|
|
1112
|
+
type: "string",
|
|
1113
|
+
enum: ["always", "never", "fromEditor"],
|
|
1114
|
+
default: "fromEditor"
|
|
1018
1115
|
},
|
|
1019
1116
|
[NotebookSetting.outputLineHeight]: {
|
|
1020
1117
|
markdownDescription: ( localize(
|
|
1021
|
-
|
|
1118
|
+
9869,
|
|
1022
1119
|
"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."
|
|
1023
1120
|
)),
|
|
1024
|
-
type:
|
|
1121
|
+
type: "number",
|
|
1025
1122
|
default: 0,
|
|
1026
|
-
tags: [
|
|
1123
|
+
tags: ["notebookLayout", "notebookOutputLayout"]
|
|
1027
1124
|
},
|
|
1028
1125
|
[NotebookSetting.outputFontSize]: {
|
|
1029
1126
|
markdownDescription: ( localize(
|
|
1030
|
-
|
|
1127
|
+
9870,
|
|
1031
1128
|
"Font size for the output text within notebook cells. When set to 0, {0} is used.",
|
|
1032
|
-
|
|
1129
|
+
"`#editor.fontSize#`"
|
|
1033
1130
|
)),
|
|
1034
|
-
type:
|
|
1131
|
+
type: "number",
|
|
1035
1132
|
default: 0,
|
|
1036
|
-
tags: [
|
|
1133
|
+
tags: ["notebookLayout", "notebookOutputLayout"]
|
|
1037
1134
|
},
|
|
1038
1135
|
[NotebookSetting.outputFontFamily]: {
|
|
1039
1136
|
markdownDescription: ( localize(
|
|
1040
|
-
|
|
1137
|
+
9871,
|
|
1041
1138
|
"The font family of the output text within notebook cells. When set to empty, the {0} is used.",
|
|
1042
|
-
|
|
1139
|
+
"`#editor.fontFamily#`"
|
|
1043
1140
|
)),
|
|
1044
|
-
type:
|
|
1045
|
-
tags: [
|
|
1141
|
+
type: "string",
|
|
1142
|
+
tags: ["notebookLayout", "notebookOutputLayout"]
|
|
1046
1143
|
},
|
|
1047
1144
|
[NotebookSetting.outputScrolling]: {
|
|
1048
1145
|
markdownDescription: ( localize(
|
|
1049
|
-
|
|
1146
|
+
9872,
|
|
1050
1147
|
"Initially render notebook outputs in a scrollable region when longer than the limit."
|
|
1051
1148
|
)),
|
|
1052
|
-
type:
|
|
1053
|
-
tags: [
|
|
1054
|
-
default: typeof product.quality ===
|
|
1149
|
+
type: "boolean",
|
|
1150
|
+
tags: ["notebookLayout", "notebookOutputLayout"],
|
|
1151
|
+
default: typeof product.quality === "string" && product.quality !== "stable"
|
|
1055
1152
|
},
|
|
1056
1153
|
[NotebookSetting.outputWordWrap]: {
|
|
1057
|
-
markdownDescription: ( localize(
|
|
1058
|
-
type:
|
|
1059
|
-
tags: [
|
|
1154
|
+
markdownDescription: ( localize(9873, "Controls whether the lines in output should wrap.")),
|
|
1155
|
+
type: "boolean",
|
|
1156
|
+
tags: ["notebookLayout", "notebookOutputLayout"],
|
|
1060
1157
|
default: false
|
|
1061
1158
|
},
|
|
1062
1159
|
[NotebookSetting.defaultFormatter]: {
|
|
1063
1160
|
description: ( localize(
|
|
1064
|
-
|
|
1161
|
+
9874,
|
|
1065
1162
|
"Defines a default notebook formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter."
|
|
1066
1163
|
)),
|
|
1067
|
-
type: [
|
|
1164
|
+
type: ["string", "null"],
|
|
1068
1165
|
default: null,
|
|
1069
1166
|
enum: DefaultFormatter.extensionIds,
|
|
1070
1167
|
enumItemLabels: DefaultFormatter.extensionItemLabels,
|
|
@@ -1072,60 +1169,60 @@ configurationRegistry.registerConfiguration({
|
|
|
1072
1169
|
},
|
|
1073
1170
|
[NotebookSetting.formatOnSave]: {
|
|
1074
1171
|
markdownDescription: ( localize(
|
|
1075
|
-
|
|
1172
|
+
9875,
|
|
1076
1173
|
"Format a notebook on save. A formatter must be available and the editor must not be shutting down. When {0} is set to `afterDelay`, the file will only be formatted when saved explicitly.",
|
|
1077
|
-
|
|
1174
|
+
"`#files.autoSave#`"
|
|
1078
1175
|
)),
|
|
1079
|
-
type:
|
|
1080
|
-
tags: [
|
|
1176
|
+
type: "boolean",
|
|
1177
|
+
tags: ["notebookLayout"],
|
|
1081
1178
|
default: false
|
|
1082
1179
|
},
|
|
1083
1180
|
[NotebookSetting.insertFinalNewline]: {
|
|
1084
1181
|
markdownDescription: ( localize(
|
|
1085
|
-
|
|
1182
|
+
9876,
|
|
1086
1183
|
"When enabled, insert a final new line into the end of code cells when saving a notebook."
|
|
1087
1184
|
)),
|
|
1088
|
-
type:
|
|
1089
|
-
tags: [
|
|
1185
|
+
type: "boolean",
|
|
1186
|
+
tags: ["notebookLayout"],
|
|
1090
1187
|
default: false
|
|
1091
1188
|
},
|
|
1092
1189
|
[NotebookSetting.formatOnCellExecution]: {
|
|
1093
1190
|
markdownDescription: ( localize(
|
|
1094
|
-
|
|
1191
|
+
9877,
|
|
1095
1192
|
"Format a notebook cell upon execution. A formatter must be available."
|
|
1096
1193
|
)),
|
|
1097
|
-
type:
|
|
1194
|
+
type: "boolean",
|
|
1098
1195
|
default: false
|
|
1099
1196
|
},
|
|
1100
1197
|
[NotebookSetting.confirmDeleteRunningCell]: {
|
|
1101
1198
|
markdownDescription: ( localize(
|
|
1102
|
-
|
|
1199
|
+
9878,
|
|
1103
1200
|
"Control whether a confirmation prompt is required to delete a running cell."
|
|
1104
1201
|
)),
|
|
1105
|
-
type:
|
|
1202
|
+
type: "boolean",
|
|
1106
1203
|
default: true
|
|
1107
1204
|
},
|
|
1108
1205
|
[NotebookSetting.findFilters]: {
|
|
1109
1206
|
markdownDescription: ( localize(
|
|
1110
|
-
|
|
1207
|
+
9879,
|
|
1111
1208
|
"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."
|
|
1112
1209
|
)),
|
|
1113
|
-
type:
|
|
1210
|
+
type: "object",
|
|
1114
1211
|
properties: {
|
|
1115
1212
|
markupSource: {
|
|
1116
|
-
type:
|
|
1213
|
+
type: "boolean",
|
|
1117
1214
|
default: true
|
|
1118
1215
|
},
|
|
1119
1216
|
markupPreview: {
|
|
1120
|
-
type:
|
|
1217
|
+
type: "boolean",
|
|
1121
1218
|
default: true
|
|
1122
1219
|
},
|
|
1123
1220
|
codeSource: {
|
|
1124
|
-
type:
|
|
1221
|
+
type: "boolean",
|
|
1125
1222
|
default: true
|
|
1126
1223
|
},
|
|
1127
1224
|
codeOutput: {
|
|
1128
|
-
type:
|
|
1225
|
+
type: "boolean",
|
|
1129
1226
|
default: true
|
|
1130
1227
|
}
|
|
1131
1228
|
},
|
|
@@ -1135,97 +1232,89 @@ configurationRegistry.registerConfiguration({
|
|
|
1135
1232
|
codeSource: true,
|
|
1136
1233
|
codeOutput: true
|
|
1137
1234
|
},
|
|
1138
|
-
tags: [
|
|
1235
|
+
tags: ["notebookLayout"]
|
|
1139
1236
|
},
|
|
1140
1237
|
[NotebookSetting.remoteSaving]: {
|
|
1141
1238
|
markdownDescription: ( localize(
|
|
1142
|
-
|
|
1239
|
+
9880,
|
|
1143
1240
|
"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."
|
|
1144
1241
|
)),
|
|
1145
|
-
type:
|
|
1146
|
-
default: typeof product.quality ===
|
|
1147
|
-
tags: [
|
|
1242
|
+
type: "boolean",
|
|
1243
|
+
default: typeof product.quality === "string" && product.quality !== "stable",
|
|
1244
|
+
tags: ["experimental"]
|
|
1148
1245
|
},
|
|
1149
1246
|
[NotebookSetting.scrollToRevealCell]: {
|
|
1150
1247
|
markdownDescription: ( localize(
|
|
1151
|
-
|
|
1248
|
+
9881,
|
|
1152
1249
|
"How far to scroll when revealing the next cell upon running {0}.",
|
|
1153
|
-
|
|
1250
|
+
"notebook.cell.executeAndSelectBelow"
|
|
1154
1251
|
)),
|
|
1155
|
-
type:
|
|
1156
|
-
enum: [
|
|
1157
|
-
markdownEnumDescriptions: [
|
|
1158
|
-
|
|
1159
|
-
( localize(9563, 'Scroll to reveal the first line of the next cell.')),
|
|
1160
|
-
( localize(9564, 'Do not scroll.')),
|
|
1161
|
-
],
|
|
1162
|
-
default: 'fullCell'
|
|
1252
|
+
type: "string",
|
|
1253
|
+
enum: ["fullCell", "firstLine", "none"],
|
|
1254
|
+
markdownEnumDescriptions: [( localize(9882, "Scroll to fully reveal the next cell.")), ( localize(9883, "Scroll to reveal the first line of the next cell.")), ( localize(9884, "Do not scroll."))],
|
|
1255
|
+
default: "fullCell"
|
|
1163
1256
|
},
|
|
1164
1257
|
[NotebookSetting.cellGenerate]: {
|
|
1165
1258
|
markdownDescription: ( localize(
|
|
1166
|
-
|
|
1259
|
+
9885,
|
|
1167
1260
|
"Enable experimental generate action to create code cell with inline chat enabled."
|
|
1168
1261
|
)),
|
|
1169
|
-
type:
|
|
1262
|
+
type: "boolean",
|
|
1170
1263
|
default: true
|
|
1171
1264
|
},
|
|
1172
1265
|
[NotebookSetting.notebookVariablesView]: {
|
|
1173
1266
|
markdownDescription: ( localize(
|
|
1174
|
-
|
|
1267
|
+
9886,
|
|
1175
1268
|
"Enable the experimental notebook variables view within the debug panel."
|
|
1176
1269
|
)),
|
|
1177
|
-
type:
|
|
1270
|
+
type: "boolean",
|
|
1178
1271
|
default: false
|
|
1179
1272
|
},
|
|
1180
1273
|
[NotebookSetting.notebookInlineValues]: {
|
|
1181
1274
|
markdownDescription: ( localize(
|
|
1182
|
-
|
|
1275
|
+
9887,
|
|
1183
1276
|
"Control whether to show inline values within notebook code cells after cell execution. Values will remain until the cell is edited, re-executed, or explicitly cleared via the Clear All Outputs toolbar button or the `Notebook: Clear Inline Values` command."
|
|
1184
1277
|
)),
|
|
1185
|
-
type:
|
|
1186
|
-
enum: [
|
|
1187
|
-
enumDescriptions: [
|
|
1188
|
-
|
|
1189
|
-
9568,
|
|
1278
|
+
type: "string",
|
|
1279
|
+
enum: ["on", "auto", "off"],
|
|
1280
|
+
enumDescriptions: [( localize(
|
|
1281
|
+
9888,
|
|
1190
1282
|
"Always show inline values, with a regex fallback if no inline value provider is registered. Note: There may be a performance impact in larger cells if the fallback is used."
|
|
1191
|
-
)),
|
|
1192
|
-
|
|
1193
|
-
9569,
|
|
1283
|
+
)), ( localize(
|
|
1284
|
+
9889,
|
|
1194
1285
|
"Show inline values only when an inline value provider is registered."
|
|
1195
|
-
)),
|
|
1196
|
-
|
|
1197
|
-
],
|
|
1198
|
-
default: 'off'
|
|
1286
|
+
)), ( localize(9890, "Never show inline values."))],
|
|
1287
|
+
default: "off"
|
|
1199
1288
|
},
|
|
1200
1289
|
[NotebookSetting.cellFailureDiagnostics]: {
|
|
1201
|
-
markdownDescription: ( localize(
|
|
1202
|
-
type:
|
|
1290
|
+
markdownDescription: ( localize(9891, "Show available diagnostics for cell failures.")),
|
|
1291
|
+
type: "boolean",
|
|
1203
1292
|
default: true
|
|
1204
1293
|
},
|
|
1205
1294
|
[NotebookSetting.outputBackupSizeLimit]: {
|
|
1206
1295
|
markdownDescription: ( localize(
|
|
1207
|
-
|
|
1296
|
+
9892,
|
|
1208
1297
|
"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."
|
|
1209
1298
|
)),
|
|
1210
|
-
type:
|
|
1299
|
+
type: "number",
|
|
1211
1300
|
default: 10000
|
|
1212
1301
|
},
|
|
1213
1302
|
[NotebookSetting.multiCursor]: {
|
|
1214
1303
|
markdownDescription: ( localize(
|
|
1215
|
-
|
|
1304
|
+
9893,
|
|
1216
1305
|
"Experimental. Enables a limited set of multi cursor controls across multiple cells in the notebook editor. Currently supported are core editor actions (typing/cut/copy/paste/composition) and a limited subset of editor commands."
|
|
1217
1306
|
)),
|
|
1218
|
-
type:
|
|
1307
|
+
type: "boolean",
|
|
1219
1308
|
default: false
|
|
1220
1309
|
},
|
|
1221
1310
|
[NotebookSetting.markupFontFamily]: {
|
|
1222
1311
|
markdownDescription: ( localize(
|
|
1223
|
-
|
|
1312
|
+
9894,
|
|
1224
1313
|
"Controls the font family of rendered markup in notebooks. When left blank, this will fall back to the default workbench font family."
|
|
1225
1314
|
)),
|
|
1226
|
-
type:
|
|
1227
|
-
default:
|
|
1228
|
-
tags: [
|
|
1315
|
+
type: "string",
|
|
1316
|
+
default: "",
|
|
1317
|
+
tags: ["notebookLayout"]
|
|
1229
1318
|
}
|
|
1230
1319
|
}
|
|
1231
1320
|
});
|