@codingame/monaco-vscode-notebook-service-override 10.0.1 → 10.0.2
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 +8 -8
- 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 +2 -2
- 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 +1 -1
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +13 -13
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +9 -9
- 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.js +12 -12
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +24 -24
- 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/diff/notebookDiffActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +60 -60
- 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/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 +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
|
@@ -66,7 +66,7 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
66
66
|
if (debugViewContainer) {
|
|
67
67
|
const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
68
68
|
const viewDescriptor = {
|
|
69
|
-
id: 'NOTEBOOK_VARIABLES', name: ( localize2(
|
|
69
|
+
id: 'NOTEBOOK_VARIABLES', name: ( localize2(8133, "Notebook Variables")),
|
|
70
70
|
containerIcon: variablesViewIcon, ctorDescriptor: ( (new SyncDescriptor(NotebookVariablesView))),
|
|
71
71
|
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: false, when: NOTEBOOK_VARIABLE_VIEW_ENABLED,
|
|
72
72
|
};
|
|
@@ -74,7 +74,7 @@ class NotebookVariableDataSource {
|
|
|
74
74
|
notebook: parent.notebook,
|
|
75
75
|
id: parent.id + `${last + 1}`,
|
|
76
76
|
extHostId: parent.extHostId,
|
|
77
|
-
name: ( localize(
|
|
77
|
+
name: ( localize(11616, "Display limit reached")),
|
|
78
78
|
value: '',
|
|
79
79
|
indexedChildrenCount: 0,
|
|
80
80
|
hasNamedChildren: false
|
|
@@ -55,10 +55,10 @@ NotebookVariableRenderer = NotebookVariableRenderer_1 = ( (__decorate([
|
|
|
55
55
|
], NotebookVariableRenderer)));
|
|
56
56
|
class NotebookVariableAccessibilityProvider {
|
|
57
57
|
getWidgetAriaLabel() {
|
|
58
|
-
return ( localize(
|
|
58
|
+
return ( localize(11617, "Notebook Variables"));
|
|
59
59
|
}
|
|
60
60
|
getAriaLabel(element) {
|
|
61
|
-
return ( localize(
|
|
61
|
+
return ( localize(11618, "Variable {0}, value {1}", element.name, element.value));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -31,8 +31,8 @@ var NotebookVariablesView_1;
|
|
|
31
31
|
let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
32
32
|
static { NotebookVariablesView_1 = this; }
|
|
33
33
|
static { this.ID = 'notebookVariablesView'; }
|
|
34
|
-
static { this.NOTEBOOK_TITLE = ( localize2(
|
|
35
|
-
static { this.REPL_TITLE = ( localize2(
|
|
34
|
+
static { this.NOTEBOOK_TITLE = ( localize2(10871, "Notebook Variables")); }
|
|
35
|
+
static { this.REPL_TITLE = ( localize2(10872, "REPL Variables")); }
|
|
36
36
|
constructor(options, editorService, notebookKernelService, notebookExecutionStateService, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, themeService, telemetryService, hoverService, menuService) {
|
|
37
37
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
38
38
|
this.editorService = editorService;
|
|
@@ -716,33 +716,33 @@ const NotebookOutlineContext = {
|
|
|
716
716
|
type: 'boolean',
|
|
717
717
|
default: true,
|
|
718
718
|
markdownDescription: ( localize(
|
|
719
|
-
|
|
719
|
+
8058,
|
|
720
720
|
"When enabled, notebook outline will show only markdown cells containing a header."
|
|
721
721
|
))
|
|
722
722
|
},
|
|
723
723
|
[NotebookSetting.outlineShowCodeCells]: {
|
|
724
724
|
type: 'boolean',
|
|
725
725
|
default: false,
|
|
726
|
-
markdownDescription: ( localize(
|
|
726
|
+
markdownDescription: ( localize(8059, "When enabled, notebook outline shows code cells."))
|
|
727
727
|
},
|
|
728
728
|
[NotebookSetting.outlineShowCodeCellSymbols]: {
|
|
729
729
|
type: 'boolean',
|
|
730
730
|
default: true,
|
|
731
731
|
markdownDescription: ( localize(
|
|
732
|
-
|
|
732
|
+
8060,
|
|
733
733
|
"When enabled, notebook outline shows code cell symbols. Relies on `notebook.outline.showCodeCells` being enabled."
|
|
734
734
|
))
|
|
735
735
|
},
|
|
736
736
|
[NotebookSetting.breadcrumbsShowCodeCells]: {
|
|
737
737
|
type: 'boolean',
|
|
738
738
|
default: true,
|
|
739
|
-
markdownDescription: ( localize(
|
|
739
|
+
markdownDescription: ( localize(8061, "When enabled, notebook breadcrumbs contain code cells."))
|
|
740
740
|
},
|
|
741
741
|
[NotebookSetting.gotoSymbolsAllSymbols]: {
|
|
742
742
|
type: 'boolean',
|
|
743
743
|
default: true,
|
|
744
744
|
markdownDescription: ( localize(
|
|
745
|
-
|
|
745
|
+
8062,
|
|
746
746
|
"When enabled, the Go to Symbol Quick Pick will display full code symbols from the notebook, as well as Markdown headers."
|
|
747
747
|
))
|
|
748
748
|
},
|
|
@@ -750,7 +750,7 @@ const NotebookOutlineContext = {
|
|
|
750
750
|
});
|
|
751
751
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
752
752
|
submenu: MenuId.NotebookOutlineFilter,
|
|
753
|
-
title: ( localize(
|
|
753
|
+
title: ( localize(8063, "Filter Entries")),
|
|
754
754
|
icon: Codicon.filter,
|
|
755
755
|
group: 'navigation',
|
|
756
756
|
order: -1,
|
|
@@ -763,7 +763,7 @@ registerAction2(class ToggleShowMarkdownHeadersOnly extends Action2 {
|
|
|
763
763
|
constructor() {
|
|
764
764
|
super({
|
|
765
765
|
id: 'notebook.outline.toggleShowMarkdownHeadersOnly',
|
|
766
|
-
title: ( localize(
|
|
766
|
+
title: ( localize(8064, "Markdown Headers Only")),
|
|
767
767
|
f1: false,
|
|
768
768
|
toggled: {
|
|
769
769
|
condition: ( (ContextKeyExpr.equals('config.notebook.outline.showMarkdownHeadersOnly', true)))
|
|
@@ -784,7 +784,7 @@ registerAction2(class ToggleCodeCellEntries extends Action2 {
|
|
|
784
784
|
constructor() {
|
|
785
785
|
super({
|
|
786
786
|
id: 'notebook.outline.toggleCodeCells',
|
|
787
|
-
title: ( localize(
|
|
787
|
+
title: ( localize(8065, "Code Cells")),
|
|
788
788
|
f1: false,
|
|
789
789
|
toggled: {
|
|
790
790
|
condition: ( (ContextKeyExpr.equals('config.notebook.outline.showCodeCells', true)))
|
|
@@ -806,7 +806,7 @@ registerAction2(class ToggleCodeCellSymbolEntries extends Action2 {
|
|
|
806
806
|
constructor() {
|
|
807
807
|
super({
|
|
808
808
|
id: 'notebook.outline.toggleCodeCellSymbols',
|
|
809
|
-
title: ( localize(
|
|
809
|
+
title: ( localize(8066, "Code Cell Symbols")),
|
|
810
810
|
f1: false,
|
|
811
811
|
toggled: {
|
|
812
812
|
condition: ( (ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true)))
|
|
@@ -60,7 +60,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
60
60
|
if (!enabled) {
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
|
-
progress.report({ message: ( localize(
|
|
63
|
+
progress.report({ message: ( localize(8033, "Formatting")) });
|
|
64
64
|
const notebook = workingCopy.model.notebookModel;
|
|
65
65
|
const formatApplied = await this.instantiationService.invokeFunction(CodeActionParticipantUtils.checkAndRunFormatCodeAction, notebook, progress, token);
|
|
66
66
|
const disposable = ( (new DisposableStore()));
|
|
@@ -80,7 +80,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
80
80
|
}
|
|
81
81
|
return [];
|
|
82
82
|
}))));
|
|
83
|
-
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(
|
|
83
|
+
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(8034, "Format Notebook")), code: 'undoredo.formatNotebook', });
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
finally {
|
|
@@ -153,7 +153,7 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
|
|
|
153
153
|
);
|
|
154
154
|
}))));
|
|
155
155
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
156
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
156
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8035, "Notebook Trim Trailing Whitespace")), code: 'undoredo.notebookTrimTrailingWhitespace' });
|
|
157
157
|
}
|
|
158
158
|
finally {
|
|
159
159
|
progress.report({ increment: 100 });
|
|
@@ -232,7 +232,7 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
|
|
|
232
232
|
);
|
|
233
233
|
}))));
|
|
234
234
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
235
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
235
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8036, "Trim Final New Lines")), code: 'undoredo.trimFinalNewLines' });
|
|
236
236
|
}
|
|
237
237
|
finally {
|
|
238
238
|
progress.report({ increment: 100 });
|
|
@@ -288,7 +288,7 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
|
|
|
288
288
|
);
|
|
289
289
|
}))));
|
|
290
290
|
const filteredEdits = allCellEdits.filter(edit => edit !== undefined);
|
|
291
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
291
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8037, "Insert Final New Line")), code: 'undoredo.insertFinalNewLine' });
|
|
292
292
|
if (activeCellEditor && selections) {
|
|
293
293
|
activeCellEditor.setSelections(selections);
|
|
294
294
|
}
|
|
@@ -344,7 +344,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
344
344
|
const notebookCodeActionsOnSave = includedActions.filter(x => CodeActionKind.Notebook.contains(x));
|
|
345
345
|
if (notebookCodeActionsOnSave.length) {
|
|
346
346
|
const nbDisposable = ( (new DisposableStore()));
|
|
347
|
-
progress.report({ message: ( localize(
|
|
347
|
+
progress.report({ message: ( localize(8038, "Running 'Notebook' code actions")) });
|
|
348
348
|
try {
|
|
349
349
|
const cell = notebookModel.cells[0];
|
|
350
350
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -376,7 +376,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
const cellDisposable = ( (new DisposableStore()));
|
|
379
|
-
progress.report({ message: ( localize(
|
|
379
|
+
progress.report({ message: ( localize(8039, "Running 'Cell' code actions")) });
|
|
380
380
|
try {
|
|
381
381
|
await Promise.all(( (notebookModel.cells.map(async (cell) => {
|
|
382
382
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -416,7 +416,7 @@ class CodeActionParticipantUtils {
|
|
|
416
416
|
const configurationService = accessor.get(IConfigurationService);
|
|
417
417
|
const formatDisposable = ( (new DisposableStore()));
|
|
418
418
|
let formatResult = false;
|
|
419
|
-
progress.report({ message: ( localize(
|
|
419
|
+
progress.report({ message: ( localize(8040, "Running 'Format' code actions")) });
|
|
420
420
|
try {
|
|
421
421
|
const cell = notebookModel.cells[0];
|
|
422
422
|
const ref = await textModelService.createModelReference(cell.uri);
|
|
@@ -445,7 +445,7 @@ class CodeActionParticipantUtils {
|
|
|
445
445
|
_report() {
|
|
446
446
|
progress.report({
|
|
447
447
|
message: ( localize(
|
|
448
|
-
|
|
448
|
+
8041,
|
|
449
449
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
450
450
|
( ([...this._names].map(name => `'${name}'`))).join(', '),
|
|
451
451
|
'command:workbench.action.openSettings?%5B%22notebook.codeActionsOnSave%22%5D'
|
|
@@ -485,7 +485,7 @@ class CodeActionParticipantUtils {
|
|
|
485
485
|
logService.warn('Failed to apply code action on save, applied to multiple resources.');
|
|
486
486
|
continue;
|
|
487
487
|
}
|
|
488
|
-
progress.report({ message: ( localize(
|
|
488
|
+
progress.report({ message: ( localize(8042, "Applying code action '{0}'.", action.action.title)) });
|
|
489
489
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
490
490
|
if (token.isCancellationRequested) {
|
|
491
491
|
return;
|
|
@@ -510,7 +510,7 @@ class CodeActionParticipantUtils {
|
|
|
510
510
|
_report() {
|
|
511
511
|
progress.report({
|
|
512
512
|
message: ( localize(
|
|
513
|
-
|
|
513
|
+
8041,
|
|
514
514
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
515
515
|
( ([...this._names].map(name => `'${name}'`))).join(', '),
|
|
516
516
|
'command:workbench.action.openSettings?%5B%22notebook.defaultFormatter%22%5D'
|
|
@@ -537,7 +537,7 @@ class CodeActionParticipantUtils {
|
|
|
537
537
|
if (!action) {
|
|
538
538
|
return false;
|
|
539
539
|
}
|
|
540
|
-
progress.report({ message: ( localize(
|
|
540
|
+
progress.report({ message: ( localize(8042, "Applying code action '{0}'.", action.action.title)) });
|
|
541
541
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
542
542
|
if (token.isCancellationRequested) {
|
|
543
543
|
return false;
|
|
@@ -93,7 +93,7 @@ registerAction2(class extends Action2 {
|
|
|
93
93
|
constructor() {
|
|
94
94
|
super({
|
|
95
95
|
id: 'notebook.toggleLayoutTroubleshoot',
|
|
96
|
-
title: ( localize2(
|
|
96
|
+
title: ( localize2(8106, "Toggle Layout Troubleshoot")),
|
|
97
97
|
category: Categories.Developer,
|
|
98
98
|
f1: true
|
|
99
99
|
});
|
|
@@ -112,7 +112,7 @@ registerAction2(class extends Action2 {
|
|
|
112
112
|
constructor() {
|
|
113
113
|
super({
|
|
114
114
|
id: 'notebook.inspectLayout',
|
|
115
|
-
title: ( localize2(
|
|
115
|
+
title: ( localize2(8107, "Inspect Notebook Layout")),
|
|
116
116
|
category: Categories.Developer,
|
|
117
117
|
f1: true
|
|
118
118
|
});
|
|
@@ -133,7 +133,7 @@ registerAction2(class extends Action2 {
|
|
|
133
133
|
constructor() {
|
|
134
134
|
super({
|
|
135
135
|
id: 'notebook.clearNotebookEdtitorTypeCache',
|
|
136
|
-
title: ( localize2(
|
|
136
|
+
title: ( localize2(8108, "Clear Notebook Editor Type Cache")),
|
|
137
137
|
category: Categories.Developer,
|
|
138
138
|
f1: true
|
|
139
139
|
});
|
|
@@ -25,7 +25,7 @@ registerAction2(class extends NotebookAction {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super({
|
|
27
27
|
id: 'notebook.cell.chat.accept',
|
|
28
|
-
title: ( localize2(
|
|
28
|
+
title: ( localize2(10833, "Make Request")),
|
|
29
29
|
icon: Codicon.send,
|
|
30
30
|
keybinding: {
|
|
31
31
|
when: ( (ContextKeyExpr.and(
|
|
@@ -53,7 +53,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
super({
|
|
55
55
|
id: 'notebook.cell.chat.arrowOutUp',
|
|
56
|
-
title: ( localize(
|
|
56
|
+
title: ( localize(10834, 'Cursor Up')),
|
|
57
57
|
keybinding: {
|
|
58
58
|
when: ( (ContextKeyExpr.and(
|
|
59
59
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -88,7 +88,7 @@ registerAction2(class extends NotebookAction {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: 'notebook.cell.chat.arrowOutDown',
|
|
91
|
-
title: ( localize(
|
|
91
|
+
title: ( localize(10835, 'Cursor Down')),
|
|
92
92
|
keybinding: {
|
|
93
93
|
when: ( (ContextKeyExpr.and(
|
|
94
94
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -111,7 +111,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: 'notebook.cell.focusChatWidget',
|
|
114
|
-
title: ( localize(
|
|
114
|
+
title: ( localize(10836, 'Focus Chat Widget')),
|
|
115
115
|
keybinding: {
|
|
116
116
|
when: ( (ContextKeyExpr.and(
|
|
117
117
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
@@ -139,7 +139,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
139
139
|
constructor() {
|
|
140
140
|
super({
|
|
141
141
|
id: 'notebook.cell.focusNextChatWidget',
|
|
142
|
-
title: ( localize(
|
|
142
|
+
title: ( localize(10837, 'Focus Next Cell Chat Widget')),
|
|
143
143
|
keybinding: {
|
|
144
144
|
when: ( (ContextKeyExpr.and(
|
|
145
145
|
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
@@ -173,7 +173,7 @@ registerAction2(class extends NotebookAction {
|
|
|
173
173
|
constructor() {
|
|
174
174
|
super({
|
|
175
175
|
id: 'notebook.cell.chat.stop',
|
|
176
|
-
title: ( localize2(
|
|
176
|
+
title: ( localize2(10838, "Stop Request")),
|
|
177
177
|
icon: Codicon.debugStop,
|
|
178
178
|
menu: {
|
|
179
179
|
id: MENU_CELL_CHAT_INPUT,
|
|
@@ -192,7 +192,7 @@ registerAction2(class extends NotebookAction {
|
|
|
192
192
|
constructor() {
|
|
193
193
|
super({
|
|
194
194
|
id: 'notebook.cell.chat.close',
|
|
195
|
-
title: ( localize2(
|
|
195
|
+
title: ( localize2(10839, "Close Chat")),
|
|
196
196
|
icon: Codicon.close,
|
|
197
197
|
menu: {
|
|
198
198
|
id: MENU_CELL_CHAT_WIDGET,
|
|
@@ -210,10 +210,10 @@ registerAction2(class extends NotebookAction {
|
|
|
210
210
|
constructor() {
|
|
211
211
|
super({
|
|
212
212
|
id: 'notebook.cell.chat.acceptChanges',
|
|
213
|
-
title: ( localize2(
|
|
214
|
-
shortTitle: ( localize(
|
|
213
|
+
title: ( localize2(10840, "Accept Changes")),
|
|
214
|
+
shortTitle: ( localize(10841, 'Accept')),
|
|
215
215
|
icon: Codicon.check,
|
|
216
|
-
tooltip: ( localize(
|
|
216
|
+
tooltip: ( localize(10842, 'Accept Changes')),
|
|
217
217
|
keybinding: [
|
|
218
218
|
{
|
|
219
219
|
when: ( (ContextKeyExpr.and(
|
|
@@ -264,7 +264,7 @@ registerAction2(class extends NotebookAction {
|
|
|
264
264
|
constructor() {
|
|
265
265
|
super({
|
|
266
266
|
id: 'notebook.cell.chat.discard',
|
|
267
|
-
title: ( localize(
|
|
267
|
+
title: ( localize(10843, 'Discard')),
|
|
268
268
|
icon: Codicon.discard,
|
|
269
269
|
keybinding: {
|
|
270
270
|
when: ( (ContextKeyExpr.and(
|
|
@@ -310,12 +310,12 @@ registerAction2(class extends NotebookAction {
|
|
|
310
310
|
super({
|
|
311
311
|
id: 'notebook.cell.chat.start',
|
|
312
312
|
title: {
|
|
313
|
-
value: '$(sparkle) ' + ( localize(
|
|
313
|
+
value: '$(sparkle) ' + ( localize(10844, "Generate")),
|
|
314
314
|
original: '$(sparkle) Generate',
|
|
315
315
|
},
|
|
316
|
-
tooltip: ( localize(
|
|
316
|
+
tooltip: ( localize(10845, "Start Chat to Generate Code")),
|
|
317
317
|
metadata: {
|
|
318
|
-
description: ( localize(
|
|
318
|
+
description: ( localize(10845, "Start Chat to Generate Code")),
|
|
319
319
|
args: [
|
|
320
320
|
{
|
|
321
321
|
name: 'args',
|
|
@@ -413,10 +413,10 @@ registerAction2(class extends NotebookAction {
|
|
|
413
413
|
super({
|
|
414
414
|
id: 'notebook.cell.chat.startAtTop',
|
|
415
415
|
title: {
|
|
416
|
-
value: '$(sparkle) ' + ( localize(
|
|
416
|
+
value: '$(sparkle) ' + ( localize(10844, "Generate")),
|
|
417
417
|
original: '$(sparkle) Generate',
|
|
418
418
|
},
|
|
419
|
-
tooltip: ( localize(
|
|
419
|
+
tooltip: ( localize(10845, "Start Chat to Generate Code")),
|
|
420
420
|
f1: false,
|
|
421
421
|
menu: [
|
|
422
422
|
{
|
|
@@ -443,8 +443,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
443
443
|
command: {
|
|
444
444
|
id: 'notebook.cell.chat.start',
|
|
445
445
|
icon: Codicon.sparkle,
|
|
446
|
-
title: ( localize(
|
|
447
|
-
tooltip: ( localize(
|
|
446
|
+
title: ( localize(10846, "Generate")),
|
|
447
|
+
tooltip: ( localize(10847, "Start Chat to Generate Code"))
|
|
448
448
|
},
|
|
449
449
|
order: -10,
|
|
450
450
|
group: 'navigation/add',
|
|
@@ -463,7 +463,7 @@ registerAction2(class extends NotebookAction {
|
|
|
463
463
|
constructor() {
|
|
464
464
|
super({
|
|
465
465
|
id: 'notebook.cell.chat.focus',
|
|
466
|
-
title: ( localize(
|
|
466
|
+
title: ( localize(10848, 'Focus Chat')),
|
|
467
467
|
keybinding: [
|
|
468
468
|
{
|
|
469
469
|
when: ( (ContextKeyExpr.and(
|
|
@@ -495,7 +495,7 @@ registerAction2(class extends NotebookAction {
|
|
|
495
495
|
constructor() {
|
|
496
496
|
super({
|
|
497
497
|
id: 'notebook.cell.chat.focusNextCell',
|
|
498
|
-
title: ( localize(
|
|
498
|
+
title: ( localize(10849, 'Focus Next Cell')),
|
|
499
499
|
keybinding: [
|
|
500
500
|
{
|
|
501
501
|
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
@@ -514,7 +514,7 @@ registerAction2(class extends NotebookAction {
|
|
|
514
514
|
constructor() {
|
|
515
515
|
super({
|
|
516
516
|
id: 'notebook.cell.chat.focusPreviousCell',
|
|
517
|
-
title: ( localize(
|
|
517
|
+
title: ( localize(10850, 'Focus Previous Cell')),
|
|
518
518
|
keybinding: [
|
|
519
519
|
{
|
|
520
520
|
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
@@ -533,7 +533,7 @@ registerAction2(class extends NotebookAction {
|
|
|
533
533
|
constructor() {
|
|
534
534
|
super({
|
|
535
535
|
id: 'notebook.cell.chat.previousFromHistory',
|
|
536
|
-
title: ( localize2(
|
|
536
|
+
title: ( localize2(10851, "Previous From History")),
|
|
537
537
|
precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
538
538
|
keybinding: {
|
|
539
539
|
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
@@ -551,7 +551,7 @@ registerAction2(class extends NotebookAction {
|
|
|
551
551
|
constructor() {
|
|
552
552
|
super({
|
|
553
553
|
id: 'notebook.cell.chat.nextFromHistory',
|
|
554
|
-
title: ( localize2(
|
|
554
|
+
title: ( localize2(10852, "Next From History")),
|
|
555
555
|
precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
556
556
|
keybinding: {
|
|
557
557
|
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
@@ -569,7 +569,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
569
569
|
constructor() {
|
|
570
570
|
super({
|
|
571
571
|
id: 'notebook.cell.chat.restore',
|
|
572
|
-
title: ( localize2(
|
|
572
|
+
title: ( localize2(10853, "Generate")),
|
|
573
573
|
icon: Codicon.sparkle,
|
|
574
574
|
menu: {
|
|
575
575
|
id: MenuId.NotebookCellTitle,
|
|
@@ -605,9 +605,9 @@ class AcceptChangesAndRun extends AbstractInlineChatAction {
|
|
|
605
605
|
constructor() {
|
|
606
606
|
super({
|
|
607
607
|
id: 'notebook.inlineChat.acceptChangesAndRun',
|
|
608
|
-
title: ( localize2(
|
|
609
|
-
shortTitle: ( localize(
|
|
610
|
-
tooltip: ( localize(
|
|
608
|
+
title: ( localize2(10854, "Accept and Run")),
|
|
609
|
+
shortTitle: ( localize(10855, 'Accept & Run')),
|
|
610
|
+
tooltip: ( localize(10856, 'Accept the changes and run the cell')),
|
|
611
611
|
icon: Codicon.check,
|
|
612
612
|
f1: true,
|
|
613
613
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -65,7 +65,7 @@ let NotebookChatContribution = class NotebookChatContribution extends Disposable
|
|
|
65
65
|
result.suggestions.push({
|
|
66
66
|
label: `${chatVariableLeader}${NotebookKernelVariableKey}`,
|
|
67
67
|
insertText: `${chatVariableLeader}${NotebookKernelVariableKey}:`,
|
|
68
|
-
detail: ( localize(
|
|
68
|
+
detail: ( localize(8020, "Pick a variable from the kernel")),
|
|
69
69
|
range,
|
|
70
70
|
kind: 18 ,
|
|
71
71
|
command: { id: SelectAndInsertKernelVariableAction.ID, title: SelectAndInsertKernelVariableAction.ID, arguments: [{ widget, range: afterRange }] },
|
|
@@ -41,7 +41,7 @@ registerAction2(class EditCellAction extends NotebookCellAction {
|
|
|
41
41
|
constructor() {
|
|
42
42
|
super({
|
|
43
43
|
id: EDIT_CELL_COMMAND_ID,
|
|
44
|
-
title: ( localize(
|
|
44
|
+
title: ( localize(7992, "Edit Cell")),
|
|
45
45
|
keybinding: {
|
|
46
46
|
when: ( (ContextKeyExpr.and(
|
|
47
47
|
NOTEBOOK_CELL_LIST_FOCUSED,
|
|
@@ -87,7 +87,7 @@ registerAction2(class QuitEditCellAction extends NotebookCellAction {
|
|
|
87
87
|
constructor() {
|
|
88
88
|
super({
|
|
89
89
|
id: QUIT_EDIT_CELL_COMMAND_ID,
|
|
90
|
-
title: ( localize(
|
|
90
|
+
title: ( localize(7993, "Stop Editing Cell")),
|
|
91
91
|
menu: {
|
|
92
92
|
id: MenuId.NotebookCellTitle,
|
|
93
93
|
when: ( (ContextKeyExpr.and(
|
|
@@ -137,7 +137,7 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
|
137
137
|
constructor() {
|
|
138
138
|
super({
|
|
139
139
|
id: DELETE_CELL_COMMAND_ID,
|
|
140
|
-
title: ( localize(
|
|
140
|
+
title: ( localize(7994, "Delete Cell")),
|
|
141
141
|
keybinding: {
|
|
142
142
|
primary: 20 ,
|
|
143
143
|
mac: {
|
|
@@ -174,13 +174,13 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
|
174
174
|
const configService = accessor.get(IConfigurationService);
|
|
175
175
|
if (runState === NotebookCellExecutionState.Executing && configService.getValue(NotebookSetting.confirmDeleteRunningCell)) {
|
|
176
176
|
const dialogService = accessor.get(IDialogService);
|
|
177
|
-
const primaryButton = ( localize(
|
|
177
|
+
const primaryButton = ( localize(7995, "Delete"));
|
|
178
178
|
confirmation = await dialogService.confirm({
|
|
179
179
|
type: 'question',
|
|
180
|
-
message: ( localize(
|
|
180
|
+
message: ( localize(7996, "This cell is running, are you sure you want to delete it?")),
|
|
181
181
|
primaryButton: primaryButton,
|
|
182
182
|
checkbox: {
|
|
183
|
-
label: ( localize(
|
|
183
|
+
label: ( localize(7997, "Do not ask me again"))
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
}
|
|
@@ -200,7 +200,7 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: CLEAR_CELL_OUTPUTS_COMMAND_ID,
|
|
203
|
-
title: ( localize(
|
|
203
|
+
title: ( localize(7998, 'Clear Cell Outputs')),
|
|
204
204
|
menu: [
|
|
205
205
|
{
|
|
206
206
|
id: MenuId.NotebookCellTitle,
|
|
@@ -271,7 +271,7 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
|
|
|
271
271
|
constructor() {
|
|
272
272
|
super({
|
|
273
273
|
id: CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID,
|
|
274
|
-
title: ( localize(
|
|
274
|
+
title: ( localize(7999, 'Clear All Outputs')),
|
|
275
275
|
precondition: NOTEBOOK_HAS_OUTPUTS,
|
|
276
276
|
menu: [
|
|
277
277
|
{
|
|
@@ -332,9 +332,9 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
332
332
|
constructor() {
|
|
333
333
|
super({
|
|
334
334
|
id: CHANGE_CELL_LANGUAGE,
|
|
335
|
-
title: ( localize(
|
|
335
|
+
title: ( localize(8000, 'Change Cell Language')),
|
|
336
336
|
metadata: {
|
|
337
|
-
description: ( localize(
|
|
337
|
+
description: ( localize(8000, 'Change Cell Language')),
|
|
338
338
|
args: [
|
|
339
339
|
{
|
|
340
340
|
name: 'range',
|
|
@@ -407,10 +407,10 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
407
407
|
providerLanguages.forEach(languageId => {
|
|
408
408
|
let description;
|
|
409
409
|
if (context.cell.cellKind === CellKind.Markup ? (languageId === 'markdown') : (languageId === context.cell.language)) {
|
|
410
|
-
description = ( localize(
|
|
410
|
+
description = ( localize(8001, "({0}) - Current Language", languageId));
|
|
411
411
|
}
|
|
412
412
|
else {
|
|
413
|
-
description = ( localize(
|
|
413
|
+
description = ( localize(8002, "({0})", languageId));
|
|
414
414
|
}
|
|
415
415
|
const languageName = languageService.getLanguageName(languageId);
|
|
416
416
|
if (!languageName) {
|
|
@@ -433,16 +433,16 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
433
433
|
return a.description.localeCompare(b.description);
|
|
434
434
|
});
|
|
435
435
|
const autoDetectMode = {
|
|
436
|
-
label: ( localize(
|
|
436
|
+
label: ( localize(8003, "Auto Detect"))
|
|
437
437
|
};
|
|
438
438
|
const picks = [
|
|
439
439
|
autoDetectMode,
|
|
440
|
-
{ type: 'separator', label: ( localize(
|
|
440
|
+
{ type: 'separator', label: ( localize(8004, "languages (identifier)")) },
|
|
441
441
|
...topItems,
|
|
442
442
|
{ type: 'separator' },
|
|
443
443
|
...mainItems
|
|
444
444
|
];
|
|
445
|
-
const selection = await quickInputService.pick(picks, { placeHolder: ( localize(
|
|
445
|
+
const selection = await quickInputService.pick(picks, { placeHolder: ( localize(8005, "Select Language Mode")) });
|
|
446
446
|
const languageId = selection === autoDetectMode
|
|
447
447
|
? await languageDetectionService.detectLanguage(context.cell.uri)
|
|
448
448
|
: selection?.languageId;
|
|
@@ -475,7 +475,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
475
475
|
constructor() {
|
|
476
476
|
super({
|
|
477
477
|
id: DETECT_CELL_LANGUAGE,
|
|
478
|
-
title: ( localize2(
|
|
478
|
+
title: ( localize2(8006, "Accept Detected Language for Cell")),
|
|
479
479
|
f1: true,
|
|
480
480
|
precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))),
|
|
481
481
|
keybinding: { primary: 34 | 512 | 1024 , weight: 200 }
|
|
@@ -493,7 +493,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
493
493
|
setCellToLanguage(detection, context);
|
|
494
494
|
}
|
|
495
495
|
else {
|
|
496
|
-
notificationService.warn(( localize(
|
|
496
|
+
notificationService.warn(( localize(8007, "Unable to detect cell language")));
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
});
|
|
@@ -518,7 +518,7 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
518
518
|
constructor() {
|
|
519
519
|
super({
|
|
520
520
|
id: SELECT_NOTEBOOK_INDENTATION_ID,
|
|
521
|
-
title: ( localize2(
|
|
521
|
+
title: ( localize2(8008, 'Select Indentation')),
|
|
522
522
|
f1: true,
|
|
523
523
|
precondition: ( (ContextKeyExpr.and(
|
|
524
524
|
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
@@ -536,10 +536,10 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
536
536
|
const instantiationService = accessor.get(IInstantiationService);
|
|
537
537
|
const activeNotebook = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
538
538
|
if (!activeNotebook || activeNotebook.isDisposed) {
|
|
539
|
-
return quickInputService.pick([{ label: ( localize(
|
|
539
|
+
return quickInputService.pick([{ label: ( localize(8009, "No notebook editor active at this time")) }]);
|
|
540
540
|
}
|
|
541
541
|
if (activeNotebook.isReadOnly) {
|
|
542
|
-
return quickInputService.pick([{ label: ( localize(
|
|
542
|
+
return quickInputService.pick([{ label: ( localize(8010, "The active notebook editor is read-only.")) }]);
|
|
543
543
|
}
|
|
544
544
|
const picks = ( ([
|
|
545
545
|
(
|
|
@@ -561,9 +561,9 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
})));
|
|
564
|
-
picks.splice(3, 0, { type: 'separator', label: ( localize(
|
|
565
|
-
picks.unshift({ type: 'separator', label: ( localize(
|
|
566
|
-
const action = await quickInputService.pick(picks, { placeHolder: ( localize(
|
|
564
|
+
picks.splice(3, 0, { type: 'separator', label: ( localize(8011, "convert file")) });
|
|
565
|
+
picks.unshift({ type: 'separator', label: ( localize(8012, "change view")) });
|
|
566
|
+
const action = await quickInputService.pick(picks, { placeHolder: ( localize(8013, "Select Action")), matchOnDetail: true });
|
|
567
567
|
if (!action) {
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
@@ -576,7 +576,7 @@ registerAction2(class CommentSelectedCellsAction extends NotebookMultiCellAction
|
|
|
576
576
|
constructor() {
|
|
577
577
|
super({
|
|
578
578
|
id: COMMENT_SELECTED_CELLS_ID,
|
|
579
|
-
title: ( localize(
|
|
579
|
+
title: ( localize(8014, "Comment Selected Cells")),
|
|
580
580
|
keybinding: {
|
|
581
581
|
when: ( (ContextKeyExpr.and(
|
|
582
582
|
NOTEBOOK_EDITOR_FOCUSED,
|