@codingame/monaco-vscode-notebook-service-override 5.3.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +26 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +56 -112
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
4
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
4
5
|
import { DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
6
|
import { registerEditorAction, EditorAction } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
6
7
|
import { IBulkEditService, ResourceTextEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
@@ -8,10 +9,11 @@ import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextK
|
|
|
8
9
|
import { IEditorWorkerService } from 'vscode/vscode/vs/editor/common/services/editorWorker';
|
|
9
10
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
10
11
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
11
|
-
import {
|
|
12
|
+
import { getDocumentFormattingEditsWithSelectedProvider, FormattingMode, formatDocumentWithSelectedProvider } from 'vscode/vscode/vs/editor/contrib/format/browser/format';
|
|
12
13
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
13
14
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
14
15
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
15
17
|
import { Progress } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
16
18
|
import { NOTEBOOK_ACTIONS_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
19
|
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
@@ -20,9 +22,11 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
20
22
|
import { INotebookExecutionService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService.service';
|
|
21
23
|
import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
22
24
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
25
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
23
26
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
24
27
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
25
28
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
29
|
+
import { CodeActionParticipantUtils } from '../saveParticipants/saveParticipants.js';
|
|
26
30
|
|
|
27
31
|
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/format/formatting";
|
|
28
32
|
registerAction2(class extends Action2 {
|
|
@@ -34,9 +38,9 @@ registerAction2(class extends Action2 {
|
|
|
34
38
|
precondition: ( (ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EDITABLE))),
|
|
35
39
|
keybinding: {
|
|
36
40
|
when: ( (EditorContextKeys.editorTextFocus.toNegated())),
|
|
37
|
-
primary:
|
|
38
|
-
linux: { primary:
|
|
39
|
-
weight:
|
|
41
|
+
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
|
42
|
+
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
|
43
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
40
44
|
},
|
|
41
45
|
f1: true,
|
|
42
46
|
menu: {
|
|
@@ -56,28 +60,32 @@ registerAction2(class extends Action2 {
|
|
|
56
60
|
const editorWorkerService = accessor.get(IEditorWorkerService);
|
|
57
61
|
const languageFeaturesService = accessor.get(ILanguageFeaturesService);
|
|
58
62
|
const bulkEditService = accessor.get(IBulkEditService);
|
|
63
|
+
const instantiationService = accessor.get(IInstantiationService);
|
|
59
64
|
const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
60
65
|
if (!editor || !editor.hasModel()) {
|
|
61
66
|
return;
|
|
62
67
|
}
|
|
63
68
|
const notebook = editor.textModel;
|
|
69
|
+
const formatApplied = await instantiationService.invokeFunction(CodeActionParticipantUtils.checkAndRunFormatCodeAction, notebook, Progress.None, CancellationToken.None);
|
|
64
70
|
const disposable = ( (new DisposableStore()));
|
|
65
71
|
try {
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
if (!formatApplied) {
|
|
73
|
+
const allCellEdits = await Promise.all(( (notebook.cells.map(async (cell) => {
|
|
74
|
+
const ref = await textModelService.createModelReference(cell.uri);
|
|
75
|
+
disposable.add(ref);
|
|
76
|
+
const model = ref.object.textEditorModel;
|
|
77
|
+
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(editorWorkerService, languageFeaturesService, model, FormattingMode.Explicit, CancellationToken.None);
|
|
78
|
+
const edits = [];
|
|
79
|
+
if (formatEdits) {
|
|
80
|
+
for (const edit of formatEdits) {
|
|
81
|
+
edits.push(( (new ResourceTextEdit(model.uri, edit, model.getVersionId()))));
|
|
82
|
+
}
|
|
83
|
+
return edits;
|
|
75
84
|
}
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
await bulkEditService.apply( allCellEdits.flat(), { label: ( localizeWithPath(_moduleId, 1, "Format Notebook")), code: 'undoredo.formatNotebook', });
|
|
85
|
+
return [];
|
|
86
|
+
}))));
|
|
87
|
+
await bulkEditService.apply( allCellEdits.flat(), { label: ( localizeWithPath(_moduleId, 1, "Format Notebook")), code: 'undoredo.formatNotebook', });
|
|
88
|
+
}
|
|
81
89
|
}
|
|
82
90
|
finally {
|
|
83
91
|
disposable.dispose();
|
|
@@ -99,9 +107,9 @@ registerEditorAction(class FormatCellAction extends EditorAction {
|
|
|
99
107
|
))),
|
|
100
108
|
kbOpts: {
|
|
101
109
|
kbExpr: ( (ContextKeyExpr.and(EditorContextKeys.editorTextFocus))),
|
|
102
|
-
primary:
|
|
103
|
-
linux: { primary:
|
|
104
|
-
weight:
|
|
110
|
+
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
|
111
|
+
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI },
|
|
112
|
+
weight: KeybindingWeight.EditorContrib
|
|
105
113
|
},
|
|
106
114
|
contextMenuOpts: {
|
|
107
115
|
group: '1_modification',
|
|
@@ -112,7 +120,7 @@ registerEditorAction(class FormatCellAction extends EditorAction {
|
|
|
112
120
|
async run(accessor, editor) {
|
|
113
121
|
if (editor.hasModel()) {
|
|
114
122
|
const instaService = accessor.get(IInstantiationService);
|
|
115
|
-
await instaService.invokeFunction(formatDocumentWithSelectedProvider, editor,
|
|
123
|
+
await instaService.invokeFunction(formatDocumentWithSelectedProvider, editor, FormattingMode.Explicit, Progress.None, CancellationToken.None, true);
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
});
|
|
@@ -150,7 +158,7 @@ let FormatOnCellExecutionParticipant = class FormatOnCellExecutionParticipant {
|
|
|
150
158
|
const ref = await this.textModelService.createModelReference(activeCell.uri);
|
|
151
159
|
disposable.add(ref);
|
|
152
160
|
const model = ref.object.textEditorModel;
|
|
153
|
-
const formatEdits = await
|
|
161
|
+
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(this.editorWorkerService, this.languageFeaturesService, model, FormattingMode.Silent, CancellationToken.None);
|
|
154
162
|
const edits = [];
|
|
155
163
|
if (formatEdits) {
|
|
156
164
|
edits.push(...( (formatEdits.map(
|
|
@@ -191,6 +199,6 @@ CellExecutionParticipantsContribution = ( (__decorate([
|
|
|
191
199
|
( (__param(1, INotebookExecutionService)))
|
|
192
200
|
], CellExecutionParticipantsContribution)));
|
|
193
201
|
const workbenchContributionsRegistry = ( (Registry.as(Extensions.Workbench)));
|
|
194
|
-
workbenchContributionsRegistry.registerWorkbenchContribution(CellExecutionParticipantsContribution,
|
|
202
|
+
workbenchContributionsRegistry.registerWorkbenchContribution(CellExecutionParticipantsContribution, LifecyclePhase.Restored);
|
|
195
203
|
|
|
196
204
|
export { CellExecutionParticipantsContribution };
|
|
@@ -8,6 +8,7 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
8
8
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
9
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
10
10
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
11
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
11
12
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
12
13
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
13
14
|
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
@@ -15,6 +16,7 @@ import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/com
|
|
|
15
16
|
import { HAS_OPENED_NOTEBOOK } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
16
17
|
import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
17
18
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
19
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
18
20
|
|
|
19
21
|
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted";
|
|
20
22
|
const hasOpenedNotebookKey = 'hasOpenedNotebook';
|
|
@@ -24,7 +26,7 @@ let NotebookGettingStarted = class NotebookGettingStarted extends Disposable {
|
|
|
24
26
|
super();
|
|
25
27
|
const hasOpenedNotebook = HAS_OPENED_NOTEBOOK.bindTo(_contextKeyService);
|
|
26
28
|
const memento = ( (new Memento('notebookGettingStarted2', _storageService)));
|
|
27
|
-
const storedValue = memento.getMemento(
|
|
29
|
+
const storedValue = memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
28
30
|
if (storedValue[hasOpenedNotebookKey]) {
|
|
29
31
|
hasOpenedNotebook.set(true);
|
|
30
32
|
}
|
|
@@ -59,7 +61,7 @@ NotebookGettingStarted = ( (__decorate([
|
|
|
59
61
|
( (__param(3, ICommandService))),
|
|
60
62
|
( (__param(4, IConfigurationService)))
|
|
61
63
|
], NotebookGettingStarted)));
|
|
62
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(NotebookGettingStarted,
|
|
64
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(NotebookGettingStarted, LifecyclePhase.Restored);
|
|
63
65
|
registerAction2(class NotebookClearNotebookLayoutAction extends Action2 {
|
|
64
66
|
constructor() {
|
|
65
67
|
super({
|
|
@@ -73,7 +75,7 @@ registerAction2(class NotebookClearNotebookLayoutAction extends Action2 {
|
|
|
73
75
|
run(accessor) {
|
|
74
76
|
const storageService = accessor.get(IStorageService);
|
|
75
77
|
const memento = ( (new Memento('notebookGettingStarted', storageService)));
|
|
76
|
-
const storedValue = memento.getMemento(
|
|
78
|
+
const storedValue = memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
77
79
|
storedValue[hasOpenedNotebookKey] = undefined;
|
|
78
80
|
memento.saveMemento();
|
|
79
81
|
}
|
|
@@ -5,6 +5,7 @@ import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
|
5
5
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
6
6
|
import { INotebookLoggingService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
|
|
7
7
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
8
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
8
9
|
|
|
9
10
|
let NotebookKernelDetection = class NotebookKernelDetection extends Disposable {
|
|
10
11
|
constructor(_notebookKernelService, _extensionService, _notebookLoggingService) {
|
|
@@ -79,4 +80,4 @@ NotebookKernelDetection = ( __decorate([
|
|
|
79
80
|
( __param(1, IExtensionService)),
|
|
80
81
|
( __param(2, INotebookLoggingService))
|
|
81
82
|
], NotebookKernelDetection));
|
|
82
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookKernelDetection,
|
|
83
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookKernelDetection, LifecyclePhase.Restored);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
2
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
3
|
import { MarkerList, IMarkerNavigationService } from 'vscode/vscode/vs/editor/contrib/gotoError/browser/markerNavigationService';
|
|
4
4
|
import { CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
5
5
|
import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
@@ -98,5 +98,5 @@ NotebookMarkerDecorationContribution.__decorator = ( __decorate([
|
|
|
98
98
|
NotebookMarkerDecorationContribution = ( __decorate([
|
|
99
99
|
( __param(1, IMarkerService))
|
|
100
100
|
], NotebookMarkerDecorationContribution));
|
|
101
|
-
registerWorkbenchContribution2(MarkerListProvider.ID, MarkerListProvider,
|
|
101
|
+
registerWorkbenchContribution2(MarkerListProvider.ID, MarkerListProvider, WorkbenchPhase.BlockRestore);
|
|
102
102
|
registerNotebookContribution(NotebookMarkerDecorationContribution.id, NotebookMarkerDecorationContribution);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { timeout } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
+
import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
3
|
import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
3
4
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
4
5
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
@@ -7,6 +8,7 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
|
|
|
7
8
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
8
9
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
10
|
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
11
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
10
12
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
11
13
|
import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
12
14
|
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
@@ -38,12 +40,12 @@ registerAction2(class extends Action2 {
|
|
|
38
40
|
)),
|
|
39
41
|
keybinding: [{
|
|
40
42
|
when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
|
|
41
|
-
primary:
|
|
42
|
-
weight:
|
|
43
|
+
primary: KeyCode.DownArrow,
|
|
44
|
+
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
43
45
|
}, {
|
|
44
46
|
when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
|
|
45
|
-
primary:
|
|
46
|
-
weight:
|
|
47
|
+
primary: KeyCode.UpArrow,
|
|
48
|
+
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
47
49
|
}],
|
|
48
50
|
f1: false
|
|
49
51
|
});
|
|
@@ -71,7 +73,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
71
73
|
)),
|
|
72
74
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
73
75
|
))),
|
|
74
|
-
primary:
|
|
76
|
+
primary: KeyCode.DownArrow,
|
|
75
77
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
76
78
|
},
|
|
77
79
|
{
|
|
@@ -86,20 +88,20 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
86
88
|
)),
|
|
87
89
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
88
90
|
))),
|
|
89
|
-
primary:
|
|
90
|
-
weight:
|
|
91
|
+
primary: KeyCode.DownArrow,
|
|
92
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
91
93
|
},
|
|
92
94
|
{
|
|
93
95
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
94
|
-
primary:
|
|
95
|
-
mac: { primary:
|
|
96
|
-
weight:
|
|
96
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
97
|
+
mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.DownArrow, },
|
|
98
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
101
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
100
|
-
primary:
|
|
101
|
-
mac: { primary:
|
|
102
|
-
weight:
|
|
102
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown,
|
|
103
|
+
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown, },
|
|
104
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
103
105
|
},
|
|
104
106
|
]
|
|
105
107
|
});
|
|
@@ -146,7 +148,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
146
148
|
)),
|
|
147
149
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
148
150
|
))),
|
|
149
|
-
primary:
|
|
151
|
+
primary: KeyCode.UpArrow,
|
|
150
152
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
151
153
|
},
|
|
152
154
|
{
|
|
@@ -161,14 +163,14 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
161
163
|
)),
|
|
162
164
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
163
165
|
))),
|
|
164
|
-
primary:
|
|
165
|
-
weight:
|
|
166
|
+
primary: KeyCode.UpArrow,
|
|
167
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
166
168
|
},
|
|
167
169
|
{
|
|
168
170
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
169
|
-
primary:
|
|
170
|
-
mac: { primary:
|
|
171
|
-
weight:
|
|
171
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp,
|
|
172
|
+
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp },
|
|
173
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
172
174
|
},
|
|
173
175
|
],
|
|
174
176
|
});
|
|
@@ -201,8 +203,8 @@ registerAction2(class extends NotebookAction {
|
|
|
201
203
|
keybinding: [
|
|
202
204
|
{
|
|
203
205
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
204
|
-
primary:
|
|
205
|
-
weight:
|
|
206
|
+
primary: KeyMod.CtrlCmd | KeyCode.Home,
|
|
207
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
206
208
|
},
|
|
207
209
|
{
|
|
208
210
|
when: ( (ContextKeyExpr.and(
|
|
@@ -210,8 +212,8 @@ registerAction2(class extends NotebookAction {
|
|
|
210
212
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
211
213
|
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
212
214
|
))),
|
|
213
|
-
mac: { primary:
|
|
214
|
-
weight:
|
|
215
|
+
mac: { primary: KeyMod.CtrlCmd | KeyCode.UpArrow },
|
|
216
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
215
217
|
}
|
|
216
218
|
],
|
|
217
219
|
});
|
|
@@ -233,9 +235,9 @@ registerAction2(class extends NotebookAction {
|
|
|
233
235
|
keybinding: [
|
|
234
236
|
{
|
|
235
237
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
236
|
-
primary:
|
|
238
|
+
primary: KeyMod.CtrlCmd | KeyCode.End,
|
|
237
239
|
mac: undefined,
|
|
238
|
-
weight:
|
|
240
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
239
241
|
},
|
|
240
242
|
{
|
|
241
243
|
when: ( (ContextKeyExpr.and(
|
|
@@ -243,8 +245,8 @@ registerAction2(class extends NotebookAction {
|
|
|
243
245
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
244
246
|
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
245
247
|
))),
|
|
246
|
-
mac: { primary:
|
|
247
|
-
weight:
|
|
248
|
+
mac: { primary: KeyMod.CtrlCmd | KeyCode.DownArrow },
|
|
249
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
248
250
|
}
|
|
249
251
|
],
|
|
250
252
|
});
|
|
@@ -269,9 +271,9 @@ registerAction2(class extends NotebookCellAction {
|
|
|
269
271
|
title: ( localizeWithPath(_moduleId, 5, 'Focus In Active Cell Output')),
|
|
270
272
|
keybinding: {
|
|
271
273
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS))),
|
|
272
|
-
primary:
|
|
273
|
-
mac: { primary:
|
|
274
|
-
weight:
|
|
274
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
275
|
+
mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.DownArrow, },
|
|
276
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
275
277
|
},
|
|
276
278
|
});
|
|
277
279
|
}
|
|
@@ -288,9 +290,9 @@ registerAction2(class extends NotebookCellAction {
|
|
|
288
290
|
title: ( localizeWithPath(_moduleId, 6, 'Focus Out Active Cell Output')),
|
|
289
291
|
keybinding: {
|
|
290
292
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
291
|
-
primary:
|
|
292
|
-
mac: { primary:
|
|
293
|
-
weight:
|
|
293
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
|
|
294
|
+
mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.UpArrow, },
|
|
295
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
294
296
|
},
|
|
295
297
|
});
|
|
296
298
|
}
|
|
@@ -307,11 +309,11 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
307
309
|
title: ( localizeWithPath(_moduleId, 7, "Center Active Cell")),
|
|
308
310
|
keybinding: {
|
|
309
311
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
310
|
-
primary:
|
|
312
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
|
311
313
|
mac: {
|
|
312
|
-
primary:
|
|
314
|
+
primary: KeyMod.WinCtrl | KeyCode.KeyL,
|
|
313
315
|
},
|
|
314
|
-
weight:
|
|
316
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
315
317
|
},
|
|
316
318
|
});
|
|
317
319
|
}
|
|
@@ -331,7 +333,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
331
333
|
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
332
334
|
EditorContextKeys.editorTextFocus
|
|
333
335
|
))),
|
|
334
|
-
primary:
|
|
336
|
+
primary: KeyCode.PageUp,
|
|
335
337
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
336
338
|
}
|
|
337
339
|
]
|
|
@@ -354,7 +356,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
354
356
|
EditorContextKeys.editorTextFocus,
|
|
355
357
|
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
356
358
|
))),
|
|
357
|
-
primary:
|
|
359
|
+
primary: KeyMod.Shift | KeyCode.PageUp,
|
|
358
360
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
359
361
|
}
|
|
360
362
|
]
|
|
@@ -376,7 +378,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
376
378
|
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
377
379
|
EditorContextKeys.editorTextFocus
|
|
378
380
|
))),
|
|
379
|
-
primary:
|
|
381
|
+
primary: KeyCode.PageDown,
|
|
380
382
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
381
383
|
}
|
|
382
384
|
]
|
|
@@ -399,7 +401,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
399
401
|
EditorContextKeys.editorTextFocus,
|
|
400
402
|
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
401
403
|
))),
|
|
402
|
-
primary:
|
|
404
|
+
primary: KeyMod.Shift | KeyCode.PageDown,
|
|
403
405
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
404
406
|
}
|
|
405
407
|
]
|