@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.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 (157) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +64 -1
  3. package/package.json +47 -15
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
  6. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
  81. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
  82. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
  83. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
  84. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
  85. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
  86. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
  95. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
  96. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
  97. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
  98. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
  99. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
  100. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
  101. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
  102. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
  103. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
  104. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
  105. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
  106. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
  107. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
  132. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
  134. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
  136. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
  138. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
  142. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
  144. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
  145. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
  146. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
  147. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
  148. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
  149. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
  150. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
  151. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
  152. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
  153. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
  154. package/worker.js +2 -1
  155. package/workers/notebook.worker.d.ts +1 -0
  156. package/notebook.js +0 -50
  157. package/workers/notebook.worker.js +0 -1
@@ -0,0 +1,124 @@
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
3
+ import { Event } from 'vscode/vscode/vs/base/common/event';
4
+ import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
5
+ import { Selection, SelectionDirection } from 'vscode/vscode/vs/editor/common/core/selection';
6
+ import { CursorChangeReason } from 'vscode/vscode/vs/editor/common/cursorEvents';
7
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
8
+ import { registerNotebookContribution } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
9
+
10
+ let NotebookSelectionHighlighter = class NotebookSelectionHighlighter extends Disposable {
11
+ static { this.id = 'notebook.selectionHighlighter'; }
12
+ constructor(notebookEditor, configurationService) {
13
+ super();
14
+ this.notebookEditor = notebookEditor;
15
+ this.configurationService = configurationService;
16
+ this.isEnabled = false;
17
+ this.cellDecorationIds = ( new Map());
18
+ this.anchorDisposables = ( new DisposableStore());
19
+ this.isEnabled = this.configurationService.getValue('editor.selectionHighlight');
20
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
21
+ if (e.affectsConfiguration('editor.selectionHighlight')) {
22
+ this.isEnabled = this.configurationService.getValue('editor.selectionHighlight');
23
+ }
24
+ }));
25
+ this._register(this.notebookEditor.onDidChangeActiveCell(async () => {
26
+ if (!this.isEnabled) {
27
+ return;
28
+ }
29
+ this.anchorCell = this.notebookEditor.activeCellAndCodeEditor;
30
+ if (!this.anchorCell) {
31
+ return;
32
+ }
33
+ const activeCell = this.notebookEditor.getActiveCell();
34
+ if (!activeCell) {
35
+ return;
36
+ }
37
+ if (!activeCell.editorAttached) {
38
+ await Event.toPromise(activeCell.onDidChangeEditorAttachState);
39
+ }
40
+ this.clearNotebookSelectionDecorations();
41
+ this.anchorDisposables.clear();
42
+ this.anchorDisposables.add(this.anchorCell[1].onDidChangeCursorPosition((e) => {
43
+ if (e.reason !== CursorChangeReason.Explicit) {
44
+ return;
45
+ }
46
+ if (!this.anchorCell) {
47
+ return;
48
+ }
49
+ if (this.notebookEditor.hasModel()) {
50
+ this.clearNotebookSelectionDecorations();
51
+ this._update(this.notebookEditor);
52
+ }
53
+ }));
54
+ if (this.notebookEditor.getEditorViewState().editorFocused && this.notebookEditor.hasModel()) {
55
+ this._update(this.notebookEditor);
56
+ }
57
+ }));
58
+ }
59
+ _update(editor) {
60
+ if (!this.anchorCell || !this.isEnabled) {
61
+ return;
62
+ }
63
+ const textModel = this.anchorCell[0].textModel;
64
+ if (!textModel || textModel.isTooLargeForTokenization()) {
65
+ return;
66
+ }
67
+ const s = this.anchorCell[0].getSelections()[0];
68
+ if (s.startLineNumber !== s.endLineNumber || s.isEmpty()) {
69
+ return;
70
+ }
71
+ const searchText = this.getSearchText(s, textModel);
72
+ if (!searchText) {
73
+ return;
74
+ }
75
+ const results = editor.textModel.findMatches(searchText, false, true, null);
76
+ for (const res of results) {
77
+ const cell = editor.getCellByHandle(res.cell.handle);
78
+ if (!cell) {
79
+ continue;
80
+ }
81
+ this.updateCellDecorations(cell, res.matches);
82
+ }
83
+ }
84
+ updateCellDecorations(cell, matches) {
85
+ const selections = ( matches.map(m => {
86
+ return Selection.fromRange(m.range, SelectionDirection.LTR);
87
+ }));
88
+ const newDecorations = [];
89
+ selections?.map(selection => {
90
+ const isEmpty = selection.isEmpty();
91
+ if (!isEmpty) {
92
+ newDecorations.push({
93
+ range: selection,
94
+ options: {
95
+ description: '',
96
+ className: '.nb-selection-highlight',
97
+ }
98
+ });
99
+ }
100
+ });
101
+ const oldDecorations = this.cellDecorationIds.get(cell) ?? [];
102
+ this.cellDecorationIds.set(cell, cell.deltaModelDecorations(oldDecorations, newDecorations));
103
+ }
104
+ clearNotebookSelectionDecorations() {
105
+ this.cellDecorationIds.forEach((_, cell) => {
106
+ const cellDecorations = this.cellDecorationIds.get(cell) ?? [];
107
+ if (cellDecorations) {
108
+ cell.deltaModelDecorations(cellDecorations, []);
109
+ this.cellDecorationIds.delete(cell);
110
+ }
111
+ });
112
+ }
113
+ getSearchText(selection, model) {
114
+ return model.getValueInRange(selection).replace(/\r\n/g, '\n');
115
+ }
116
+ dispose() {
117
+ super.dispose();
118
+ this.anchorDisposables.dispose();
119
+ }
120
+ };
121
+ NotebookSelectionHighlighter = ( __decorate([
122
+ ( __param(1, IConfigurationService))
123
+ ], NotebookSelectionHighlighter));
124
+ registerNotebookContribution(NotebookSelectionHighlighter.id, NotebookSelectionHighlighter);
@@ -0,0 +1 @@
1
+ export declare const CENTER_ACTIVE_CELL = "notebook.centerActiveCell";
@@ -1,4 +1,6 @@
1
+
1
2
  import { timeout } from 'vscode/vscode/vs/base/common/async';
3
+ import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
2
4
  import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
3
5
  import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
4
6
  import { localize } from 'vscode/vscode/vs/nls';
@@ -7,13 +9,14 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
7
9
  import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
8
10
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
9
11
  import { InputFocusedContextKey, IsWindowsContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
12
+ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
10
13
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
11
- import { InlineChatController } from '@codingame/monaco-vscode-chat-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
12
- import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
13
- import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
14
- import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
14
+ import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
15
+ import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
16
+ import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
17
+ import { CellEditState } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
15
18
  import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
16
- import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
19
+ import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_HAS_OUTPUTS } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
17
20
 
18
21
  const NOTEBOOK_FOCUS_TOP = 'notebook.focusTop';
19
22
  const NOTEBOOK_FOCUS_BOTTOM = 'notebook.focusBottom';
@@ -31,17 +34,17 @@ registerAction2(class extends Action2 {
31
34
  super({
32
35
  id: 'notebook.cell.nullAction',
33
36
  title: ( localize(
34
- 8135,
37
+ 7363,
35
38
  "Keypresses that should be handled by the focused element in the cell output."
36
39
  )),
37
40
  keybinding: [{
38
41
  when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
39
- primary: 18 ,
40
- weight: 200 + 1
42
+ primary: KeyCode.DownArrow,
43
+ weight: KeybindingWeight.WorkbenchContrib + 1
41
44
  }, {
42
45
  when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
43
- primary: 16 ,
44
- weight: 200 + 1
46
+ primary: KeyCode.UpArrow,
47
+ weight: KeybindingWeight.WorkbenchContrib + 1
45
48
  }],
46
49
  f1: false
47
50
  });
@@ -54,50 +57,29 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
54
57
  constructor() {
55
58
  super({
56
59
  id: NOTEBOOK_FOCUS_NEXT_EDITOR,
57
- title: ( localize(8136, 'Focus Next Cell Editor')),
60
+ title: ( localize(7364, 'Focus Next Cell Editor')),
58
61
  keybinding: [
59
62
  {
60
- when: ( (ContextKeyExpr.and(
61
- NOTEBOOK_EDITOR_FOCUSED,
62
- (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
63
- (ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
64
- (ContextKeyExpr.and(
65
- (ContextKeyExpr.has(InputFocusedContextKey)),
66
- EditorContextKeys.editorTextFocus,
67
- (NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')),
68
- (NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
69
- )),
70
- (EditorContextKeys.isEmbeddedDiffEditor.negate())
71
- ))),
72
- primary: 18 ,
63
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
64
+ primary: KeyCode.DownArrow,
73
65
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
74
66
  },
75
67
  {
76
- when: ( (ContextKeyExpr.and(
77
- NOTEBOOK_EDITOR_FOCUSED,
78
- (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
79
- (ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
80
- (ContextKeyExpr.and(
81
- (NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
82
- (NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)),
83
- NOTEBOOK_CURSOR_NAVIGATION_MODE
84
- )),
85
- (EditorContextKeys.isEmbeddedDiffEditor.negate())
86
- ))),
87
- primary: 18 ,
88
- weight: 200 ,
68
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), ( NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)), NOTEBOOK_CURSOR_NAVIGATION_MODE)), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
69
+ primary: KeyCode.DownArrow,
70
+ weight: KeybindingWeight.WorkbenchContrib,
89
71
  },
90
72
  {
91
- when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
92
- primary: 2048 | 18 ,
93
- mac: { primary: 256 | 2048 | 18 , },
94
- weight: 200
73
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
74
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
75
+ mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.DownArrow, },
76
+ weight: KeybindingWeight.WorkbenchContrib
95
77
  },
96
78
  {
97
- when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
98
- primary: 2048 | 12 ,
99
- mac: { primary: 256 | 11 , },
100
- weight: 200 + 1
79
+ when: ( ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED)),
80
+ primary: KeyMod.CtrlCmd | KeyCode.PageDown,
81
+ mac: { primary: KeyMod.WinCtrl | KeyCode.PageUp, },
82
+ weight: KeybindingWeight.WorkbenchContrib + 1
101
83
  },
102
84
  ]
103
85
  });
@@ -129,44 +111,23 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
129
111
  constructor() {
130
112
  super({
131
113
  id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
132
- title: ( localize(8137, 'Focus Previous Cell Editor')),
114
+ title: ( localize(7365, 'Focus Previous Cell Editor')),
133
115
  keybinding: [
134
116
  {
135
- when: ( (ContextKeyExpr.and(
136
- NOTEBOOK_EDITOR_FOCUSED,
137
- (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
138
- (ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
139
- (ContextKeyExpr.and(
140
- (ContextKeyExpr.has(InputFocusedContextKey)),
141
- EditorContextKeys.editorTextFocus,
142
- (NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')),
143
- (NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
144
- )),
145
- (EditorContextKeys.isEmbeddedDiffEditor.negate())
146
- ))),
147
- primary: 16 ,
117
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
118
+ primary: KeyCode.UpArrow,
148
119
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
149
120
  },
150
121
  {
151
- when: ( (ContextKeyExpr.and(
152
- NOTEBOOK_EDITOR_FOCUSED,
153
- (CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
154
- (ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
155
- (ContextKeyExpr.and(
156
- (NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
157
- (NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)),
158
- NOTEBOOK_CURSOR_NAVIGATION_MODE
159
- )),
160
- (EditorContextKeys.isEmbeddedDiffEditor.negate())
161
- ))),
162
- primary: 16 ,
163
- weight: 200 ,
122
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), ( NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)), NOTEBOOK_CURSOR_NAVIGATION_MODE)), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
123
+ primary: KeyCode.UpArrow,
124
+ weight: KeybindingWeight.WorkbenchContrib,
164
125
  },
165
126
  {
166
- when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
167
- primary: 2048 | 11 ,
168
- mac: { primary: 256 | 11 , },
169
- weight: 200 + 1
127
+ when: ( ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED)),
128
+ primary: KeyMod.CtrlCmd | KeyCode.PageUp,
129
+ mac: { primary: KeyMod.WinCtrl | KeyCode.PageUp, },
130
+ weight: KeybindingWeight.WorkbenchContrib + 1
170
131
  },
171
132
  ],
172
133
  });
@@ -195,21 +156,21 @@ registerAction2(class extends NotebookAction {
195
156
  constructor() {
196
157
  super({
197
158
  id: NOTEBOOK_FOCUS_TOP,
198
- title: ( localize(8138, 'Focus First Cell')),
159
+ title: ( localize(7366, 'Focus First Cell')),
199
160
  keybinding: [
200
161
  {
201
- when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
202
- primary: 2048 | 14 ,
203
- weight: 200
162
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
163
+ primary: KeyMod.CtrlCmd | KeyCode.Home,
164
+ weight: KeybindingWeight.WorkbenchContrib
204
165
  },
205
166
  {
206
- when: ( (ContextKeyExpr.and(
167
+ when: ( ContextKeyExpr.and(
207
168
  NOTEBOOK_EDITOR_FOCUSED,
208
169
  ContextKeyExpr.not(InputFocusedContextKey),
209
- (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
210
- ))),
211
- mac: { primary: 2048 | 16 },
212
- weight: 200
170
+ ( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
171
+ )),
172
+ mac: { primary: KeyMod.CtrlCmd | KeyCode.UpArrow },
173
+ weight: KeybindingWeight.WorkbenchContrib
213
174
  }
214
175
  ],
215
176
  });
@@ -227,22 +188,22 @@ registerAction2(class extends NotebookAction {
227
188
  constructor() {
228
189
  super({
229
190
  id: NOTEBOOK_FOCUS_BOTTOM,
230
- title: ( localize(8139, 'Focus Last Cell')),
191
+ title: ( localize(7367, 'Focus Last Cell')),
231
192
  keybinding: [
232
193
  {
233
- when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
234
- primary: 2048 | 13 ,
194
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
195
+ primary: KeyMod.CtrlCmd | KeyCode.End,
235
196
  mac: undefined,
236
- weight: 200
197
+ weight: KeybindingWeight.WorkbenchContrib
237
198
  },
238
199
  {
239
- when: ( (ContextKeyExpr.and(
200
+ when: ( ContextKeyExpr.and(
240
201
  NOTEBOOK_EDITOR_FOCUSED,
241
202
  ContextKeyExpr.not(InputFocusedContextKey),
242
- (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
243
- ))),
244
- mac: { primary: 2048 | 18 },
245
- weight: 200
203
+ ( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
204
+ )),
205
+ mac: { primary: KeyMod.CtrlCmd | KeyCode.DownArrow },
206
+ weight: KeybindingWeight.WorkbenchContrib
246
207
  }
247
208
  ],
248
209
  });
@@ -264,18 +225,17 @@ registerAction2(class extends NotebookCellAction {
264
225
  constructor() {
265
226
  super({
266
227
  id: FOCUS_IN_OUTPUT_COMMAND_ID,
267
- title: ( localize(8140, 'Focus In Active Cell Output')),
228
+ title: ( localize(7368, 'Focus In Active Cell Output')),
268
229
  keybinding: [{
269
- primary: 2048 | 1024 | 18 ,
270
- mac: { primary: 256 | 2048 | 18 , },
271
- weight: 200
272
- },
273
- {
274
- when: ( (ContextKeyExpr.and( (IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext))),
275
- primary: 2048 | 18 ,
276
- weight: 200
230
+ when: ( ContextKeyExpr.and(( IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext)),
231
+ primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
232
+ weight: KeybindingWeight.WorkbenchContrib
233
+ }, {
234
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.DownArrow,
235
+ mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.DownArrow, },
236
+ weight: KeybindingWeight.WorkbenchContrib
277
237
  }],
278
- precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS)))
238
+ precondition: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS))
279
239
  });
280
240
  }
281
241
  async runWithContext(accessor, context) {
@@ -288,13 +248,13 @@ registerAction2(class extends NotebookCellAction {
288
248
  constructor() {
289
249
  super({
290
250
  id: FOCUS_OUT_OUTPUT_COMMAND_ID,
291
- title: ( localize(8141, 'Focus Out Active Cell Output')),
251
+ title: ( localize(7369, 'Focus Out Active Cell Output')),
292
252
  keybinding: {
293
- primary: 2048 | 1024 | 16 ,
294
- mac: { primary: 256 | 2048 | 16 , },
295
- weight: 200
253
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
254
+ mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.UpArrow, },
255
+ weight: KeybindingWeight.WorkbenchContrib
296
256
  },
297
- precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
257
+ precondition: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
298
258
  });
299
259
  }
300
260
  async runWithContext(accessor, context) {
@@ -307,14 +267,14 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
307
267
  constructor() {
308
268
  super({
309
269
  id: CENTER_ACTIVE_CELL,
310
- title: ( localize(8142, "Center Active Cell")),
270
+ title: ( localize(7370, "Center Active Cell")),
311
271
  keybinding: {
312
272
  when: NOTEBOOK_EDITOR_FOCUSED,
313
- primary: 2048 | 42 ,
273
+ primary: KeyMod.CtrlCmd | KeyCode.KeyL,
314
274
  mac: {
315
- primary: 256 | 42 ,
275
+ primary: KeyMod.WinCtrl | KeyCode.KeyL,
316
276
  },
317
- weight: 200
277
+ weight: KeybindingWeight.WorkbenchContrib
318
278
  },
319
279
  });
320
280
  }
@@ -326,15 +286,11 @@ registerAction2(class extends NotebookCellAction {
326
286
  constructor() {
327
287
  super({
328
288
  id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
329
- title: ( localize(8143, "Cell Cursor Page Up")),
289
+ title: ( localize(7371, "Cell Cursor Page Up")),
330
290
  keybinding: [
331
291
  {
332
- when: ( (ContextKeyExpr.and(
333
- NOTEBOOK_EDITOR_FOCUSED,
334
- (ContextKeyExpr.has(InputFocusedContextKey)),
335
- EditorContextKeys.editorTextFocus
336
- ))),
337
- primary: 11 ,
292
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
293
+ primary: KeyCode.PageUp,
338
294
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
339
295
  }
340
296
  ]
@@ -348,16 +304,11 @@ registerAction2(class extends NotebookCellAction {
348
304
  constructor() {
349
305
  super({
350
306
  id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
351
- title: ( localize(8144, "Cell Cursor Page Up Select")),
307
+ title: ( localize(7372, "Cell Cursor Page Up Select")),
352
308
  keybinding: [
353
309
  {
354
- when: ( (ContextKeyExpr.and(
355
- NOTEBOOK_EDITOR_FOCUSED,
356
- (ContextKeyExpr.has(InputFocusedContextKey)),
357
- EditorContextKeys.editorTextFocus,
358
- (NOTEBOOK_OUTPUT_FOCUSED.negate())
359
- ))),
360
- primary: 1024 | 11 ,
310
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
311
+ primary: KeyMod.Shift | KeyCode.PageUp,
361
312
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
362
313
  }
363
314
  ]
@@ -371,15 +322,11 @@ registerAction2(class extends NotebookCellAction {
371
322
  constructor() {
372
323
  super({
373
324
  id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
374
- title: ( localize(8145, "Cell Cursor Page Down")),
325
+ title: ( localize(7373, "Cell Cursor Page Down")),
375
326
  keybinding: [
376
327
  {
377
- when: ( (ContextKeyExpr.and(
378
- NOTEBOOK_EDITOR_FOCUSED,
379
- (ContextKeyExpr.has(InputFocusedContextKey)),
380
- EditorContextKeys.editorTextFocus
381
- ))),
382
- primary: 12 ,
328
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
329
+ primary: KeyCode.PageDown,
383
330
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
384
331
  }
385
332
  ]
@@ -393,16 +340,11 @@ registerAction2(class extends NotebookCellAction {
393
340
  constructor() {
394
341
  super({
395
342
  id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
396
- title: ( localize(8146, "Cell Cursor Page Down Select")),
343
+ title: ( localize(7374, "Cell Cursor Page Down Select")),
397
344
  keybinding: [
398
345
  {
399
- when: ( (ContextKeyExpr.and(
400
- NOTEBOOK_EDITOR_FOCUSED,
401
- (ContextKeyExpr.has(InputFocusedContextKey)),
402
- EditorContextKeys.editorTextFocus,
403
- (NOTEBOOK_OUTPUT_FOCUSED.negate())
404
- ))),
405
- primary: 1024 | 12 ,
346
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
347
+ primary: KeyMod.Shift | KeyCode.PageDown,
406
348
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
407
349
  }
408
350
  ]
@@ -418,7 +360,7 @@ function getPageSize(context) {
418
360
  const lineHeight = layoutInfo?.fontInfo.lineHeight || 17;
419
361
  return Math.max(1, Math.floor((layoutInfo?.height || 0) / lineHeight) - 2);
420
362
  }
421
- ( (Registry.as(Extensions.Configuration))).registerConfiguration({
363
+ ( Registry.as(Extensions.Configuration)).registerConfiguration({
422
364
  id: 'notebook',
423
365
  order: 100,
424
366
  type: 'object',
@@ -427,7 +369,7 @@ function getPageSize(context) {
427
369
  type: 'boolean',
428
370
  default: true,
429
371
  markdownDescription: ( localize(
430
- 8147,
372
+ 7375,
431
373
  "When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
432
374
  ))
433
375
  }
@@ -0,0 +1,2 @@
1
+ import { RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
2
+ export declare const NOTEBOOK_VARIABLE_VIEW_ENABLED: RawContextKey<boolean>;
@@ -1,3 +1,4 @@
1
+
1
2
  import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
2
3
 
3
4
  const NOTEBOOK_VARIABLE_VIEW_ENABLED = ( new RawContextKey('notebookVariableViewEnabled', false));
@@ -0,0 +1,27 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
4
+ import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
5
+ import { IViewDescriptorService } from "vscode/vscode/vs/workbench/common/views.service";
6
+ import { INotebookExecutionStateService } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
7
+ import { INotebookKernelService } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service";
8
+ import { INotebookService } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
9
+ import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
10
+ export declare class NotebookVariables extends Disposable implements IWorkbenchContribution {
11
+ private readonly configurationService;
12
+ private readonly editorService;
13
+ private readonly notebookExecutionStateService;
14
+ private readonly notebookKernelService;
15
+ private readonly notebookDocumentService;
16
+ private readonly viewDescriptorService;
17
+ private listeners;
18
+ private configListener;
19
+ private initialized;
20
+ private viewEnabled;
21
+ constructor(contextKeyService: IContextKeyService, configurationService: IConfigurationService, editorService: IEditorService, notebookExecutionStateService: INotebookExecutionStateService, notebookKernelService: INotebookKernelService, notebookDocumentService: INotebookService, viewDescriptorService: IViewDescriptorService);
22
+ private handleConfigChange;
23
+ private handleInitEvent;
24
+ private hasVariableProvider;
25
+ private initializeView;
26
+ dispose(): void;
27
+ }
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { localize2 } from 'vscode/vscode/vs/nls';
4
5
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -10,8 +11,8 @@ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.
10
11
  import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
11
12
  import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from './notebookVariableContextKeys.js';
12
13
  import { NotebookVariablesView } from './notebookVariablesView.js';
13
- import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
14
- import { variablesViewIcon } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
14
+ import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
15
+ import { variablesViewIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
15
16
  import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
16
17
  import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
17
18
  import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
@@ -60,10 +61,10 @@ let NotebookVariables = class NotebookVariables extends Disposable {
60
61
  initializeView() {
61
62
  const debugViewContainer = this.viewDescriptorService.getViewContainerById(VIEWLET_ID);
62
63
  if (debugViewContainer) {
63
- const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
64
+ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
64
65
  const viewDescriptor = {
65
- id: 'workbench.notebook.variables', name: ( localize2(8223, "Notebook Variables")),
66
- containerIcon: variablesViewIcon, ctorDescriptor: ( (new SyncDescriptor(NotebookVariablesView))),
66
+ id: 'workbench.notebook.variables', name: ( localize2(7378, "Notebook Variables")),
67
+ containerIcon: variablesViewIcon, ctorDescriptor: ( new SyncDescriptor(NotebookVariablesView)),
67
68
  order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: false, when: NOTEBOOK_VARIABLE_VIEW_ENABLED
68
69
  };
69
70
  viewsRegistry.registerViews([viewDescriptor], debugViewContainer);
@@ -77,14 +78,14 @@ let NotebookVariables = class NotebookVariables extends Disposable {
77
78
  this.configListener.dispose();
78
79
  }
79
80
  };
80
- NotebookVariables = ( (__decorate([
81
- ( (__param(0, IContextKeyService))),
82
- ( (__param(1, IConfigurationService))),
83
- ( (__param(2, IEditorService))),
84
- ( (__param(3, INotebookExecutionStateService))),
85
- ( (__param(4, INotebookKernelService))),
86
- ( (__param(5, INotebookService))),
87
- ( (__param(6, IViewDescriptorService)))
88
- ], NotebookVariables)));
81
+ NotebookVariables = ( __decorate([
82
+ ( __param(0, IContextKeyService)),
83
+ ( __param(1, IConfigurationService)),
84
+ ( __param(2, IEditorService)),
85
+ ( __param(3, INotebookExecutionStateService)),
86
+ ( __param(4, INotebookKernelService)),
87
+ ( __param(5, INotebookService)),
88
+ ( __param(6, IViewDescriptorService))
89
+ ], NotebookVariables));
89
90
 
90
91
  export { NotebookVariables };