@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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +26 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +56 -112
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
|
@@ -3,12 +3,12 @@ import { append, $, reset, scheduleAtNextAnimationFrame, getWindow } from 'vscod
|
|
|
3
3
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
5
5
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
-
import { PropertyFoldingState, SideBySideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON, OUTPUT_EDITOR_HEIGHT_MAGIC, outputEqual } from './diffElementViewModel.js';
|
|
6
|
+
import { PropertyFoldingState, SideBySideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON, OUTPUT_EDITOR_HEIGHT_MAGIC, OutputComparison, outputEqual } from './diffElementViewModel.js';
|
|
7
7
|
import { NOTEBOOK_DIFF_CELL_PROPERTY, NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED, DIFF_CELL_MARGIN, DiffSide, NOTEBOOK_DIFF_CELL_INPUT } from './notebookDiffEditorBrowser.js';
|
|
8
8
|
import { CodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
9
9
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
10
10
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
11
|
-
import { CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
|
+
import { CellEditType, CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
13
13
|
import { MenuItemAction, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
14
14
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
@@ -33,6 +33,7 @@ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeServi
|
|
|
33
33
|
import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
34
34
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
35
35
|
import { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPadding } from './diffCellEditorOptions.js';
|
|
36
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
36
37
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
37
38
|
import { DiffEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/diffEditor/diffEditorWidget';
|
|
38
39
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -388,7 +389,7 @@ class AbstractElementRenderer extends Disposable {
|
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
391
|
this.notebookEditor.textModel.applyEdits([
|
|
391
|
-
{ editType:
|
|
392
|
+
{ editType: CellEditType.Metadata, index, metadata: result }
|
|
392
393
|
], true, undefined, () => undefined, undefined, true);
|
|
393
394
|
}
|
|
394
395
|
catch {
|
|
@@ -503,7 +504,7 @@ class AbstractElementRenderer extends Disposable {
|
|
|
503
504
|
height: Math.min(OUTPUT_EDITOR_HEIGHT_MAGIC, this.cell.layoutInfo.rawOutputHeight || lineHeight * lineCount),
|
|
504
505
|
width: this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(), false, true)
|
|
505
506
|
},
|
|
506
|
-
accessibilityVerbose: this.configurationService.getValue(
|
|
507
|
+
accessibilityVerbose: this.configurationService.getValue(AccessibilityVerbositySettingId.DiffEditor) ?? false
|
|
507
508
|
}, {
|
|
508
509
|
originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
|
|
509
510
|
modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
|
|
@@ -1072,10 +1073,10 @@ let ModifiedElement = class ModifiedElement extends AbstractElementRenderer {
|
|
|
1072
1073
|
this._outputMetadataContainer = append(this._outputViewContainer, $('.output-view-container-metadata'));
|
|
1073
1074
|
const outputModified = this.cell.checkIfOutputsModified();
|
|
1074
1075
|
const outputMetadataChangeOnly = outputModified
|
|
1075
|
-
&& outputModified.kind ===
|
|
1076
|
+
&& outputModified.kind === OutputComparison.Metadata
|
|
1076
1077
|
&& this.cell.original.outputs.length === 1
|
|
1077
1078
|
&& this.cell.modified.outputs.length === 1
|
|
1078
|
-
&& outputEqual(this.cell.original.outputs[0], this.cell.modified.outputs[0]) ===
|
|
1079
|
+
&& outputEqual(this.cell.original.outputs[0], this.cell.modified.outputs[0]) === OutputComparison.Metadata;
|
|
1079
1080
|
if (outputModified && !outputMetadataChangeOnly) {
|
|
1080
1081
|
const originalOutputRenderListener = this.notebookEditor.onDidDynamicOutputRendered(e => {
|
|
1081
1082
|
if (( e.cell.uri.toString()) === ( this.cell.original.uri.toString()) && this.cell.checkIfOutputsModified()) {
|
|
@@ -4,10 +4,12 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
4
4
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { SideBySideDiffElementViewModel } from './diffElementViewModel.js';
|
|
6
6
|
import { DiffSide } from './notebookDiffEditorBrowser.js';
|
|
7
|
+
import { RenderOutputType } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
7
8
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
8
9
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
9
10
|
import { mimetypeIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
10
11
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
12
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
11
13
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
12
14
|
|
|
13
15
|
const _moduleId = "vs/workbench/contrib/notebook/browser/diff/diffElementOutputs";
|
|
@@ -51,7 +53,7 @@ class OutputElement extends Disposable {
|
|
|
51
53
|
}));
|
|
52
54
|
this.resizeListener.add((addDisposableListener(mimeTypePicker, EventType.KEY_DOWN, async (e) => {
|
|
53
55
|
const event = ( (new StandardKeyboardEvent(e)));
|
|
54
|
-
if ((event.equals(
|
|
56
|
+
if ((event.equals(KeyCode.Enter) || event.equals(KeyCode.Space))) {
|
|
55
57
|
e.preventDefault();
|
|
56
58
|
e.stopPropagation();
|
|
57
59
|
await this.pickActiveMimeTypeRenderer(this._notebookTextModel, this.output);
|
|
@@ -63,7 +65,7 @@ class OutputElement extends Disposable {
|
|
|
63
65
|
if (mimeTypes.length !== 0) {
|
|
64
66
|
const renderer = this._notebookService.getRendererInfo(pickedMimeTypeRenderer.rendererId);
|
|
65
67
|
result = renderer
|
|
66
|
-
? { type:
|
|
68
|
+
? { type: RenderOutputType.Extension, renderer, source: this.output, mimeType: pickedMimeTypeRenderer.mimeType }
|
|
67
69
|
: this._renderMissingRenderer(this.output, pickedMimeTypeRenderer.mimeType);
|
|
68
70
|
this.output.pickedMimeType = pickedMimeTypeRenderer;
|
|
69
71
|
}
|
|
@@ -103,14 +105,14 @@ class OutputElement extends Disposable {
|
|
|
103
105
|
const p = $('p', undefined, `No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.`);
|
|
104
106
|
const a = $('a', { href: `command:workbench.extensions.search?%22${query}%22`, class: 'monaco-button monaco-text-button', tabindex: 0, role: 'button', style: 'padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;' }, `Search Marketplace`);
|
|
105
107
|
return {
|
|
106
|
-
type:
|
|
108
|
+
type: RenderOutputType.Html,
|
|
107
109
|
source: viewModel,
|
|
108
110
|
htmlContent: p.outerHTML + a.outerHTML,
|
|
109
111
|
};
|
|
110
112
|
}
|
|
111
113
|
_renderMessage(viewModel, message) {
|
|
112
114
|
const el = $('p', undefined, message);
|
|
113
|
-
return { type:
|
|
115
|
+
return { type: RenderOutputType.Html, source: viewModel, htmlContent: el.outerHTML };
|
|
114
116
|
}
|
|
115
117
|
async pickActiveMimeTypeRenderer(notebookTextModel, viewModel) {
|
|
116
118
|
const [mimeTypes, currIndex] = viewModel.resolveMimeTypes(notebookTextModel, undefined);
|
|
@@ -321,11 +321,11 @@ class SideBySideDiffElementViewModel extends DiffElementViewModelBase {
|
|
|
321
321
|
return false;
|
|
322
322
|
}
|
|
323
323
|
const ret = outputsEqual(this.original?.outputs ?? [], this.modified?.outputs ?? []);
|
|
324
|
-
if (ret ===
|
|
324
|
+
if (ret === OutputComparison.Unchanged) {
|
|
325
325
|
return false;
|
|
326
326
|
}
|
|
327
327
|
return {
|
|
328
|
-
reason: ret ===
|
|
328
|
+
reason: ret === OutputComparison.Metadata ? 'Output metadata is changed' : undefined,
|
|
329
329
|
kind: ret
|
|
330
330
|
};
|
|
331
331
|
}
|
|
@@ -454,58 +454,64 @@ class SingleSideDiffElementViewModel extends DiffElementViewModelBase {
|
|
|
454
454
|
return this.cellViewModel;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
+
var OutputComparison;
|
|
458
|
+
( (function(OutputComparison) {
|
|
459
|
+
OutputComparison[OutputComparison["Unchanged"] = 0] = "Unchanged";
|
|
460
|
+
OutputComparison[OutputComparison["Metadata"] = 1] = "Metadata";
|
|
461
|
+
OutputComparison[OutputComparison["Other"] = 2] = "Other";
|
|
462
|
+
})(OutputComparison || (OutputComparison = {})));
|
|
457
463
|
function outputEqual(a, b) {
|
|
458
464
|
if (hash(a.metadata) === hash(b.metadata)) {
|
|
459
|
-
return
|
|
465
|
+
return OutputComparison.Other;
|
|
460
466
|
}
|
|
461
467
|
for (let j = 0; j < a.outputs.length; j++) {
|
|
462
468
|
const aOutputItem = a.outputs[j];
|
|
463
469
|
const bOutputItem = b.outputs[j];
|
|
464
470
|
if (aOutputItem.mime !== bOutputItem.mime) {
|
|
465
|
-
return
|
|
471
|
+
return OutputComparison.Other;
|
|
466
472
|
}
|
|
467
473
|
if (aOutputItem.data.buffer.length !== bOutputItem.data.buffer.length) {
|
|
468
|
-
return
|
|
474
|
+
return OutputComparison.Other;
|
|
469
475
|
}
|
|
470
476
|
for (let k = 0; k < aOutputItem.data.buffer.length; k++) {
|
|
471
477
|
if (aOutputItem.data.buffer[k] !== bOutputItem.data.buffer[k]) {
|
|
472
|
-
return
|
|
478
|
+
return OutputComparison.Other;
|
|
473
479
|
}
|
|
474
480
|
}
|
|
475
481
|
}
|
|
476
|
-
return
|
|
482
|
+
return OutputComparison.Metadata;
|
|
477
483
|
}
|
|
478
484
|
function outputsEqual(original, modified) {
|
|
479
485
|
if (original.length !== modified.length) {
|
|
480
|
-
return
|
|
486
|
+
return OutputComparison.Other;
|
|
481
487
|
}
|
|
482
488
|
const len = original.length;
|
|
483
489
|
for (let i = 0; i < len; i++) {
|
|
484
490
|
const a = original[i];
|
|
485
491
|
const b = modified[i];
|
|
486
492
|
if (hash(a.metadata) !== hash(b.metadata)) {
|
|
487
|
-
return
|
|
493
|
+
return OutputComparison.Metadata;
|
|
488
494
|
}
|
|
489
495
|
if (a.outputs.length !== b.outputs.length) {
|
|
490
|
-
return
|
|
496
|
+
return OutputComparison.Other;
|
|
491
497
|
}
|
|
492
498
|
for (let j = 0; j < a.outputs.length; j++) {
|
|
493
499
|
const aOutputItem = a.outputs[j];
|
|
494
500
|
const bOutputItem = b.outputs[j];
|
|
495
501
|
if (aOutputItem.mime !== bOutputItem.mime) {
|
|
496
|
-
return
|
|
502
|
+
return OutputComparison.Other;
|
|
497
503
|
}
|
|
498
504
|
if (aOutputItem.data.buffer.length !== bOutputItem.data.buffer.length) {
|
|
499
|
-
return
|
|
505
|
+
return OutputComparison.Other;
|
|
500
506
|
}
|
|
501
507
|
for (let k = 0; k < aOutputItem.data.buffer.length; k++) {
|
|
502
508
|
if (aOutputItem.data.buffer[k] !== bOutputItem.data.buffer[k]) {
|
|
503
|
-
return
|
|
509
|
+
return OutputComparison.Other;
|
|
504
510
|
}
|
|
505
511
|
}
|
|
506
512
|
}
|
|
507
513
|
}
|
|
508
|
-
return
|
|
514
|
+
return OutputComparison.Unchanged;
|
|
509
515
|
}
|
|
510
516
|
function getFormattedMetadataJSON(documentTextModel, metadata, language) {
|
|
511
517
|
let filteredMetadata = {};
|
|
@@ -560,4 +566,4 @@ function getFormattedOutputJSON(outputs) {
|
|
|
560
566
|
})), undefined, '\t');
|
|
561
567
|
}
|
|
562
568
|
|
|
563
|
-
export { DiffElementViewModelBase, OUTPUT_EDITOR_HEIGHT_MAGIC, PropertyFoldingState, SideBySideDiffElementViewModel, SingleSideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON, getStreamOutputData, outputEqual };
|
|
569
|
+
export { DiffElementViewModelBase, OUTPUT_EDITOR_HEIGHT_MAGIC, OutputComparison, PropertyFoldingState, SideBySideDiffElementViewModel, SingleSideDiffElementViewModel, getFormattedMetadataJSON, getFormattedOutputJSON, getStreamOutputData, outputEqual };
|
|
@@ -12,7 +12,9 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
12
12
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
13
13
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
14
14
|
import { DEFAULT_EDITOR_ASSOCIATION } from 'vscode/vscode/vs/workbench/common/editor';
|
|
15
|
-
import {
|
|
15
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
16
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
17
|
+
import { CellEditType, NOTEBOOK_DIFF_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
18
|
|
|
17
19
|
const _moduleId = "vs/workbench/contrib/notebook/browser/diff/notebookDiffActions";
|
|
18
20
|
registerAction2(class extends Action2 {
|
|
@@ -120,7 +122,7 @@ registerAction2(class extends Action2 {
|
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
122
124
|
context.cell.mainDocumentTextModel.applyEdits([{
|
|
123
|
-
editType:
|
|
125
|
+
editType: CellEditType.Output, index: modifiedCellIndex, outputs: original.outputs
|
|
124
126
|
}], true, undefined, () => undefined, undefined, true);
|
|
125
127
|
}
|
|
126
128
|
});
|
|
@@ -203,8 +205,8 @@ registerAction2(class extends Action2 {
|
|
|
203
205
|
icon: previousChangeIcon,
|
|
204
206
|
f1: false,
|
|
205
207
|
keybinding: {
|
|
206
|
-
primary:
|
|
207
|
-
weight:
|
|
208
|
+
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3,
|
|
209
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
208
210
|
when: ( (ActiveEditorContext.isEqualTo(NotebookTextDiffEditor.ID)))
|
|
209
211
|
},
|
|
210
212
|
menu: {
|
|
@@ -231,8 +233,8 @@ registerAction2(class extends Action2 {
|
|
|
231
233
|
icon: nextChangeIcon,
|
|
232
234
|
f1: false,
|
|
233
235
|
keybinding: {
|
|
234
|
-
primary:
|
|
235
|
-
weight:
|
|
236
|
+
primary: KeyMod.Alt | KeyCode.F3,
|
|
237
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
236
238
|
when: ( (ActiveEditorContext.isEqualTo(NotebookTextDiffEditor.ID)))
|
|
237
239
|
},
|
|
238
240
|
menu: {
|
|
@@ -6,6 +6,7 @@ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storag
|
|
|
6
6
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
7
7
|
import { registerThemingParticipant } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
8
8
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
9
|
+
import { EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from 'vscode/vscode/vs/workbench/common/editor';
|
|
9
10
|
import { getDefaultNotebookCreationOptions } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget';
|
|
10
11
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
11
12
|
import { SideBySideDiffElementViewModel, SingleSideDiffElementViewModel } from './diffElementViewModel.js';
|
|
@@ -54,17 +55,17 @@ class NotebookDiffEditorSelection {
|
|
|
54
55
|
}
|
|
55
56
|
compare(other) {
|
|
56
57
|
if (!(other instanceof NotebookDiffEditorSelection)) {
|
|
57
|
-
return
|
|
58
|
+
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
58
59
|
}
|
|
59
60
|
if (this.selections.length !== other.selections.length) {
|
|
60
|
-
return
|
|
61
|
+
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
61
62
|
}
|
|
62
63
|
for (let i = 0; i < this.selections.length; i++) {
|
|
63
64
|
if (this.selections[i] !== other.selections[i]) {
|
|
64
|
-
return
|
|
65
|
+
return EditorPaneSelectionCompareResult.DIFFERENT;
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
return
|
|
68
|
+
return EditorPaneSelectionCompareResult.IDENTICAL;
|
|
68
69
|
}
|
|
69
70
|
restore(options) {
|
|
70
71
|
const notebookOptions = {
|
|
@@ -261,7 +262,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
261
262
|
this._register(this._list.onDidScroll(() => {
|
|
262
263
|
this._onDidScroll.fire();
|
|
263
264
|
}));
|
|
264
|
-
this._register(this._list.onDidChangeFocus(() => this._onDidChangeSelection.fire({ reason:
|
|
265
|
+
this._register(this._list.onDidChangeFocus(() => this._onDidChangeSelection.fire({ reason: EditorPaneSelectionChangeReason.USER })));
|
|
265
266
|
this._overviewRulerContainer = document.createElement('div');
|
|
266
267
|
this._overviewRulerContainer.classList.add('notebook-overview-ruler-container');
|
|
267
268
|
this._rootElement.appendChild(this._overviewRulerContainer);
|