@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.
Files changed (53) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +26 -22
  3. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +56 -112
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -6
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
  45. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
  46. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
  48. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
  49. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
  50. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
  51. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
  52. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
@@ -1,9 +1,10 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
3
- import { LinkedMap } from 'vscode/vscode/vs/base/common/map';
3
+ import { LinkedMap, Touch } from 'vscode/vscode/vs/base/common/map';
4
4
  import { localize2WithPath } from 'vscode/vscode/vs/nls';
5
5
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
6
6
  import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
7
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
7
8
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
8
9
  import { INotebookKernelService, INotebookKernelHistoryService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
9
10
  import { INotebookLoggingService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
@@ -22,7 +23,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
22
23
  this._mostRecentKernelsMap = {};
23
24
  this._loadState();
24
25
  this._register(this._storageService.onWillSaveState(() => this._saveState()));
25
- this._register(this._storageService.onDidChangeValue(1 , NotebookKernelHistoryService_1.STORAGE_KEY, this._register(( (new DisposableStore()))))(() => {
26
+ this._register(this._storageService.onDidChangeValue(StorageScope.WORKSPACE, NotebookKernelHistoryService_1.STORAGE_KEY, this._register(( (new DisposableStore()))))(() => {
26
27
  this._loadState();
27
28
  }));
28
29
  }
@@ -44,7 +45,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
44
45
  const key = kernel.id;
45
46
  const viewType = kernel.viewType;
46
47
  const recentKeynels = this._mostRecentKernelsMap[viewType] ?? ( (new LinkedMap()));
47
- recentKeynels.set(key, key, 1 );
48
+ recentKeynels.set(key, key, Touch.AsOld);
48
49
  if (recentKeynels.size > MAX_KERNELS_IN_HISTORY) {
49
50
  const reserved = [...recentKeynels.entries()].slice(0, MAX_KERNELS_IN_HISTORY);
50
51
  recentKeynels.fromJSON(reserved);
@@ -58,14 +59,14 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
58
59
  }
59
60
  if (notEmpty) {
60
61
  const serialized = this._serialize();
61
- this._storageService.store(NotebookKernelHistoryService_1.STORAGE_KEY, JSON.stringify(serialized), 1 , 0 );
62
+ this._storageService.store(NotebookKernelHistoryService_1.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE, StorageTarget.USER);
62
63
  }
63
64
  else {
64
- this._storageService.remove(NotebookKernelHistoryService_1.STORAGE_KEY, 1 );
65
+ this._storageService.remove(NotebookKernelHistoryService_1.STORAGE_KEY, StorageScope.WORKSPACE);
65
66
  }
66
67
  }
67
68
  _loadState() {
68
- const serialized = this._storageService.get(NotebookKernelHistoryService_1.STORAGE_KEY, 1 );
69
+ const serialized = this._storageService.get(NotebookKernelHistoryService_1.STORAGE_KEY, StorageScope.WORKSPACE);
69
70
  if (serialized) {
70
71
  try {
71
72
  this._deserialize(JSON.parse(serialized));
@@ -2,12 +2,14 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
3
3
  import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
4
  import { ResourceMap, LRUCache } from 'vscode/vscode/vs/base/common/map';
5
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
5
6
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
6
7
  import { URI } from 'vscode/vscode/vs/base/common/uri';
7
8
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
8
9
  import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
9
10
  import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
10
11
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
12
+ import { MarshalledId } from 'vscode/vscode/vs/base/common/marshallingIds';
11
13
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
12
14
  import { runWhenWindowIdle, getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
13
15
 
@@ -56,7 +58,7 @@ class SourceAction extends Disposable {
56
58
  try {
57
59
  await this.action.run({
58
60
  uri: this.model.uri,
59
- $mid: 14
61
+ $mid: MarshalledId.NotebookActionContext
60
62
  });
61
63
  }
62
64
  catch (error) {
@@ -104,7 +106,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
104
106
  this._kernelSourceActionsUpdates.delete(id);
105
107
  }));
106
108
  try {
107
- const data = JSON.parse(this._storageService.get(NotebookKernelService_1._storageNotebookBinding, 1 , '[]'));
109
+ const data = JSON.parse(this._storageService.get(NotebookKernelService_1._storageNotebookBinding, StorageScope.WORKSPACE, '[]'));
108
110
  this._notebookBindings.fromJSON(data);
109
111
  }
110
112
  catch {
@@ -125,7 +127,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
125
127
  _persistMementos() {
126
128
  this._persistSoonHandle?.dispose();
127
129
  this._persistSoonHandle = runWhenWindowIdle(getActiveWindow(), () => {
128
- this._storageService.store(NotebookKernelService_1._storageNotebookBinding, JSON.stringify(this._notebookBindings), 1 , 1 );
130
+ this._storageService.store(NotebookKernelService_1._storageNotebookBinding, JSON.stringify(this._notebookBindings), StorageScope.WORKSPACE, StorageTarget.MACHINE);
129
131
  }, 100);
130
132
  }
131
133
  static _score(kernel, notebook) {
@@ -7,10 +7,13 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
7
7
  import 'vscode/vscode/vs/platform/notification/common/notification';
8
8
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
9
9
  import { getInstalledExtensions } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsUtils';
10
+ import { EnablementState } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
10
11
  import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
11
12
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
13
+ import { InstallOperation } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
12
14
  import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
13
15
  import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
16
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
14
17
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
15
18
  import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
16
19
  import { distinct } from 'vscode/vscode/vs/base/common/arrays';
@@ -20,7 +23,7 @@ const _moduleId = "vs/workbench/contrib/notebook/browser/services/notebookKeymap
20
23
  function onExtensionChanged(accessor) {
21
24
  const extensionService = accessor.get(IExtensionManagementService);
22
25
  const extensionEnablementService = accessor.get(IWorkbenchExtensionEnablementService);
23
- const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( ($.filter(e => ( (e.some(({ operation }) => operation === 2 ))))
26
+ const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( ($.filter(e => ( (e.some(({ operation }) => operation === InstallOperation.Install))))
24
27
  .map(e => ( (e.map(({ identifier }) => identifier)))))));
25
28
  return Event.debounce(Event.any(Event.any(onDidInstallExtensions, ( (Event.map(extensionService.onDidUninstallExtension, e => [e.identifier])))), ( (Event.map(
26
29
  extensionEnablementService.onEnablementChanged,
@@ -43,7 +46,7 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
43
46
  this.extensionEnablementService = extensionEnablementService;
44
47
  this.notificationService = notificationService;
45
48
  this.notebookKeymapMemento = ( (new Memento('notebookKeymap', storageService)));
46
- this.notebookKeymap = this.notebookKeymapMemento.getMemento(0 , 0 );
49
+ this.notebookKeymap = this.notebookKeymapMemento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
47
50
  this._register(lifecycleService.onDidShutdown(() => this.dispose()));
48
51
  this._register(this.instantiationService.invokeFunction(onExtensionChanged)((identifiers => {
49
52
  Promise.all(( (identifiers.map(identifier => this.checkForOtherKeymaps(identifier)))))
@@ -68,7 +71,7 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
68
71
  promptForDisablingOtherKeymaps(newKeymap, oldKeymaps) {
69
72
  const onPrompt = (confirmed) => {
70
73
  if (confirmed) {
71
- this.extensionEnablementService.setEnablement(( (oldKeymaps.map(keymap => keymap.local))), 6 );
74
+ this.extensionEnablementService.setEnablement(( (oldKeymaps.map(keymap => keymap.local))), EnablementState.DisabledGlobally);
72
75
  }
73
76
  };
74
77
  this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
@@ -8,19 +8,20 @@ import { Lazy } from 'vscode/vscode/vs/base/common/lazy';
8
8
  import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
9
9
  import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
10
10
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
11
- import { isEqual } from 'vscode/vscode/vs/base/common/resources';
11
+ import { basename, isEqual } from 'vscode/vscode/vs/base/common/resources';
12
12
  import { isDefined } from 'vscode/vscode/vs/base/common/types';
13
13
  import { URI } from 'vscode/vscode/vs/base/common/uri';
14
14
  import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
15
15
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
16
16
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
17
17
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
18
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
18
19
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
19
20
  import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
20
21
  import { notebooksExtensionPoint, notebookRendererExtensionPoint, notebookPreloadExtensionPoint } from '../notebookExtensionPoint.js';
21
22
  import { NotebookDiffEditorInput } from '../../common/notebookDiffEditorInput.js';
22
23
  import { NotebookTextModel } from '../../common/model/notebookTextModel.js';
23
- import { NotebookEditorPriority, NotebookSetting, CellUri, RENDERER_EQUIVALENT_EXTENSIONS, RENDERER_NOT_AVAILABLE, MimeTypeDisplayOrder, ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER, NOTEBOOK_DISPLAY_ORDER } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
24
+ import { NotebookEditorPriority, NotebookSetting, CellUri, NotebookRendererMatch, RENDERER_EQUIVALENT_EXTENSIONS, RENDERER_NOT_AVAILABLE, MimeTypeDisplayOrder, ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER, NOTEBOOK_DISPLAY_ORDER } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
24
25
  import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
25
26
  import { INotebookEditorModelResolverService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
26
27
  import { NotebookOutputRendererInfo, NotebookStaticPreloadInfo } from '../../common/notebookOutputRenderer.js';
@@ -33,6 +34,7 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
33
34
  import { InstallRecommendedExtensionAction } from 'vscode/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
34
35
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
35
36
  import { INotebookDocumentService } from 'vscode/vscode/vs/workbench/services/notebook/common/notebookDocumentService.service';
37
+ import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
36
38
 
37
39
  var NotebookProviderInfoStore_1, NotebookService_1;
38
40
  const _moduleId = "vs/workbench/contrib/notebook/browser/services/notebookServiceImpl";
@@ -53,10 +55,10 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
53
55
  this._contributedEditors = ( (new Map()));
54
56
  this._contributedEditorDisposables = this._register(( (new DisposableStore())));
55
57
  this._memento = ( (new Memento(NotebookProviderInfoStore_1.CUSTOM_EDITORS_STORAGE_ID, storageService)));
56
- const mementoObject = this._memento.getMemento(0 , 1 );
58
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
57
59
  this._editorResolverService.bufferChangeEvents(() => {
58
60
  for (const info of (mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] || [])) {
59
- this.add(( (new NotebookProviderInfo(info))));
61
+ this.add(( (new NotebookProviderInfo(info))), false);
60
62
  }
61
63
  });
62
64
  this._register(extensionService.onDidRegisterExtensions(() => {
@@ -107,12 +109,12 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
107
109
  }))));
108
110
  }
109
111
  }
110
- const mementoObject = this._memento.getMemento(0 , 1 );
112
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
111
113
  mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._contributedEditors.values())));
112
114
  this._memento.saveMemento();
113
115
  }
114
116
  clearEditorCache() {
115
- const mementoObject = this._memento.getMemento(0 , 1 );
117
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
116
118
  mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] = [];
117
119
  this._memento.saveMemento();
118
120
  }
@@ -169,10 +171,26 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
169
171
  const notebookDiffEditorInputFactory = ({ modified, original, label, description }) => {
170
172
  return { editor: NotebookDiffEditorInput.create(this._instantiationService, modified.resource, label, description, original.resource, notebookProviderInfo.id) };
171
173
  };
174
+ const mergeEditorInputFactory = (mergeEditor) => {
175
+ return {
176
+ editor: this._instantiationService.createInstance(MergeEditorInput, mergeEditor.base.resource, {
177
+ uri: mergeEditor.input1.resource,
178
+ title: mergeEditor.input1.label ?? basename(mergeEditor.input1.resource),
179
+ description: mergeEditor.input1.description ?? '',
180
+ detail: mergeEditor.input1.detail
181
+ }, {
182
+ uri: mergeEditor.input2.resource,
183
+ title: mergeEditor.input2.label ?? basename(mergeEditor.input2.resource),
184
+ description: mergeEditor.input2.description ?? '',
185
+ detail: mergeEditor.input2.detail
186
+ }, mergeEditor.result.resource)
187
+ };
188
+ };
172
189
  const notebookFactoryObject = {
173
190
  createEditorInput: notebookEditorInputFactory,
174
191
  createDiffEditorInput: notebookDiffEditorInputFactory,
175
192
  createUntitledEditorInput: notebookUntitledEditorFactory,
193
+ createMergeEditorInput: mergeEditorInputFactory
176
194
  };
177
195
  const notebookCellFactoryObject = {
178
196
  createEditorInput: notebookEditorInputFactory,
@@ -214,7 +232,7 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
214
232
  get(viewType) {
215
233
  return this._contributedEditors.get(viewType);
216
234
  }
217
- add(info) {
235
+ add(info, saveMemento = true) {
218
236
  if (( (this._contributedEditors.has(info.id)))) {
219
237
  throw ( (new Error(`notebook type '${info.id}' ALREADY EXISTS`)));
220
238
  }
@@ -224,11 +242,13 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
224
242
  editorRegistration = this._registerContributionPoint(info);
225
243
  this._contributedEditorDisposables.add(editorRegistration);
226
244
  }
227
- const mementoObject = this._memento.getMemento(0 , 1 );
228
- mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._contributedEditors.values())));
229
- this._memento.saveMemento();
245
+ if (saveMemento) {
246
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
247
+ mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._contributedEditors.values())));
248
+ this._memento.saveMemento();
249
+ }
230
250
  return this._register(toDisposable(() => {
231
- const mementoObject = this._memento.getMemento(0 , 1 );
251
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
232
252
  mementoObject[NotebookProviderInfoStore_1.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._contributedEditors.values())));
233
253
  this._memento.saveMemento();
234
254
  editorRegistration?.dispose();
@@ -268,7 +288,7 @@ let NotebookOutputRendererInfoStore = class NotebookOutputRendererInfoStore {
268
288
  constructor(storageService) {
269
289
  this.contributedRenderers = ( (new Map()));
270
290
  this.preferredMimetype = ( (new Lazy(
271
- () => this.preferredMimetypeMemento.getMemento(1 , 1 )
291
+ () => this.preferredMimetypeMemento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE)
272
292
  )));
273
293
  this.preferredMimetypeMemento = ( (new Memento('workbench.editor.notebook.preferredRenderer2', storageService)));
274
294
  }
@@ -299,6 +319,13 @@ let NotebookOutputRendererInfoStore = class NotebookOutputRendererInfoStore {
299
319
  this.preferredMimetypeMemento.saveMemento();
300
320
  }
301
321
  findBestRenderers(notebookProviderInfo, mimeType, kernelProvides) {
322
+ let ReuseOrder;
323
+ ( ((function(ReuseOrder) {
324
+ ReuseOrder[ReuseOrder["PreviouslySelected"] = 256] = "PreviouslySelected";
325
+ ReuseOrder[ReuseOrder["SameExtensionAsNotebook"] = 512] = "SameExtensionAsNotebook";
326
+ ReuseOrder[ReuseOrder["OtherRenderer"] = 768] = "OtherRenderer";
327
+ ReuseOrder[ReuseOrder["BuiltIn"] = 1024] = "BuiltIn";
328
+ })(ReuseOrder || (ReuseOrder = {}))));
302
329
  const preferred = notebookProviderInfo && this.preferredMimetype.value[notebookProviderInfo.id]?.[mimeType];
303
330
  const notebookExtId = notebookProviderInfo?.extension?.value;
304
331
  const notebookId = notebookProviderInfo?.id;
@@ -307,15 +334,15 @@ let NotebookOutputRendererInfoStore = class NotebookOutputRendererInfoStore {
307
334
  const ownScore = kernelProvides === undefined
308
335
  ? renderer.matchesWithoutKernel(mimeType)
309
336
  : renderer.matches(mimeType, kernelProvides);
310
- if (ownScore === 3 ) {
337
+ if (ownScore === NotebookRendererMatch.Never) {
311
338
  return undefined;
312
339
  }
313
340
  const rendererExtId = renderer.extensionId.value;
314
341
  const reuseScore = preferred === renderer.id
315
- ? 256
342
+ ? ReuseOrder.PreviouslySelected
316
343
  : rendererExtId === notebookExtId || RENDERER_EQUIVALENT_EXTENSIONS.get(rendererExtId)?.has(notebookId)
317
- ? 512
318
- : renderer.isBuiltin ? 1024 : 768 ;
344
+ ? ReuseOrder.SameExtensionAsNotebook
345
+ : renderer.isBuiltin ? ReuseOrder.BuiltIn : ReuseOrder.OtherRenderer;
319
346
  return {
320
347
  ordered: { mimeType, rendererId: renderer.id, isTrusted: true },
321
348
  score: reuseScore | ownScore,
@@ -455,7 +482,7 @@ let NotebookService = class NotebookService extends Disposable {
455
482
  updateOrder();
456
483
  }));
457
484
  this._memento = ( (new Memento(NotebookService_1._storageNotebookViewTypeProvider, this._storageService)));
458
- this._viewTypeCache = this._memento.getMemento(1 , 1 );
485
+ this._viewTypeCache = this._memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
459
486
  }
460
487
  getEditorTypes() {
461
488
  return (
@@ -0,0 +1,34 @@
1
+ import 'vscode/vscode/vs/base/browser/dom';
2
+ import 'vscode/vscode/vs/base/browser/dompurify/dompurify';
3
+ import 'vscode/vscode/vs/base/common/event';
4
+ import 'vscode/vscode/vs/base/browser/formattedTextRenderer';
5
+ import 'vscode/vscode/vs/base/browser/browser';
6
+ import 'vscode/vscode/vs/base/common/keyCodes';
7
+ import 'vscode/vscode/vs/base/common/keybindings';
8
+ import 'vscode/vscode/vs/base/common/platform';
9
+ import 'vscode/vscode/vs/base/common/themables';
10
+ import 'vscode/vscode/vs/base/common/htmlContent';
11
+ import 'vscode/vscode/vs/base/common/filters';
12
+ import 'vscode/vscode/vs/base/common/strings';
13
+ import 'vscode/vscode/vs/base/common/lifecycle';
14
+ import 'vscode/external/vscode-marked/lib/marked.esm.js';
15
+ import 'vscode/vscode/vs/base/common/charCode';
16
+ import 'vscode/vscode/vs/base/common/marshallingIds';
17
+ import 'vscode/vscode/vs/base/common/path';
18
+ import 'vscode/vscode/vs/base/common/network';
19
+ import 'vscode/vscode/vs/base/common/resources';
20
+ import 'vscode/vscode/vs/nls';
21
+ import 'vscode/vscode/vs/editor/common/model';
22
+ import 'vscode/vscode/vs/editor/contrib/folding/browser/foldingRanges';
23
+ import 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
24
+ import 'vscode/vscode/vs/base/common/codicons';
25
+ import 'vscode/vscode/vs/platform/markers/common/markers';
26
+ import 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
27
+ import 'vscode/vscode/vs/editor/common/languages';
28
+
29
+ var NotebookOutlineConstants;
30
+ ( (function(NotebookOutlineConstants) {
31
+ NotebookOutlineConstants[NotebookOutlineConstants["NonHeaderOutlineLevel"] = 7] = "NonHeaderOutlineLevel";
32
+ })(NotebookOutlineConstants || (NotebookOutlineConstants = {})));
33
+
34
+ export { NotebookOutlineConstants };
@@ -1,3 +1,5 @@
1
+ import { UndoRedoElementType } from 'vscode/vscode/vs/platform/undoRedo/common/undoRedo';
2
+
1
3
  class MoveCellEdit {
2
4
  get label() {
3
5
  return this.length === 1 ? 'Move Cell' : 'Move Cells';
@@ -10,7 +12,7 @@ class MoveCellEdit {
10
12
  this.editingDelegate = editingDelegate;
11
13
  this.beforedSelections = beforedSelections;
12
14
  this.endSelections = endSelections;
13
- this.type = 0 ;
15
+ this.type = UndoRedoElementType.Resource;
14
16
  this.code = 'undoredo.textBufferEdit';
15
17
  }
16
18
  undo() {
@@ -42,7 +44,7 @@ class SpliceCellsEdit {
42
44
  this.editingDelegate = editingDelegate;
43
45
  this.beforeHandles = beforeHandles;
44
46
  this.endHandles = endHandles;
45
- this.type = 0 ;
47
+ this.type = UndoRedoElementType.Resource;
46
48
  this.code = 'undoredo.textBufferEdit';
47
49
  }
48
50
  undo() {
@@ -69,7 +71,7 @@ class CellMetadataEdit {
69
71
  this.oldMetadata = oldMetadata;
70
72
  this.newMetadata = newMetadata;
71
73
  this.editingDelegate = editingDelegate;
72
- this.type = 0 ;
74
+ this.type = UndoRedoElementType.Resource;
73
75
  this.label = 'Update Cell Metadata';
74
76
  this.code = 'undoredo.textBufferEdit';
75
77
  }