@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.
Files changed (80) hide show
  1. package/notebook.js +13 -13
  2. package/package.json +2 -2
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/override/vs/platform/dialogs/common/dialogs.js +0 -8
  6. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +0 -6
  7. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +0 -389
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +0 -608
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +0 -109
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +0 -173
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +0 -488
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +0 -106
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +0 -67
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +0 -165
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +0 -67
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +0 -320
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +0 -72
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +0 -6
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +0 -168
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +0 -209
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +0 -84
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +0 -82
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +0 -67
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +0 -91
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +0 -393
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +0 -5
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +0 -97
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +0 -118
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +0 -59
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +0 -148
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +0 -383
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +0 -77
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +0 -511
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +0 -159
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +0 -56
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +0 -94
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +0 -51
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -565
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -31
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +0 -744
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +0 -707
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -351
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +0 -267
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -45
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1297
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -284
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -563
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -108
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -39
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +0 -6
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +0 -313
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -890
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -13
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -393
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -175
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +0 -1174
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -159
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +0 -451
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +0 -192
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +0 -106
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +0 -509
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +0 -130
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +0 -341
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +0 -111
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +0 -28
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +0 -65
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +0 -641
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +0 -200
  69. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +0 -80
  70. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +0 -1003
  71. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -103
  72. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +0 -202
  73. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +0 -80
  74. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +0 -98
  75. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +0 -237
  76. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +0 -89
  77. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +0 -376
  78. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +0 -408
  79. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +0 -144
  80. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +0 -129
@@ -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 );
@@ -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
- });