@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.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 (94) hide show
  1. package/index.js +2 -2
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +28 -22
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
  71. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
  72. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
  73. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  74. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
  76. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
  78. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
  79. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
  80. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
  81. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
  82. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
  83. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
  84. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
  85. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
  86. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
@@ -16,7 +16,9 @@ import { runWhenWindowIdle, getActiveWindow } from '@codingame/monaco-vscode-api
16
16
 
17
17
  var NotebookKernelService_1;
18
18
  class KernelInfo {
19
- static { this._logicClock = 0; }
19
+ static {
20
+ this._logicClock = 0;
21
+ }
20
22
  constructor(kernel) {
21
23
  this.notebookPriorities = ( new ResourceMap());
22
24
  this.kernel = kernel;
@@ -29,7 +31,7 @@ class NotebookTextModelLikeId {
29
31
  return `${k.notebookType}/${( k.uri.toString())}`;
30
32
  }
31
33
  static obj(s) {
32
- const idx = s.indexOf('/');
34
+ const idx = s.indexOf("/");
33
35
  return {
34
36
  notebookType: s.substring(0, idx),
35
37
  uri: ( URI.parse(s.substring(idx + 1)))
@@ -61,15 +63,18 @@ class SourceAction extends Disposable {
61
63
  uri: this.model.uri,
62
64
  $mid: MarshalledId.NotebookActionContext
63
65
  });
64
- }
65
- catch (error) {
66
+ } catch (error) {
66
67
  console.warn(`Kernel source command failed: ${error}`);
67
68
  }
68
69
  }
69
70
  }
70
71
  let NotebookKernelService = class NotebookKernelService extends Disposable {
71
- static { NotebookKernelService_1 = this; }
72
- static { this._storageNotebookBinding = 'notebook.controller2NotebookBindings'; }
72
+ static {
73
+ NotebookKernelService_1 = this;
74
+ }
75
+ static {
76
+ this._storageNotebookBinding = "notebook.controller2NotebookBindings";
77
+ }
73
78
  constructor(_notebookService, _storageService, _menuService, _contextKeyService) {
74
79
  super();
75
80
  this._notebookService = _notebookService;
@@ -107,11 +112,13 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
107
112
  this._kernelSourceActionsUpdates.delete(id);
108
113
  }));
109
114
  try {
110
- const data = JSON.parse(this._storageService.get(NotebookKernelService_1._storageNotebookBinding, StorageScope.WORKSPACE, '[]'));
115
+ const data = JSON.parse(this._storageService.get(
116
+ NotebookKernelService_1._storageNotebookBinding,
117
+ StorageScope.WORKSPACE,
118
+ "[]"
119
+ ));
111
120
  this._notebookBindings.fromJSON(data);
112
- }
113
- catch {
114
- }
121
+ } catch {}
115
122
  }
116
123
  dispose() {
117
124
  this._kernels.clear();
@@ -128,17 +135,20 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
128
135
  _persistMementos() {
129
136
  this._persistSoonHandle?.dispose();
130
137
  this._persistSoonHandle = runWhenWindowIdle(getActiveWindow(), () => {
131
- this._storageService.store(NotebookKernelService_1._storageNotebookBinding, JSON.stringify(this._notebookBindings), StorageScope.WORKSPACE, StorageTarget.MACHINE);
138
+ this._storageService.store(
139
+ NotebookKernelService_1._storageNotebookBinding,
140
+ JSON.stringify(this._notebookBindings),
141
+ StorageScope.WORKSPACE,
142
+ StorageTarget.MACHINE
143
+ );
132
144
  }, 100);
133
145
  }
134
146
  static _score(kernel, notebook) {
135
- if (kernel.viewType === '*') {
147
+ if (kernel.viewType === "*") {
136
148
  return 5;
137
- }
138
- else if (kernel.viewType === notebook.notebookType) {
149
+ } else if (kernel.viewType === notebook.notebookType) {
139
150
  return 10;
140
- }
141
- else {
151
+ } else {
142
152
  return 0;
143
153
  }
144
154
  }
@@ -152,7 +162,11 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
152
162
  return;
153
163
  }
154
164
  if (!onlyThisKernel || existingKernel.kernel === onlyThisKernel) {
155
- this._onDidChangeNotebookKernelBinding.fire({ notebook: notebook.uri, oldKernel: undefined, newKernel: existingKernel.kernel.id });
165
+ this._onDidChangeNotebookKernelBinding.fire({
166
+ notebook: notebook.uri,
167
+ oldKernel: undefined,
168
+ newKernel: existingKernel.kernel.id
169
+ });
156
170
  }
157
171
  }
158
172
  notifyVariablesChange(notebookUri) {
@@ -173,7 +187,11 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
173
187
  }
174
188
  for (const [key, candidate] of Array.from(this._notebookBindings)) {
175
189
  if (candidate === kernel.id) {
176
- this._onDidChangeNotebookKernelBinding.fire({ notebook: NotebookTextModelLikeId.obj(key).uri, oldKernel: kernel.id, newKernel: undefined });
190
+ this._onDidChangeNotebookKernelBinding.fire({
191
+ notebook: NotebookTextModelLikeId.obj(key).uri,
192
+ oldKernel: kernel.id,
193
+ newKernel: undefined
194
+ });
177
195
  }
178
196
  }
179
197
  });
@@ -186,25 +204,33 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
186
204
  kernels.push({
187
205
  score,
188
206
  kernel: info.kernel,
189
- instanceAffinity: info.notebookPriorities.get(notebook.uri) ?? 1 ,
207
+ instanceAffinity: info.notebookPriorities.get(notebook.uri) ?? 1
190
208
  });
191
209
  }
192
210
  }
193
- kernels
194
- .sort((a, b) => b.instanceAffinity - a.instanceAffinity || a.score - b.score || a.kernel.label.localeCompare(b.kernel.label));
211
+ kernels.sort(
212
+ (a, b) => b.instanceAffinity - a.instanceAffinity || a.score - b.score || a.kernel.label.localeCompare(b.kernel.label)
213
+ );
195
214
  const all = ( kernels.map(obj => obj.kernel));
196
215
  const selectedId = this._notebookBindings.get(NotebookTextModelLikeId.str(notebook));
197
216
  const selected = selectedId ? this._kernels.get(selectedId)?.kernel : undefined;
198
217
  const suggestions = ( kernels.filter(item => item.instanceAffinity > 1).map(item => item.kernel));
199
218
  const hidden = ( kernels.filter(item => item.instanceAffinity < 0).map(item => item.kernel));
200
- return { all, selected, suggestions, hidden };
219
+ return {
220
+ all,
221
+ selected,
222
+ suggestions,
223
+ hidden
224
+ };
201
225
  }
202
226
  getSelectedOrSuggestedKernel(notebook) {
203
227
  const info = this.getMatchingKernel(notebook);
204
228
  if (info.selected) {
205
229
  return info.selected;
206
230
  }
207
- const preferred = info.all.filter(kernel => this._kernels.get(kernel.id)?.notebookPriorities.get(notebook.uri) === 2 );
231
+ const preferred = info.all.filter(
232
+ kernel => this._kernels.get(kernel.id)?.notebookPriorities.get(notebook.uri) === 2
233
+ );
208
234
  if (preferred.length === 1) {
209
235
  return preferred[0];
210
236
  }
@@ -216,11 +242,14 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
216
242
  if (oldKernel !== kernel?.id) {
217
243
  if (kernel) {
218
244
  this._notebookBindings.set(key, kernel.id);
219
- }
220
- else {
245
+ } else {
221
246
  this._notebookBindings.delete(key);
222
247
  }
223
- this._onDidChangeNotebookKernelBinding.fire({ notebook: notebook.uri, oldKernel, newKernel: kernel?.id });
248
+ this._onDidChangeNotebookKernelBinding.fire({
249
+ notebook: notebook.uri,
250
+ oldKernel,
251
+ newKernel: kernel?.id
252
+ });
224
253
  this._persistMementos();
225
254
  }
226
255
  }
@@ -239,8 +268,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
239
268
  }
240
269
  if (preference === undefined) {
241
270
  info.notebookPriorities.delete(notebook);
242
- }
243
- else {
271
+ } else {
244
272
  info.notebookPriorities.set(notebook, preference);
245
273
  }
246
274
  this._onDidChangeNotebookAffinity.fire();
@@ -260,10 +288,17 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
260
288
  if (existingInfo) {
261
289
  return ( existingInfo.actions.map(a => a[0]));
262
290
  }
263
- const sourceMenu = this._register(this._menuService.createMenu(MenuId.NotebookKernelSource, contextKeyService));
264
- const info = { menu: sourceMenu, actions: [] };
291
+ const sourceMenu = this._register(
292
+ this._menuService.createMenu(MenuId.NotebookKernelSource, contextKeyService)
293
+ );
294
+ const info = {
295
+ menu: sourceMenu,
296
+ actions: []
297
+ };
265
298
  const loadActionsFromMenu = (menu, document) => {
266
- const groups = menu.getActions({ shouldForwardArgs: true });
299
+ const groups = menu.getActions({
300
+ shouldForwardArgs: true
301
+ });
267
302
  const sourceActions = [];
268
303
  groups.forEach(group => {
269
304
  const isPrimary = /^primary/.test(group[0]);
@@ -272,7 +307,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
272
307
  const stateChangeListener = sourceAction.onDidChangeState(() => {
273
308
  this._onDidChangeSourceActions.fire({
274
309
  notebook: document.uri,
275
- viewType: document.notebookType,
310
+ viewType: document.notebookType
276
311
  });
277
312
  });
278
313
  sourceActions.push([sourceAction, stateChangeListener]);
@@ -280,7 +315,10 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
280
315
  });
281
316
  info.actions = sourceActions;
282
317
  this._kernelSources.set(id, info);
283
- this._onDidChangeSourceActions.fire({ notebook: document.uri, viewType: document.notebookType });
318
+ this._onDidChangeSourceActions.fire({
319
+ notebook: document.uri,
320
+ viewType: document.notebookType
321
+ });
284
322
  };
285
323
  this._kernelSourceActionsUpdates.get(id)?.dispose();
286
324
  this._kernelSourceActionsUpdates.set(id, sourceMenu.onDidChange(() => {
@@ -312,9 +350,13 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
312
350
  const providers = this._kernelSourceActionProviders.get(viewType) ?? [];
313
351
  providers.push(provider);
314
352
  this._kernelSourceActionProviders.set(viewType, providers);
315
- this._onDidChangeSourceActions.fire({ viewType: viewType });
353
+ this._onDidChangeSourceActions.fire({
354
+ viewType: viewType
355
+ });
316
356
  const eventEmitterDisposable = provider.onDidChangeSourceActions?.(() => {
317
- this._onDidChangeSourceActions.fire({ viewType: viewType });
357
+ this._onDidChangeSourceActions.fire({
358
+ viewType: viewType
359
+ });
318
360
  });
319
361
  return toDisposable(() => {
320
362
  const providers = this._kernelSourceActionProviders.get(viewType) ?? [];
@@ -335,11 +377,6 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
335
377
  });
336
378
  }
337
379
  };
338
- NotebookKernelService = NotebookKernelService_1 = ( __decorate([
339
- ( __param(0, INotebookService)),
340
- ( __param(1, IStorageService)),
341
- ( __param(2, IMenuService)),
342
- ( __param(3, IContextKeyService))
343
- ], NotebookKernelService));
380
+ NotebookKernelService = NotebookKernelService_1 = ( __decorate([( __param(0, INotebookService)), ( __param(1, IStorageService)), ( __param(2, IMenuService)), ( __param(3, IContextKeyService))], NotebookKernelService));
344
381
 
345
382
  export { NotebookKernelService };
@@ -23,8 +23,15 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
23
23
  function onExtensionChanged(accessor) {
24
24
  const extensionService = accessor.get(IExtensionManagementService);
25
25
  const extensionEnablementService = accessor.get(IWorkbenchExtensionEnablementService);
26
- const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( $.filter(e => ( e.some(({ operation }) => operation === InstallOperation.Install)))
27
- .map(e => ( e.map(({ identifier }) => identifier)))));
26
+ const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( $.filter(e => ( e.some((
27
+ {
28
+ operation
29
+ }
30
+ ) => operation === InstallOperation.Install))).map(e => ( e.map((
31
+ {
32
+ identifier
33
+ }
34
+ ) => identifier)))));
28
35
  return Event.debounce(Event.any(Event.any(onDidInstallExtensions, ( Event.map(extensionService.onDidUninstallExtension, e => [e.identifier]))), ( Event.map(
29
36
  extensionEnablementService.onEnablementChanged,
30
37
  extensions => ( extensions.map(e => e.identifier))
@@ -38,20 +45,27 @@ function onExtensionChanged(accessor) {
38
45
  return result;
39
46
  });
40
47
  }
41
- const hasRecommendedKeymapKey = 'hasRecommendedKeymap';
48
+ const hasRecommendedKeymapKey = "hasRecommendedKeymap";
42
49
  let NotebookKeymapService = class NotebookKeymapService extends Disposable {
43
- constructor(instantiationService, extensionEnablementService, notificationService, storageService, lifecycleService) {
50
+ constructor(
51
+ instantiationService,
52
+ extensionEnablementService,
53
+ notificationService,
54
+ storageService,
55
+ lifecycleService
56
+ ) {
44
57
  super();
45
58
  this.instantiationService = instantiationService;
46
59
  this.extensionEnablementService = extensionEnablementService;
47
60
  this.notificationService = notificationService;
48
- this.notebookKeymapMemento = ( new Memento('notebookKeymap', storageService));
61
+ this.notebookKeymapMemento = ( new Memento("notebookKeymap", storageService));
49
62
  this.notebookKeymap = this.notebookKeymapMemento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
50
63
  this._register(lifecycleService.onDidShutdown(() => this.dispose()));
51
- this._register(this.instantiationService.invokeFunction(onExtensionChanged)((identifiers => {
52
- Promise.all(( identifiers.map(identifier => this.checkForOtherKeymaps(identifier))))
53
- .then(undefined, onUnexpectedError);
54
- })));
64
+ this._register(
65
+ this.instantiationService.invokeFunction(onExtensionChanged)((identifiers => {
66
+ Promise.all(( identifiers.map(identifier => this.checkForOtherKeymaps(identifier)))).then(undefined, onUnexpectedError);
67
+ }))
68
+ );
55
69
  }
56
70
  checkForOtherKeymaps(extensionIdentifier) {
57
71
  return this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => {
@@ -60,7 +74,9 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
60
74
  if (extension && extension.globallyEnabled) {
61
75
  this.notebookKeymap[hasRecommendedKeymapKey] = true;
62
76
  this.notebookKeymapMemento.saveMemento();
63
- const otherKeymaps = keymaps.filter(extension => !areSameExtensions(extension.identifier, extensionIdentifier) && extension.globallyEnabled);
77
+ const otherKeymaps = keymaps.filter(
78
+ extension => !areSameExtensions(extension.identifier, extensionIdentifier) && extension.globallyEnabled
79
+ );
64
80
  if (otherKeymaps.length) {
65
81
  return this.promptForDisablingOtherKeymaps(extension, otherKeymaps);
66
82
  }
@@ -69,31 +85,25 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
69
85
  });
70
86
  }
71
87
  promptForDisablingOtherKeymaps(newKeymap, oldKeymaps) {
72
- const onPrompt = (confirmed) => {
88
+ const onPrompt = confirmed => {
73
89
  if (confirmed) {
74
90
  this.extensionEnablementService.setEnablement(( oldKeymaps.map(keymap => keymap.local)), EnablementState.DisabledGlobally);
75
91
  }
76
92
  };
77
93
  this.notificationService.prompt(Severity.Info, ( localize(
78
- 9687,
94
+ 10007,
79
95
  "Disable other keymaps ({0}) to avoid conflicts between keybindings?",
80
- ( distinct(( oldKeymaps.map(k => k.local.manifest.displayName))).map(name => `'${name}'`)).join(', ')
96
+ ( distinct(( oldKeymaps.map(k => k.local.manifest.displayName))).map(name => `'${name}'`)).join(", ")
81
97
  )), [{
82
- label: ( localize(9688, "Yes")),
83
- run: () => onPrompt(true)
84
- }, {
85
- label: ( localize(9689, "No")),
86
- run: () => onPrompt(false)
87
- }]);
98
+ label: ( localize(10008, "Yes")),
99
+ run: () => onPrompt(true)
100
+ }, {
101
+ label: ( localize(10009, "No")),
102
+ run: () => onPrompt(false)
103
+ }]);
88
104
  }
89
105
  };
90
- NotebookKeymapService = ( __decorate([
91
- ( __param(0, IInstantiationService)),
92
- ( __param(1, IWorkbenchExtensionEnablementService)),
93
- ( __param(2, INotificationService)),
94
- ( __param(3, IStorageService)),
95
- ( __param(4, ILifecycleService))
96
- ], NotebookKeymapService));
106
+ NotebookKeymapService = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IWorkbenchExtensionEnablementService)), ( __param(2, INotificationService)), ( __param(3, IStorageService)), ( __param(4, ILifecycleService))], NotebookKeymapService));
97
107
  function isNotebookKeymapExtension(extension) {
98
108
  if (extension.local.manifest.extensionPack) {
99
109
  return false;
@@ -102,7 +112,7 @@ function isNotebookKeymapExtension(extension) {
102
112
  if (!keywords) {
103
113
  return false;
104
114
  }
105
- return keywords.indexOf('notebook-keymap') !== -1;
115
+ return keywords.indexOf("notebook-keymap") !== -1;
106
116
  }
107
117
 
108
118
  export { NotebookKeymapService, isNotebookKeymapExtension };
@@ -5,12 +5,17 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
5
5
  import { ILoggerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
6
6
  import { windowLogGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/log/common/logConstants';
7
7
 
8
- const logChannelId = 'notebook.rendering';
8
+ const logChannelId = "notebook.rendering";
9
9
  let NotebookLoggingService = class NotebookLoggingService extends Disposable {
10
- static { this.ID = 'notebook'; }
10
+ static {
11
+ this.ID = "notebook";
12
+ }
11
13
  constructor(loggerService) {
12
14
  super();
13
- this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localize(9690, "Notebook")), group: windowLogGroup }));
15
+ this._logger = this._register(loggerService.createLogger(logChannelId, {
16
+ name: ( localize(10010, "Notebook")),
17
+ group: windowLogGroup
18
+ }));
14
19
  }
15
20
  trace(category, output) {
16
21
  this._logger.trace(`[${category}] ${output}`);
@@ -28,8 +33,6 @@ let NotebookLoggingService = class NotebookLoggingService extends Disposable {
28
33
  this._logger.error(`[${category}] ${output}`);
29
34
  }
30
35
  };
31
- NotebookLoggingService = ( __decorate([
32
- ( __param(0, ILoggerService))
33
- ], NotebookLoggingService));
36
+ NotebookLoggingService = ( __decorate([( __param(0, ILoggerService))], NotebookLoggingService));
34
37
 
35
38
  export { NotebookLoggingService };
@@ -40,7 +40,7 @@ let NotebookRendererMessagingService = class NotebookRendererMessagingService ex
40
40
  }
41
41
  const messaging = {
42
42
  postMessage: (rendererId, message) => this.postMessage(editorId, rendererId, message),
43
- dispose: () => this.scopedMessaging.delete(editorId),
43
+ dispose: () => this.scopedMessaging.delete(editorId)
44
44
  };
45
45
  this.scopedMessaging.set(editorId, messaging);
46
46
  return messaging;
@@ -50,17 +50,18 @@ let NotebookRendererMessagingService = class NotebookRendererMessagingService ex
50
50
  this.prepare(rendererId);
51
51
  }
52
52
  const activation = this.activations.get(rendererId);
53
- const toSend = { rendererId, editorId, message };
53
+ const toSend = {
54
+ rendererId,
55
+ editorId,
56
+ message
57
+ };
54
58
  if (activation === undefined) {
55
59
  this.postMessageEmitter.fire(toSend);
56
- }
57
- else {
60
+ } else {
58
61
  activation.push(toSend);
59
62
  }
60
63
  }
61
64
  };
62
- NotebookRendererMessagingService = ( __decorate([
63
- ( __param(0, IExtensionService))
64
- ], NotebookRendererMessagingService));
65
+ NotebookRendererMessagingService = ( __decorate([( __param(0, IExtensionService))], NotebookRendererMessagingService));
65
66
 
66
67
  export { NotebookRendererMessagingService };