@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.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.
Files changed (157) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +64 -1
  3. package/package.json +47 -15
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
  6. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
  81. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
  82. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
  83. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
  84. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
  85. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
  86. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
  95. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
  96. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
  97. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
  98. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
  99. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
  100. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
  101. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
  102. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
  103. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
  104. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
  105. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
  106. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
  107. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
  132. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
  134. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
  136. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
  138. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
  142. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
  144. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
  145. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
  146. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
  147. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
  148. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
  149. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
  150. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
  151. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
  152. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
  153. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
  154. package/worker.js +2 -1
  155. package/workers/notebook.worker.d.ts +1 -0
  156. package/notebook.js +0 -50
  157. package/workers/notebook.worker.js +0 -1
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { HierarchicalKind } from 'vscode/vscode/vs/base/common/hierarchicalKind';
3
4
  import { DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
5
  import { isEqual } from 'vscode/vscode/vs/base/common/resources';
@@ -6,12 +7,13 @@ import { ResourceTextEdit, IBulkEditService } from 'vscode/vscode/vs/editor/brow
6
7
  import { trimTrailingWhitespace } from 'vscode/vscode/vs/editor/common/commands/trimTrailingWhitespaceCommand';
7
8
  import { Position } from 'vscode/vscode/vs/editor/common/core/position';
8
9
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
10
+ import { CodeActionTriggerType } from 'vscode/vscode/vs/editor/common/languages';
9
11
  import { IEditorWorkerService } from 'vscode/vscode/vs/editor/common/services/editorWorker';
10
12
  import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
11
13
  import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
12
14
  import { applyCodeAction, ApplyCodeActionReason, getCodeActions } from 'vscode/vscode/vs/editor/contrib/codeAction/browser/codeAction';
13
15
  import { CodeActionKind, CodeActionTriggerSource } from 'vscode/vscode/vs/editor/contrib/codeAction/common/types';
14
- import { getDocumentFormattingEditsWithSelectedProvider } from 'vscode/vscode/vs/editor/contrib/format/browser/format';
16
+ import { getDocumentFormattingEditsWithSelectedProvider, FormattingMode } from 'vscode/vscode/vs/editor/contrib/format/browser/format';
15
17
  import { SnippetController2 } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetController2';
16
18
  import { localize } from 'vscode/vscode/vs/nls';
17
19
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -20,10 +22,12 @@ import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
20
22
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
21
23
  import { IWorkspaceTrustManagementService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust.service';
22
24
  import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
23
- import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
25
+ import { SaveReason } from 'vscode/vscode/vs/workbench/common/editor';
26
+ import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
24
27
  import { NotebookSetting, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
25
- import { NotebookFileWorkingCopyModel } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
28
+ import { NotebookFileWorkingCopyModel } from '@codingame/monaco-vscode-99f24462-c56d-5407-83fb-2ea9dd33cc8c-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
26
29
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
30
+ import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
27
31
  import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
28
32
  import { NotebookMultiCursorController, NotebookMultiCursorState } from '../multicursor/notebookMulticursor.js';
29
33
 
@@ -53,34 +57,32 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
53
57
  if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
54
58
  return;
55
59
  }
56
- if (context.reason === 2 ) {
60
+ if (context.reason === SaveReason.AUTO) {
57
61
  return undefined;
58
62
  }
59
63
  const enabled = this.configurationService.getValue(NotebookSetting.formatOnSave);
60
64
  if (!enabled) {
61
65
  return undefined;
62
66
  }
63
- progress.report({ message: ( localize(8123, "Formatting")) });
67
+ progress.report({ message: ( localize(7394, "Formatting")) });
64
68
  const notebook = workingCopy.model.notebookModel;
65
69
  const formatApplied = await this.instantiationService.invokeFunction(CodeActionParticipantUtils.checkAndRunFormatCodeAction, notebook, progress, token);
66
- const disposable = ( (new DisposableStore()));
70
+ const disposable = ( new DisposableStore());
67
71
  try {
68
72
  if (!formatApplied) {
69
- const allCellEdits = await Promise.all(( (notebook.cells.map(async (cell) => {
73
+ const allCellEdits = await Promise.all(( notebook.cells.map(async (cell) => {
70
74
  const ref = await this.textModelService.createModelReference(cell.uri);
71
75
  disposable.add(ref);
72
76
  const model = ref.object.textEditorModel;
73
- const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(this.editorWorkerService, this.languageFeaturesService, model, 2 , token);
77
+ const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(this.editorWorkerService, this.languageFeaturesService, model, FormattingMode.Silent, token);
74
78
  const edits = [];
75
79
  if (formatEdits) {
76
- edits.push(...( (formatEdits.map(
77
- edit => ( (new ResourceTextEdit(model.uri, edit, model.getVersionId())))
78
- ))));
80
+ edits.push(...( formatEdits.map(edit => ( new ResourceTextEdit(model.uri, edit, model.getVersionId())))));
79
81
  return edits;
80
82
  }
81
83
  return [];
82
- }))));
83
- await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(8124, "Format Notebook")), code: 'undoredo.formatNotebook', });
84
+ })));
85
+ await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(7395, "Format Notebook")), code: 'undoredo.formatNotebook', });
84
86
  }
85
87
  }
86
88
  finally {
@@ -89,14 +91,14 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
89
91
  }
90
92
  }
91
93
  };
92
- FormatOnSaveParticipant = ( (__decorate([
93
- ( (__param(0, IEditorWorkerService))),
94
- ( (__param(1, ILanguageFeaturesService))),
95
- ( (__param(2, IInstantiationService))),
96
- ( (__param(3, ITextModelService))),
97
- ( (__param(4, IBulkEditService))),
98
- ( (__param(5, IConfigurationService)))
99
- ], FormatOnSaveParticipant)));
94
+ FormatOnSaveParticipant = ( __decorate([
95
+ ( __param(0, IEditorWorkerService)),
96
+ ( __param(1, ILanguageFeaturesService)),
97
+ ( __param(2, IInstantiationService)),
98
+ ( __param(3, ITextModelService)),
99
+ ( __param(4, IBulkEditService)),
100
+ ( __param(5, IConfigurationService))
101
+ ], FormatOnSaveParticipant));
100
102
  let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends NotebookSaveParticipant {
101
103
  constructor(configurationService, editorService, textModelService, bulkEditService) {
102
104
  super(editorService);
@@ -109,35 +111,35 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
109
111
  const trimTrailingWhitespaceOption = this.configurationService.getValue('files.trimTrailingWhitespace');
110
112
  const trimInRegexAndStrings = this.configurationService.getValue('files.trimTrailingWhitespaceInRegexAndStrings');
111
113
  if (trimTrailingWhitespaceOption && this.canParticipate()) {
112
- await this.doTrimTrailingWhitespace(workingCopy, context.reason === 2 , trimInRegexAndStrings, progress);
114
+ await this.doTrimTrailingWhitespace(workingCopy, context.reason === SaveReason.AUTO, trimInRegexAndStrings, progress);
113
115
  }
114
116
  }
115
117
  async doTrimTrailingWhitespace(workingCopy, isAutoSaved, trimInRegexesAndStrings, progress) {
116
118
  if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
117
119
  return;
118
120
  }
119
- const disposable = ( (new DisposableStore()));
121
+ const disposable = ( new DisposableStore());
120
122
  const notebook = workingCopy.model.notebookModel;
121
123
  const activeCellEditor = getActiveCellCodeEditor(this.editorService);
122
124
  let cursors = [];
123
125
  let prevSelection = [];
124
126
  try {
125
- const allCellEdits = await Promise.all(( (notebook.cells.map(async (cell) => {
127
+ const allCellEdits = await Promise.all(( notebook.cells.map(async (cell) => {
126
128
  if (cell.cellKind !== CellKind.Code) {
127
129
  return [];
128
130
  }
129
131
  const ref = await this.textModelService.createModelReference(cell.uri);
130
132
  disposable.add(ref);
131
133
  const model = ref.object.textEditorModel;
132
- const isActiveCell = (activeCellEditor && ( (cell.uri.toString())) === activeCellEditor.getModel()?.uri.toString());
134
+ const isActiveCell = (activeCellEditor && ( cell.uri.toString()) === activeCellEditor.getModel()?.uri.toString());
133
135
  if (isActiveCell) {
134
136
  prevSelection = activeCellEditor.getSelections() ?? [];
135
137
  if (isAutoSaved) {
136
- cursors = ( (prevSelection.map(s => s.getPosition())));
138
+ cursors = ( prevSelection.map(s => s.getPosition()));
137
139
  const snippetsRange = SnippetController2.get(activeCellEditor)?.getSessionEnclosingRange();
138
140
  if (snippetsRange) {
139
141
  for (let lineNumber = snippetsRange.startLineNumber; lineNumber <= snippetsRange.endLineNumber; lineNumber++) {
140
- cursors.push(( (new Position(lineNumber, model.getLineMaxColumn(lineNumber)))));
142
+ cursors.push(( new Position(lineNumber, model.getLineMaxColumn(lineNumber))));
141
143
  }
142
144
  }
143
145
  }
@@ -146,14 +148,10 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
146
148
  if (!ops.length) {
147
149
  return [];
148
150
  }
149
- return (
150
- (ops.map(
151
- op => ( (new ResourceTextEdit(model.uri, { ...op, text: op.text || '' }, model.getVersionId())))
152
- ))
153
- );
154
- }))));
151
+ return ( ops.map(op => ( new ResourceTextEdit(model.uri, { ...op, text: op.text || '' }, model.getVersionId()))));
152
+ })));
155
153
  const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
156
- await this.bulkEditService.apply(filteredEdits, { label: ( localize(8125, "Notebook Trim Trailing Whitespace")), code: 'undoredo.notebookTrimTrailingWhitespace' });
154
+ await this.bulkEditService.apply(filteredEdits, { label: ( localize(7396, "Notebook Trim Trailing Whitespace")), code: 'undoredo.notebookTrimTrailingWhitespace' });
157
155
  }
158
156
  finally {
159
157
  progress.report({ increment: 100 });
@@ -161,12 +159,12 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
161
159
  }
162
160
  }
163
161
  };
164
- TrimWhitespaceParticipant = ( (__decorate([
165
- ( (__param(0, IConfigurationService))),
166
- ( (__param(1, IEditorService))),
167
- ( (__param(2, ITextModelService))),
168
- ( (__param(3, IBulkEditService)))
169
- ], TrimWhitespaceParticipant)));
162
+ TrimWhitespaceParticipant = ( __decorate([
163
+ ( __param(0, IConfigurationService)),
164
+ ( __param(1, IEditorService)),
165
+ ( __param(2, ITextModelService)),
166
+ ( __param(3, IBulkEditService))
167
+ ], TrimWhitespaceParticipant));
170
168
  let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends NotebookSaveParticipant {
171
169
  constructor(configurationService, editorService, bulkEditService) {
172
170
  super(editorService);
@@ -176,7 +174,7 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
176
174
  }
177
175
  async participate(workingCopy, context, progress, _token) {
178
176
  if (this.configurationService.getValue('files.trimFinalNewlines') && this.canParticipate()) {
179
- await this.doTrimFinalNewLines(workingCopy, context.reason === 2 , progress);
177
+ await this.doTrimFinalNewLines(workingCopy, context.reason === SaveReason.AUTO, progress);
180
178
  }
181
179
  }
182
180
  findLastNonEmptyLine(textBuffer) {
@@ -192,16 +190,16 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
192
190
  if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
193
191
  return;
194
192
  }
195
- const disposable = ( (new DisposableStore()));
193
+ const disposable = ( new DisposableStore());
196
194
  const notebook = workingCopy.model.notebookModel;
197
195
  const activeCellEditor = getActiveCellCodeEditor(this.editorService);
198
196
  try {
199
- const allCellEdits = await Promise.all(( (notebook.cells.map(async (cell) => {
197
+ const allCellEdits = await Promise.all(( notebook.cells.map(async (cell) => {
200
198
  if (cell.cellKind !== CellKind.Code) {
201
199
  return;
202
200
  }
203
201
  let cannotTouchLineNumber = 0;
204
- const isActiveCell = (activeCellEditor && ( (cell.uri.toString())) === activeCellEditor.getModel()?.uri.toString());
202
+ const isActiveCell = (activeCellEditor && ( cell.uri.toString()) === activeCellEditor.getModel()?.uri.toString());
205
203
  if (isAutoSaved && isActiveCell) {
206
204
  const selections = activeCellEditor.getSelections() ?? [];
207
205
  for (const sel of selections) {
@@ -214,25 +212,23 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
214
212
  if (deleteFromLineNumber > textBuffer.getLineCount()) {
215
213
  return;
216
214
  }
217
- const deletionRange = ( (new Range(
215
+ const deletionRange = ( new Range(
218
216
  deleteFromLineNumber,
219
217
  1,
220
218
  textBuffer.getLineCount(),
221
219
  textBuffer.getLineLastNonWhitespaceColumn(textBuffer.getLineCount())
222
- )));
220
+ ));
223
221
  if (deletionRange.isEmpty()) {
224
222
  return;
225
223
  }
226
- return (
227
- (new ResourceTextEdit(
228
- cell.uri,
229
- { range: deletionRange, text: '' },
230
- cell.textModel?.getVersionId()
231
- ))
232
- );
233
- }))));
224
+ return ( new ResourceTextEdit(
225
+ cell.uri,
226
+ { range: deletionRange, text: '' },
227
+ cell.textModel?.getVersionId()
228
+ ));
229
+ })));
234
230
  const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
235
- await this.bulkEditService.apply(filteredEdits, { label: ( localize(8126, "Trim Final New Lines")), code: 'undoredo.trimFinalNewLines' });
231
+ await this.bulkEditService.apply(filteredEdits, { label: ( localize(7397, "Trim Final New Lines")), code: 'undoredo.trimFinalNewLines' });
236
232
  }
237
233
  finally {
238
234
  progress.report({ increment: 100 });
@@ -240,11 +236,11 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
240
236
  }
241
237
  }
242
238
  };
243
- TrimFinalNewLinesParticipant = ( (__decorate([
244
- ( (__param(0, IConfigurationService))),
245
- ( (__param(1, IEditorService))),
246
- ( (__param(2, IBulkEditService)))
247
- ], TrimFinalNewLinesParticipant)));
239
+ TrimFinalNewLinesParticipant = ( __decorate([
240
+ ( __param(0, IConfigurationService)),
241
+ ( __param(1, IEditorService)),
242
+ ( __param(2, IBulkEditService))
243
+ ], TrimFinalNewLinesParticipant));
248
244
  let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends NotebookSaveParticipant {
249
245
  constructor(configurationService, bulkEditService, editorService) {
250
246
  super(editorService);
@@ -254,14 +250,14 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
254
250
  }
255
251
  async participate(workingCopy, context, progress, _token) {
256
252
  if (this.configurationService.getValue(NotebookSetting.insertFinalNewline) && this.canParticipate()) {
257
- await this.doInsertFinalNewLine(workingCopy, context.reason === 2 , progress);
253
+ await this.doInsertFinalNewLine(workingCopy, context.reason === SaveReason.AUTO, progress);
258
254
  }
259
255
  }
260
256
  async doInsertFinalNewLine(workingCopy, isAutoSaved, progress) {
261
257
  if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
262
258
  return;
263
259
  }
264
- const disposable = ( (new DisposableStore()));
260
+ const disposable = ( new DisposableStore());
265
261
  const notebook = workingCopy.model.notebookModel;
266
262
  const activeCellEditor = getActiveCellCodeEditor(this.editorService);
267
263
  let selections;
@@ -269,7 +265,7 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
269
265
  selections = activeCellEditor.getSelections() ?? [];
270
266
  }
271
267
  try {
272
- const allCellEdits = await Promise.all(( (notebook.cells.map(async (cell) => {
268
+ const allCellEdits = await Promise.all(( notebook.cells.map(async (cell) => {
273
269
  if (cell.cellKind !== CellKind.Code) {
274
270
  return;
275
271
  }
@@ -278,17 +274,15 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
278
274
  if (!lineCount || lastLineIsEmptyOrWhitespace) {
279
275
  return;
280
276
  }
281
- return (
282
- (new ResourceTextEdit(cell.uri, { range: ( (new Range(
283
- lineCount + 1,
284
- cell.textBuffer.getLineLength(lineCount),
285
- lineCount + 1,
286
- cell.textBuffer.getLineLength(lineCount)
287
- ))), text: cell.textBuffer.getEOL() }, cell.textModel?.getVersionId()))
288
- );
289
- }))));
277
+ return ( new ResourceTextEdit(cell.uri, { range: ( new Range(
278
+ lineCount + 1,
279
+ cell.textBuffer.getLineLength(lineCount),
280
+ lineCount + 1,
281
+ cell.textBuffer.getLineLength(lineCount)
282
+ )), text: cell.textBuffer.getEOL() }, cell.textModel?.getVersionId()));
283
+ })));
290
284
  const filteredEdits = allCellEdits.filter(edit => edit !== undefined);
291
- await this.bulkEditService.apply(filteredEdits, { label: ( localize(8127, "Insert Final New Line")), code: 'undoredo.insertFinalNewLine' });
285
+ await this.bulkEditService.apply(filteredEdits, { label: ( localize(7398, "Insert Final New Line")), code: 'undoredo.insertFinalNewLine' });
292
286
  if (activeCellEditor && selections) {
293
287
  activeCellEditor.setSelections(selections);
294
288
  }
@@ -299,11 +293,11 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
299
293
  }
300
294
  }
301
295
  };
302
- InsertFinalNewLineParticipant = ( (__decorate([
303
- ( (__param(0, IConfigurationService))),
304
- ( (__param(1, IBulkEditService))),
305
- ( (__param(2, IEditorService)))
306
- ], InsertFinalNewLineParticipant)));
296
+ InsertFinalNewLineParticipant = ( __decorate([
297
+ ( __param(0, IConfigurationService)),
298
+ ( __param(1, IBulkEditService)),
299
+ ( __param(2, IEditorService))
300
+ ], InsertFinalNewLineParticipant));
307
301
  let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
308
302
  constructor(configurationService, logService, workspaceTrustManagementService, textModelService, instantiationService) {
309
303
  this.configurationService = configurationService;
@@ -321,10 +315,10 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
321
315
  return;
322
316
  }
323
317
  let saveTrigger = '';
324
- if (context.reason === 2 ) {
318
+ if (context.reason === SaveReason.AUTO) {
325
319
  return undefined;
326
320
  }
327
- else if (context.reason === 1 ) {
321
+ else if (context.reason === SaveReason.EXPLICIT) {
328
322
  saveTrigger = 'explicit';
329
323
  }
330
324
  else {
@@ -334,7 +328,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
334
328
  const setting = this.configurationService.getValue(NotebookSetting.codeActionsOnSave);
335
329
  const settingItems = Array.isArray(setting)
336
330
  ? setting
337
- : ( (Object.keys(setting))).filter(x => setting[x]);
331
+ : ( Object.keys(setting)).filter(x => setting[x]);
338
332
  const allCodeActions = this.createCodeActionsOnSave(settingItems);
339
333
  const excludedActions = allCodeActions
340
334
  .filter(x => setting[x.value] === 'never' || setting[x.value] === false);
@@ -343,8 +337,8 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
343
337
  const editorCodeActionsOnSave = includedActions.filter(x => !CodeActionKind.Notebook.contains(x));
344
338
  const notebookCodeActionsOnSave = includedActions.filter(x => CodeActionKind.Notebook.contains(x));
345
339
  if (notebookCodeActionsOnSave.length) {
346
- const nbDisposable = ( (new DisposableStore()));
347
- progress.report({ message: ( localize(8128, "Running 'Notebook' code actions")) });
340
+ const nbDisposable = ( new DisposableStore());
341
+ progress.report({ message: ( localize(7399, "Running 'Notebook' code actions")) });
348
342
  try {
349
343
  const cell = notebookModel.cells[0];
350
344
  const ref = await this.textModelService.createModelReference(cell.uri);
@@ -375,15 +369,15 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
375
369
  return 0;
376
370
  });
377
371
  }
378
- const cellDisposable = ( (new DisposableStore()));
379
- progress.report({ message: ( localize(8129, "Running 'Cell' code actions")) });
372
+ const cellDisposable = ( new DisposableStore());
373
+ progress.report({ message: ( localize(7400, "Running 'Cell' code actions")) });
380
374
  try {
381
- await Promise.all(( (notebookModel.cells.map(async (cell) => {
375
+ await Promise.all(( notebookModel.cells.map(async (cell) => {
382
376
  const ref = await this.textModelService.createModelReference(cell.uri);
383
377
  cellDisposable.add(ref);
384
378
  const textEditorModel = ref.object.textEditorModel;
385
379
  await this.instantiationService.invokeFunction(CodeActionParticipantUtils.applyOnSaveGenericCodeActions, textEditorModel, editorCodeActionsOnSave, excludedActions, progress, token);
386
- }))));
380
+ })));
387
381
  }
388
382
  catch {
389
383
  this.logService.error('Failed to apply code action on save');
@@ -395,35 +389,35 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
395
389
  }
396
390
  }
397
391
  createCodeActionsOnSave(settingItems) {
398
- const kinds = ( (settingItems.map(x => ( (new HierarchicalKind(x))))));
392
+ const kinds = ( settingItems.map(x => ( new HierarchicalKind(x))));
399
393
  return kinds.filter(kind => {
400
394
  return kinds.every(otherKind => otherKind.equals(kind) || !otherKind.contains(kind));
401
395
  });
402
396
  }
403
397
  };
404
- CodeActionOnSaveParticipant = ( (__decorate([
405
- ( (__param(0, IConfigurationService))),
406
- ( (__param(1, ILogService))),
407
- ( (__param(2, IWorkspaceTrustManagementService))),
408
- ( (__param(3, ITextModelService))),
409
- ( (__param(4, IInstantiationService)))
410
- ], CodeActionOnSaveParticipant)));
398
+ CodeActionOnSaveParticipant = ( __decorate([
399
+ ( __param(0, IConfigurationService)),
400
+ ( __param(1, ILogService)),
401
+ ( __param(2, IWorkspaceTrustManagementService)),
402
+ ( __param(3, ITextModelService)),
403
+ ( __param(4, IInstantiationService))
404
+ ], CodeActionOnSaveParticipant));
411
405
  class CodeActionParticipantUtils {
412
406
  static async checkAndRunFormatCodeAction(accessor, notebookModel, progress, token) {
413
407
  const instantiationService = accessor.get(IInstantiationService);
414
408
  const textModelService = accessor.get(ITextModelService);
415
409
  const logService = accessor.get(ILogService);
416
410
  const configurationService = accessor.get(IConfigurationService);
417
- const formatDisposable = ( (new DisposableStore()));
411
+ const formatDisposable = ( new DisposableStore());
418
412
  let formatResult = false;
419
- progress.report({ message: ( localize(8130, "Running 'Format' code actions")) });
413
+ progress.report({ message: ( localize(7401, "Running 'Format' code actions")) });
420
414
  try {
421
415
  const cell = notebookModel.cells[0];
422
416
  const ref = await textModelService.createModelReference(cell.uri);
423
417
  formatDisposable.add(ref);
424
418
  const textEditorModel = ref.object.textEditorModel;
425
419
  const defaultFormatterExtId = configurationService.getValue(NotebookSetting.defaultFormatter);
426
- formatResult = await instantiationService.invokeFunction(CodeActionParticipantUtils.applyOnSaveFormatCodeAction, textEditorModel, ( (new HierarchicalKind('notebook.format'))), [], defaultFormatterExtId, progress, token);
420
+ formatResult = await instantiationService.invokeFunction(CodeActionParticipantUtils.applyOnSaveFormatCodeAction, textEditorModel, ( new HierarchicalKind('notebook.format')), [], defaultFormatterExtId, progress, token);
427
421
  }
428
422
  catch {
429
423
  logService.error('Failed to apply notebook format action on save');
@@ -440,20 +434,20 @@ class CodeActionParticipantUtils {
440
434
  const logService = accessor.get(ILogService);
441
435
  const getActionProgress = new (class {
442
436
  constructor() {
443
- this._names = ( (new Set()));
437
+ this._names = ( new Set());
444
438
  }
445
439
  _report() {
446
440
  progress.report({
447
441
  message: ( localize(
448
- 8131,
442
+ 7402,
449
443
  "Getting code actions from '{0}' ([configure]({1})).",
450
- ( ([...this._names].map(name => `'${name}'`))).join(', '),
444
+ ( [...this._names].map(name => `'${name}'`)).join(', '),
451
445
  'command:workbench.action.openSettings?%5B%22notebook.codeActionsOnSave%22%5D'
452
446
  ))
453
447
  });
454
448
  }
455
449
  report(provider) {
456
- if (provider.displayName && !( (this._names.has(provider.displayName)))) {
450
+ if (provider.displayName && !( this._names.has(provider.displayName))) {
457
451
  this._names.add(provider.displayName);
458
452
  this._report();
459
453
  }
@@ -485,7 +479,7 @@ class CodeActionParticipantUtils {
485
479
  logService.warn('Failed to apply code action on save, applied to multiple resources.');
486
480
  continue;
487
481
  }
488
- progress.report({ message: ( localize(8132, "Applying code action '{0}'.", action.action.title)) });
482
+ progress.report({ message: ( localize(7403, "Applying code action '{0}'.", action.action.title)) });
489
483
  await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
490
484
  if (token.isCancellationRequested) {
491
485
  return;
@@ -505,20 +499,20 @@ class CodeActionParticipantUtils {
505
499
  const logService = accessor.get(ILogService);
506
500
  const getActionProgress = new (class {
507
501
  constructor() {
508
- this._names = ( (new Set()));
502
+ this._names = ( new Set());
509
503
  }
510
504
  _report() {
511
505
  progress.report({
512
506
  message: ( localize(
513
- 8131,
507
+ 7402,
514
508
  "Getting code actions from '{0}' ([configure]({1})).",
515
- ( ([...this._names].map(name => `'${name}'`))).join(', '),
509
+ ( [...this._names].map(name => `'${name}'`)).join(', '),
516
510
  'command:workbench.action.openSettings?%5B%22notebook.defaultFormatter%22%5D'
517
511
  ))
518
512
  });
519
513
  }
520
514
  report(provider) {
521
- if (provider.displayName && !( (this._names.has(provider.displayName)))) {
515
+ if (provider.displayName && !( this._names.has(provider.displayName))) {
522
516
  this._names.add(provider.displayName);
523
517
  this._report();
524
518
  }
@@ -537,7 +531,7 @@ class CodeActionParticipantUtils {
537
531
  if (!action) {
538
532
  return false;
539
533
  }
540
- progress.report({ message: ( localize(8132, "Applying code action '{0}'.", action.action.title)) });
534
+ progress.report({ message: ( localize(7403, "Applying code action '{0}'.", action.action.title)) });
541
535
  await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
542
536
  if (token.isCancellationRequested) {
543
537
  return false;
@@ -554,7 +548,7 @@ class CodeActionParticipantUtils {
554
548
  }
555
549
  static getActionsToRun(model, codeActionKind, excludes, languageFeaturesService, progress, token) {
556
550
  return getCodeActions(languageFeaturesService.codeActionProvider, model, model.getFullModelRange(), {
557
- type: 1 ,
551
+ type: CodeActionTriggerType.Invoke,
558
552
  triggerAction: CodeActionTriggerSource.OnSave,
559
553
  filter: { include: codeActionKind, excludes: excludes, includeSourceActions: true },
560
554
  }, progress, token);
@@ -581,11 +575,11 @@ let SaveParticipantsContribution = class SaveParticipantsContribution extends Di
581
575
  this._register(this.workingCopyFileService.addSaveParticipant(this.instantiationService.createInstance(TrimFinalNewLinesParticipant)));
582
576
  }
583
577
  };
584
- SaveParticipantsContribution = ( (__decorate([
585
- ( (__param(0, IInstantiationService))),
586
- ( (__param(1, IWorkingCopyFileService)))
587
- ], SaveParticipantsContribution)));
588
- const workbenchContributionsRegistry = ( (Registry.as(Extensions.Workbench)));
589
- workbenchContributionsRegistry.registerWorkbenchContribution(SaveParticipantsContribution, 3 );
578
+ SaveParticipantsContribution = ( __decorate([
579
+ ( __param(0, IInstantiationService)),
580
+ ( __param(1, IWorkingCopyFileService))
581
+ ], SaveParticipantsContribution));
582
+ const workbenchContributionsRegistry = ( Registry.as(Extensions.Workbench));
583
+ workbenchContributionsRegistry.registerWorkbenchContribution(SaveParticipantsContribution, LifecyclePhase.Restored);
590
584
 
591
- export { CodeActionParticipantUtils, SaveParticipantsContribution };
585
+ export { CodeActionParticipantUtils, NotebookSaveParticipant, SaveParticipantsContribution };
@@ -0,0 +1,17 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
3
+ export declare class TroubleshootController extends Disposable implements INotebookEditorContribution {
4
+ private readonly _notebookEditor;
5
+ static id: string;
6
+ private readonly _localStore;
7
+ private _cellStateListeners;
8
+ private _enabled;
9
+ private _cellStatusItems;
10
+ constructor(_notebookEditor: INotebookEditor);
11
+ toggle(): void;
12
+ private _update;
13
+ private _log;
14
+ private _updateListener;
15
+ private _getItemsForCells;
16
+ dispose(): void;
17
+ }
@@ -1,9 +1,11 @@
1
+
1
2
  import { Disposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
2
3
  import { localize2 } from 'vscode/vscode/vs/nls';
3
4
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
4
5
  import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
5
- import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
6
- import { registerNotebookContribution } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
6
+ import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
7
+ import { registerNotebookContribution } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
8
+ import { CellStatusbarAlignment } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
7
9
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
8
10
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
9
11
 
@@ -12,7 +14,7 @@ class TroubleshootController extends Disposable {
12
14
  constructor(_notebookEditor) {
13
15
  super();
14
16
  this._notebookEditor = _notebookEditor;
15
- this._localStore = this._register(( (new DisposableStore())));
17
+ this._localStore = this._register(( new DisposableStore()));
16
18
  this._cellStateListeners = [];
17
19
  this._enabled = false;
18
20
  this._cellStatusItems = [];
@@ -52,11 +54,11 @@ class TroubleshootController extends Disposable {
52
54
  this._localStore.add(this._notebookEditor.onDidChangeViewCells(e => {
53
55
  [...e.splices].reverse().forEach(splice => {
54
56
  const [start, deleted, newCells] = splice;
55
- const deletedCells = this._cellStateListeners.splice(start, deleted, ...( (newCells.map(cell => {
57
+ const deletedCells = this._cellStateListeners.splice(start, deleted, ...( newCells.map(cell => {
56
58
  return cell.onDidChangeLayout((e) => {
57
59
  this._log(cell, e);
58
60
  });
59
- }))));
61
+ })));
60
62
  dispose(deletedCells);
61
63
  });
62
64
  }));
@@ -75,7 +77,7 @@ class TroubleshootController extends Disposable {
75
77
  items: [
76
78
  {
77
79
  text: `index: ${i}`,
78
- alignment: 1 ,
80
+ alignment: CellStatusbarAlignment.Left,
79
81
  priority: Number.MAX_SAFE_INTEGER
80
82
  }
81
83
  ]
@@ -93,7 +95,7 @@ registerAction2(class extends Action2 {
93
95
  constructor() {
94
96
  super({
95
97
  id: 'notebook.toggleLayoutTroubleshoot',
96
- title: ( localize2(8196, "Toggle Layout Troubleshoot")),
98
+ title: ( localize2(7404, "Toggle Layout Troubleshoot")),
97
99
  category: Categories.Developer,
98
100
  f1: true
99
101
  });
@@ -112,7 +114,7 @@ registerAction2(class extends Action2 {
112
114
  constructor() {
113
115
  super({
114
116
  id: 'notebook.inspectLayout',
115
- title: ( localize2(8197, "Inspect Notebook Layout")),
117
+ title: ( localize2(7405, "Inspect Notebook Layout")),
116
118
  category: Categories.Developer,
117
119
  f1: true
118
120
  });
@@ -133,7 +135,7 @@ registerAction2(class extends Action2 {
133
135
  constructor() {
134
136
  super({
135
137
  id: 'notebook.clearNotebookEdtitorTypeCache',
136
- title: ( localize2(8198, "Clear Notebook Editor Type Cache")),
138
+ title: ( localize2(7406, "Clear Notebook Editor Type Cache")),
137
139
  category: Categories.Developer,
138
140
  f1: true
139
141
  });
@@ -1,9 +1,10 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
- import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
4
+ import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
4
5
  import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
5
6
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
6
- import { getNotebookEditorFromEditorPane, CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
7
+ import { getNotebookEditorFromEditorPane, CellEditState } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
7
8
  import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
8
9
 
9
10
  let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Disposable {
@@ -53,4 +54,4 @@ let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Di
53
54
  NotebookUndoRedoContribution = ( __decorate([
54
55
  ( __param(0, IEditorService))
55
56
  ], NotebookUndoRedoContribution));
56
- registerWorkbenchContribution2(NotebookUndoRedoContribution.ID, NotebookUndoRedoContribution, 2 );
57
+ registerWorkbenchContribution2(NotebookUndoRedoContribution.ID, NotebookUndoRedoContribution, WorkbenchPhase.BlockRestore);