@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
@@ -9,7 +9,7 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
9
9
  import { InputFocusedContext, InputFocusedContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
10
10
  import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
11
11
  import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
12
- import { moveCellRange, copyCellRange, computeCellLinesContents, joinCellsWithSurrounds, joinSelectedCells, changeCellToKind } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
12
+ import { moveCellRange, copyCellRange, computeCellLinesContents, joinCellsWithSurrounds, joinSelectedCells, changeCellToKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
13
13
  import { NotebookCellAction, CellOverflowToolbarGroups, CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder, NotebookMultiCellAction, parseMultiCellExecutionArgs, cellExecutionArgs } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
14
14
  import { CellFocusMode, EXPAND_CELL_INPUT_COMMAND_ID, EXPAND_CELL_OUTPUT_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
15
15
  import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_CELL_INPUT_COLLAPSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED, NOTEBOOK_CELL_HAS_OUTPUTS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
@@ -19,15 +19,15 @@ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/pla
19
19
  import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
20
20
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
21
21
 
22
- const MOVE_CELL_UP_COMMAND_ID = 'notebook.cell.moveUp';
23
- const MOVE_CELL_DOWN_COMMAND_ID = 'notebook.cell.moveDown';
24
- const COPY_CELL_UP_COMMAND_ID = 'notebook.cell.copyUp';
25
- const COPY_CELL_DOWN_COMMAND_ID = 'notebook.cell.copyDown';
22
+ const MOVE_CELL_UP_COMMAND_ID = "notebook.cell.moveUp";
23
+ const MOVE_CELL_DOWN_COMMAND_ID = "notebook.cell.moveDown";
24
+ const COPY_CELL_UP_COMMAND_ID = "notebook.cell.copyUp";
25
+ const COPY_CELL_DOWN_COMMAND_ID = "notebook.cell.copyDown";
26
26
  registerAction2(class extends NotebookCellAction {
27
27
  constructor() {
28
28
  super({
29
29
  id: MOVE_CELL_UP_COMMAND_ID,
30
- title: ( localize2(9218, "Move Cell Up")),
30
+ title: ( localize2(9538, "Move Cell Up")),
31
31
  icon: moveUpIcon,
32
32
  keybinding: {
33
33
  primary: KeyMod.Alt | KeyCode.UpArrow,
@@ -36,21 +36,21 @@ registerAction2(class extends NotebookCellAction {
36
36
  },
37
37
  menu: {
38
38
  id: MenuId.NotebookCellTitle,
39
- when: ( ContextKeyExpr.equals('config.notebook.dragAndDropEnabled', false)),
39
+ when: ( ContextKeyExpr.equals("config.notebook.dragAndDropEnabled", false)),
40
40
  group: CellOverflowToolbarGroups.Edit,
41
41
  order: 14
42
42
  }
43
43
  });
44
44
  }
45
45
  async runWithContext(accessor, context) {
46
- return moveCellRange(context, 'up');
46
+ return moveCellRange(context, "up");
47
47
  }
48
48
  });
49
49
  registerAction2(class extends NotebookCellAction {
50
50
  constructor() {
51
51
  super({
52
52
  id: MOVE_CELL_DOWN_COMMAND_ID,
53
- title: ( localize2(9219, "Move Cell Down")),
53
+ title: ( localize2(9539, "Move Cell Down")),
54
54
  icon: moveDownIcon,
55
55
  keybinding: {
56
56
  primary: KeyMod.Alt | KeyCode.DownArrow,
@@ -59,21 +59,21 @@ registerAction2(class extends NotebookCellAction {
59
59
  },
60
60
  menu: {
61
61
  id: MenuId.NotebookCellTitle,
62
- when: ( ContextKeyExpr.equals('config.notebook.dragAndDropEnabled', false)),
62
+ when: ( ContextKeyExpr.equals("config.notebook.dragAndDropEnabled", false)),
63
63
  group: CellOverflowToolbarGroups.Edit,
64
64
  order: 14
65
65
  }
66
66
  });
67
67
  }
68
68
  async runWithContext(accessor, context) {
69
- return moveCellRange(context, 'down');
69
+ return moveCellRange(context, "down");
70
70
  }
71
71
  });
72
72
  registerAction2(class extends NotebookCellAction {
73
73
  constructor() {
74
74
  super({
75
75
  id: COPY_CELL_UP_COMMAND_ID,
76
- title: ( localize2(9220, "Copy Cell Up")),
76
+ title: ( localize2(9540, "Copy Cell Up")),
77
77
  keybinding: {
78
78
  primary: KeyMod.Alt | KeyMod.Shift | KeyCode.UpArrow,
79
79
  when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
@@ -82,14 +82,14 @@ registerAction2(class extends NotebookCellAction {
82
82
  });
83
83
  }
84
84
  async runWithContext(accessor, context) {
85
- return copyCellRange(context, 'up');
85
+ return copyCellRange(context, "up");
86
86
  }
87
87
  });
88
88
  registerAction2(class extends NotebookCellAction {
89
89
  constructor() {
90
90
  super({
91
91
  id: COPY_CELL_DOWN_COMMAND_ID,
92
- title: ( localize2(9221, "Copy Cell Down")),
92
+ title: ( localize2(9541, "Copy Cell Down")),
93
93
  keybinding: {
94
94
  primary: KeyMod.Alt | KeyMod.Shift | KeyCode.DownArrow,
95
95
  when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
@@ -104,18 +104,18 @@ registerAction2(class extends NotebookCellAction {
104
104
  });
105
105
  }
106
106
  async runWithContext(accessor, context) {
107
- return copyCellRange(context, 'down');
107
+ return copyCellRange(context, "down");
108
108
  }
109
109
  });
110
- const SPLIT_CELL_COMMAND_ID = 'notebook.cell.split';
111
- const JOIN_SELECTED_CELLS_COMMAND_ID = 'notebook.cell.joinSelected';
112
- const JOIN_CELL_ABOVE_COMMAND_ID = 'notebook.cell.joinAbove';
113
- const JOIN_CELL_BELOW_COMMAND_ID = 'notebook.cell.joinBelow';
110
+ const SPLIT_CELL_COMMAND_ID = "notebook.cell.split";
111
+ const JOIN_SELECTED_CELLS_COMMAND_ID = "notebook.cell.joinSelected";
112
+ const JOIN_CELL_ABOVE_COMMAND_ID = "notebook.cell.joinAbove";
113
+ const JOIN_CELL_BELOW_COMMAND_ID = "notebook.cell.joinBelow";
114
114
  registerAction2(class extends NotebookCellAction {
115
115
  constructor() {
116
116
  super({
117
117
  id: SPLIT_CELL_COMMAND_ID,
118
- title: ( localize2(9222, "Split Cell")),
118
+ title: ( localize2(9542, "Split Cell")),
119
119
  menu: {
120
120
  id: MenuId.NotebookCellTitle,
121
121
  when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, ( NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()))),
@@ -130,9 +130,12 @@ registerAction2(class extends NotebookCellAction {
130
130
  NOTEBOOK_CELL_EDITABLE,
131
131
  EditorContextKeys.editorTextFocus
132
132
  )),
133
- primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash),
133
+ primary: KeyChord(
134
+ KeyMod.CtrlCmd | KeyCode.KeyK,
135
+ KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash
136
+ ),
134
137
  weight: KeybindingWeight.WorkbenchContrib
135
- },
138
+ }
136
139
  });
137
140
  }
138
141
  async runWithContext(accessor, context) {
@@ -142,7 +145,10 @@ registerAction2(class extends NotebookCellAction {
142
145
  const bulkEditService = accessor.get(IBulkEditService);
143
146
  const cell = context.cell;
144
147
  const index = context.notebookEditor.getCellIndex(cell);
145
- const splitPoints = cell.focusMode === CellFocusMode.Container ? [{ lineNumber: 1, column: 1 }] : cell.getSelectionsStartPosition();
148
+ const splitPoints = cell.focusMode === CellFocusMode.Container ? [{
149
+ lineNumber: 1,
150
+ column: 1
151
+ }] : cell.getSelectionsStartPosition();
146
152
  if (splitPoints && splitPoints.length > 0) {
147
153
  await cell.resolveTextModel();
148
154
  if (!cell.hasModel()) {
@@ -154,26 +160,25 @@ registerAction2(class extends NotebookCellAction {
154
160
  const kind = cell.cellKind;
155
161
  const mime = cell.mime;
156
162
  const textModel = await cell.resolveTextModel();
157
- await bulkEditService.apply([
158
- ( new ResourceTextEdit(
159
- cell.uri,
160
- { range: textModel.getFullModelRange(), text: newLinesContents[0] }
161
- )),
162
- ( new ResourceNotebookCellEdit(context.notebookEditor.textModel.uri, {
163
- editType: CellEditType.Replace,
164
- index: index + 1,
165
- count: 0,
166
- cells: ( newLinesContents.slice(1).map(line => ({
167
- cellKind: kind,
168
- language,
169
- mime,
170
- source: line,
171
- outputs: [],
172
- metadata: {}
173
- })))
174
- }))
175
- ], { quotableLabel: 'Split Notebook Cell' });
176
- context.notebookEditor.cellAt(index + 1)?.updateEditState(cell.getEditState(), 'splitCell');
163
+ await bulkEditService.apply([( new ResourceTextEdit(cell.uri, {
164
+ range: textModel.getFullModelRange(),
165
+ text: newLinesContents[0]
166
+ })), ( new ResourceNotebookCellEdit(context.notebookEditor.textModel.uri, {
167
+ editType: CellEditType.Replace,
168
+ index: index + 1,
169
+ count: 0,
170
+ cells: ( newLinesContents.slice(1).map(line => ({
171
+ cellKind: kind,
172
+ language,
173
+ mime,
174
+ source: line,
175
+ outputs: [],
176
+ metadata: {}
177
+ })))
178
+ }))], {
179
+ quotableLabel: "Split Notebook Cell"
180
+ });
181
+ context.notebookEditor.cellAt(index + 1)?.updateEditState(cell.getEditState(), "splitCell");
177
182
  }
178
183
  }
179
184
  }
@@ -182,7 +187,7 @@ registerAction2(class extends NotebookCellAction {
182
187
  constructor() {
183
188
  super({
184
189
  id: JOIN_CELL_ABOVE_COMMAND_ID,
185
- title: ( localize2(9223, "Join With Previous Cell")),
190
+ title: ( localize2(9543, "Join With Previous Cell")),
186
191
  keybinding: {
187
192
  when: NOTEBOOK_EDITOR_FOCUSED,
188
193
  primary: KeyMod.WinCtrl | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyJ,
@@ -198,14 +203,14 @@ registerAction2(class extends NotebookCellAction {
198
203
  }
199
204
  async runWithContext(accessor, context) {
200
205
  const bulkEditService = accessor.get(IBulkEditService);
201
- return joinCellsWithSurrounds(bulkEditService, context, 'above');
206
+ return joinCellsWithSurrounds(bulkEditService, context, "above");
202
207
  }
203
208
  });
204
209
  registerAction2(class extends NotebookCellAction {
205
210
  constructor() {
206
211
  super({
207
212
  id: JOIN_CELL_BELOW_COMMAND_ID,
208
- title: ( localize2(9224, "Join With Next Cell")),
213
+ title: ( localize2(9544, "Join With Next Cell")),
209
214
  keybinding: {
210
215
  when: NOTEBOOK_EDITOR_FOCUSED,
211
216
  primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyJ,
@@ -221,14 +226,14 @@ registerAction2(class extends NotebookCellAction {
221
226
  }
222
227
  async runWithContext(accessor, context) {
223
228
  const bulkEditService = accessor.get(IBulkEditService);
224
- return joinCellsWithSurrounds(bulkEditService, context, 'below');
229
+ return joinCellsWithSurrounds(bulkEditService, context, "below");
225
230
  }
226
231
  });
227
232
  registerAction2(class extends NotebookCellAction {
228
233
  constructor() {
229
234
  super({
230
235
  id: JOIN_SELECTED_CELLS_COMMAND_ID,
231
- title: ( localize2(9225, "Join Selected Cells")),
236
+ title: ( localize2(9545, "Join Selected Cells")),
232
237
  menu: {
233
238
  id: MenuId.NotebookCellTitle,
234
239
  when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
@@ -243,13 +248,13 @@ registerAction2(class extends NotebookCellAction {
243
248
  return joinSelectedCells(bulkEditService, notificationService, context);
244
249
  }
245
250
  });
246
- const CHANGE_CELL_TO_CODE_COMMAND_ID = 'notebook.cell.changeToCode';
247
- const CHANGE_CELL_TO_MARKDOWN_COMMAND_ID = 'notebook.cell.changeToMarkdown';
251
+ const CHANGE_CELL_TO_CODE_COMMAND_ID = "notebook.cell.changeToCode";
252
+ const CHANGE_CELL_TO_MARKDOWN_COMMAND_ID = "notebook.cell.changeToMarkdown";
248
253
  registerAction2(class ChangeCellToCodeAction extends NotebookMultiCellAction {
249
254
  constructor() {
250
255
  super({
251
256
  id: CHANGE_CELL_TO_CODE_COMMAND_ID,
252
- title: ( localize2(9226, "Change Cell to Code")),
257
+ title: ( localize2(9546, "Change Cell to Code")),
253
258
  keybinding: {
254
259
  when: ( ContextKeyExpr.and(
255
260
  NOTEBOOK_EDITOR_FOCUSED,
@@ -259,16 +264,16 @@ registerAction2(class ChangeCellToCodeAction extends NotebookMultiCellAction {
259
264
  primary: KeyCode.KeyY,
260
265
  weight: KeybindingWeight.WorkbenchContrib
261
266
  },
262
- precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')))),
267
+ precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo("markup")))),
263
268
  menu: {
264
269
  id: MenuId.NotebookCellTitle,
265
270
  when: ( ContextKeyExpr.and(
266
271
  NOTEBOOK_EDITOR_FOCUSED,
267
272
  NOTEBOOK_EDITOR_EDITABLE,
268
273
  NOTEBOOK_CELL_EDITABLE,
269
- ( NOTEBOOK_CELL_TYPE.isEqualTo('markup'))
274
+ ( NOTEBOOK_CELL_TYPE.isEqualTo("markup"))
270
275
  )),
271
- group: CellOverflowToolbarGroups.Edit,
276
+ group: CellOverflowToolbarGroups.Edit
272
277
  }
273
278
  });
274
279
  }
@@ -280,7 +285,7 @@ registerAction2(class ChangeCellToMarkdownAction extends NotebookMultiCellAction
280
285
  constructor() {
281
286
  super({
282
287
  id: CHANGE_CELL_TO_MARKDOWN_COMMAND_ID,
283
- title: ( localize2(9227, "Change Cell to Markdown")),
288
+ title: ( localize2(9547, "Change Cell to Markdown")),
284
289
  keybinding: {
285
290
  when: ( ContextKeyExpr.and(
286
291
  NOTEBOOK_EDITOR_FOCUSED,
@@ -290,36 +295,36 @@ registerAction2(class ChangeCellToMarkdownAction extends NotebookMultiCellAction
290
295
  primary: KeyCode.KeyM,
291
296
  weight: KeybindingWeight.WorkbenchContrib
292
297
  },
293
- precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo('code')))),
298
+ precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo("code")))),
294
299
  menu: {
295
300
  id: MenuId.NotebookCellTitle,
296
301
  when: ( ContextKeyExpr.and(
297
302
  NOTEBOOK_EDITOR_FOCUSED,
298
303
  NOTEBOOK_EDITOR_EDITABLE,
299
304
  NOTEBOOK_CELL_EDITABLE,
300
- ( NOTEBOOK_CELL_TYPE.isEqualTo('code'))
305
+ ( NOTEBOOK_CELL_TYPE.isEqualTo("code"))
301
306
  )),
302
- group: CellOverflowToolbarGroups.Edit,
307
+ group: CellOverflowToolbarGroups.Edit
303
308
  }
304
309
  });
305
310
  }
306
311
  async runWithContext(accessor, context) {
307
- await changeCellToKind(CellKind.Markup, context, 'markdown', Mimes.markdown);
312
+ await changeCellToKind(CellKind.Markup, context, "markdown", Mimes.markdown);
308
313
  }
309
314
  });
310
- const COLLAPSE_CELL_INPUT_COMMAND_ID = 'notebook.cell.collapseCellInput';
311
- const COLLAPSE_CELL_OUTPUT_COMMAND_ID = 'notebook.cell.collapseCellOutput';
312
- const COLLAPSE_ALL_CELL_INPUTS_COMMAND_ID = 'notebook.cell.collapseAllCellInputs';
313
- const EXPAND_ALL_CELL_INPUTS_COMMAND_ID = 'notebook.cell.expandAllCellInputs';
314
- const COLLAPSE_ALL_CELL_OUTPUTS_COMMAND_ID = 'notebook.cell.collapseAllCellOutputs';
315
- const EXPAND_ALL_CELL_OUTPUTS_COMMAND_ID = 'notebook.cell.expandAllCellOutputs';
316
- const TOGGLE_CELL_OUTPUTS_COMMAND_ID = 'notebook.cell.toggleOutputs';
317
- const TOGGLE_CELL_OUTPUT_SCROLLING = 'notebook.cell.toggleOutputScrolling';
315
+ const COLLAPSE_CELL_INPUT_COMMAND_ID = "notebook.cell.collapseCellInput";
316
+ const COLLAPSE_CELL_OUTPUT_COMMAND_ID = "notebook.cell.collapseCellOutput";
317
+ const COLLAPSE_ALL_CELL_INPUTS_COMMAND_ID = "notebook.cell.collapseAllCellInputs";
318
+ const EXPAND_ALL_CELL_INPUTS_COMMAND_ID = "notebook.cell.expandAllCellInputs";
319
+ const COLLAPSE_ALL_CELL_OUTPUTS_COMMAND_ID = "notebook.cell.collapseAllCellOutputs";
320
+ const EXPAND_ALL_CELL_OUTPUTS_COMMAND_ID = "notebook.cell.expandAllCellOutputs";
321
+ const TOGGLE_CELL_OUTPUTS_COMMAND_ID = "notebook.cell.toggleOutputs";
322
+ const TOGGLE_CELL_OUTPUT_SCROLLING = "notebook.cell.toggleOutputScrolling";
318
323
  registerAction2(class CollapseCellInputAction extends NotebookMultiCellAction {
319
324
  constructor() {
320
325
  super({
321
326
  id: COLLAPSE_CELL_INPUT_COMMAND_ID,
322
- title: ( localize2(9228, "Collapse Cell Input")),
327
+ title: ( localize2(9548, "Collapse Cell Input")),
323
328
  keybinding: {
324
329
  when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()), ( InputFocusedContext.toNegated()))),
325
330
  primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
@@ -333,8 +338,7 @@ registerAction2(class CollapseCellInputAction extends NotebookMultiCellAction {
333
338
  async runWithContext(accessor, context) {
334
339
  if (context.ui) {
335
340
  context.cell.isInputCollapsed = true;
336
- }
337
- else {
341
+ } else {
338
342
  context.selectedCells.forEach(cell => cell.isInputCollapsed = true);
339
343
  }
340
344
  }
@@ -343,7 +347,7 @@ registerAction2(class ExpandCellInputAction extends NotebookMultiCellAction {
343
347
  constructor() {
344
348
  super({
345
349
  id: EXPAND_CELL_INPUT_COMMAND_ID,
346
- title: ( localize2(9229, "Expand Cell Input")),
350
+ title: ( localize2(9549, "Expand Cell Input")),
347
351
  keybinding: {
348
352
  when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_INPUT_COLLAPSED)),
349
353
  primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
@@ -357,8 +361,7 @@ registerAction2(class ExpandCellInputAction extends NotebookMultiCellAction {
357
361
  async runWithContext(accessor, context) {
358
362
  if (context.ui) {
359
363
  context.cell.isInputCollapsed = false;
360
- }
361
- else {
364
+ } else {
362
365
  context.selectedCells.forEach(cell => cell.isInputCollapsed = false);
363
366
  }
364
367
  }
@@ -367,7 +370,7 @@ registerAction2(class CollapseCellOutputAction extends NotebookMultiCellAction {
367
370
  constructor() {
368
371
  super({
369
372
  id: COLLAPSE_CELL_OUTPUT_COMMAND_ID,
370
- title: ( localize2(9230, "Collapse Cell Output")),
373
+ title: ( localize2(9550, "Collapse Cell Output")),
371
374
  keybinding: {
372
375
  when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated()), ( InputFocusedContext.toNegated()), NOTEBOOK_CELL_HAS_OUTPUTS)),
373
376
  primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
@@ -378,8 +381,7 @@ registerAction2(class CollapseCellOutputAction extends NotebookMultiCellAction {
378
381
  async runWithContext(accessor, context) {
379
382
  if (context.ui) {
380
383
  context.cell.isOutputCollapsed = true;
381
- }
382
- else {
384
+ } else {
383
385
  context.selectedCells.forEach(cell => cell.isOutputCollapsed = true);
384
386
  }
385
387
  }
@@ -388,7 +390,7 @@ registerAction2(class ExpandCellOuputAction extends NotebookMultiCellAction {
388
390
  constructor() {
389
391
  super({
390
392
  id: EXPAND_CELL_OUTPUT_COMMAND_ID,
391
- title: ( localize2(9231, "Expand Cell Output")),
393
+ title: ( localize2(9551, "Expand Cell Output")),
392
394
  keybinding: {
393
395
  when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED)),
394
396
  primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
@@ -399,8 +401,7 @@ registerAction2(class ExpandCellOuputAction extends NotebookMultiCellAction {
399
401
  async runWithContext(accessor, context) {
400
402
  if (context.ui) {
401
403
  context.cell.isOutputCollapsed = false;
402
- }
403
- else {
404
+ } else {
404
405
  context.selectedCells.forEach(cell => cell.isOutputCollapsed = false);
405
406
  }
406
407
  }
@@ -410,9 +411,9 @@ registerAction2(class extends NotebookMultiCellAction {
410
411
  super({
411
412
  id: TOGGLE_CELL_OUTPUTS_COMMAND_ID,
412
413
  precondition: NOTEBOOK_CELL_LIST_FOCUSED,
413
- title: ( localize2(9232, "Toggle Outputs")),
414
+ title: ( localize2(9552, "Toggle Outputs")),
414
415
  metadata: {
415
- description: ( localize(9232, "Toggle Outputs")),
416
+ description: ( localize(9552, "Toggle Outputs")),
416
417
  args: cellExecutionArgs
417
418
  }
418
419
  });
@@ -424,8 +425,7 @@ registerAction2(class extends NotebookMultiCellAction {
424
425
  let cells = [];
425
426
  if (context.ui) {
426
427
  cells = [context.cell];
427
- }
428
- else if (context.selectedCells) {
428
+ } else if (context.selectedCells) {
429
429
  cells = context.selectedCells;
430
430
  }
431
431
  for (const cell of cells) {
@@ -437,8 +437,8 @@ registerAction2(class CollapseAllCellInputsAction extends NotebookMultiCellActio
437
437
  constructor() {
438
438
  super({
439
439
  id: COLLAPSE_ALL_CELL_INPUTS_COMMAND_ID,
440
- title: ( localize2(9233, "Collapse All Cell Inputs")),
441
- f1: true,
440
+ title: ( localize2(9553, "Collapse All Cell Inputs")),
441
+ f1: true
442
442
  });
443
443
  }
444
444
  async runWithContext(accessor, context) {
@@ -449,7 +449,7 @@ registerAction2(class ExpandAllCellInputsAction extends NotebookMultiCellAction
449
449
  constructor() {
450
450
  super({
451
451
  id: EXPAND_ALL_CELL_INPUTS_COMMAND_ID,
452
- title: ( localize2(9234, "Expand All Cell Inputs")),
452
+ title: ( localize2(9554, "Expand All Cell Inputs")),
453
453
  f1: true
454
454
  });
455
455
  }
@@ -461,8 +461,8 @@ registerAction2(class CollapseAllCellOutputsAction extends NotebookMultiCellActi
461
461
  constructor() {
462
462
  super({
463
463
  id: COLLAPSE_ALL_CELL_OUTPUTS_COMMAND_ID,
464
- title: ( localize2(9235, "Collapse All Cell Outputs")),
465
- f1: true,
464
+ title: ( localize2(9555, "Collapse All Cell Outputs")),
465
+ f1: true
466
466
  });
467
467
  }
468
468
  async runWithContext(accessor, context) {
@@ -473,7 +473,7 @@ registerAction2(class ExpandAllCellOutputsAction extends NotebookMultiCellAction
473
473
  constructor() {
474
474
  super({
475
475
  id: EXPAND_ALL_CELL_OUTPUTS_COMMAND_ID,
476
- title: ( localize2(9236, "Expand All Cell Outputs")),
476
+ title: ( localize2(9556, "Expand All Cell Outputs")),
477
477
  f1: true
478
478
  });
479
479
  }
@@ -485,7 +485,7 @@ registerAction2(class ToggleCellOutputScrolling extends NotebookMultiCellAction
485
485
  constructor() {
486
486
  super({
487
487
  id: TOGGLE_CELL_OUTPUT_SCROLLING,
488
- title: ( localize2(9237, "Toggle Scroll Cell Output")),
488
+ title: ( localize2(9557, "Toggle Scroll Cell Output")),
489
489
  keybinding: {
490
490
  when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()), NOTEBOOK_CELL_HAS_OUTPUTS)),
491
491
  primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyY),
@@ -496,23 +496,22 @@ registerAction2(class ToggleCellOutputScrolling extends NotebookMultiCellAction
496
496
  toggleOutputScrolling(viewModel, globalScrollSetting, collapsed) {
497
497
  const cellMetadata = viewModel.model.metadata;
498
498
  if (cellMetadata) {
499
- const currentlyEnabled = cellMetadata['scrollable'] !== undefined ? cellMetadata['scrollable'] : globalScrollSetting;
499
+ const currentlyEnabled = cellMetadata["scrollable"] !== undefined ? cellMetadata["scrollable"] : globalScrollSetting;
500
500
  const shouldEnableScrolling = collapsed || !currentlyEnabled;
501
- cellMetadata['scrollable'] = shouldEnableScrolling;
501
+ cellMetadata["scrollable"] = shouldEnableScrolling;
502
502
  viewModel.resetRenderer();
503
503
  }
504
504
  }
505
505
  async runWithContext(accessor, context) {
506
506
  const globalScrolling = accessor.get(IConfigurationService).getValue(NotebookSetting.outputScrolling);
507
507
  if (context.ui) {
508
- context.cell.outputsViewModels.forEach((viewModel) => {
508
+ context.cell.outputsViewModels.forEach(viewModel => {
509
509
  this.toggleOutputScrolling(viewModel, globalScrolling, context.cell.isOutputCollapsed);
510
510
  });
511
511
  context.cell.isOutputCollapsed = false;
512
- }
513
- else {
512
+ } else {
514
513
  context.selectedCells.forEach(cell => {
515
- cell.outputsViewModels.forEach((viewModel) => {
514
+ cell.outputsViewModels.forEach(viewModel => {
516
515
  this.toggleOutputScrolling(viewModel, globalScrolling, cell.isOutputCollapsed);
517
516
  });
518
517
  cell.isOutputCollapsed = false;
@@ -16,9 +16,19 @@ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
16
16
 
17
17
  var CellDiagnostics_1;
18
18
  let CellDiagnostics = class CellDiagnostics extends Disposable {
19
- static { CellDiagnostics_1 = this; }
20
- static { this.ID = 'workbench.notebook.cellDiagnostics'; }
21
- constructor(notebookEditor, notebookExecutionStateService, markerService, chatAgentService, configurationService) {
19
+ static {
20
+ CellDiagnostics_1 = this;
21
+ }
22
+ static {
23
+ this.ID = "workbench.notebook.cellDiagnostics";
24
+ }
25
+ constructor(
26
+ notebookEditor,
27
+ notebookExecutionStateService,
28
+ markerService,
29
+ chatAgentService,
30
+ configurationService
31
+ ) {
22
32
  super();
23
33
  this.notebookEditor = notebookEditor;
24
34
  this.notebookExecutionStateService = notebookExecutionStateService;
@@ -30,7 +40,7 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
30
40
  this.diagnosticsByHandle = ( new Map());
31
41
  this.updateEnabled();
32
42
  this._register(chatAgentService.onDidChangeAgents(() => this.updateEnabled()));
33
- this._register(configurationService.onDidChangeConfiguration((e) => {
43
+ this._register(configurationService.onDidChangeConfiguration(e => {
34
44
  if (e.affectsConfiguration(NotebookSetting.cellFailureDiagnostics)) {
35
45
  this.updateEnabled();
36
46
  }
@@ -45,12 +55,13 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
45
55
  if (this.enabled && (!settingEnabled || !this.hasNotebookAgent())) {
46
56
  this.enabled = false;
47
57
  this.clearAll();
48
- }
49
- else if (!this.enabled && settingEnabled && this.hasNotebookAgent()) {
58
+ } else if (!this.enabled && settingEnabled && this.hasNotebookAgent()) {
50
59
  this.enabled = true;
51
60
  if (!this.listening) {
52
61
  this.listening = true;
53
- this._register(Event.accumulate(this.notebookExecutionStateService.onDidChangeExecution, 200)((e) => this.handleChangeExecutionState(e)));
62
+ this._register(
63
+ Event.accumulate(this.notebookExecutionStateService.onDidChangeExecution, 200)(e => this.handleChangeExecutionState(e))
64
+ );
54
65
  }
55
66
  }
56
67
  }
@@ -65,8 +76,7 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
65
76
  handled.add(e.cellHandle);
66
77
  if (!!e.changed) {
67
78
  this.clear(e.cellHandle);
68
- }
69
- else {
79
+ } else {
70
80
  this.setDiagnostics(e.cellHandle);
71
81
  }
72
82
  }
@@ -100,10 +110,14 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
100
110
  const errorLabel = metadata.error.name ? `${metadata.error.name}: ${metadata.error.message}` : metadata.error.message;
101
111
  const marker = this.createMarkerData(errorLabel, metadata.error.location);
102
112
  this.markerService.changeOne(CellDiagnostics_1.ID, cell.uri, [marker]);
103
- disposables.push(toDisposable(() => this.markerService.changeOne(CellDiagnostics_1.ID, cell.uri, [])));
113
+ disposables.push(
114
+ toDisposable(() => this.markerService.changeOne(CellDiagnostics_1.ID, cell.uri, []))
115
+ );
104
116
  cell.executionErrorDiagnostic.set(metadata.error, undefined);
105
- disposables.push(toDisposable(() => cell.executionErrorDiagnostic.set(undefined, undefined)));
106
- disposables.push(autorun((r) => {
117
+ disposables.push(
118
+ toDisposable(() => cell.executionErrorDiagnostic.set(undefined, undefined))
119
+ );
120
+ disposables.push(autorun(r => {
107
121
  if (!cell.executionErrorDiagnostic.read(r)) {
108
122
  this.clear(cellHandle);
109
123
  }
@@ -127,7 +141,7 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
127
141
  startColumn: location.startColumn + 1,
128
142
  endLineNumber: location.endLineNumber + 1,
129
143
  endColumn: location.endColumn + 1,
130
- source: 'Cell Execution Error'
144
+ source: "Cell Execution Error"
131
145
  };
132
146
  }
133
147
  dispose() {
@@ -135,12 +149,7 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
135
149
  this.clearAll();
136
150
  }
137
151
  };
138
- CellDiagnostics = CellDiagnostics_1 = ( __decorate([
139
- ( __param(1, INotebookExecutionStateService)),
140
- ( __param(2, IMarkerService)),
141
- ( __param(3, IChatAgentService)),
142
- ( __param(4, IConfigurationService))
143
- ], CellDiagnostics));
152
+ CellDiagnostics = CellDiagnostics_1 = ( __decorate([( __param(1, INotebookExecutionStateService)), ( __param(2, IMarkerService)), ( __param(3, IChatAgentService)), ( __param(4, IConfigurationService))], CellDiagnostics));
144
153
  registerNotebookContribution(CellDiagnostics.ID, CellDiagnostics);
145
154
 
146
155
  export { CellDiagnostics };