@codingame/monaco-vscode-notebook-service-override 5.2.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +26 -22
  3. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +56 -112
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -6
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
  45. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
  46. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
  48. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
  49. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
  50. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
  51. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
  52. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
@@ -1,5 +1,5 @@
1
1
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
- import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
2
+ import { KeyCode, KeyMod, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
3
3
  import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
4
4
  import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
5
5
  import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
@@ -8,8 +8,9 @@ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/comma
8
8
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
9
9
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
10
10
  import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
11
- import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_RESPONSE_TYPES, CTX_INLINE_CHAT_LAST_RESPONSE_TYPE, CTX_INLINE_CHAT_HAS_PROVIDER } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
12
- import { CTX_NOTEBOOK_CELL_CHAT_FOCUSED, MENU_CELL_CHAT_INPUT, CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST, MENU_CELL_CHAT_WIDGET, CTX_NOTEBOOK_CHAT_USER_DID_EDIT, CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION, MENU_CELL_CHAT_WIDGET_STATUS, MENU_CELL_CHAT_WIDGET_FEEDBACK } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
11
+ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
12
+ import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_RESPONSE_TYPES, InlineChatResponseTypes, CTX_INLINE_CHAT_HAS_AGENT } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
13
+ import { CTX_NOTEBOOK_CELL_CHAT_FOCUSED, MENU_CELL_CHAT_INPUT, CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST, MENU_CELL_CHAT_WIDGET, CTX_NOTEBOOK_CHAT_USER_DID_EDIT, CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION, MENU_CELL_CHAT_WIDGET_STATUS } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
13
14
  import { NotebookChatController } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController';
14
15
  import { NotebookAction, NotebookCellAction, getEditorFromArgsOrActivePane, CELL_TITLE_CELL_GROUP_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
15
16
  import { insertNewCell } from '../insertCellActions.js';
@@ -30,8 +31,8 @@ registerAction2(class extends NotebookAction {
30
31
  CTX_INLINE_CHAT_FOCUSED,
31
32
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
32
33
  ))),
33
- weight: 200 ,
34
- primary: 3
34
+ weight: KeybindingWeight.WorkbenchContrib,
35
+ primary: KeyCode.Enter
35
36
  },
36
37
  menu: {
37
38
  id: MENU_CELL_CHAT_INPUT,
@@ -59,8 +60,8 @@ registerAction2(class extends NotebookCellAction {
59
60
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
60
61
  (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
61
62
  ))),
62
- weight: 0 + 7,
63
- primary: 2048 | 16
63
+ weight: KeybindingWeight.EditorCore + 7,
64
+ primary: KeyMod.CtrlCmd | KeyCode.UpArrow
64
65
  },
65
66
  f1: false
66
67
  });
@@ -94,8 +95,8 @@ registerAction2(class extends NotebookAction {
94
95
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
95
96
  (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
96
97
  ))),
97
- weight: 0 + 7,
98
- primary: 2048 | 18
98
+ weight: KeybindingWeight.EditorCore + 7,
99
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow
99
100
  },
100
101
  f1: false
101
102
  });
@@ -121,8 +122,8 @@ registerAction2(class extends NotebookCellAction {
121
122
  )),
122
123
  (EditorContextKeys.isEmbeddedDiffEditor.negate())
123
124
  ))),
124
- weight: 0 + 7,
125
- primary: 2048 | 16
125
+ weight: KeybindingWeight.EditorCore + 7,
126
+ primary: KeyMod.CtrlCmd | KeyCode.UpArrow
126
127
  },
127
128
  f1: false
128
129
  });
@@ -149,8 +150,8 @@ registerAction2(class extends NotebookCellAction {
149
150
  )),
150
151
  (EditorContextKeys.isEmbeddedDiffEditor.negate())
151
152
  ))),
152
- weight: 0 + 7,
153
- primary: 2048 | 18
153
+ weight: KeybindingWeight.EditorCore + 7,
154
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow
154
155
  },
155
156
  f1: false
156
157
  });
@@ -212,8 +213,8 @@ registerAction2(class extends NotebookAction {
212
213
  CTX_INLINE_CHAT_FOCUSED,
213
214
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
214
215
  ))),
215
- weight: 100 + 10,
216
- primary: 2048 | 3 ,
216
+ weight: KeybindingWeight.EditorContrib + 10,
217
+ primary: KeyMod.CtrlCmd | KeyCode.Enter,
217
218
  },
218
219
  {
219
220
  when: ( (ContextKeyExpr.and(
@@ -222,8 +223,8 @@ registerAction2(class extends NotebookAction {
222
223
  CTX_NOTEBOOK_CHAT_USER_DID_EDIT,
223
224
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
224
225
  ))),
225
- weight: 0 + 10,
226
- primary: 9
226
+ weight: KeybindingWeight.EditorCore + 10,
227
+ primary: KeyCode.Escape
227
228
  },
228
229
  {
229
230
  when: ( (ContextKeyExpr.and(
@@ -232,8 +233,8 @@ registerAction2(class extends NotebookAction {
232
233
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
233
234
  (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
234
235
  ))),
235
- primary: 2048 | 3 ,
236
- weight: 200
236
+ primary: KeyMod.CtrlCmd | KeyCode.Enter,
237
+ weight: KeybindingWeight.WorkbenchContrib
237
238
  }
238
239
  ],
239
240
  menu: [
@@ -241,7 +242,7 @@ registerAction2(class extends NotebookAction {
241
242
  id: MENU_CELL_CHAT_WIDGET_STATUS,
242
243
  group: 'inline',
243
244
  order: 0,
244
- when: ( (CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo("onlyMessages" ))),
245
+ when: ( (CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChatResponseTypes.OnlyMessages))),
245
246
  }
246
247
  ],
247
248
  f1: false
@@ -264,8 +265,8 @@ registerAction2(class extends NotebookAction {
264
265
  (CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()),
265
266
  (NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
266
267
  ))),
267
- weight: 100 ,
268
- primary: 9
268
+ weight: KeybindingWeight.EditorContrib,
269
+ primary: KeyCode.Escape
269
270
  },
270
271
  menu: {
271
272
  id: MENU_CELL_CHAT_WIDGET_STATUS,
@@ -279,63 +280,6 @@ registerAction2(class extends NotebookAction {
279
280
  NotebookChatController.get(context.notebookEditor)?.discard();
280
281
  }
281
282
  });
282
- registerAction2(class extends NotebookAction {
283
- constructor() {
284
- super({
285
- id: 'notebook.cell.feedbackHelpful',
286
- title: ( localizeWithPath(_moduleId, 11, 'Helpful')),
287
- icon: Codicon.thumbsup,
288
- menu: {
289
- id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
290
- group: 'inline',
291
- order: 1,
292
- when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
293
- },
294
- f1: false
295
- });
296
- }
297
- async runWithContext(accessor, context) {
298
- NotebookChatController.get(context.notebookEditor)?.feedbackLast(1 );
299
- }
300
- });
301
- registerAction2(class extends NotebookAction {
302
- constructor() {
303
- super({
304
- id: 'notebook.cell.feedbackUnhelpful',
305
- title: ( localizeWithPath(_moduleId, 12, 'Unhelpful')),
306
- icon: Codicon.thumbsdown,
307
- menu: {
308
- id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
309
- group: 'inline',
310
- order: 2,
311
- when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
312
- },
313
- f1: false
314
- });
315
- }
316
- async runWithContext(accessor, context) {
317
- NotebookChatController.get(context.notebookEditor)?.feedbackLast(0 );
318
- }
319
- });
320
- registerAction2(class extends NotebookAction {
321
- constructor() {
322
- super({
323
- id: 'notebook.cell.reportIssueForBug',
324
- title: ( localizeWithPath(_moduleId, 13, 'Report Issue')),
325
- icon: Codicon.report,
326
- menu: {
327
- id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
328
- group: 'inline',
329
- order: 3,
330
- when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
331
- },
332
- f1: false
333
- });
334
- }
335
- async runWithContext(accessor, context) {
336
- NotebookChatController.get(context.notebookEditor)?.feedbackLast(4 );
337
- }
338
- });
339
283
  async function startChat(accessor, context, index, input, autoSend, source) {
340
284
  const configurationService = accessor.get(IConfigurationService);
341
285
  const commandService = accessor.get(ICommandService);
@@ -362,12 +306,12 @@ registerAction2(class extends NotebookAction {
362
306
  super({
363
307
  id: 'notebook.cell.chat.start',
364
308
  title: {
365
- value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 14, "Generate")),
309
+ value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 11, "Generate")),
366
310
  original: '$(sparkle) Generate',
367
311
  },
368
- tooltip: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
312
+ tooltip: ( localizeWithPath(_moduleId, 12, "Start Chat to Generate Code")),
369
313
  metadata: {
370
- description: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
314
+ description: ( localizeWithPath(_moduleId, 12, "Start Chat to Generate Code")),
371
315
  args: [
372
316
  {
373
317
  name: 'args',
@@ -395,15 +339,15 @@ registerAction2(class extends NotebookAction {
395
339
  NOTEBOOK_EDITOR_FOCUSED,
396
340
  (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
397
341
  ContextKeyExpr.not(InputFocusedContextKey),
398
- CTX_INLINE_CHAT_HAS_PROVIDER,
342
+ CTX_INLINE_CHAT_HAS_AGENT,
399
343
  (ContextKeyExpr.or(
400
344
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
401
345
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
402
346
  ))
403
347
  ))),
404
- weight: 200 ,
405
- primary: 2048 | 39 ,
406
- secondary: [KeyChord(2048 | 41 , 39 )],
348
+ weight: KeybindingWeight.WorkbenchContrib,
349
+ primary: KeyMod.CtrlCmd | KeyCode.KeyI,
350
+ secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyI)],
407
351
  },
408
352
  menu: [
409
353
  {
@@ -412,7 +356,7 @@ registerAction2(class extends NotebookAction {
412
356
  order: -1,
413
357
  when: ( (ContextKeyExpr.and(
414
358
  (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
415
- CTX_INLINE_CHAT_HAS_PROVIDER,
359
+ CTX_INLINE_CHAT_HAS_AGENT,
416
360
  (ContextKeyExpr.or(
417
361
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
418
362
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
@@ -465,10 +409,10 @@ registerAction2(class extends NotebookAction {
465
409
  super({
466
410
  id: 'notebook.cell.chat.startAtTop',
467
411
  title: {
468
- value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 14, "Generate")),
412
+ value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 11, "Generate")),
469
413
  original: '$(sparkle) Generate',
470
414
  },
471
- tooltip: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
415
+ tooltip: ( localizeWithPath(_moduleId, 12, "Start Chat to Generate Code")),
472
416
  f1: false,
473
417
  menu: [
474
418
  {
@@ -477,7 +421,7 @@ registerAction2(class extends NotebookAction {
477
421
  order: -1,
478
422
  when: ( (ContextKeyExpr.and(
479
423
  (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
480
- CTX_INLINE_CHAT_HAS_PROVIDER,
424
+ CTX_INLINE_CHAT_HAS_AGENT,
481
425
  (ContextKeyExpr.or(
482
426
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
483
427
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
@@ -495,8 +439,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
495
439
  command: {
496
440
  id: 'notebook.cell.chat.start',
497
441
  icon: Codicon.sparkle,
498
- title: ( localizeWithPath(_moduleId, 16, "Generate")),
499
- tooltip: ( localizeWithPath(_moduleId, 17, "Start Chat to Generate Code"))
442
+ title: ( localizeWithPath(_moduleId, 13, "Generate")),
443
+ tooltip: ( localizeWithPath(_moduleId, 14, "Start Chat to Generate Code"))
500
444
  },
501
445
  order: -10,
502
446
  group: 'navigation/add',
@@ -504,7 +448,7 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
504
448
  (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
505
449
  (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
506
450
  (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')),
507
- CTX_INLINE_CHAT_HAS_PROVIDER,
451
+ CTX_INLINE_CHAT_HAS_AGENT,
508
452
  (ContextKeyExpr.or(
509
453
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
510
454
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
@@ -515,7 +459,7 @@ registerAction2(class extends NotebookAction {
515
459
  constructor() {
516
460
  super({
517
461
  id: 'notebook.cell.chat.focus',
518
- title: ( localizeWithPath(_moduleId, 18, 'Focus Chat')),
462
+ title: ( localizeWithPath(_moduleId, 15, 'Focus Chat')),
519
463
  keybinding: [
520
464
  {
521
465
  when: ( (ContextKeyExpr.and(
@@ -523,8 +467,8 @@ registerAction2(class extends NotebookAction {
523
467
  ContextKeyExpr.not(InputFocusedContextKey),
524
468
  (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('above'))
525
469
  ))),
526
- primary: 2048 | 18 ,
527
- weight: 200
470
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
471
+ weight: KeybindingWeight.WorkbenchContrib
528
472
  },
529
473
  {
530
474
  when: ( (ContextKeyExpr.and(
@@ -532,8 +476,8 @@ registerAction2(class extends NotebookAction {
532
476
  ContextKeyExpr.not(InputFocusedContextKey),
533
477
  (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
534
478
  ))),
535
- primary: 2048 | 16 ,
536
- weight: 200
479
+ primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
480
+ weight: KeybindingWeight.WorkbenchContrib
537
481
  }
538
482
  ],
539
483
  f1: false
@@ -547,12 +491,12 @@ registerAction2(class extends NotebookAction {
547
491
  constructor() {
548
492
  super({
549
493
  id: 'notebook.cell.chat.focusNextCell',
550
- title: ( localizeWithPath(_moduleId, 19, 'Focus Next Cell')),
494
+ title: ( localizeWithPath(_moduleId, 16, 'Focus Next Cell')),
551
495
  keybinding: [
552
496
  {
553
497
  when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
554
- primary: 2048 | 18 ,
555
- weight: 200
498
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
499
+ weight: KeybindingWeight.WorkbenchContrib
556
500
  }
557
501
  ],
558
502
  f1: false
@@ -566,12 +510,12 @@ registerAction2(class extends NotebookAction {
566
510
  constructor() {
567
511
  super({
568
512
  id: 'notebook.cell.chat.focusPreviousCell',
569
- title: ( localizeWithPath(_moduleId, 20, 'Focus Previous Cell')),
513
+ title: ( localizeWithPath(_moduleId, 17, 'Focus Previous Cell')),
570
514
  keybinding: [
571
515
  {
572
516
  when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
573
- primary: 2048 | 16 ,
574
- weight: 200
517
+ primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
518
+ weight: KeybindingWeight.WorkbenchContrib
575
519
  }
576
520
  ],
577
521
  f1: false
@@ -585,12 +529,12 @@ registerAction2(class extends NotebookAction {
585
529
  constructor() {
586
530
  super({
587
531
  id: 'notebook.cell.chat.previousFromHistory',
588
- title: ( localize2WithPath(_moduleId, 21, "Previous From History")),
532
+ title: ( localize2WithPath(_moduleId, 18, "Previous From History")),
589
533
  precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
590
534
  keybinding: {
591
535
  when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
592
- weight: 0 + 10,
593
- primary: 16 ,
536
+ weight: KeybindingWeight.EditorCore + 10,
537
+ primary: KeyCode.UpArrow,
594
538
  },
595
539
  f1: false
596
540
  });
@@ -603,12 +547,12 @@ registerAction2(class extends NotebookAction {
603
547
  constructor() {
604
548
  super({
605
549
  id: 'notebook.cell.chat.nextFromHistory',
606
- title: ( localize2WithPath(_moduleId, 22, "Next From History")),
550
+ title: ( localize2WithPath(_moduleId, 19, "Next From History")),
607
551
  precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
608
552
  keybinding: {
609
553
  when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
610
- weight: 0 + 10,
611
- primary: 18
554
+ weight: KeybindingWeight.EditorCore + 10,
555
+ primary: KeyCode.DownArrow
612
556
  },
613
557
  f1: false
614
558
  });
@@ -621,7 +565,7 @@ registerAction2(class extends NotebookCellAction {
621
565
  constructor() {
622
566
  super({
623
567
  id: 'notebook.cell.chat.restore',
624
- title: ( localize2WithPath(_moduleId, 23, "Generate")),
568
+ title: ( localize2WithPath(_moduleId, 20, "Generate")),
625
569
  icon: Codicon.sparkle,
626
570
  menu: {
627
571
  id: MenuId.NotebookCellTitle,
@@ -629,7 +573,7 @@ registerAction2(class extends NotebookCellAction {
629
573
  order: 0,
630
574
  when: ( (ContextKeyExpr.and(
631
575
  (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
632
- CTX_INLINE_CHAT_HAS_PROVIDER,
576
+ CTX_INLINE_CHAT_HAS_AGENT,
633
577
  NOTEBOOK_CELL_GENERATED_BY_CHAT,
634
578
  (ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
635
579
  )))
@@ -0,0 +1,31 @@
1
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
+ import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
4
+ import { IChatVariablesService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
5
+ import './cellChatActions.js';
6
+ import { NotebookChatController } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController';
7
+ import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
8
+
9
+ let NotebookChatVariables = class NotebookChatVariables extends Disposable {
10
+ static { this.ID = 'workbench.contrib.notebookChatVariables'; }
11
+ constructor(_chatVariableService, _notebookEditorService) {
12
+ super();
13
+ this._chatVariableService = _chatVariableService;
14
+ this._notebookEditorService = _notebookEditorService;
15
+ this._register(this._chatVariableService.registerVariable({ id: '_notebookChatInput', name: '_notebookChatInput', description: '', hidden: true }, async (_message, _arg, model) => {
16
+ const editors = this._notebookEditorService.listNotebookEditors();
17
+ for (const editor of editors) {
18
+ const chatController = editor.getContribution(NotebookChatController.id);
19
+ if (chatController?.hasSession(model)) {
20
+ return chatController.getSessionInputUri();
21
+ }
22
+ }
23
+ return undefined;
24
+ }));
25
+ }
26
+ };
27
+ NotebookChatVariables = ( __decorate([
28
+ ( __param(0, IChatVariablesService)),
29
+ ( __param(1, INotebookEditorService))
30
+ ], NotebookChatVariables));
31
+ registerWorkbenchContribution2(NotebookChatVariables.ID, NotebookChatVariables, WorkbenchPhase.BlockRestore);
@@ -1,4 +1,5 @@
1
1
  import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
2
+ import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
2
3
  import { isEqual } from 'vscode/vscode/vs/base/common/resources';
3
4
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
4
5
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
@@ -6,13 +7,13 @@ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
6
7
  import { registerAction2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
7
8
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
8
9
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
10
+ import { EditorsOrder } from 'vscode/vscode/vs/workbench/common/editor';
9
11
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
10
- import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
11
12
  import { CTX_INLINE_CHAT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
12
13
  import { insertCell } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
13
14
  import { CTX_NOTEBOOK_CELL_CHAT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
14
15
  import { NotebookChatController } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController';
15
- import { NotebookAction, executeNotebookCondition, getContextFromUri, getContextFromActiveEditor, NotebookMultiCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, cellExecutionArgs, parseMultiCellExecutionArgs, CELL_TITLE_CELL_GROUP_ID, NotebookCellAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
16
+ import { NotebookAction, executeNotebookCondition, getContextFromUri, getContextFromActiveEditor, NotebookMultiCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, cellExecutionArgs, parseMultiCellExecutionArgs, CellToolbarOrder, CELL_TITLE_CELL_GROUP_ID, NotebookCellAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
16
17
  import { CellEditState, EXECUTE_CELL_COMMAND_ID, ScrollToRevealBehavior, CellFocusMode } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
17
18
  import { executeAllIcon, executeIcon, executeAboveIcon, executeBelowIcon, stopIcon, executingStateIcon, errorStateIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
18
19
  import { CellKind, NotebookSetting, CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
@@ -85,11 +86,6 @@ async function runCell(editorGroupsService, context) {
85
86
  if (!foundEditor) {
86
87
  return;
87
88
  }
88
- const controller = InlineChatController.get(foundEditor);
89
- if (!controller) {
90
- return;
91
- }
92
- controller.createSnapshot();
93
89
  }
94
90
  registerAction2(class RenderAllMarkdownCellsAction extends NotebookAction {
95
91
  constructor() {
@@ -153,7 +149,7 @@ registerAction2(class ExecuteNotebookAction extends NotebookAction {
153
149
  async runWithContext(accessor, context) {
154
150
  renderAllMarkdownCells(context);
155
151
  const editorService = accessor.get(IEditorService);
156
- const editor = editorService.getEditors(0 ).find(editor => editor.editor instanceof NotebookEditorInput && editor.editor.viewType === context.notebookEditor.textModel.viewType && ( (editor.editor.resource.toString())) === ( (context.notebookEditor.textModel.uri.toString())));
152
+ const editor = editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE).find(editor => editor.editor instanceof NotebookEditorInput && editor.editor.viewType === context.notebookEditor.textModel.viewType && ( (editor.editor.resource.toString())) === ( (context.notebookEditor.textModel.uri.toString())));
157
153
  const editorGroupService = accessor.get(IEditorGroupsService);
158
154
  if (editor) {
159
155
  const group = editorGroupService.getGroup(editor.groupId);
@@ -173,9 +169,9 @@ registerAction2(class ExecuteCell extends NotebookMultiCellAction {
173
169
  NOTEBOOK_CELL_LIST_FOCUSED,
174
170
  (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))
175
171
  ))),
176
- primary: 256 | 3 ,
172
+ primary: KeyMod.WinCtrl | KeyCode.Enter,
177
173
  win: {
178
- primary: 2048 | 512 | 3
174
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Enter
179
175
  },
180
176
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
181
177
  },
@@ -230,7 +226,7 @@ registerAction2(class ExecuteAboveCells extends NotebookMultiCellAction {
230
226
  },
231
227
  {
232
228
  id: MenuId.NotebookCellTitle,
233
- order: 1 ,
229
+ order: CellToolbarOrder.ExecuteAboveCells,
234
230
  group: CELL_TITLE_CELL_GROUP_ID,
235
231
  when: ( (ContextKeyExpr.and(
236
232
  executeCondition,
@@ -276,7 +272,7 @@ registerAction2(class ExecuteCellAndBelow extends NotebookMultiCellAction {
276
272
  },
277
273
  {
278
274
  id: MenuId.NotebookCellTitle,
279
- order: 2 ,
275
+ order: CellToolbarOrder.ExecuteCellAndBelow,
280
276
  group: CELL_TITLE_CELL_GROUP_ID,
281
277
  when: ( (ContextKeyExpr.and(
282
278
  executeCondition,
@@ -417,7 +413,7 @@ registerAction2(class ExecuteCellSelectBelow extends NotebookCellAction {
417
413
  NOTEBOOK_CELL_LIST_FOCUSED,
418
414
  (CTX_INLINE_CHAT_FOCUSED.negate())
419
415
  ))),
420
- primary: 1024 | 3 ,
416
+ primary: KeyMod.Shift | KeyCode.Enter,
421
417
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
422
418
  },
423
419
  });
@@ -480,7 +476,7 @@ registerAction2(class ExecuteCellInsertBelow extends NotebookCellAction {
480
476
  title: ( localizeWithPath(_moduleId, 8, "Execute Notebook Cell and Insert Below")),
481
477
  keybinding: {
482
478
  when: NOTEBOOK_CELL_LIST_FOCUSED,
483
- primary: 512 | 3 ,
479
+ primary: KeyMod.Alt | KeyCode.Enter,
484
480
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
485
481
  },
486
482
  });
@@ -1,9 +1,11 @@
1
1
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
+ import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
2
3
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
3
4
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
5
  import { registerAction2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
5
6
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
6
7
  import { InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
8
+ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
7
9
  import { insertCell } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
8
10
  import { NotebookAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
9
11
  import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
@@ -56,12 +58,12 @@ registerAction2(class InsertCodeCellAboveAction extends InsertCellCommand {
56
58
  id: INSERT_CODE_CELL_ABOVE_COMMAND_ID,
57
59
  title: ( localizeWithPath(_moduleId, 0, "Insert Code Cell Above")),
58
60
  keybinding: {
59
- primary: 2048 | 1024 | 3 ,
61
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
60
62
  when: ( (ContextKeyExpr.and(
61
63
  NOTEBOOK_CELL_LIST_FOCUSED,
62
64
  (InputFocusedContext.toNegated())
63
65
  ))),
64
- weight: 200
66
+ weight: KeybindingWeight.WorkbenchContrib
65
67
  },
66
68
  menu: {
67
69
  id: MenuId.NotebookCellInsert,
@@ -84,13 +86,13 @@ registerAction2(class InsertCodeCellBelowAction extends InsertCellCommand {
84
86
  id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
85
87
  title: ( localizeWithPath(_moduleId, 2, "Insert Code Cell Below")),
86
88
  keybinding: {
87
- primary: 2048 | 3 ,
89
+ primary: KeyMod.CtrlCmd | KeyCode.Enter,
88
90
  when: ( (ContextKeyExpr.and(
89
91
  NOTEBOOK_CELL_LIST_FOCUSED,
90
92
  (InputFocusedContext.toNegated()),
91
93
  (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
92
94
  ))),
93
- weight: 200
95
+ weight: KeybindingWeight.WorkbenchContrib
94
96
  },
95
97
  menu: {
96
98
  id: MenuId.NotebookCellInsert,
@@ -4,6 +4,7 @@ import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
4
4
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
5
5
  import { registerAction2, Action2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
6
6
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
7
+ import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
7
8
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
8
9
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
9
10
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
@@ -179,8 +180,8 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
179
180
  const qp = accessor.get(IQuickInputService).createQuickPick();
180
181
  qp.placeholder = ( localizeWithPath(_moduleId, 8, 'Settings file to save in'));
181
182
  qp.items = [
182
- { target: 2 , label: ( localizeWithPath(_moduleId, 9, 'User Settings')) },
183
- { target: 5 , label: ( localizeWithPath(_moduleId, 10, 'Workspace Settings')) },
183
+ { target: ConfigurationTarget.USER, label: ( localizeWithPath(_moduleId, 9, 'User Settings')) },
184
+ { target: ConfigurationTarget.WORKSPACE, label: ( localizeWithPath(_moduleId, 10, 'Workspace Settings')) },
184
185
  ];
185
186
  qp.onDidAccept(() => {
186
187
  const target = qp.selectedItems[0]?.target;
@@ -3,8 +3,10 @@ import { Action2, MenuId, registerAction2 } from 'vscode/vscode/vs/platform/acti
3
3
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
4
4
  import { NotebookOutlineContext } from '../contrib/outline/notebookOutline.js';
5
5
  import { FoldingController } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/foldingController';
6
+ import { CellFoldingState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
6
7
  import { executeIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
7
8
  import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
9
+ import { OutlineTarget } from 'vscode/vscode/vs/workbench/services/outline/browser/outline';
8
10
 
9
11
  const _moduleId = "vs/workbench/contrib/notebook/browser/controller/sectionActions";
10
12
  class NotebookRunSingleCellInSection extends Action2 {
@@ -24,7 +26,7 @@ class NotebookRunSingleCellInSection extends Action2 {
24
26
  order: 1,
25
27
  when: ( (ContextKeyExpr.and(
26
28
  (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)),
27
- (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
29
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)),
28
30
  (NotebookOutlineContext.CellHasChildren.toNegated()),
29
31
  (NotebookOutlineContext.CellHasHeader.toNegated())
30
32
  )))
@@ -60,7 +62,7 @@ class NotebookRunCellsInSection extends Action2 {
60
62
  order: 1,
61
63
  when: ( (ContextKeyExpr.and(
62
64
  (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
63
- (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
65
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)),
64
66
  NotebookOutlineContext.CellHasChildren,
65
67
  NotebookOutlineContext.CellHasHeader
66
68
  )))
@@ -101,10 +103,10 @@ class NotebookFoldSection extends Action2 {
101
103
  order: 2,
102
104
  when: ( (ContextKeyExpr.and(
103
105
  (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
104
- (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
106
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)),
105
107
  NotebookOutlineContext.CellHasChildren,
106
108
  NotebookOutlineContext.CellHasHeader,
107
- (NotebookOutlineContext.CellFoldingState.isEqualTo(1 ))
109
+ (NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Expanded))
108
110
  )))
109
111
  }
110
112
  ]
@@ -120,7 +122,7 @@ class NotebookFoldSection extends Action2 {
120
122
  const foldingController = notebookEditor.getContribution(FoldingController.id);
121
123
  const index = entry.index;
122
124
  const headerLevel = entry.level;
123
- const newFoldingState = 2 ;
125
+ const newFoldingState = CellFoldingState.Collapsed;
124
126
  foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
125
127
  }
126
128
  }
@@ -140,10 +142,10 @@ class NotebookExpandSection extends Action2 {
140
142
  order: 2,
141
143
  when: ( (ContextKeyExpr.and(
142
144
  (NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
143
- (NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
145
+ (NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)),
144
146
  NotebookOutlineContext.CellHasChildren,
145
147
  NotebookOutlineContext.CellHasHeader,
146
- (NotebookOutlineContext.CellFoldingState.isEqualTo(2 ))
148
+ (NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Collapsed))
147
149
  )))
148
150
  }
149
151
  ]
@@ -159,7 +161,7 @@ class NotebookExpandSection extends Action2 {
159
161
  const foldingController = notebookEditor.getContribution(FoldingController.id);
160
162
  const index = entry.index;
161
163
  const headerLevel = entry.level;
162
- const newFoldingState = 1 ;
164
+ const newFoldingState = CellFoldingState.Expanded;
163
165
  foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
164
166
  }
165
167
  }