@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.
- package/index.d.ts +2 -1
- package/index.js +64 -1
- package/package.json +47 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
- package/worker.js +2 -1
- package/workers/notebook.worker.d.ts +1 -0
- package/notebook.js +0 -50
- package/workers/notebook.worker.js +0 -1
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { KeyMod, KeyCode, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
3
|
import { Mimes } from 'vscode/vscode/vs/base/common/mime';
|
|
3
4
|
import { IBulkEditService, ResourceTextEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
4
5
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
5
6
|
import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
6
7
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
8
|
import { InputFocusedContext, InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
10
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
11
|
+
import { moveCellRange, copyCellRange, computeCellLinesContents, joinCellsWithSurrounds, joinSelectedCells, changeCellToKind } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
|
12
|
+
import { NotebookCellAction, CellOverflowToolbarGroups, CellToolbarOrder, CELL_TITLE_CELL_GROUP_ID, NotebookMultiCellAction, parseMultiCellExecutionArgs, cellExecutionArgs } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
13
|
+
import { CellFocusMode, EXPAND_CELL_INPUT_COMMAND_ID, EXPAND_CELL_OUTPUT_COMMAND_ID } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
14
|
+
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_CELL_INPUT_COLLAPSED, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED, NOTEBOOK_CELL_HAS_OUTPUTS } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
15
|
+
import { moveUpIcon, moveDownIcon, splitCellIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
16
|
+
import { CellEditType, CellKind, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
15
17
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
16
18
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
17
19
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -24,17 +26,17 @@ registerAction2(class extends NotebookCellAction {
|
|
|
24
26
|
constructor() {
|
|
25
27
|
super({
|
|
26
28
|
id: MOVE_CELL_UP_COMMAND_ID,
|
|
27
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(7279, "Move Cell Up")),
|
|
28
30
|
icon: moveUpIcon,
|
|
29
31
|
keybinding: {
|
|
30
|
-
primary:
|
|
31
|
-
when: (
|
|
32
|
-
weight:
|
|
32
|
+
primary: KeyMod.Alt | KeyCode.UpArrow,
|
|
33
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
|
|
34
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
33
35
|
},
|
|
34
36
|
menu: {
|
|
35
37
|
id: MenuId.NotebookCellTitle,
|
|
36
|
-
when: (
|
|
37
|
-
group:
|
|
38
|
+
when: ( ContextKeyExpr.equals('config.notebook.dragAndDropEnabled', false)),
|
|
39
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
38
40
|
order: 14
|
|
39
41
|
}
|
|
40
42
|
});
|
|
@@ -47,17 +49,17 @@ registerAction2(class extends NotebookCellAction {
|
|
|
47
49
|
constructor() {
|
|
48
50
|
super({
|
|
49
51
|
id: MOVE_CELL_DOWN_COMMAND_ID,
|
|
50
|
-
title: ( localize2(
|
|
52
|
+
title: ( localize2(7280, "Move Cell Down")),
|
|
51
53
|
icon: moveDownIcon,
|
|
52
54
|
keybinding: {
|
|
53
|
-
primary:
|
|
54
|
-
when: (
|
|
55
|
-
weight:
|
|
55
|
+
primary: KeyMod.Alt | KeyCode.DownArrow,
|
|
56
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
|
|
57
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
56
58
|
},
|
|
57
59
|
menu: {
|
|
58
60
|
id: MenuId.NotebookCellTitle,
|
|
59
|
-
when: (
|
|
60
|
-
group:
|
|
61
|
+
when: ( ContextKeyExpr.equals('config.notebook.dragAndDropEnabled', false)),
|
|
62
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
61
63
|
order: 14
|
|
62
64
|
}
|
|
63
65
|
});
|
|
@@ -70,11 +72,11 @@ registerAction2(class extends NotebookCellAction {
|
|
|
70
72
|
constructor() {
|
|
71
73
|
super({
|
|
72
74
|
id: COPY_CELL_UP_COMMAND_ID,
|
|
73
|
-
title: ( localize2(
|
|
75
|
+
title: ( localize2(7281, "Copy Cell Up")),
|
|
74
76
|
keybinding: {
|
|
75
|
-
primary:
|
|
76
|
-
when: (
|
|
77
|
-
weight:
|
|
77
|
+
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.UpArrow,
|
|
78
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
|
|
79
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
82
|
}
|
|
@@ -86,16 +88,16 @@ registerAction2(class extends NotebookCellAction {
|
|
|
86
88
|
constructor() {
|
|
87
89
|
super({
|
|
88
90
|
id: COPY_CELL_DOWN_COMMAND_ID,
|
|
89
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(7282, "Copy Cell Down")),
|
|
90
92
|
keybinding: {
|
|
91
|
-
primary:
|
|
92
|
-
when: (
|
|
93
|
-
weight:
|
|
93
|
+
primary: KeyMod.Alt | KeyMod.Shift | KeyCode.DownArrow,
|
|
94
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( InputFocusedContext.toNegated()))),
|
|
95
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
94
96
|
},
|
|
95
97
|
menu: {
|
|
96
98
|
id: MenuId.NotebookCellTitle,
|
|
97
|
-
when: (
|
|
98
|
-
group:
|
|
99
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
|
|
100
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
99
101
|
order: 13
|
|
100
102
|
}
|
|
101
103
|
});
|
|
@@ -112,27 +114,23 @@ registerAction2(class extends NotebookCellAction {
|
|
|
112
114
|
constructor() {
|
|
113
115
|
super({
|
|
114
116
|
id: SPLIT_CELL_COMMAND_ID,
|
|
115
|
-
title: ( localize2(
|
|
117
|
+
title: ( localize2(7283, "Split Cell")),
|
|
116
118
|
menu: {
|
|
117
119
|
id: MenuId.NotebookCellTitle,
|
|
118
|
-
when: (
|
|
119
|
-
|
|
120
|
-
NOTEBOOK_CELL_EDITABLE,
|
|
121
|
-
(NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated())
|
|
122
|
-
))),
|
|
123
|
-
order: 4 ,
|
|
120
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, ( NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()))),
|
|
121
|
+
order: CellToolbarOrder.SplitCell,
|
|
124
122
|
group: CELL_TITLE_CELL_GROUP_ID
|
|
125
123
|
},
|
|
126
124
|
icon: splitCellIcon,
|
|
127
125
|
keybinding: {
|
|
128
|
-
when: (
|
|
126
|
+
when: ( ContextKeyExpr.and(
|
|
129
127
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
130
128
|
NOTEBOOK_EDITOR_EDITABLE,
|
|
131
129
|
NOTEBOOK_CELL_EDITABLE,
|
|
132
130
|
EditorContextKeys.editorTextFocus
|
|
133
|
-
))
|
|
134
|
-
primary: KeyChord(
|
|
135
|
-
weight:
|
|
131
|
+
)),
|
|
132
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Backslash),
|
|
133
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
136
134
|
},
|
|
137
135
|
});
|
|
138
136
|
}
|
|
@@ -156,23 +154,23 @@ registerAction2(class extends NotebookCellAction {
|
|
|
156
154
|
const mime = cell.mime;
|
|
157
155
|
const textModel = await cell.resolveTextModel();
|
|
158
156
|
await bulkEditService.apply([
|
|
159
|
-
(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
(
|
|
164
|
-
editType:
|
|
157
|
+
( new ResourceTextEdit(
|
|
158
|
+
cell.uri,
|
|
159
|
+
{ range: textModel.getFullModelRange(), text: newLinesContents[0] }
|
|
160
|
+
)),
|
|
161
|
+
( new ResourceNotebookCellEdit(context.notebookEditor.textModel.uri, {
|
|
162
|
+
editType: CellEditType.Replace,
|
|
165
163
|
index: index + 1,
|
|
166
164
|
count: 0,
|
|
167
|
-
cells: (
|
|
165
|
+
cells: ( newLinesContents.slice(1).map(line => ({
|
|
168
166
|
cellKind: kind,
|
|
169
167
|
language,
|
|
170
168
|
mime,
|
|
171
169
|
source: line,
|
|
172
170
|
outputs: [],
|
|
173
171
|
metadata: {}
|
|
174
|
-
})))
|
|
175
|
-
}))
|
|
172
|
+
})))
|
|
173
|
+
}))
|
|
176
174
|
], { quotableLabel: 'Split Notebook Cell' });
|
|
177
175
|
}
|
|
178
176
|
}
|
|
@@ -182,16 +180,16 @@ registerAction2(class extends NotebookCellAction {
|
|
|
182
180
|
constructor() {
|
|
183
181
|
super({
|
|
184
182
|
id: JOIN_CELL_ABOVE_COMMAND_ID,
|
|
185
|
-
title: ( localize2(
|
|
183
|
+
title: ( localize2(7284, "Join With Previous Cell")),
|
|
186
184
|
keybinding: {
|
|
187
185
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
188
|
-
primary:
|
|
189
|
-
weight:
|
|
186
|
+
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyJ,
|
|
187
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
190
188
|
},
|
|
191
189
|
menu: {
|
|
192
190
|
id: MenuId.NotebookCellTitle,
|
|
193
|
-
when: (
|
|
194
|
-
group:
|
|
191
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
|
|
192
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
195
193
|
order: 10
|
|
196
194
|
}
|
|
197
195
|
});
|
|
@@ -205,16 +203,16 @@ registerAction2(class extends NotebookCellAction {
|
|
|
205
203
|
constructor() {
|
|
206
204
|
super({
|
|
207
205
|
id: JOIN_CELL_BELOW_COMMAND_ID,
|
|
208
|
-
title: ( localize2(
|
|
206
|
+
title: ( localize2(7285, "Join With Next Cell")),
|
|
209
207
|
keybinding: {
|
|
210
208
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
211
|
-
primary:
|
|
212
|
-
weight:
|
|
209
|
+
primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyJ,
|
|
210
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
213
211
|
},
|
|
214
212
|
menu: {
|
|
215
213
|
id: MenuId.NotebookCellTitle,
|
|
216
|
-
when: (
|
|
217
|
-
group:
|
|
214
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
|
|
215
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
218
216
|
order: 11
|
|
219
217
|
}
|
|
220
218
|
});
|
|
@@ -228,11 +226,11 @@ registerAction2(class extends NotebookCellAction {
|
|
|
228
226
|
constructor() {
|
|
229
227
|
super({
|
|
230
228
|
id: JOIN_SELECTED_CELLS_COMMAND_ID,
|
|
231
|
-
title: ( localize2(
|
|
229
|
+
title: ( localize2(7286, "Join Selected Cells")),
|
|
232
230
|
menu: {
|
|
233
231
|
id: MenuId.NotebookCellTitle,
|
|
234
|
-
when: (
|
|
235
|
-
group:
|
|
232
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
|
|
233
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
236
234
|
order: 12
|
|
237
235
|
}
|
|
238
236
|
});
|
|
@@ -249,29 +247,26 @@ registerAction2(class ChangeCellToCodeAction extends NotebookMultiCellAction {
|
|
|
249
247
|
constructor() {
|
|
250
248
|
super({
|
|
251
249
|
id: CHANGE_CELL_TO_CODE_COMMAND_ID,
|
|
252
|
-
title: ( localize2(
|
|
250
|
+
title: ( localize2(7287, "Change Cell to Code")),
|
|
253
251
|
keybinding: {
|
|
254
|
-
when: (
|
|
252
|
+
when: ( ContextKeyExpr.and(
|
|
255
253
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
256
254
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
257
|
-
|
|
258
|
-
))
|
|
259
|
-
primary:
|
|
260
|
-
weight:
|
|
255
|
+
( NOTEBOOK_OUTPUT_FOCUSED.toNegated())
|
|
256
|
+
)),
|
|
257
|
+
primary: KeyCode.KeyY,
|
|
258
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
261
259
|
},
|
|
262
|
-
precondition: (
|
|
263
|
-
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
264
|
-
(NOTEBOOK_CELL_TYPE.isEqualTo('markup'))
|
|
265
|
-
))),
|
|
260
|
+
precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')))),
|
|
266
261
|
menu: {
|
|
267
262
|
id: MenuId.NotebookCellTitle,
|
|
268
|
-
when: (
|
|
263
|
+
when: ( ContextKeyExpr.and(
|
|
269
264
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
270
265
|
NOTEBOOK_EDITOR_EDITABLE,
|
|
271
266
|
NOTEBOOK_CELL_EDITABLE,
|
|
272
|
-
|
|
273
|
-
))
|
|
274
|
-
group:
|
|
267
|
+
( NOTEBOOK_CELL_TYPE.isEqualTo('markup'))
|
|
268
|
+
)),
|
|
269
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
275
270
|
}
|
|
276
271
|
});
|
|
277
272
|
}
|
|
@@ -283,29 +278,26 @@ registerAction2(class ChangeCellToMarkdownAction extends NotebookMultiCellAction
|
|
|
283
278
|
constructor() {
|
|
284
279
|
super({
|
|
285
280
|
id: CHANGE_CELL_TO_MARKDOWN_COMMAND_ID,
|
|
286
|
-
title: ( localize2(
|
|
281
|
+
title: ( localize2(7288, "Change Cell to Markdown")),
|
|
287
282
|
keybinding: {
|
|
288
|
-
when: (
|
|
283
|
+
when: ( ContextKeyExpr.and(
|
|
289
284
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
290
285
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
291
|
-
|
|
292
|
-
))
|
|
293
|
-
primary:
|
|
294
|
-
weight:
|
|
286
|
+
( NOTEBOOK_OUTPUT_FOCUSED.toNegated())
|
|
287
|
+
)),
|
|
288
|
+
primary: KeyCode.KeyM,
|
|
289
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
295
290
|
},
|
|
296
|
-
precondition: (
|
|
297
|
-
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
298
|
-
(NOTEBOOK_CELL_TYPE.isEqualTo('code'))
|
|
299
|
-
))),
|
|
291
|
+
precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( NOTEBOOK_CELL_TYPE.isEqualTo('code')))),
|
|
300
292
|
menu: {
|
|
301
293
|
id: MenuId.NotebookCellTitle,
|
|
302
|
-
when: (
|
|
294
|
+
when: ( ContextKeyExpr.and(
|
|
303
295
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
304
296
|
NOTEBOOK_EDITOR_EDITABLE,
|
|
305
297
|
NOTEBOOK_CELL_EDITABLE,
|
|
306
|
-
|
|
307
|
-
))
|
|
308
|
-
group:
|
|
298
|
+
( NOTEBOOK_CELL_TYPE.isEqualTo('code'))
|
|
299
|
+
)),
|
|
300
|
+
group: CellOverflowToolbarGroups.Edit,
|
|
309
301
|
}
|
|
310
302
|
});
|
|
311
303
|
}
|
|
@@ -325,15 +317,11 @@ registerAction2(class CollapseCellInputAction extends NotebookMultiCellAction {
|
|
|
325
317
|
constructor() {
|
|
326
318
|
super({
|
|
327
319
|
id: COLLAPSE_CELL_INPUT_COMMAND_ID,
|
|
328
|
-
title: ( localize2(
|
|
320
|
+
title: ( localize2(7289, "Collapse Cell Input")),
|
|
329
321
|
keybinding: {
|
|
330
|
-
when: (
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
(InputFocusedContext.toNegated())
|
|
334
|
-
))),
|
|
335
|
-
primary: KeyChord(2048 | 41 , 2048 | 33 ),
|
|
336
|
-
weight: 200
|
|
322
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()), ( InputFocusedContext.toNegated()))),
|
|
323
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
|
324
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
337
325
|
}
|
|
338
326
|
});
|
|
339
327
|
}
|
|
@@ -353,11 +341,11 @@ registerAction2(class ExpandCellInputAction extends NotebookMultiCellAction {
|
|
|
353
341
|
constructor() {
|
|
354
342
|
super({
|
|
355
343
|
id: EXPAND_CELL_INPUT_COMMAND_ID,
|
|
356
|
-
title: ( localize2(
|
|
344
|
+
title: ( localize2(7290, "Expand Cell Input")),
|
|
357
345
|
keybinding: {
|
|
358
|
-
when: (
|
|
359
|
-
primary: KeyChord(
|
|
360
|
-
weight:
|
|
346
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_INPUT_COLLAPSED)),
|
|
347
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyC),
|
|
348
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
361
349
|
}
|
|
362
350
|
});
|
|
363
351
|
}
|
|
@@ -377,16 +365,11 @@ registerAction2(class CollapseCellOutputAction extends NotebookMultiCellAction {
|
|
|
377
365
|
constructor() {
|
|
378
366
|
super({
|
|
379
367
|
id: COLLAPSE_CELL_OUTPUT_COMMAND_ID,
|
|
380
|
-
title: ( localize2(
|
|
368
|
+
title: ( localize2(7291, "Collapse Cell Output")),
|
|
381
369
|
keybinding: {
|
|
382
|
-
when: (
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
(InputFocusedContext.toNegated()),
|
|
386
|
-
NOTEBOOK_CELL_HAS_OUTPUTS
|
|
387
|
-
))),
|
|
388
|
-
primary: KeyChord(2048 | 41 , 50 ),
|
|
389
|
-
weight: 200
|
|
370
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated()), ( InputFocusedContext.toNegated()), NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
371
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
|
|
372
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
390
373
|
}
|
|
391
374
|
});
|
|
392
375
|
}
|
|
@@ -403,11 +386,11 @@ registerAction2(class ExpandCellOuputAction extends NotebookMultiCellAction {
|
|
|
403
386
|
constructor() {
|
|
404
387
|
super({
|
|
405
388
|
id: EXPAND_CELL_OUTPUT_COMMAND_ID,
|
|
406
|
-
title: ( localize2(
|
|
389
|
+
title: ( localize2(7292, "Expand Cell Output")),
|
|
407
390
|
keybinding: {
|
|
408
|
-
when: (
|
|
409
|
-
primary: KeyChord(
|
|
410
|
-
weight:
|
|
391
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED)),
|
|
392
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyT),
|
|
393
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
411
394
|
}
|
|
412
395
|
});
|
|
413
396
|
}
|
|
@@ -425,9 +408,9 @@ registerAction2(class extends NotebookMultiCellAction {
|
|
|
425
408
|
super({
|
|
426
409
|
id: TOGGLE_CELL_OUTPUTS_COMMAND_ID,
|
|
427
410
|
precondition: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
428
|
-
title: ( localize2(
|
|
411
|
+
title: ( localize2(7293, "Toggle Outputs")),
|
|
429
412
|
metadata: {
|
|
430
|
-
description: ( localize(
|
|
413
|
+
description: ( localize(7293, "Toggle Outputs")),
|
|
431
414
|
args: cellExecutionArgs
|
|
432
415
|
}
|
|
433
416
|
});
|
|
@@ -452,7 +435,7 @@ registerAction2(class CollapseAllCellInputsAction extends NotebookMultiCellActio
|
|
|
452
435
|
constructor() {
|
|
453
436
|
super({
|
|
454
437
|
id: COLLAPSE_ALL_CELL_INPUTS_COMMAND_ID,
|
|
455
|
-
title: ( localize2(
|
|
438
|
+
title: ( localize2(7294, "Collapse All Cell Inputs")),
|
|
456
439
|
f1: true,
|
|
457
440
|
});
|
|
458
441
|
}
|
|
@@ -464,7 +447,7 @@ registerAction2(class ExpandAllCellInputsAction extends NotebookMultiCellAction
|
|
|
464
447
|
constructor() {
|
|
465
448
|
super({
|
|
466
449
|
id: EXPAND_ALL_CELL_INPUTS_COMMAND_ID,
|
|
467
|
-
title: ( localize2(
|
|
450
|
+
title: ( localize2(7295, "Expand All Cell Inputs")),
|
|
468
451
|
f1: true
|
|
469
452
|
});
|
|
470
453
|
}
|
|
@@ -476,7 +459,7 @@ registerAction2(class CollapseAllCellOutputsAction extends NotebookMultiCellActi
|
|
|
476
459
|
constructor() {
|
|
477
460
|
super({
|
|
478
461
|
id: COLLAPSE_ALL_CELL_OUTPUTS_COMMAND_ID,
|
|
479
|
-
title: ( localize2(
|
|
462
|
+
title: ( localize2(7296, "Collapse All Cell Outputs")),
|
|
480
463
|
f1: true,
|
|
481
464
|
});
|
|
482
465
|
}
|
|
@@ -488,7 +471,7 @@ registerAction2(class ExpandAllCellOutputsAction extends NotebookMultiCellAction
|
|
|
488
471
|
constructor() {
|
|
489
472
|
super({
|
|
490
473
|
id: EXPAND_ALL_CELL_OUTPUTS_COMMAND_ID,
|
|
491
|
-
title: ( localize2(
|
|
474
|
+
title: ( localize2(7297, "Expand All Cell Outputs")),
|
|
492
475
|
f1: true
|
|
493
476
|
});
|
|
494
477
|
}
|
|
@@ -500,15 +483,11 @@ registerAction2(class ToggleCellOutputScrolling extends NotebookMultiCellAction
|
|
|
500
483
|
constructor() {
|
|
501
484
|
super({
|
|
502
485
|
id: TOGGLE_CELL_OUTPUT_SCROLLING,
|
|
503
|
-
title: ( localize2(
|
|
486
|
+
title: ( localize2(7298, "Toggle Scroll Cell Output")),
|
|
504
487
|
keybinding: {
|
|
505
|
-
when: (
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
NOTEBOOK_CELL_HAS_OUTPUTS
|
|
509
|
-
))),
|
|
510
|
-
primary: KeyChord(2048 | 41 , 55 ),
|
|
511
|
-
weight: 200
|
|
488
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()), NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
489
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyY),
|
|
490
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
512
491
|
}
|
|
513
492
|
});
|
|
514
493
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IMarkerService } from "vscode/vscode/vs/platform/markers/common/markers.service";
|
|
3
|
+
import { INotebookExecutionStateService } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
|
|
4
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
6
|
+
import { IChatAgentService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
7
|
+
export declare class CellDiagnostics extends Disposable implements INotebookEditorContribution {
|
|
8
|
+
private readonly notebookEditor;
|
|
9
|
+
private readonly notebookExecutionStateService;
|
|
10
|
+
private readonly markerService;
|
|
11
|
+
private readonly chatAgentService;
|
|
12
|
+
private readonly configurationService;
|
|
13
|
+
static ID: string;
|
|
14
|
+
private enabled;
|
|
15
|
+
private listening;
|
|
16
|
+
private diagnosticsByHandle;
|
|
17
|
+
constructor(notebookEditor: INotebookEditor, notebookExecutionStateService: INotebookExecutionStateService, markerService: IMarkerService, chatAgentService: IChatAgentService, configurationService: IConfigurationService);
|
|
18
|
+
private updateEnabled;
|
|
19
|
+
private handleChangeExecutionState;
|
|
20
|
+
private clearAll;
|
|
21
|
+
clear(cellHandle: number): void;
|
|
22
|
+
private setDiagnostics;
|
|
23
|
+
private createMarkerData;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers.service';
|
|
4
|
-
import { NotebookExecutionType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
5
|
+
import { NotebookExecutionType } from '@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
5
6
|
import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
6
7
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
8
|
import { NotebookSetting, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
8
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
9
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
9
10
|
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
10
|
-
import { CodeCellViewModel } from '@codingame/monaco-vscode-
|
|
11
|
+
import { CodeCellViewModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
|
11
12
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
12
13
|
import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
13
14
|
|
|
@@ -71,9 +72,9 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
clear(cellHandle) {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
for (const disposable of
|
|
75
|
+
const disposables = this.diagnosticsByHandle.get(cellHandle);
|
|
76
|
+
if (disposables) {
|
|
77
|
+
for (const disposable of disposables) {
|
|
77
78
|
disposable.dispose();
|
|
78
79
|
}
|
|
79
80
|
this.diagnosticsByHandle.delete(cellHandle);
|
|
@@ -90,11 +91,12 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
|
|
|
90
91
|
const metadata = cell.model.internalMetadata;
|
|
91
92
|
if (cell instanceof CodeCellViewModel && !metadata.lastRunSuccess && metadata?.error?.location) {
|
|
92
93
|
const disposables = [];
|
|
93
|
-
const
|
|
94
|
+
const errorLabel = metadata.error.name ? `${metadata.error.name}: ${metadata.error.message}` : metadata.error.message;
|
|
95
|
+
const marker = this.createMarkerData(errorLabel, metadata.error.location);
|
|
94
96
|
this.markerService.changeOne(CellDiagnostics_1.ID, cell.uri, [marker]);
|
|
95
97
|
disposables.push(toDisposable(() => this.markerService.changeOne(CellDiagnostics_1.ID, cell.uri, [])));
|
|
96
|
-
cell.
|
|
97
|
-
disposables.push(toDisposable(() => cell.
|
|
98
|
+
cell.executionErrorDiagnostic.set(metadata.error, undefined);
|
|
99
|
+
disposables.push(toDisposable(() => cell.executionErrorDiagnostic.set(undefined, undefined)));
|
|
98
100
|
disposables.push(cell.model.onDidChangeOutputs(() => {
|
|
99
101
|
if (cell.model.outputs.length === 0) {
|
|
100
102
|
this.clear(cellHandle);
|
|
@@ -103,7 +105,7 @@ let CellDiagnostics = class CellDiagnostics extends Disposable {
|
|
|
103
105
|
disposables.push(cell.model.onDidChangeContent(() => {
|
|
104
106
|
this.clear(cellHandle);
|
|
105
107
|
}));
|
|
106
|
-
this.diagnosticsByHandle.set(cellHandle,
|
|
108
|
+
this.diagnosticsByHandle.set(cellHandle, disposables);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
createMarkerData(message, location) {
|