@codingame/monaco-vscode-notebook-service-override 4.5.1 → 5.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 (51) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +38 -48
  3. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +3 -1
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +9 -7
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +43 -87
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +121 -79
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +25 -19
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +29 -30
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +107 -109
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +199 -196
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +13 -8
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +200 -278
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
  45. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +11 -6
  46. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
  48. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
  49. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +42 -77
  50. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +43 -46
  51. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +1 -1
@@ -27,7 +27,6 @@ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
27
27
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
28
28
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
29
29
  import { NotebookEditor } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditor';
30
- import { NotebookCellOutlineProvider } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider';
31
30
  import { CellKind, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
32
31
  import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
33
32
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
@@ -44,8 +43,10 @@ import { disposableTimeout } from 'vscode/vscode/vs/base/common/async';
44
43
  import { IOutlinePane } from 'vscode/vscode/vs/workbench/contrib/outline/browser/outline';
45
44
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
46
45
  import { NOTEBOOK_IS_ACTIVE_EDITOR } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
46
+ import { INotebookCellOutlineProviderFactory } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service';
47
47
 
48
48
  var NotebookCellOutline_1;
49
+ const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline";
49
50
  class NotebookOutlineTemplate {
50
51
  static { this.templateId = 'NotebookOutlineRenderer'; }
51
52
  constructor(container, iconClass, iconLabel, decoration, actionMenu, elementDisposables) {
@@ -70,25 +71,27 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
70
71
  this.templateId = NotebookOutlineTemplate.templateId;
71
72
  }
72
73
  renderTemplate(container) {
73
- const elementDisposables = ( new DisposableStore());
74
+ const elementDisposables = ( (new DisposableStore()));
74
75
  container.classList.add('notebook-outline-element', 'show-file-icons');
75
76
  const iconClass = document.createElement('div');
76
77
  container.append(iconClass);
77
- const iconLabel = ( new IconLabel(container, { supportHighlights: true }));
78
+ const iconLabel = ( (new IconLabel(container, { supportHighlights: true })));
78
79
  const decoration = document.createElement('div');
79
80
  decoration.className = 'element-decoration';
80
81
  container.append(decoration);
81
82
  const actionMenu = document.createElement('div');
82
83
  actionMenu.className = 'action-menu';
83
84
  container.append(actionMenu);
84
- return ( new NotebookOutlineTemplate(
85
- container,
86
- iconClass,
87
- iconLabel,
88
- decoration,
89
- actionMenu,
90
- elementDisposables
91
- ));
85
+ return (
86
+ (new NotebookOutlineTemplate(
87
+ container,
88
+ iconClass,
89
+ iconLabel,
90
+ decoration,
91
+ actionMenu,
92
+ elementDisposables
93
+ ))
94
+ );
92
95
  }
93
96
  renderElement(node, _index, template, _height) {
94
97
  const extraClasses = [];
@@ -151,17 +154,17 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
151
154
  const scopedContextKeyService = template.elementDisposables.add(this._contextKeyService.createScoped(template.container));
152
155
  NotebookOutlineContext.CellKind.bindTo(scopedContextKeyService).set(isCodeCell ? CellKind.Code : CellKind.Markup);
153
156
  NotebookOutlineContext.CellHasChildren.bindTo(scopedContextKeyService).set(length > 0);
154
- NotebookOutlineContext.CellHasHeader.bindTo(scopedContextKeyService).set(node.element.level !== 7);
157
+ NotebookOutlineContext.CellHasHeader.bindTo(scopedContextKeyService).set(node.element.level !== 7 );
155
158
  NotebookOutlineContext.OutlineElementTarget.bindTo(scopedContextKeyService).set(this._target);
156
159
  this.setupFolding(isCodeCell, nbViewModel, scopedContextKeyService, template, nbCell);
157
- const outlineEntryToolbar = template.elementDisposables.add(( new ToolBar(template.actionMenu, this._contextMenuService, {
160
+ const outlineEntryToolbar = template.elementDisposables.add(( (new ToolBar(template.actionMenu, this._contextMenuService, {
158
161
  actionViewItemProvider: action => {
159
162
  if (action instanceof MenuItemAction) {
160
163
  return this._instantiationService.createInstance(MenuEntryActionViewItem, action, undefined);
161
164
  }
162
165
  return undefined;
163
166
  },
164
- })));
167
+ }))));
165
168
  const menu = template.elementDisposables.add(this._menuService.createMenu(MenuId.NotebookOutlineActionMenu, scopedContextKeyService));
166
169
  const actions = getOutlineToolbarActions(menu, { notebookEditor: this._editor, outlineEntry: node.element });
167
170
  outlineEntryToolbar.setActions(actions.primary, actions.secondary);
@@ -220,14 +223,14 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
220
223
  }));
221
224
  }
222
225
  };
223
- NotebookOutlineRenderer = ( __decorate([
224
- ( __param(2, IThemeService)),
225
- ( __param(3, IConfigurationService)),
226
- ( __param(4, IContextMenuService)),
227
- ( __param(5, IContextKeyService)),
228
- ( __param(6, IMenuService)),
229
- ( __param(7, IInstantiationService))
230
- ], NotebookOutlineRenderer));
226
+ NotebookOutlineRenderer = ( (__decorate([
227
+ ( (__param(2, IThemeService))),
228
+ ( (__param(3, IConfigurationService))),
229
+ ( (__param(4, IContextMenuService))),
230
+ ( (__param(5, IContextKeyService))),
231
+ ( (__param(6, IMenuService))),
232
+ ( (__param(7, IInstantiationService)))
233
+ ], NotebookOutlineRenderer)));
231
234
  function getOutlineToolbarActions(menu, args) {
232
235
  const primary = [];
233
236
  const secondary = [];
@@ -257,8 +260,9 @@ class NotebookOutlineVirtualDelegate {
257
260
  }
258
261
  }
259
262
  let NotebookQuickPickProvider = class NotebookQuickPickProvider {
260
- constructor(_getEntries, _themeService) {
263
+ constructor(_getEntries, _configurationService, _themeService) {
261
264
  this._getEntries = _getEntries;
265
+ this._configurationService = _configurationService;
262
266
  this._themeService = _themeService;
263
267
  }
264
268
  getQuickPickElements() {
@@ -268,7 +272,21 @@ let NotebookQuickPickProvider = class NotebookQuickPickProvider {
268
272
  }
269
273
  const result = [];
270
274
  const { hasFileIcons } = this._themeService.getFileIconTheme();
271
- for (const element of bucket) {
275
+ const showSymbols = this._configurationService.getValue(NotebookSetting.gotoSymbolsAllSymbols);
276
+ const isSymbol = (element) => !!element.symbolKind;
277
+ const isCodeCell = (element) => ((element.cell.cellKind === CellKind.Code && element.level === 7) );
278
+ for (let i = 0; i < bucket.length; i++) {
279
+ const element = bucket[i];
280
+ const nextElement = bucket[i + 1];
281
+ if (!showSymbols
282
+ && isSymbol(element)) {
283
+ continue;
284
+ }
285
+ if (showSymbols
286
+ && isCodeCell(element)
287
+ && nextElement && isSymbol(nextElement)) {
288
+ continue;
289
+ }
272
290
  const useFileIcon = hasFileIcons && !element.symbolKind;
273
291
  result.push({
274
292
  element,
@@ -280,9 +298,10 @@ let NotebookQuickPickProvider = class NotebookQuickPickProvider {
280
298
  return result;
281
299
  }
282
300
  };
283
- NotebookQuickPickProvider = ( __decorate([
284
- ( __param(1, IThemeService))
285
- ], NotebookQuickPickProvider));
301
+ NotebookQuickPickProvider = ( (__decorate([
302
+ ( (__param(1, IConfigurationService))),
303
+ ( (__param(2, IThemeService)))
304
+ ], NotebookQuickPickProvider)));
286
305
  class NotebookComparator {
287
306
  constructor() {
288
307
  this._collator = new WindowIdleValue(mainWindow, () => new Intl.Collator(undefined, { numeric: true }));
@@ -299,32 +318,32 @@ class NotebookComparator {
299
318
  }
300
319
  let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
301
320
  get entries() {
302
- return this._outlineProvider?.entries ?? [];
321
+ return this._outlineProviderReference?.object?.entries ?? [];
303
322
  }
304
323
  get activeElement() {
305
- return this._outlineProvider?.activeElement;
324
+ return this._outlineProviderReference?.object?.activeElement;
306
325
  }
307
326
  constructor(_editor, _target, instantiationService, _editorService, _configurationService) {
308
327
  this._editor = _editor;
309
328
  this._editorService = _editorService;
310
- this._dispoables = ( new DisposableStore());
311
- this._onDidChange = ( new Emitter());
329
+ this._dispoables = ( (new DisposableStore()));
330
+ this._onDidChange = ( (new Emitter()));
312
331
  this.onDidChange = this._onDidChange.event;
313
- this._entriesDisposables = ( new DisposableStore());
332
+ this._entriesDisposables = ( (new DisposableStore()));
314
333
  this.outlineKind = 'notebookCells';
315
- this._localDisposables = ( new DisposableStore());
334
+ this._localDisposables = ( (new DisposableStore()));
316
335
  const installSelectionListener = () => {
317
336
  const notebookEditor = _editor.getControl();
318
337
  if (!notebookEditor?.hasModel()) {
319
- this._outlineProvider?.dispose();
320
- this._outlineProvider = undefined;
338
+ this._outlineProviderReference?.dispose();
339
+ this._outlineProviderReference = undefined;
321
340
  this._localDisposables.clear();
322
341
  }
323
342
  else {
324
- this._outlineProvider?.dispose();
343
+ this._outlineProviderReference?.dispose();
325
344
  this._localDisposables.clear();
326
- this._outlineProvider = instantiationService.createInstance(NotebookCellOutlineProvider, notebookEditor, _target);
327
- this._localDisposables.add(this._outlineProvider.onDidChange(e => {
345
+ this._outlineProviderReference = instantiationService.invokeFunction((accessor) => accessor.get(INotebookCellOutlineProviderFactory).getOrCreate(notebookEditor, _target));
346
+ this._localDisposables.add(this._outlineProviderReference.object.onDidChange(e => {
328
347
  this._onDidChange.fire(e);
329
348
  }));
330
349
  }
@@ -338,16 +357,16 @@ let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
338
357
  return this.getChildren(parent, _configurationService);
339
358
  }
340
359
  };
341
- const delegate = ( new NotebookOutlineVirtualDelegate());
360
+ const delegate = ( (new NotebookOutlineVirtualDelegate()));
342
361
  const renderers = [instantiationService.createInstance(NotebookOutlineRenderer, this._editor.getControl(), _target)];
343
- const comparator = ( new NotebookComparator());
362
+ const comparator = ( (new NotebookComparator()));
344
363
  const options = {
345
364
  collapseByDefault: _target === 2 || ((_target === 1 && _configurationService.getValue("outline.collapseItems" ) === "alwaysCollapse") ),
346
365
  expandOnlyOnTwistieClick: true,
347
366
  multipleSelectionSupport: false,
348
- accessibilityProvider: ( new NotebookOutlineAccessibility()),
349
- identityProvider: { getId: element => ( element.cell.uri.toString()) },
350
- keyboardNavigationLabelProvider: ( new NotebookNavigationLabelProvider())
367
+ accessibilityProvider: ( (new NotebookOutlineAccessibility())),
368
+ identityProvider: { getId: element => ( (element.cell.uri.toString())) },
369
+ keyboardNavigationLabelProvider: ( (new NotebookNavigationLabelProvider()))
351
370
  };
352
371
  this.config = {
353
372
  breadcrumbsDataSource: {
@@ -361,7 +380,7 @@ let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
361
380
  return result;
362
381
  }
363
382
  },
364
- quickPickDataSource: instantiationService.createInstance(NotebookQuickPickProvider, () => (this._outlineProvider?.entries ?? [])),
383
+ quickPickDataSource: instantiationService.createInstance(NotebookQuickPickProvider, () => (this._outlineProviderReference?.object?.entries ?? [])),
365
384
  treeDataSource,
366
385
  delegate,
367
386
  renderers,
@@ -373,12 +392,12 @@ let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
373
392
  const showCodeCells = configurationService.getValue(NotebookSetting.outlineShowCodeCells);
374
393
  const showCodeCellSymbols = configurationService.getValue(NotebookSetting.outlineShowCodeCellSymbols);
375
394
  const showMarkdownHeadersOnly = configurationService.getValue(NotebookSetting.outlineShowMarkdownHeadersOnly);
376
- for (const entry of parent instanceof NotebookCellOutline_1 ? (this._outlineProvider?.entries ?? []) : parent.children) {
395
+ for (const entry of parent instanceof NotebookCellOutline_1 ? (this._outlineProviderReference?.object?.entries ?? []) : parent.children) {
377
396
  if (entry.cell.cellKind === CellKind.Markup) {
378
397
  if (!showMarkdownHeadersOnly) {
379
398
  yield entry;
380
399
  }
381
- else if (entry.level < 7) {
400
+ else if (entry.level < 7 ) {
382
401
  yield entry;
383
402
  }
384
403
  }
@@ -386,20 +405,20 @@ let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
386
405
  if (showCodeCellSymbols) {
387
406
  yield entry;
388
407
  }
389
- else if (entry.level === 7) {
408
+ else if (entry.level === 7 ) {
390
409
  yield entry;
391
410
  }
392
411
  }
393
412
  }
394
413
  }
395
414
  async setFullSymbols(cancelToken) {
396
- await this._outlineProvider?.setFullSymbols(cancelToken);
415
+ await this._outlineProviderReference?.object?.setFullSymbols(cancelToken);
397
416
  }
398
417
  get uri() {
399
- return this._outlineProvider?.uri;
418
+ return this._outlineProviderReference?.object?.uri;
400
419
  }
401
420
  get isEmpty() {
402
- return this._outlineProvider?.isEmpty ?? true;
421
+ return this._outlineProviderReference?.object?.isEmpty ?? true;
403
422
  }
404
423
  async reveal(entry, options, sideBySide) {
405
424
  await this._editorService.openEditor({
@@ -469,15 +488,15 @@ let NotebookCellOutline = NotebookCellOutline_1 = class NotebookCellOutline {
469
488
  this._onDidChange.dispose();
470
489
  this._dispoables.dispose();
471
490
  this._entriesDisposables.dispose();
472
- this._outlineProvider?.dispose();
491
+ this._outlineProviderReference?.dispose();
473
492
  this._localDisposables.dispose();
474
493
  }
475
494
  };
476
- NotebookCellOutline = NotebookCellOutline_1 = ( __decorate([
477
- ( __param(2, IInstantiationService)),
478
- ( __param(3, IEditorService)),
479
- ( __param(4, IConfigurationService))
480
- ], NotebookCellOutline));
495
+ NotebookCellOutline = NotebookCellOutline_1 = ( (__decorate([
496
+ ( (__param(2, IInstantiationService))),
497
+ ( (__param(3, IEditorService))),
498
+ ( (__param(4, IConfigurationService)))
499
+ ], NotebookCellOutline)));
481
500
  let NotebookOutlineCreator = class NotebookOutlineCreator {
482
501
  constructor(outlineService, _instantiationService, _configurationService) {
483
502
  this._instantiationService = _instantiationService;
@@ -496,25 +515,25 @@ let NotebookOutlineCreator = class NotebookOutlineCreator {
496
515
  await outline.setFullSymbols(cancelToken);
497
516
  }
498
517
  else if (target === 1 && showAllOutlineSymbols) {
499
- await outline.setFullSymbols(cancelToken);
518
+ void outline.setFullSymbols(cancelToken);
500
519
  }
501
520
  return outline;
502
521
  }
503
522
  };
504
- NotebookOutlineCreator = ( __decorate([
505
- ( __param(0, IOutlineService)),
506
- ( __param(1, IInstantiationService)),
507
- ( __param(2, IConfigurationService))
508
- ], NotebookOutlineCreator));
523
+ NotebookOutlineCreator = ( (__decorate([
524
+ ( (__param(0, IOutlineService))),
525
+ ( (__param(1, IInstantiationService))),
526
+ ( (__param(2, IConfigurationService)))
527
+ ], NotebookOutlineCreator)));
509
528
  const NotebookOutlineContext = {
510
- CellKind: ( new RawContextKey('notebookCellKind', undefined)),
511
- CellHasChildren: ( new RawContextKey('notebookCellHasChildren', false)),
512
- CellHasHeader: ( new RawContextKey('notebookCellHasHeader', false)),
513
- CellFoldingState: ( new RawContextKey('notebookCellFoldingState', 0 )),
514
- OutlineElementTarget: ( new RawContextKey('notebookOutlineElementTarget', undefined)),
529
+ CellKind: ( (new RawContextKey('notebookCellKind', undefined))),
530
+ CellHasChildren: ( (new RawContextKey('notebookCellHasChildren', false))),
531
+ CellHasHeader: ( (new RawContextKey('notebookCellHasHeader', false))),
532
+ CellFoldingState: ( (new RawContextKey('notebookCellFoldingState', 0 ))),
533
+ OutlineElementTarget: ( (new RawContextKey('notebookOutlineElementTarget', undefined))),
515
534
  };
516
- ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookOutlineCreator, 4 );
517
- ( Registry.as(Extensions$1.Configuration)).registerConfiguration({
535
+ ( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(NotebookOutlineCreator, 4 );
536
+ ( (Registry.as(Extensions$1.Configuration))).registerConfiguration({
518
537
  id: 'notebook',
519
538
  order: 100,
520
539
  type: 'object',
@@ -523,44 +542,36 @@ const NotebookOutlineContext = {
523
542
  type: 'boolean',
524
543
  default: true,
525
544
  markdownDescription: ( localizeWithPath(
526
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
527
- 'outline.showMarkdownHeadersOnly',
545
+ _moduleId,
546
+ 0,
528
547
  "When enabled, notebook outline will show only markdown cells containing a header."
529
548
  ))
530
549
  },
531
550
  [NotebookSetting.outlineShowCodeCells]: {
532
551
  type: 'boolean',
533
552
  default: false,
534
- markdownDescription: ( localizeWithPath(
535
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
536
- 'outline.showCodeCells',
537
- "When enabled, notebook outline shows code cells."
538
- ))
553
+ markdownDescription: ( localizeWithPath(_moduleId, 1, "When enabled, notebook outline shows code cells."))
539
554
  },
540
555
  [NotebookSetting.outlineShowCodeCellSymbols]: {
541
556
  type: 'boolean',
542
557
  default: true,
543
558
  markdownDescription: ( localizeWithPath(
544
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
545
- 'outline.showCodeCellSymbols',
559
+ _moduleId,
560
+ 2,
546
561
  "When enabled, notebook outline shows code cell symbols. Relies on `notebook.outline.showCodeCells` being enabled."
547
562
  ))
548
563
  },
549
564
  [NotebookSetting.breadcrumbsShowCodeCells]: {
550
565
  type: 'boolean',
551
566
  default: true,
552
- markdownDescription: ( localizeWithPath(
553
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
554
- 'breadcrumbs.showCodeCells',
555
- "When enabled, notebook breadcrumbs contain code cells."
556
- ))
567
+ markdownDescription: ( localizeWithPath(_moduleId, 3, "When enabled, notebook breadcrumbs contain code cells."))
557
568
  },
558
569
  [NotebookSetting.gotoSymbolsAllSymbols]: {
559
570
  type: 'boolean',
560
571
  default: true,
561
572
  markdownDescription: ( localizeWithPath(
562
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
563
- 'notebook.gotoSymbols.showAllSymbols',
573
+ _moduleId,
574
+ 4,
564
575
  "When enabled, the Go to Symbol Quick Pick will display full code symbols from the notebook, as well as Markdown headers."
565
576
  ))
566
577
  },
@@ -568,28 +579,23 @@ const NotebookOutlineContext = {
568
579
  });
569
580
  MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
570
581
  submenu: MenuId.NotebookOutlineFilter,
571
- title: ( localizeWithPath(
572
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
573
- 'filter',
574
- "Filter Entries"
575
- )),
582
+ title: ( localizeWithPath(_moduleId, 5, "Filter Entries")),
576
583
  icon: Codicon.filter,
577
584
  group: 'navigation',
578
585
  order: -1,
579
- when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', IOutlinePane.Id)), NOTEBOOK_IS_ACTIVE_EDITOR)),
586
+ when: ( (ContextKeyExpr.and(
587
+ (ContextKeyExpr.equals('view', IOutlinePane.Id)),
588
+ NOTEBOOK_IS_ACTIVE_EDITOR
589
+ ))),
580
590
  });
581
591
  registerAction2(class ToggleShowMarkdownHeadersOnly extends Action2 {
582
592
  constructor() {
583
593
  super({
584
594
  id: 'notebook.outline.toggleShowMarkdownHeadersOnly',
585
- title: ( localizeWithPath(
586
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
587
- 'toggleShowMarkdownHeadersOnly',
588
- "Markdown Headers Only"
589
- )),
595
+ title: ( localizeWithPath(_moduleId, 6, "Markdown Headers Only")),
590
596
  f1: false,
591
597
  toggled: {
592
- condition: ( ContextKeyExpr.equals('config.notebook.outline.showMarkdownHeadersOnly', true))
598
+ condition: ( (ContextKeyExpr.equals('config.notebook.outline.showMarkdownHeadersOnly', true)))
593
599
  },
594
600
  menu: {
595
601
  id: MenuId.NotebookOutlineFilter,
@@ -607,14 +613,10 @@ registerAction2(class ToggleCodeCellEntries extends Action2 {
607
613
  constructor() {
608
614
  super({
609
615
  id: 'notebook.outline.toggleCodeCells',
610
- title: ( localizeWithPath(
611
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
612
- 'toggleCodeCells',
613
- "Code Cells"
614
- )),
616
+ title: ( localizeWithPath(_moduleId, 7, "Code Cells")),
615
617
  f1: false,
616
618
  toggled: {
617
- condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCells', true))
619
+ condition: ( (ContextKeyExpr.equals('config.notebook.outline.showCodeCells', true)))
618
620
  },
619
621
  menu: {
620
622
  id: MenuId.NotebookOutlineFilter,
@@ -633,14 +635,10 @@ registerAction2(class ToggleCodeCellSymbolEntries extends Action2 {
633
635
  constructor() {
634
636
  super({
635
637
  id: 'notebook.outline.toggleCodeCellSymbols',
636
- title: ( localizeWithPath(
637
- 'vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline',
638
- 'toggleCodeCellSymbols',
639
- "Code Cell Symbols"
640
- )),
638
+ title: ( localizeWithPath(_moduleId, 8, "Code Cell Symbols")),
641
639
  f1: false,
642
640
  toggled: {
643
- condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true))
641
+ condition: ( (ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true)))
644
642
  },
645
643
  menu: {
646
644
  id: MenuId.NotebookOutlineFilter,
@@ -3,12 +3,13 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
3
3
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
4
4
  import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
5
5
 
6
+ const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile";
6
7
  var NotebookProfileType;
7
- ( (function(NotebookProfileType) {
8
+ ( ((function(NotebookProfileType) {
8
9
  NotebookProfileType["default"] = "default";
9
10
  NotebookProfileType["jupyter"] = "jupyter";
10
11
  NotebookProfileType["colab"] = "colab";
11
- })(NotebookProfileType || (NotebookProfileType = {})));
12
+ })(NotebookProfileType || (NotebookProfileType = {}))));
12
13
  const profiles = {
13
14
  [NotebookProfileType.default]: {
14
15
  [NotebookSetting.focusIndicator]: 'gutter',
@@ -52,11 +53,7 @@ registerAction2(class extends Action2 {
52
53
  constructor() {
53
54
  super({
54
55
  id: 'notebook.setProfile',
55
- title: ( localizeWithPath(
56
- 'vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile',
57
- 'setProfileTitle',
58
- "Set Profile"
59
- ))
56
+ title: ( localizeWithPath(_moduleId, 0, "Set Profile"))
60
57
  });
61
58
  }
62
59
  async run(accessor, args) {