@codingame/monaco-vscode-notebook-service-override 3.2.2 → 4.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 (35) hide show
  1. package/notebook.js +1 -1
  2. package/override/vs/platform/dialogs/common/dialogs.js +2 -0
  3. package/package.json +2 -2
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +9 -7
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -5
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +11 -1
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +3 -3
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +9 -7
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +1 -0
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +3 -1
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +293 -20
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +16 -10
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +107 -20
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +15 -1
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +1 -1
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +48 -0
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +199 -0
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +2 -0
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -7
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +7 -0
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +47 -26
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +6 -4
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +11 -1
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +20 -7
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +1 -0
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +15 -5
  29. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +54 -55
  30. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +3 -2
  31. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +11 -1
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +0 -608
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -31
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +0 -744
  35. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +0 -237
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
- import { getWindowById, append, $ as $$1, getWindow, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, getActiveWindow, scheduleAtNextAnimationFrame } from 'vscode/vscode/vs/base/browser/dom';
3
+ import { append, $ as $$1, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, scheduleAtNextAnimationFrame } from 'vscode/vscode/vs/base/browser/dom';
4
4
  import { findLastIdx } from 'vscode/vscode/vs/base/common/arraysFind';
5
5
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
6
6
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
@@ -11,7 +11,17 @@ import { SideBySideDiffElementViewModel, SingleSideDiffElementViewModel } from '
11
11
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
12
12
  import { CellDiffSingleSideRenderer, CellDiffSideBySideRenderer, NotebookTextDiffList, NotebookCellTextDiffListDelegate } from './notebookDiffList.js';
13
13
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
14
- import { editorBackground, foreground, focusBorder, diffDiagonalFill } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
14
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
15
+ import { foreground, focusBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
16
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
17
+ import { editorBackground, diffDiagonalFill } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
18
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
19
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
20
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
21
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
22
+ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
23
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
24
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
15
25
  import { INotebookEditorWorkerService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService';
16
26
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
17
27
  import { BareFontInfo } from 'vscode/vscode/vs/editor/common/config/fontInfo';
@@ -32,7 +42,6 @@ import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contr
32
42
  import { cellRangesToIndexes, cellIndexesToRanges } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookRange';
33
43
  import { NotebookDiffOverviewRuler } from './notebookDiffOverviewRuler.js';
34
44
  import { registerZIndex, ZIndex } from 'vscode/vscode/vs/platform/layout/browser/zIndexRegistry';
35
- import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
36
45
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
37
46
 
38
47
  var NotebookTextDiffEditor_1;
@@ -76,8 +85,8 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
76
85
  get isDisposed() {
77
86
  return this._isDisposed;
78
87
  }
79
- constructor(instantiationService, themeService, contextKeyService, notebookEditorWorkerService, configurationService, telemetryService, storageService, notebookExecutionStateService, codeEditorService) {
80
- super(NotebookTextDiffEditor_1.ID, telemetryService, themeService, storageService);
88
+ constructor(group, instantiationService, themeService, contextKeyService, notebookEditorWorkerService, configurationService, telemetryService, storageService, notebookExecutionStateService, codeEditorService) {
89
+ super(NotebookTextDiffEditor_1.ID, group, telemetryService, themeService, storageService);
81
90
  this.instantiationService = instantiationService;
82
91
  this.contextKeyService = contextKeyService;
83
92
  this.notebookEditorWorkerService = notebookEditorWorkerService;
@@ -92,6 +101,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
92
101
  this.onMouseUp = this._onMouseUp.event;
93
102
  this._onDidScroll = this._register(( new Emitter()));
94
103
  this.onDidScroll = this._onDidScroll.event;
104
+ this.onDidChangeScroll = this._onDidScroll.event;
95
105
  this._model = null;
96
106
  this._modifiedResourceDisposableStore = this._register(( new DisposableStore()));
97
107
  this._insetModifyQueueByOutputId = ( new SequencerByKey());
@@ -103,7 +113,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
103
113
  this._isDisposed = false;
104
114
  this.pendingLayouts = ( new WeakMap());
105
115
  this._notebookOptions = ( new NotebookOptions(
106
- getWindowById(this.group?.windowId, true).window ?? mainWindow,
116
+ this.window,
107
117
  this.configurationService,
108
118
  notebookExecutionStateService,
109
119
  codeEditorService,
@@ -119,9 +129,8 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
119
129
  return this._fontInfo;
120
130
  }
121
131
  createFontInfo() {
122
- const window = getWindowById(this.group?.windowId, true).window;
123
132
  const editorOptions = this.configurationService.getValue('editor');
124
- return FontMeasurements.readFontInfo(window, BareFontInfo.createFromRawSettings(editorOptions, PixelRatio.getInstance(window).value));
133
+ return FontMeasurements.readFontInfo(this.window, BareFontInfo.createFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value));
125
134
  }
126
135
  isOverviewRulerEnabled() {
127
136
  return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
@@ -146,6 +155,21 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
146
155
  getScrollHeight() {
147
156
  return this._list?.scrollHeight ?? 0;
148
157
  }
158
+ getScrollPosition() {
159
+ return {
160
+ scrollTop: this.getScrollTop(),
161
+ scrollLeft: this._list?.scrollLeft ?? 0
162
+ };
163
+ }
164
+ setScrollPosition(scrollPosition) {
165
+ if (!this._list) {
166
+ return;
167
+ }
168
+ this._list.scrollTop = scrollPosition.scrollTop;
169
+ if (scrollPosition.scrollLeft !== undefined) {
170
+ this._list.scrollLeft = scrollPosition.scrollLeft;
171
+ }
172
+ }
149
173
  delegateVerticalScrollbarPointerDown(browserEvent) {
150
174
  this._list?.delegateVerticalScrollbarPointerDown(browserEvent);
151
175
  }
@@ -189,7 +213,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
189
213
  this.instantiationService.createInstance(CellDiffSideBySideRenderer, this),
190
214
  ];
191
215
  this._listViewContainer = append(this._rootElement, $$1('.notebook-diff-list-view'));
192
- this._list = this.instantiationService.createInstance(NotebookTextDiffList, 'NotebookTextDiff', this._listViewContainer, this.instantiationService.createInstance(NotebookCellTextDiffListDelegate, getWindow(this._listViewContainer)), renderers, this.contextKeyService, {
216
+ this._list = this.instantiationService.createInstance(NotebookTextDiffList, 'NotebookTextDiff', this._listViewContainer, this.instantiationService.createInstance(NotebookCellTextDiffListDelegate, this.window), renderers, this.contextKeyService, {
193
217
  setRowLineHeight: false,
194
218
  setRowHeight: false,
195
219
  supportDynamicHeights: true,
@@ -343,7 +367,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
343
367
  _attachModel() {
344
368
  this._eventDispatcher = ( new NotebookDiffEditorEventDispatcher());
345
369
  const updateInsets = () => {
346
- scheduleAtNextAnimationFrame(getWindow(this._listViewContainer), () => {
370
+ scheduleAtNextAnimationFrame(this.window, () => {
347
371
  if (this._isDisposed) {
348
372
  return;
349
373
  }
@@ -373,7 +397,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
373
397
  fontFamily: this._generateFontFamily()
374
398
  }, undefined);
375
399
  this._list.rowsContainer.insertAdjacentElement('afterbegin', this._modifiedWebview.element);
376
- this._modifiedWebview.createWebview(getActiveWindow());
400
+ this._modifiedWebview.createWebview(this.window);
377
401
  this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
378
402
  this._modifiedWebview.element.style.left = `calc(50%)`;
379
403
  }
@@ -387,7 +411,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
387
411
  fontFamily: this._generateFontFamily()
388
412
  }, undefined);
389
413
  this._list.rowsContainer.insertAdjacentElement('afterbegin', this._originalWebview.element);
390
- this._originalWebview.createWebview(getActiveWindow());
414
+ this._originalWebview.createWebview(this.window);
391
415
  this._originalWebview.element.style.width = `calc(50% - 16px)`;
392
416
  this._originalWebview.element.style.left = `16px`;
393
417
  }
@@ -595,7 +619,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
595
619
  diffSide = diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original;
596
620
  }
597
621
  const webview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
598
- scheduleAtNextAnimationFrame(getWindow(this._listViewContainer), () => {
622
+ scheduleAtNextAnimationFrame(this.window, () => {
599
623
  webview?.ackHeight([{ cellId: cellInfo.cellId, outputId, height }]);
600
624
  }, 10);
601
625
  }
@@ -607,7 +631,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
607
631
  this.pendingLayouts.get(cell).dispose();
608
632
  }
609
633
  let r;
610
- const layoutDisposable = scheduleAtNextAnimationFrame(getWindow(this._listViewContainer), () => {
634
+ const layoutDisposable = scheduleAtNextAnimationFrame(this.window, () => {
611
635
  this.pendingLayouts.delete(cell);
612
636
  relayout(cell, height);
613
637
  r();
@@ -752,9 +776,6 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
752
776
  getControl() {
753
777
  return this;
754
778
  }
755
- setEditorVisible(visible, group) {
756
- super.setEditorVisible(visible, group);
757
- }
758
779
  clearInput() {
759
780
  super.clearInput();
760
781
  this._modifiedResourceDisposableStore.clear();
@@ -859,15 +880,15 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
859
880
  }
860
881
  };
861
882
  NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( __decorate([
862
- ( __param(0, IInstantiationService)),
863
- ( __param(1, IThemeService)),
864
- ( __param(2, IContextKeyService)),
865
- ( __param(3, INotebookEditorWorkerService)),
866
- ( __param(4, IConfigurationService)),
867
- ( __param(5, ITelemetryService)),
868
- ( __param(6, IStorageService)),
869
- ( __param(7, INotebookExecutionStateService)),
870
- ( __param(8, ICodeEditorService))
883
+ ( __param(1, IInstantiationService)),
884
+ ( __param(2, IThemeService)),
885
+ ( __param(3, IContextKeyService)),
886
+ ( __param(4, INotebookEditorWorkerService)),
887
+ ( __param(5, IConfigurationService)),
888
+ ( __param(6, ITelemetryService)),
889
+ ( __param(7, IStorageService)),
890
+ ( __param(8, INotebookExecutionStateService)),
891
+ ( __param(9, ICodeEditorService))
871
892
  ], NotebookTextDiffEditor));
872
893
  registerZIndex(ZIndex.Base, 10, 'notebook-diff-view-viewport-slider');
873
894
  registerThemingParticipant((theme, collector) => {
@@ -11,7 +11,7 @@ import { WorkbenchList, IListService } from 'vscode/vscode/vs/platform/list/brow
11
11
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
12
12
  import { DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
13
13
  import { InsertElement, DeletedElement, getOptimizedNestedCodeEditorWidgetOptions, ModifiedElement } from './diffComponents.js';
14
- import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditorWidget';
14
+ import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
15
15
  import { DiffEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/diffEditorWidget';
16
16
  import { MenuItemAction, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
17
17
  import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
@@ -157,11 +157,11 @@ let CellDiffSideBySideRenderer = class CellDiffSideBySideRenderer {
157
157
  const inputToolbarContainer = append(sourceContainer, $('.editor-input-toolbar-container'));
158
158
  const cellToolbarContainer = append(inputToolbarContainer, $('div.property-toolbar'));
159
159
  const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, cellToolbarContainer, {
160
- actionViewItemProvider: action => {
160
+ actionViewItemProvider: (action, options) => {
161
161
  if (action instanceof MenuItemAction) {
162
162
  const item = ( new CodiconActionViewItem(
163
163
  action,
164
- undefined,
164
+ { hoverDelegate: options.hoverDelegate },
165
165
  this.keybindingService,
166
166
  this.notificationService,
167
167
  this.contextKeyService,
@@ -217,7 +217,9 @@ let CellDiffSideBySideRenderer = class CellDiffSideBySideRenderer {
217
217
  dimension: {
218
218
  height: 0,
219
219
  width: 0
220
- }
220
+ },
221
+ renderSideBySide: true,
222
+ useInlineViewWhenSpaceIsLimited: false
221
223
  }, {
222
224
  originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
223
225
  modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
@@ -4,7 +4,17 @@ import { createFastDomNode } from 'vscode/vscode/vs/base/browser/fastDomNode';
4
4
  import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
5
5
  import { Color } from 'vscode/vscode/vs/base/common/color';
6
6
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
7
- import { diffOverviewRulerInserted, diffInserted, defaultInsertColor, diffOverviewRulerRemoved, diffRemoved, defaultRemoveColor } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
7
+ import 'vscode/vscode/vs/platform/theme/common/colorUtils';
8
+ import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
9
+ import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
10
+ import { diffOverviewRulerInserted, diffInserted, defaultInsertColor, diffOverviewRulerRemoved, diffRemoved, defaultRemoveColor } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
11
+ import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
12
+ import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
13
+ import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
14
+ import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
15
+ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
16
+ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
17
+ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
8
18
  import { Themable, IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
9
19
 
10
20
  const MINIMUM_SLIDER_SIZE = 20;
@@ -21,7 +21,7 @@ import { NotebookEditor } from 'vscode/vscode/vs/workbench/contrib/notebook/brow
21
21
  import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
22
22
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
23
23
  import './services/notebookServiceImpl.js';
24
- import { NotebookSetting, CellUri, NotebookWorkingCopyTypeIdentifier, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
24
+ import { NotebookSetting, CellUri, CellKind, NotebookWorkingCopyTypeIdentifier } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
25
25
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
26
26
  import { IUndoRedoService } from 'vscode/vscode/vs/platform/undoRedo/common/undoRedo';
27
27
  import { INotebookEditorModelResolverService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService';
@@ -32,6 +32,7 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
32
32
  import './services/notebookEditorServiceImpl.js';
33
33
  import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
34
34
  import { getFormattedMetadataJSON, getStreamOutputData } from './diff/diffElementViewModel.js';
35
+ import '../common/notebookEditorModelResolverServiceImpl.js';
35
36
  import './services/notebookKernelServiceImpl.js';
36
37
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
37
38
  import { IWorkingCopyEditorService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService';
@@ -42,6 +43,7 @@ import './services/notebookRendererMessagingServiceImpl.js';
42
43
  import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
43
44
  import './controller/insertCellActions.js';
44
45
  import './controller/executeActions.js';
46
+ import './controller/sectionActions.js';
45
47
  import './controller/layoutActions.js';
46
48
  import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/editActions';
47
49
  import 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/cellOutputActions';
@@ -64,7 +66,7 @@ import './contrib/cellStatusBar/contributedStatusBarItemController.js';
64
66
  import 'vscode/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController';
65
67
  import './contrib/editorStatusBar/editorStatusBar.js';
66
68
  import './contrib/undoRedo/notebookUndoRedo.js';
67
- import './contrib/cellCommands/cellCommands.js';
69
+ import 'vscode/vscode/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands';
68
70
  import './contrib/viewportWarmup/viewportWarmup.js';
69
71
  import './contrib/troubleshoot/layout.js';
70
72
  import './contrib/debug/notebookBreakpoints.js';
@@ -76,14 +78,16 @@ import './diff/notebookDiffActions.js';
76
78
  import { editorOptionsRegistry } from 'vscode/vscode/vs/editor/common/config/editorOptions';
77
79
  import './services/notebookExecutionStateServiceImpl.js';
78
80
  import './services/notebookExecutionServiceImpl.js';
81
+ import 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
79
82
  import './services/notebookKeymapServiceImpl.js';
80
83
  import { PLAINTEXT_LANGUAGE_ID } from 'vscode/vscode/vs/editor/common/languages/modesRegistry';
84
+ import 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
81
85
  import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
82
86
  import { COMMENTEDITOR_DECORATION_KEY } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentReply';
83
87
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
84
88
  import './services/notebookKernelHistoryServiceImpl.js';
85
89
  import './services/notebookLoggingServiceImpl.js';
86
- import product from 'vscode/vscode/vs/platform/product/common/product';
90
+ import product$1 from 'vscode/vscode/vs/platform/product/common/product';
87
91
  import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
88
92
  import { runAccessibilityHelpAction, showAccessibleOutput } from './notebookAccessibility.js';
89
93
  import { IAccessibleViewService } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleView';
@@ -971,7 +975,7 @@ configurationRegistry.registerConfiguration({
971
975
  )),
972
976
  type: 'boolean',
973
977
  tags: ['notebookLayout', 'notebookOutputLayout'],
974
- default: typeof product.quality === 'string' && product.quality !== 'stable'
978
+ default: typeof product$1.quality === 'string' && product$1.quality !== 'stable'
975
979
  },
976
980
  [NotebookSetting.outputWordWrap]: {
977
981
  markdownDescription: ( localizeWithPath(
@@ -1091,7 +1095,7 @@ configurationRegistry.registerConfiguration({
1091
1095
  "Enables the incremental saving of notebooks in Remote environment. When enabled, only the changes to the notebook are sent to the extension host, improving performance for large notebooks and slow network connections."
1092
1096
  )),
1093
1097
  type: 'boolean',
1094
- default: typeof product.quality === 'string' && product.quality !== 'stable'
1098
+ default: typeof product$1.quality === 'string' && product$1.quality !== 'stable'
1095
1099
  },
1096
1100
  [NotebookSetting.scrollToRevealCell]: {
1097
1101
  markdownDescription: ( localizeWithPath(
@@ -1154,7 +1158,7 @@ configurationRegistry.registerConfiguration({
1154
1158
  markdownDescription: ( localizeWithPath(
1155
1159
  'vs/workbench/contrib/notebook/browser/notebook.contribution',
1156
1160
  'notebook.cellChat',
1157
- "Enable experimental cell chat for notebooks."
1161
+ "Enable experimental floating chat widget in notebooks."
1158
1162
  )),
1159
1163
  type: 'boolean',
1160
1164
  default: false
@@ -1167,7 +1171,16 @@ configurationRegistry.registerConfiguration({
1167
1171
  )),
1168
1172
  type: 'boolean',
1169
1173
  default: false
1170
- }
1174
+ },
1175
+ [NotebookSetting.cellFailureDiagnostics]: {
1176
+ markdownDescription: ( localizeWithPath(
1177
+ 'vs/workbench/contrib/notebook/browser/notebook.contribution',
1178
+ 'notebook.cellFailureDiagnostics',
1179
+ "Show available diagnostics for cell failures."
1180
+ )),
1181
+ type: 'boolean',
1182
+ default: true
1183
+ },
1171
1184
  }
1172
1185
  });
1173
1186
 
@@ -126,7 +126,7 @@ function showAccessibleOutput(accessibleViewService, editorService) {
126
126
  }
127
127
  let text = `${mimeType}`;
128
128
  if (buffer) {
129
- const charLimit = 100000;
129
+ const charLimit = 100_000;
130
130
  text = decoder.decode(buffer.data.slice(0, charLimit).buffer);
131
131
  if (buffer.data.byteLength > charLimit) {
132
132
  text = text + '...(truncated)';
@@ -452,6 +452,7 @@ let CellExecution = class CellExecution extends Disposable {
452
452
  lastRunSuccess: completionData.lastRunSuccess,
453
453
  runStartTime: this._didPause ? null : cellModel.internalMetadata.runStartTime,
454
454
  runEndTime: this._didPause ? null : completionData.runEndTime,
455
+ error: completionData.error
455
456
  }
456
457
  };
457
458
  this._applyExecutionEdits([edit]);
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
3
3
  import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { LRUCache, ResourceMap } from 'vscode/vscode/vs/base/common/map';
4
+ import { ResourceMap, LRUCache } from 'vscode/vscode/vs/base/common/map';
5
5
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
6
6
  import { URI } from 'vscode/vscode/vs/base/common/uri';
7
7
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
@@ -1,4 +1,7 @@
1
1
  class MoveCellEdit {
2
+ get label() {
3
+ return this.length === 1 ? 'Move Cell' : 'Move Cells';
4
+ }
2
5
  constructor(resource, fromIndex, length, toIndex, editingDelegate, beforedSelections, endSelections) {
3
6
  this.resource = resource;
4
7
  this.fromIndex = fromIndex;
@@ -8,8 +11,7 @@ class MoveCellEdit {
8
11
  this.beforedSelections = beforedSelections;
9
12
  this.endSelections = endSelections;
10
13
  this.type = 0 ;
11
- this.label = 'Move Cell';
12
- this.code = 'undoredo.notebooks.moveCell';
14
+ this.code = 'undoredo.textBufferEdit';
13
15
  }
14
16
  undo() {
15
17
  if (!this.editingDelegate.moveCell) {
@@ -25,6 +27,15 @@ class MoveCellEdit {
25
27
  }
26
28
  }
27
29
  class SpliceCellsEdit {
30
+ get label() {
31
+ if (this.diffs.length === 1 && this.diffs[0][1].length === 0) {
32
+ return this.diffs[0][2].length > 1 ? 'Insert Cells' : 'Insert Cell';
33
+ }
34
+ if (this.diffs.length === 1 && this.diffs[0][2].length === 0) {
35
+ return this.diffs[0][1].length > 1 ? 'Delete Cells' : 'Delete Cell';
36
+ }
37
+ return 'Insert Cell';
38
+ }
28
39
  constructor(resource, diffs, editingDelegate, beforeHandles, endHandles) {
29
40
  this.resource = resource;
30
41
  this.diffs = diffs;
@@ -32,8 +43,7 @@ class SpliceCellsEdit {
32
43
  this.beforeHandles = beforeHandles;
33
44
  this.endHandles = endHandles;
34
45
  this.type = 0 ;
35
- this.label = 'Insert Cell';
36
- this.code = 'undoredo.notebooks.insertCell';
46
+ this.code = 'undoredo.textBufferEdit';
37
47
  }
38
48
  undo() {
39
49
  if (!this.editingDelegate.replaceCell) {
@@ -61,7 +71,7 @@ class CellMetadataEdit {
61
71
  this.editingDelegate = editingDelegate;
62
72
  this.type = 0 ;
63
73
  this.label = 'Update Cell Metadata';
64
- this.code = 'undoredo.notebooks.updateCellMetadata';
74
+ this.code = 'undoredo.textBufferEdit';
65
75
  }
66
76
  undo() {
67
77
  if (!this.editingDelegate.updateCellMetadata) {