@codingame/monaco-vscode-notebook-service-override 3.2.3 → 4.1.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/notebook.js +13 -13
- package/package.json +2 -2
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/external/tslib/tslib.es6.js +0 -11
- package/override/vs/platform/dialogs/common/dialogs.js +0 -8
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +0 -389
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +0 -608
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +0 -109
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +0 -173
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +0 -488
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +0 -106
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +0 -165
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +0 -320
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +0 -72
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +0 -168
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +0 -209
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +0 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +0 -82
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +0 -393
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +0 -97
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +0 -118
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +0 -148
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +0 -383
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +0 -511
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +0 -159
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +0 -94
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -565
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +0 -744
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +0 -707
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -351
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +0 -267
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -45
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1297
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -284
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -563
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +0 -313
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -890
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -393
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -175
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +0 -1174
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -159
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +0 -451
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +0 -192
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +0 -106
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +0 -509
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +0 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +0 -341
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +0 -641
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +0 -1003
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -103
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +0 -202
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +0 -98
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +0 -237
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +0 -89
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +0 -376
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +0 -408
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +0 -144
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +0 -129
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
4
|
-
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
5
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
6
|
-
import { getNotebookEditorFromEditorPane, CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
7
|
-
import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
8
|
-
|
|
9
|
-
let NotebookUndoRedoContribution = class NotebookUndoRedoContribution extends Disposable {
|
|
10
|
-
static { this.ID = 'workbench.contrib.notebookUndoRedo'; }
|
|
11
|
-
constructor(_editorService) {
|
|
12
|
-
super();
|
|
13
|
-
this._editorService = _editorService;
|
|
14
|
-
const PRIORITY = 105;
|
|
15
|
-
this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
|
|
16
|
-
const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
|
|
17
|
-
const viewModel = editor?.getViewModel();
|
|
18
|
-
if (editor && editor.hasModel() && viewModel) {
|
|
19
|
-
return viewModel.undo().then(cellResources => {
|
|
20
|
-
if (cellResources?.length) {
|
|
21
|
-
for (let i = 0; i < editor.getLength(); i++) {
|
|
22
|
-
const cell = editor.cellAt(i);
|
|
23
|
-
if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
|
|
24
|
-
cell.updateEditState(CellEditState.Editing, 'undo');
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
editor?.setOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true });
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
}));
|
|
33
|
-
this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-undo-redo', () => {
|
|
34
|
-
const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
|
|
35
|
-
const viewModel = editor?.getViewModel();
|
|
36
|
-
if (editor && editor.hasModel() && viewModel) {
|
|
37
|
-
return viewModel.redo().then(cellResources => {
|
|
38
|
-
if (cellResources?.length) {
|
|
39
|
-
for (let i = 0; i < editor.getLength(); i++) {
|
|
40
|
-
const cell = editor.cellAt(i);
|
|
41
|
-
if (cell.cellKind === CellKind.Markup && cellResources.find(resource => resource.fragment === cell.model.uri.fragment)) {
|
|
42
|
-
cell.updateEditState(CellEditState.Editing, 'redo');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
editor?.setOptions({ cellOptions: { resource: cellResources[0] }, preserveFocus: true });
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return false;
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
NotebookUndoRedoContribution = ( __decorate([
|
|
54
|
-
( __param(0, IEditorService))
|
|
55
|
-
], NotebookUndoRedoContribution));
|
|
56
|
-
registerWorkbenchContribution2(NotebookUndoRedoContribution.ID, NotebookUndoRedoContribution, 2 );
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
3
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
5
|
-
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
6
|
-
import { registerNotebookContribution } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
7
|
-
import { outputDisplayLimit } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
|
8
|
-
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
9
|
-
import { cellRangesToIndexes } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookRange';
|
|
10
|
-
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
11
|
-
|
|
12
|
-
let NotebookViewportContribution = class NotebookViewportContribution extends Disposable {
|
|
13
|
-
static { this.id = 'workbench.notebook.viewportWarmup'; }
|
|
14
|
-
constructor(_notebookEditor, _notebookService, accessibilityService) {
|
|
15
|
-
super();
|
|
16
|
-
this._notebookEditor = _notebookEditor;
|
|
17
|
-
this._notebookService = _notebookService;
|
|
18
|
-
this._warmupDocument = null;
|
|
19
|
-
this._warmupViewport = ( new RunOnceScheduler(() => this._warmupViewportNow(), 200));
|
|
20
|
-
this._register(this._warmupViewport);
|
|
21
|
-
this._register(this._notebookEditor.onDidScroll(() => {
|
|
22
|
-
this._warmupViewport.schedule();
|
|
23
|
-
}));
|
|
24
|
-
this._warmupDocument = ( new RunOnceScheduler(() => this._warmupDocumentNow(), 200));
|
|
25
|
-
this._register(this._warmupDocument);
|
|
26
|
-
this._register(this._notebookEditor.onDidAttachViewModel(() => {
|
|
27
|
-
if (this._notebookEditor.hasModel()) {
|
|
28
|
-
this._warmupDocument?.schedule();
|
|
29
|
-
}
|
|
30
|
-
}));
|
|
31
|
-
if (this._notebookEditor.hasModel()) {
|
|
32
|
-
this._warmupDocument?.schedule();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
_warmupDocumentNow() {
|
|
36
|
-
if (this._notebookEditor.hasModel()) {
|
|
37
|
-
for (let i = 0; i < this._notebookEditor.getLength(); i++) {
|
|
38
|
-
const cell = this._notebookEditor.cellAt(i);
|
|
39
|
-
if (cell?.cellKind === CellKind.Markup && cell?.getEditState() === CellEditState.Preview && !cell.isInputCollapsed) ;
|
|
40
|
-
else if (cell?.cellKind === CellKind.Code) {
|
|
41
|
-
this._warmupCodeCell(cell);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
_warmupViewportNow() {
|
|
47
|
-
if (this._notebookEditor.isDisposed) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (!this._notebookEditor.hasModel()) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const visibleRanges = this._notebookEditor.getVisibleRangesPlusViewportAboveAndBelow();
|
|
54
|
-
cellRangesToIndexes(visibleRanges).forEach(index => {
|
|
55
|
-
const cell = this._notebookEditor.cellAt(index);
|
|
56
|
-
if (cell?.cellKind === CellKind.Markup && cell?.getEditState() === CellEditState.Preview && !cell.isInputCollapsed) {
|
|
57
|
-
this._notebookEditor.createMarkupPreview(cell);
|
|
58
|
-
}
|
|
59
|
-
else if (cell?.cellKind === CellKind.Code) {
|
|
60
|
-
this._warmupCodeCell(cell);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
_warmupCodeCell(viewCell) {
|
|
65
|
-
if (viewCell.isOutputCollapsed) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const outputs = viewCell.outputsViewModels;
|
|
69
|
-
for (const output of outputs.slice(0, outputDisplayLimit)) {
|
|
70
|
-
const [mimeTypes, pick] = output.resolveMimeTypes(this._notebookEditor.textModel, undefined);
|
|
71
|
-
if (!mimeTypes.find(mimeType => mimeType.isTrusted) || mimeTypes.length === 0) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
const pickedMimeTypeRenderer = mimeTypes[pick];
|
|
75
|
-
if (!pickedMimeTypeRenderer) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (!this._notebookEditor.hasModel()) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const renderer = this._notebookService.getRendererInfo(pickedMimeTypeRenderer.rendererId);
|
|
82
|
-
if (!renderer) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const result = { type: 1 , renderer, source: output, mimeType: pickedMimeTypeRenderer.mimeType };
|
|
86
|
-
this._notebookEditor.createOutput(viewCell, result, 0, true);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
NotebookViewportContribution = ( __decorate([
|
|
91
|
-
( __param(1, INotebookService)),
|
|
92
|
-
( __param(2, IAccessibilityService))
|
|
93
|
-
], NotebookViewportContribution));
|
|
94
|
-
registerNotebookContribution(NotebookViewportContribution.id, NotebookViewportContribution);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { isRelativePattern } from 'vscode/vscode/vs/base/common/glob';
|
|
2
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
3
|
-
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
4
|
-
import { isDocumentExcludePattern } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
5
|
-
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService';
|
|
6
|
-
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
7
|
-
|
|
8
|
-
CommandsRegistry.registerCommand('_resolveNotebookContentProvider', (accessor) => {
|
|
9
|
-
const notebookService = accessor.get(INotebookService);
|
|
10
|
-
const contentProviders = notebookService.getContributedNotebookTypes();
|
|
11
|
-
return ( contentProviders.map(provider => {
|
|
12
|
-
const filenamePatterns = ( provider.selectors.map(selector => {
|
|
13
|
-
if (typeof selector === 'string') {
|
|
14
|
-
return selector;
|
|
15
|
-
}
|
|
16
|
-
if (isRelativePattern(selector)) {
|
|
17
|
-
return selector;
|
|
18
|
-
}
|
|
19
|
-
if (isDocumentExcludePattern(selector)) {
|
|
20
|
-
return {
|
|
21
|
-
include: selector.include,
|
|
22
|
-
exclude: selector.exclude
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
})).filter(pattern => pattern !== null);
|
|
27
|
-
return {
|
|
28
|
-
viewType: provider.id,
|
|
29
|
-
displayName: provider.displayName,
|
|
30
|
-
filenamePattern: filenamePatterns,
|
|
31
|
-
options: {
|
|
32
|
-
transientCellMetadata: provider.options.transientCellMetadata,
|
|
33
|
-
transientDocumentMetadata: provider.options.transientDocumentMetadata,
|
|
34
|
-
transientOutputs: provider.options.transientOutputs
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}));
|
|
38
|
-
});
|
|
39
|
-
CommandsRegistry.registerCommand('_resolveNotebookKernels', async (accessor, args) => {
|
|
40
|
-
const notebookKernelService = accessor.get(INotebookKernelService);
|
|
41
|
-
const uri = URI.revive(args.uri);
|
|
42
|
-
const kernels = notebookKernelService.getMatchingKernel({ uri, viewType: args.viewType });
|
|
43
|
-
return ( kernels.all.map(provider => ({
|
|
44
|
-
id: provider.id,
|
|
45
|
-
label: provider.label,
|
|
46
|
-
description: provider.description,
|
|
47
|
-
detail: provider.detail,
|
|
48
|
-
isPreferred: false,
|
|
49
|
-
preloads: provider.preloadUris,
|
|
50
|
-
})));
|
|
51
|
-
});
|