@codingame/monaco-vscode-notebook-service-override 20.4.1 → 21.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 +24 -23
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +27 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +51 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +22 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +69 -69
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +14 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +3 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +1 -1
|
@@ -78,7 +78,7 @@ let NotebookChatContribution = class NotebookChatContribution extends Disposable
|
|
|
78
78
|
result.suggestions.push({
|
|
79
79
|
label: `${chatVariableLeader}${NotebookKernelVariableKey}`,
|
|
80
80
|
insertText: `${chatVariableLeader}${NotebookKernelVariableKey}:`,
|
|
81
|
-
detail: ( localize(
|
|
81
|
+
detail: ( localize(8841, "Pick a variable from the kernel")),
|
|
82
82
|
range,
|
|
83
83
|
kind: CompletionItemKind.Text,
|
|
84
84
|
command: { id: SelectAndInsertKernelVariableAction.ID, title: SelectAndInsertKernelVariableAction.ID, arguments: [{ widget, range: afterRange }] },
|
|
@@ -174,8 +174,8 @@ class SelectAndInsertKernelVariableAction extends Action2 {
|
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
const placeHolder = quickPickItems.length > 0
|
|
177
|
-
? ( localize(
|
|
178
|
-
: ( localize(
|
|
177
|
+
? ( localize(8842, "Select a kernel variable"))
|
|
178
|
+
: ( localize(8843, "No kernel variables found"));
|
|
179
179
|
const pickedVariable = await quickInputService.pick(quickPickItems, { placeHolder });
|
|
180
180
|
if (!pickedVariable) {
|
|
181
181
|
return;
|
|
@@ -216,7 +216,7 @@ let KernelVariableContextPicker = class KernelVariableContextPicker {
|
|
|
216
216
|
this.editorService = editorService;
|
|
217
217
|
this.notebookKernelService = notebookKernelService;
|
|
218
218
|
this.type = 'pickerPick';
|
|
219
|
-
this.label = ( localize(
|
|
219
|
+
this.label = ( localize(8844, 'Kernel Variable...'));
|
|
220
220
|
this.icon = Codicon.serverEnvironment;
|
|
221
221
|
}
|
|
222
222
|
isEnabled(widget) {
|
|
@@ -253,7 +253,7 @@ let KernelVariableContextPicker = class KernelVariableContextPicker {
|
|
|
253
253
|
return result;
|
|
254
254
|
})();
|
|
255
255
|
return {
|
|
256
|
-
placeholder: ( localize(
|
|
256
|
+
placeholder: ( localize(8845, 'Select a kernel variable')),
|
|
257
257
|
picks
|
|
258
258
|
};
|
|
259
259
|
}
|
|
@@ -266,7 +266,7 @@ registerAction2(class CopyCellOutputAction extends Action2 {
|
|
|
266
266
|
constructor() {
|
|
267
267
|
super({
|
|
268
268
|
id: 'notebook.cellOutput.addToChat',
|
|
269
|
-
title: ( localize(
|
|
269
|
+
title: ( localize(8846, "Add Cell Output to Chat")),
|
|
270
270
|
menu: {
|
|
271
271
|
id: MenuId.NotebookOutputToolbar,
|
|
272
272
|
when: ( ContextKeyExpr.and(
|
|
@@ -24,7 +24,7 @@ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
24
24
|
import { InlineChatController } from '@codingame/monaco-vscode-a793b3ee-7ba9-5176-a019-30ec806fdd95-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
25
25
|
import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
26
26
|
import { runDeleteAction, changeCellToKind } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
|
27
|
-
import { NotebookCellAction, CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder, findTargetCellEditor, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, CELL_TITLE_OUTPUT_GROUP_ID, executeNotebookCondition,
|
|
27
|
+
import { NotebookCellAction, CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder, findTargetCellEditor, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NotebookAction, CELL_TITLE_OUTPUT_GROUP_ID, executeNotebookCondition, NotebookMultiCellAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
28
28
|
import { NotebookIndentUsingTabs, NotebookIndentUsingSpaces, NotebookChangeTabDisplaySize, NotebookIndentationToTabsAction, NotebookIndentationToSpacesAction } from './notebookIndentationActions.js';
|
|
29
29
|
import { QUIT_EDIT_CELL_COMMAND_ID, CellEditState, CHANGE_CELL_LANGUAGE, DETECT_CELL_LANGUAGE, getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
30
30
|
import { editIcon, stopEditIcon, deleteCellIcon, clearIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
@@ -39,6 +39,7 @@ import { NotebookInlineVariablesController } from '../contrib/notebookVariables/
|
|
|
39
39
|
const CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID = 'notebook.clearAllCellsOutputs';
|
|
40
40
|
const EDIT_CELL_COMMAND_ID = 'notebook.cell.edit';
|
|
41
41
|
const DELETE_CELL_COMMAND_ID = 'notebook.cell.delete';
|
|
42
|
+
const QUIT_EDIT_ALL_CELLS_COMMAND_ID = 'notebook.quitEditAllCells';
|
|
42
43
|
const CLEAR_CELL_OUTPUTS_COMMAND_ID = 'notebook.cell.clearOutputs';
|
|
43
44
|
const SELECT_NOTEBOOK_INDENTATION_ID = 'notebook.selectIndentation';
|
|
44
45
|
const COMMENT_SELECTED_CELLS_ID = 'notebook.commentSelectedCells';
|
|
@@ -46,7 +47,7 @@ registerAction2(class EditCellAction extends NotebookCellAction {
|
|
|
46
47
|
constructor() {
|
|
47
48
|
super({
|
|
48
49
|
id: EDIT_CELL_COMMAND_ID,
|
|
49
|
-
title: ( localize(
|
|
50
|
+
title: ( localize(8858, "Edit Cell")),
|
|
50
51
|
keybinding: {
|
|
51
52
|
when: ( ContextKeyExpr.and(
|
|
52
53
|
NOTEBOOK_CELL_LIST_FOCUSED,
|
|
@@ -82,7 +83,7 @@ registerAction2(class QuitEditCellAction extends NotebookCellAction {
|
|
|
82
83
|
constructor() {
|
|
83
84
|
super({
|
|
84
85
|
id: QUIT_EDIT_CELL_COMMAND_ID,
|
|
85
|
-
title: ( localize(
|
|
86
|
+
title: ( localize(8859, "Stop Editing Cell")),
|
|
86
87
|
menu: {
|
|
87
88
|
id: MenuId.NotebookCellTitle,
|
|
88
89
|
when: ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EDITABLE)),
|
|
@@ -119,11 +120,36 @@ registerAction2(class QuitEditCellAction extends NotebookCellAction {
|
|
|
119
120
|
await context.notebookEditor.focusNotebookCell(context.cell, 'container', { skipReveal: true });
|
|
120
121
|
}
|
|
121
122
|
});
|
|
123
|
+
registerAction2(class QuitEditAllCellsAction extends NotebookAction {
|
|
124
|
+
constructor() {
|
|
125
|
+
super({
|
|
126
|
+
id: QUIT_EDIT_ALL_CELLS_COMMAND_ID,
|
|
127
|
+
title: ( localize(8860, "Stop Editing All Cells"))
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async runWithContext(accessor, context) {
|
|
131
|
+
if (!context.notebookEditor.hasModel()) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const viewModel = context.notebookEditor.getViewModel();
|
|
135
|
+
if (!viewModel) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const activeCell = context.notebookEditor.getActiveCell();
|
|
139
|
+
const editingCells = viewModel.viewCells.filter(cell => cell.cellKind === CellKind.Markup && cell.getEditState() === CellEditState.Editing);
|
|
140
|
+
editingCells.forEach(cell => {
|
|
141
|
+
cell.updateEditState(CellEditState.Preview, QUIT_EDIT_ALL_CELLS_COMMAND_ID);
|
|
142
|
+
});
|
|
143
|
+
if (activeCell) {
|
|
144
|
+
await context.notebookEditor.focusNotebookCell(activeCell, 'container', { skipReveal: true });
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
122
148
|
registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
123
149
|
constructor() {
|
|
124
150
|
super({
|
|
125
151
|
id: DELETE_CELL_COMMAND_ID,
|
|
126
|
-
title: ( localize(
|
|
152
|
+
title: ( localize(8861, "Delete Cell")),
|
|
127
153
|
keybinding: {
|
|
128
154
|
primary: KeyCode.Delete,
|
|
129
155
|
mac: {
|
|
@@ -160,13 +186,13 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
|
160
186
|
const configService = accessor.get(IConfigurationService);
|
|
161
187
|
if (runState === NotebookCellExecutionState.Executing && configService.getValue(NotebookSetting.confirmDeleteRunningCell)) {
|
|
162
188
|
const dialogService = accessor.get(IDialogService);
|
|
163
|
-
const primaryButton = ( localize(
|
|
189
|
+
const primaryButton = ( localize(8862, "Delete"));
|
|
164
190
|
confirmation = await dialogService.confirm({
|
|
165
191
|
type: 'question',
|
|
166
|
-
message: ( localize(
|
|
192
|
+
message: ( localize(8863, "This cell is running, are you sure you want to delete it?")),
|
|
167
193
|
primaryButton: primaryButton,
|
|
168
194
|
checkbox: {
|
|
169
|
-
label: ( localize(
|
|
195
|
+
label: ( localize(8864, "Do not ask me again"))
|
|
170
196
|
}
|
|
171
197
|
});
|
|
172
198
|
}
|
|
@@ -186,7 +212,7 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
|
|
|
186
212
|
constructor() {
|
|
187
213
|
super({
|
|
188
214
|
id: CLEAR_CELL_OUTPUTS_COMMAND_ID,
|
|
189
|
-
title: ( localize(
|
|
215
|
+
title: ( localize(8865, 'Clear Cell Outputs')),
|
|
190
216
|
menu: [
|
|
191
217
|
{
|
|
192
218
|
id: MenuId.NotebookCellTitle,
|
|
@@ -250,7 +276,7 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
|
|
|
250
276
|
constructor() {
|
|
251
277
|
super({
|
|
252
278
|
id: CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID,
|
|
253
|
-
title: ( localize(
|
|
279
|
+
title: ( localize(8866, 'Clear All Outputs')),
|
|
254
280
|
precondition: NOTEBOOK_HAS_OUTPUTS,
|
|
255
281
|
menu: [
|
|
256
282
|
{
|
|
@@ -307,14 +333,14 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
307
333
|
constructor() {
|
|
308
334
|
super({
|
|
309
335
|
id: CHANGE_CELL_LANGUAGE,
|
|
310
|
-
title: ( localize(
|
|
336
|
+
title: ( localize(8867, 'Change Cell Language')),
|
|
311
337
|
keybinding: {
|
|
312
338
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
313
339
|
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyM),
|
|
314
340
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))
|
|
315
341
|
},
|
|
316
342
|
metadata: {
|
|
317
|
-
description: ( localize(
|
|
343
|
+
description: ( localize(8867, 'Change Cell Language')),
|
|
318
344
|
args: [
|
|
319
345
|
{
|
|
320
346
|
name: 'range',
|
|
@@ -387,10 +413,10 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
387
413
|
providerLanguages.forEach(languageId => {
|
|
388
414
|
let description;
|
|
389
415
|
if (context.cell.cellKind === CellKind.Markup ? (languageId === 'markdown') : (languageId === context.cell.language)) {
|
|
390
|
-
description = ( localize(
|
|
416
|
+
description = ( localize(8868, "({0}) - Current Language", languageId));
|
|
391
417
|
}
|
|
392
418
|
else {
|
|
393
|
-
description = ( localize(
|
|
419
|
+
description = ( localize(8869, "({0})", languageId));
|
|
394
420
|
}
|
|
395
421
|
const languageName = languageService.getLanguageName(languageId);
|
|
396
422
|
if (!languageName) {
|
|
@@ -413,16 +439,16 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
413
439
|
return a.description.localeCompare(b.description);
|
|
414
440
|
});
|
|
415
441
|
const autoDetectMode = {
|
|
416
|
-
label: ( localize(
|
|
442
|
+
label: ( localize(8870, "Auto Detect"))
|
|
417
443
|
};
|
|
418
444
|
const picks = [
|
|
419
445
|
autoDetectMode,
|
|
420
|
-
{ type: 'separator', label: ( localize(
|
|
446
|
+
{ type: 'separator', label: ( localize(8871, "languages (identifier)")) },
|
|
421
447
|
...topItems,
|
|
422
448
|
{ type: 'separator' },
|
|
423
449
|
...mainItems
|
|
424
450
|
];
|
|
425
|
-
const selection = await quickInputService.pick(picks, { placeHolder: ( localize(
|
|
451
|
+
const selection = await quickInputService.pick(picks, { placeHolder: ( localize(8872, "Select Language Mode")) });
|
|
426
452
|
const languageId = selection === autoDetectMode
|
|
427
453
|
? await languageDetectionService.detectLanguage(context.cell.uri)
|
|
428
454
|
: selection?.languageId;
|
|
@@ -455,7 +481,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
455
481
|
constructor() {
|
|
456
482
|
super({
|
|
457
483
|
id: DETECT_CELL_LANGUAGE,
|
|
458
|
-
title: ( localize2(
|
|
484
|
+
title: ( localize2(8873, "Accept Detected Language for Cell")),
|
|
459
485
|
f1: true,
|
|
460
486
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
|
|
461
487
|
keybinding: { primary: KeyCode.KeyD | KeyMod.Alt | KeyMod.Shift, weight: KeybindingWeight.WorkbenchContrib }
|
|
@@ -473,7 +499,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
473
499
|
setCellToLanguage(detection, context);
|
|
474
500
|
}
|
|
475
501
|
else {
|
|
476
|
-
notificationService.warn(( localize(
|
|
502
|
+
notificationService.warn(( localize(8874, "Unable to detect cell language")));
|
|
477
503
|
}
|
|
478
504
|
}
|
|
479
505
|
});
|
|
@@ -498,7 +524,7 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
498
524
|
constructor() {
|
|
499
525
|
super({
|
|
500
526
|
id: SELECT_NOTEBOOK_INDENTATION_ID,
|
|
501
|
-
title: ( localize2(
|
|
527
|
+
title: ( localize2(8875, 'Select Indentation')),
|
|
502
528
|
f1: true,
|
|
503
529
|
precondition: ( ContextKeyExpr.and(
|
|
504
530
|
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
@@ -516,10 +542,10 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
516
542
|
const instantiationService = accessor.get(IInstantiationService);
|
|
517
543
|
const activeNotebook = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
518
544
|
if (!activeNotebook || activeNotebook.isDisposed) {
|
|
519
|
-
return quickInputService.pick([{ label: ( localize(
|
|
545
|
+
return quickInputService.pick([{ label: ( localize(8876, "No notebook editor active at this time")) }]);
|
|
520
546
|
}
|
|
521
547
|
if (activeNotebook.isReadOnly) {
|
|
522
|
-
return quickInputService.pick([{ label: ( localize(
|
|
548
|
+
return quickInputService.pick([{ label: ( localize(8877, "The active notebook editor is read-only.")) }]);
|
|
523
549
|
}
|
|
524
550
|
const picks = ( [
|
|
525
551
|
(
|
|
@@ -541,9 +567,9 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
541
567
|
}
|
|
542
568
|
};
|
|
543
569
|
}));
|
|
544
|
-
picks.splice(3, 0, { type: 'separator', label: ( localize(
|
|
545
|
-
picks.unshift({ type: 'separator', label: ( localize(
|
|
546
|
-
const action = await quickInputService.pick(picks, { placeHolder: ( localize(
|
|
570
|
+
picks.splice(3, 0, { type: 'separator', label: ( localize(8878, "convert file")) });
|
|
571
|
+
picks.unshift({ type: 'separator', label: ( localize(8879, "change view")) });
|
|
572
|
+
const action = await quickInputService.pick(picks, { placeHolder: ( localize(8880, "Select Action")), matchOnDetail: true });
|
|
547
573
|
if (!action) {
|
|
548
574
|
return;
|
|
549
575
|
}
|
|
@@ -556,7 +582,7 @@ registerAction2(class CommentSelectedCellsAction extends NotebookMultiCellAction
|
|
|
556
582
|
constructor() {
|
|
557
583
|
super({
|
|
558
584
|
id: COMMENT_SELECTED_CELLS_ID,
|
|
559
|
-
title: ( localize(
|
|
585
|
+
title: ( localize(8881, "Comment Selected Cells")),
|
|
560
586
|
keybinding: {
|
|
561
587
|
when: ( ContextKeyExpr.and(
|
|
562
588
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
@@ -134,7 +134,7 @@ registerAction2(class RenderAllMarkdownCellsAction extends NotebookAction {
|
|
|
134
134
|
constructor() {
|
|
135
135
|
super({
|
|
136
136
|
id: RENDER_ALL_MARKDOWN_CELLS,
|
|
137
|
-
title: ( localize(
|
|
137
|
+
title: ( localize(8882, "Render All Markdown Cells")),
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
async runWithContext(accessor, context) {
|
|
@@ -145,10 +145,10 @@ registerAction2(class ExecuteNotebookAction extends NotebookAction {
|
|
|
145
145
|
constructor() {
|
|
146
146
|
super({
|
|
147
147
|
id: EXECUTE_NOTEBOOK_COMMAND_ID,
|
|
148
|
-
title: ( localize(
|
|
148
|
+
title: ( localize(8883, "Run All")),
|
|
149
149
|
icon: executeAllIcon,
|
|
150
150
|
metadata: {
|
|
151
|
-
description: ( localize(
|
|
151
|
+
description: ( localize(8883, "Run All")),
|
|
152
152
|
args: [
|
|
153
153
|
{
|
|
154
154
|
name: 'uri',
|
|
@@ -196,7 +196,7 @@ registerAction2(class ExecuteCell extends NotebookMultiCellAction {
|
|
|
196
196
|
super({
|
|
197
197
|
id: EXECUTE_CELL_COMMAND_ID,
|
|
198
198
|
precondition: executeThisCellCondition,
|
|
199
|
-
title: ( localize(
|
|
199
|
+
title: ( localize(8884, "Execute Cell")),
|
|
200
200
|
keybinding: {
|
|
201
201
|
when: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
202
202
|
primary: KeyMod.WinCtrl | KeyCode.Enter,
|
|
@@ -211,7 +211,7 @@ registerAction2(class ExecuteCell extends NotebookMultiCellAction {
|
|
|
211
211
|
group: 'inline'
|
|
212
212
|
},
|
|
213
213
|
metadata: {
|
|
214
|
-
description: ( localize(
|
|
214
|
+
description: ( localize(8884, "Execute Cell")),
|
|
215
215
|
args: cellExecutionArgs
|
|
216
216
|
},
|
|
217
217
|
icon: executeIcon
|
|
@@ -246,7 +246,7 @@ registerAction2(class ExecuteAboveCells extends NotebookMultiCellAction {
|
|
|
246
246
|
super({
|
|
247
247
|
id: EXECUTE_CELLS_ABOVE,
|
|
248
248
|
precondition: executeCondition,
|
|
249
|
-
title: ( localize(
|
|
249
|
+
title: ( localize(8885, "Execute Above Cells")),
|
|
250
250
|
menu: [
|
|
251
251
|
{
|
|
252
252
|
id: MenuId.NotebookCellExecute,
|
|
@@ -286,7 +286,7 @@ registerAction2(class ExecuteCellAndBelow extends NotebookMultiCellAction {
|
|
|
286
286
|
super({
|
|
287
287
|
id: EXECUTE_CELL_AND_BELOW,
|
|
288
288
|
precondition: executeCondition,
|
|
289
|
-
title: ( localize(
|
|
289
|
+
title: ( localize(8886, "Execute Cell and Below")),
|
|
290
290
|
menu: [
|
|
291
291
|
{
|
|
292
292
|
id: MenuId.NotebookCellExecute,
|
|
@@ -326,9 +326,9 @@ registerAction2(class ExecuteCellFocusContainer extends NotebookMultiCellAction
|
|
|
326
326
|
super({
|
|
327
327
|
id: EXECUTE_CELL_FOCUS_CONTAINER_COMMAND_ID,
|
|
328
328
|
precondition: executeThisCellCondition,
|
|
329
|
-
title: ( localize(
|
|
329
|
+
title: ( localize(8887, "Execute Cell and Focus Container")),
|
|
330
330
|
metadata: {
|
|
331
|
-
description: ( localize(
|
|
331
|
+
description: ( localize(8887, "Execute Cell and Focus Container")),
|
|
332
332
|
args: cellExecutionArgs
|
|
333
333
|
},
|
|
334
334
|
icon: executeIcon
|
|
@@ -358,7 +358,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
358
358
|
super({
|
|
359
359
|
id: CANCEL_CELL_COMMAND_ID,
|
|
360
360
|
precondition: cellCancelCondition,
|
|
361
|
-
title: ( localize(
|
|
361
|
+
title: ( localize(8888, "Stop Cell Execution")),
|
|
362
362
|
icon: stopIcon,
|
|
363
363
|
menu: {
|
|
364
364
|
id: MenuId.NotebookCellExecutePrimary,
|
|
@@ -366,7 +366,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
366
366
|
group: 'inline'
|
|
367
367
|
},
|
|
368
368
|
metadata: {
|
|
369
|
-
description: ( localize(
|
|
369
|
+
description: ( localize(8888, "Stop Cell Execution")),
|
|
370
370
|
args: [
|
|
371
371
|
{
|
|
372
372
|
name: 'options',
|
|
@@ -421,7 +421,7 @@ registerAction2(class ExecuteCellSelectBelow extends NotebookCellAction {
|
|
|
421
421
|
super({
|
|
422
422
|
id: EXECUTE_CELL_SELECT_BELOW,
|
|
423
423
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')))),
|
|
424
|
-
title: ( localize(
|
|
424
|
+
title: ( localize(8889, "Execute Notebook Cell and Select Below")),
|
|
425
425
|
keybinding: {
|
|
426
426
|
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( CTX_INLINE_CHAT_FOCUSED.negate()))),
|
|
427
427
|
primary: KeyMod.Shift | KeyCode.Enter,
|
|
@@ -482,7 +482,7 @@ registerAction2(class ExecuteCellInsertBelow extends NotebookCellAction {
|
|
|
482
482
|
super({
|
|
483
483
|
id: EXECUTE_CELL_INSERT_BELOW,
|
|
484
484
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')))),
|
|
485
|
-
title: ( localize(
|
|
485
|
+
title: ( localize(8890, "Execute Notebook Cell and Insert Below")),
|
|
486
486
|
keybinding: {
|
|
487
487
|
when: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
488
488
|
primary: KeyMod.Alt | KeyCode.Enter,
|
|
@@ -520,7 +520,7 @@ registerAction2(class CancelAllNotebook extends CancelNotebook {
|
|
|
520
520
|
constructor() {
|
|
521
521
|
super({
|
|
522
522
|
id: CANCEL_NOTEBOOK_COMMAND_ID,
|
|
523
|
-
title: ( localize2(
|
|
523
|
+
title: ( localize2(8891, "Stop Execution")),
|
|
524
524
|
icon: stopIcon,
|
|
525
525
|
menu: [
|
|
526
526
|
{
|
|
@@ -543,7 +543,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
543
543
|
constructor() {
|
|
544
544
|
super({
|
|
545
545
|
id: INTERRUPT_NOTEBOOK_COMMAND_ID,
|
|
546
|
-
title: ( localize2(
|
|
546
|
+
title: ( localize2(8892, "Interrupt")),
|
|
547
547
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_HAS_SOMETHING_RUNNING, NOTEBOOK_INTERRUPTIBLE_KERNEL)),
|
|
548
548
|
icon: stopIcon,
|
|
549
549
|
menu: [
|
|
@@ -577,7 +577,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
579
|
MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
580
|
-
title: ( localize(
|
|
580
|
+
title: ( localize(8893, "Go To")),
|
|
581
581
|
submenu: MenuId.NotebookCellExecuteGoTo,
|
|
582
582
|
group: 'navigation/execute',
|
|
583
583
|
order: 20,
|
|
@@ -587,9 +587,9 @@ registerAction2(class RevealRunningCellAction extends NotebookAction {
|
|
|
587
587
|
constructor() {
|
|
588
588
|
super({
|
|
589
589
|
id: REVEAL_RUNNING_CELL,
|
|
590
|
-
title: ( localize(
|
|
591
|
-
tooltip: ( localize(
|
|
592
|
-
shortTitle: ( localize(
|
|
590
|
+
title: ( localize(8894, "Go to Running Cell")),
|
|
591
|
+
tooltip: ( localize(8894, "Go to Running Cell")),
|
|
592
|
+
shortTitle: ( localize(8894, "Go to Running Cell")),
|
|
593
593
|
precondition: NOTEBOOK_HAS_RUNNING_CELL,
|
|
594
594
|
menu: [
|
|
595
595
|
{
|
|
@@ -647,9 +647,9 @@ registerAction2(class RevealLastFailedCellAction extends NotebookAction {
|
|
|
647
647
|
constructor() {
|
|
648
648
|
super({
|
|
649
649
|
id: REVEAL_LAST_FAILED_CELL,
|
|
650
|
-
title: ( localize(
|
|
651
|
-
tooltip: ( localize(
|
|
652
|
-
shortTitle: ( localize(
|
|
650
|
+
title: ( localize(8895, "Go to Most Recently Failed Cell")),
|
|
651
|
+
tooltip: ( localize(8895, "Go to Most Recently Failed Cell")),
|
|
652
|
+
shortTitle: ( localize(8896, "Go to Most Recently Failed Cell")),
|
|
653
653
|
precondition: NOTEBOOK_LAST_CELL_FAILED,
|
|
654
654
|
menu: [
|
|
655
655
|
{
|
|
@@ -58,7 +58,7 @@ registerAction2(class InsertCodeCellAboveAction extends InsertCellCommand {
|
|
|
58
58
|
constructor() {
|
|
59
59
|
super({
|
|
60
60
|
id: INSERT_CODE_CELL_ABOVE_COMMAND_ID,
|
|
61
|
-
title: ( localize(
|
|
61
|
+
title: ( localize(8899, "Insert Code Cell Above")),
|
|
62
62
|
keybinding: {
|
|
63
63
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
|
|
64
64
|
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()))),
|
|
@@ -75,7 +75,7 @@ registerAction2(class InsertCodeCellAboveAndFocusContainerAction extends InsertC
|
|
|
75
75
|
constructor() {
|
|
76
76
|
super({
|
|
77
77
|
id: INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID,
|
|
78
|
-
title: ( localize(
|
|
78
|
+
title: ( localize(8900, "Insert Code Cell Above and Focus Container"))
|
|
79
79
|
}, CellKind.Code, 'above', false);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -83,7 +83,7 @@ registerAction2(class InsertCodeCellBelowAction extends InsertCellCommand {
|
|
|
83
83
|
constructor() {
|
|
84
84
|
super({
|
|
85
85
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
86
|
-
title: ( localize(
|
|
86
|
+
title: ( localize(8901, "Insert Code Cell Below")),
|
|
87
87
|
keybinding: {
|
|
88
88
|
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
89
89
|
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()), ( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('')))),
|
|
@@ -100,7 +100,7 @@ registerAction2(class InsertCodeCellBelowAndFocusContainerAction extends InsertC
|
|
|
100
100
|
constructor() {
|
|
101
101
|
super({
|
|
102
102
|
id: INSERT_CODE_CELL_BELOW_AND_FOCUS_CONTAINER_COMMAND_ID,
|
|
103
|
-
title: ( localize(
|
|
103
|
+
title: ( localize(8902, "Insert Code Cell Below and Focus Container")),
|
|
104
104
|
}, CellKind.Code, 'below', false);
|
|
105
105
|
}
|
|
106
106
|
});
|
|
@@ -108,7 +108,7 @@ registerAction2(class InsertMarkdownCellAboveAction extends InsertCellCommand {
|
|
|
108
108
|
constructor() {
|
|
109
109
|
super({
|
|
110
110
|
id: INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID,
|
|
111
|
-
title: ( localize(
|
|
111
|
+
title: ( localize(8903, "Insert Markdown Cell Above")),
|
|
112
112
|
menu: {
|
|
113
113
|
id: MenuId.NotebookCellInsert,
|
|
114
114
|
order: 2
|
|
@@ -120,7 +120,7 @@ registerAction2(class InsertMarkdownCellBelowAction extends InsertCellCommand {
|
|
|
120
120
|
constructor() {
|
|
121
121
|
super({
|
|
122
122
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
123
|
-
title: ( localize(
|
|
123
|
+
title: ( localize(8904, "Insert Markdown Cell Below")),
|
|
124
124
|
menu: {
|
|
125
125
|
id: MenuId.NotebookCellInsert,
|
|
126
126
|
order: 3
|
|
@@ -132,7 +132,7 @@ registerAction2(class InsertCodeCellAtTopAction extends NotebookAction {
|
|
|
132
132
|
constructor() {
|
|
133
133
|
super({
|
|
134
134
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
135
|
-
title: ( localize(
|
|
135
|
+
title: ( localize(8905, "Add Code Cell At Top")),
|
|
136
136
|
f1: false
|
|
137
137
|
});
|
|
138
138
|
}
|
|
@@ -155,7 +155,7 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
|
|
|
155
155
|
constructor() {
|
|
156
156
|
super({
|
|
157
157
|
id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
|
|
158
|
-
title: ( localize(
|
|
158
|
+
title: ( localize(8906, "Add Markdown Cell At Top")),
|
|
159
159
|
f1: false
|
|
160
160
|
});
|
|
161
161
|
}
|
|
@@ -177,8 +177,8 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
|
|
|
177
177
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
178
178
|
command: {
|
|
179
179
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
180
|
-
title: '$(add) ' + ( localize(
|
|
181
|
-
tooltip: ( localize(
|
|
180
|
+
title: '$(add) ' + ( localize(8907, "Code")),
|
|
181
|
+
tooltip: ( localize(8908, "Add Code Cell"))
|
|
182
182
|
},
|
|
183
183
|
order: 0,
|
|
184
184
|
group: 'inline',
|
|
@@ -187,9 +187,9 @@ MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
|
187
187
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
188
188
|
command: {
|
|
189
189
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
190
|
-
title: ( localize(
|
|
190
|
+
title: ( localize(8909, "Add Code")),
|
|
191
191
|
icon: Codicon.add,
|
|
192
|
-
tooltip: ( localize(
|
|
192
|
+
tooltip: ( localize(8908, "Add Code Cell"))
|
|
193
193
|
},
|
|
194
194
|
order: 0,
|
|
195
195
|
group: 'inline',
|
|
@@ -199,8 +199,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
199
199
|
command: {
|
|
200
200
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
201
201
|
icon: Codicon.add,
|
|
202
|
-
title: ( localize(
|
|
203
|
-
tooltip: ( localize(
|
|
202
|
+
title: ( localize(8910, "Code")),
|
|
203
|
+
tooltip: ( localize(8908, "Add Code Cell"))
|
|
204
204
|
},
|
|
205
205
|
order: -5,
|
|
206
206
|
group: 'navigation/add',
|
|
@@ -209,8 +209,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
209
209
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
210
210
|
command: {
|
|
211
211
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
212
|
-
title: '$(add) ' + ( localize(
|
|
213
|
-
tooltip: ( localize(
|
|
212
|
+
title: '$(add) ' + ( localize(8907, "Code")),
|
|
213
|
+
tooltip: ( localize(8908, "Add Code Cell"))
|
|
214
214
|
},
|
|
215
215
|
order: 0,
|
|
216
216
|
group: 'inline',
|
|
@@ -219,9 +219,9 @@ MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
|
219
219
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
220
220
|
command: {
|
|
221
221
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
222
|
-
title: ( localize(
|
|
222
|
+
title: ( localize(8911, "Add Code")),
|
|
223
223
|
icon: Codicon.add,
|
|
224
|
-
tooltip: ( localize(
|
|
224
|
+
tooltip: ( localize(8908, "Add Code Cell"))
|
|
225
225
|
},
|
|
226
226
|
order: 0,
|
|
227
227
|
group: 'inline',
|
|
@@ -230,8 +230,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
|
230
230
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
231
231
|
command: {
|
|
232
232
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
233
|
-
title: '$(add) ' + ( localize(
|
|
234
|
-
tooltip: ( localize(
|
|
233
|
+
title: '$(add) ' + ( localize(8912, "Markdown")),
|
|
234
|
+
tooltip: ( localize(8913, "Add Markdown Cell"))
|
|
235
235
|
},
|
|
236
236
|
order: 1,
|
|
237
237
|
group: 'inline',
|
|
@@ -241,8 +241,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
241
241
|
command: {
|
|
242
242
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
243
243
|
icon: Codicon.add,
|
|
244
|
-
title: ( localize(
|
|
245
|
-
tooltip: ( localize(
|
|
244
|
+
title: ( localize(8914, "Markdown")),
|
|
245
|
+
tooltip: ( localize(8913, "Add Markdown Cell"))
|
|
246
246
|
},
|
|
247
247
|
order: -5,
|
|
248
248
|
group: 'navigation/add',
|
|
@@ -251,8 +251,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
251
251
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
252
252
|
command: {
|
|
253
253
|
id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
|
|
254
|
-
title: '$(add) ' + ( localize(
|
|
255
|
-
tooltip: ( localize(
|
|
254
|
+
title: '$(add) ' + ( localize(8912, "Markdown")),
|
|
255
|
+
tooltip: ( localize(8913, "Add Markdown Cell"))
|
|
256
256
|
},
|
|
257
257
|
order: 1,
|
|
258
258
|
group: 'inline',
|