@codingame/monaco-vscode-notebook-service-override 14.0.2 → 14.0.4
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 +29 -29
- 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 +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 +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 +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 +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/controller/variablesActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +65 -65
- 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
|
@@ -34,7 +34,7 @@ registerAction2(class extends Action2 {
|
|
|
34
34
|
super({
|
|
35
35
|
id: 'notebook.cell.nullAction',
|
|
36
36
|
title: ( localize(
|
|
37
|
-
|
|
37
|
+
7525,
|
|
38
38
|
"Keypresses that should be handled by the focused element in the cell output."
|
|
39
39
|
)),
|
|
40
40
|
keybinding: [{
|
|
@@ -57,7 +57,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
57
57
|
constructor() {
|
|
58
58
|
super({
|
|
59
59
|
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
60
|
-
title: ( localize(
|
|
60
|
+
title: ( localize(7526, 'Focus Next Cell Editor')),
|
|
61
61
|
keybinding: [
|
|
62
62
|
{
|
|
63
63
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
@@ -111,7 +111,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
114
|
-
title: ( localize(
|
|
114
|
+
title: ( localize(7527, 'Focus Previous Cell Editor')),
|
|
115
115
|
keybinding: [
|
|
116
116
|
{
|
|
117
117
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
@@ -156,7 +156,7 @@ registerAction2(class extends NotebookAction {
|
|
|
156
156
|
constructor() {
|
|
157
157
|
super({
|
|
158
158
|
id: NOTEBOOK_FOCUS_TOP,
|
|
159
|
-
title: ( localize(
|
|
159
|
+
title: ( localize(7528, 'Focus First Cell')),
|
|
160
160
|
keybinding: [
|
|
161
161
|
{
|
|
162
162
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -188,7 +188,7 @@ registerAction2(class extends NotebookAction {
|
|
|
188
188
|
constructor() {
|
|
189
189
|
super({
|
|
190
190
|
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
191
|
-
title: ( localize(
|
|
191
|
+
title: ( localize(7529, 'Focus Last Cell')),
|
|
192
192
|
keybinding: [
|
|
193
193
|
{
|
|
194
194
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -225,7 +225,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
225
225
|
constructor() {
|
|
226
226
|
super({
|
|
227
227
|
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
228
|
-
title: ( localize(
|
|
228
|
+
title: ( localize(7530, 'Focus In Active Cell Output')),
|
|
229
229
|
keybinding: [{
|
|
230
230
|
when: ( ContextKeyExpr.and(( IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext)),
|
|
231
231
|
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
@@ -248,7 +248,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
248
248
|
constructor() {
|
|
249
249
|
super({
|
|
250
250
|
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
251
|
-
title: ( localize(
|
|
251
|
+
title: ( localize(7531, 'Focus Out Active Cell Output')),
|
|
252
252
|
keybinding: {
|
|
253
253
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
|
|
254
254
|
mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.UpArrow, },
|
|
@@ -267,7 +267,7 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: CENTER_ACTIVE_CELL,
|
|
270
|
-
title: ( localize(
|
|
270
|
+
title: ( localize(7532, "Center Active Cell")),
|
|
271
271
|
keybinding: {
|
|
272
272
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
273
273
|
primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
|
@@ -286,7 +286,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
286
286
|
constructor() {
|
|
287
287
|
super({
|
|
288
288
|
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
289
|
-
title: ( localize(
|
|
289
|
+
title: ( localize(7533, "Cell Cursor Page Up")),
|
|
290
290
|
keybinding: [
|
|
291
291
|
{
|
|
292
292
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
@@ -304,7 +304,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
304
304
|
constructor() {
|
|
305
305
|
super({
|
|
306
306
|
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
307
|
-
title: ( localize(
|
|
307
|
+
title: ( localize(7534, "Cell Cursor Page Up Select")),
|
|
308
308
|
keybinding: [
|
|
309
309
|
{
|
|
310
310
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
@@ -322,7 +322,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
322
322
|
constructor() {
|
|
323
323
|
super({
|
|
324
324
|
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
325
|
-
title: ( localize(
|
|
325
|
+
title: ( localize(7535, "Cell Cursor Page Down")),
|
|
326
326
|
keybinding: [
|
|
327
327
|
{
|
|
328
328
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
@@ -340,7 +340,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
340
340
|
constructor() {
|
|
341
341
|
super({
|
|
342
342
|
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
343
|
-
title: ( localize(
|
|
343
|
+
title: ( localize(7536, "Cell Cursor Page Down Select")),
|
|
344
344
|
keybinding: [
|
|
345
345
|
{
|
|
346
346
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
@@ -369,7 +369,7 @@ function getPageSize(context) {
|
|
|
369
369
|
type: 'boolean',
|
|
370
370
|
default: true,
|
|
371
371
|
markdownDescription: ( localize(
|
|
372
|
-
|
|
372
|
+
7537,
|
|
373
373
|
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
374
374
|
))
|
|
375
375
|
}
|
|
@@ -296,7 +296,7 @@ registerAction2(class ClearNotebookInlineValues extends NotebookAction {
|
|
|
296
296
|
constructor() {
|
|
297
297
|
super({
|
|
298
298
|
id: 'notebook.clearAllInlineValues',
|
|
299
|
-
title: ( localize(
|
|
299
|
+
title: ( localize(7538, 'Clear All Inline Values')),
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
runWithContext(accessor, context) {
|
|
@@ -63,7 +63,7 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
63
63
|
if (debugViewContainer) {
|
|
64
64
|
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
65
65
|
const viewDescriptor = {
|
|
66
|
-
id: 'workbench.notebook.variables', name: ( localize2(
|
|
66
|
+
id: 'workbench.notebook.variables', name: ( localize2(7541, "Notebook Variables")),
|
|
67
67
|
containerIcon: variablesViewIcon, ctorDescriptor: ( new SyncDescriptor(NotebookVariablesView)),
|
|
68
68
|
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: false, when: NOTEBOOK_VARIABLE_VIEW_ENABLED
|
|
69
69
|
};
|
|
@@ -78,7 +78,7 @@ class NotebookVariableDataSource {
|
|
|
78
78
|
notebook: parent.notebook,
|
|
79
79
|
id: parent.id + `${last + 1}`,
|
|
80
80
|
extHostId: parent.extHostId,
|
|
81
|
-
name: ( localize(
|
|
81
|
+
name: ( localize(7542, "Display limit reached")),
|
|
82
82
|
value: '',
|
|
83
83
|
indexedChildrenCount: 0,
|
|
84
84
|
hasNamedChildren: false
|
|
@@ -56,10 +56,10 @@ NotebookVariableRenderer = NotebookVariableRenderer_1 = ( __decorate([
|
|
|
56
56
|
], NotebookVariableRenderer));
|
|
57
57
|
class NotebookVariableAccessibilityProvider {
|
|
58
58
|
getWidgetAriaLabel() {
|
|
59
|
-
return localize(
|
|
59
|
+
return localize(7543, "Notebook Variables");
|
|
60
60
|
}
|
|
61
61
|
getAriaLabel(element) {
|
|
62
|
-
return localize(
|
|
62
|
+
return localize(7544, "Variable {0}, value {1}", element.name, element.value);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -32,8 +32,8 @@ var NotebookVariablesView_1;
|
|
|
32
32
|
let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
33
33
|
static { NotebookVariablesView_1 = this; }
|
|
34
34
|
static { this.ID = 'notebookVariablesView'; }
|
|
35
|
-
static { this.NOTEBOOK_TITLE = ( localize2(
|
|
36
|
-
static { this.REPL_TITLE = ( localize2(
|
|
35
|
+
static { this.NOTEBOOK_TITLE = ( localize2(7545, "Notebook Variables")); }
|
|
36
|
+
static { this.REPL_TITLE = ( localize2(7546, "REPL Variables")); }
|
|
37
37
|
constructor(options, editorService, notebookKernelService, notebookExecutionStateService, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, themeService, telemetryService, hoverService, menuService) {
|
|
38
38
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
39
39
|
this.editorService = editorService;
|
|
@@ -728,33 +728,33 @@ const NotebookOutlineContext = {
|
|
|
728
728
|
type: 'boolean',
|
|
729
729
|
default: true,
|
|
730
730
|
markdownDescription: ( localize(
|
|
731
|
-
|
|
731
|
+
7547,
|
|
732
732
|
"When enabled, notebook outline will show only markdown cells containing a header."
|
|
733
733
|
))
|
|
734
734
|
},
|
|
735
735
|
[NotebookSetting.outlineShowCodeCells]: {
|
|
736
736
|
type: 'boolean',
|
|
737
737
|
default: false,
|
|
738
|
-
markdownDescription: ( localize(
|
|
738
|
+
markdownDescription: ( localize(7548, "When enabled, notebook outline shows code cells."))
|
|
739
739
|
},
|
|
740
740
|
[NotebookSetting.outlineShowCodeCellSymbols]: {
|
|
741
741
|
type: 'boolean',
|
|
742
742
|
default: true,
|
|
743
743
|
markdownDescription: ( localize(
|
|
744
|
-
|
|
744
|
+
7549,
|
|
745
745
|
"When enabled, notebook outline shows code cell symbols. Relies on `notebook.outline.showCodeCells` being enabled."
|
|
746
746
|
))
|
|
747
747
|
},
|
|
748
748
|
[NotebookSetting.breadcrumbsShowCodeCells]: {
|
|
749
749
|
type: 'boolean',
|
|
750
750
|
default: true,
|
|
751
|
-
markdownDescription: ( localize(
|
|
751
|
+
markdownDescription: ( localize(7550, "When enabled, notebook breadcrumbs contain code cells."))
|
|
752
752
|
},
|
|
753
753
|
[NotebookSetting.gotoSymbolsAllSymbols]: {
|
|
754
754
|
type: 'boolean',
|
|
755
755
|
default: true,
|
|
756
756
|
markdownDescription: ( localize(
|
|
757
|
-
|
|
757
|
+
7551,
|
|
758
758
|
"When enabled, the Go to Symbol Quick Pick will display full code symbols from the notebook, as well as Markdown headers."
|
|
759
759
|
))
|
|
760
760
|
},
|
|
@@ -762,7 +762,7 @@ const NotebookOutlineContext = {
|
|
|
762
762
|
});
|
|
763
763
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
764
764
|
submenu: MenuId.NotebookOutlineFilter,
|
|
765
|
-
title: ( localize(
|
|
765
|
+
title: ( localize(7552, "Filter Entries")),
|
|
766
766
|
icon: Codicon.filter,
|
|
767
767
|
group: 'navigation',
|
|
768
768
|
order: -1,
|
|
@@ -772,7 +772,7 @@ registerAction2(class ToggleShowMarkdownHeadersOnly extends Action2 {
|
|
|
772
772
|
constructor() {
|
|
773
773
|
super({
|
|
774
774
|
id: 'notebook.outline.toggleShowMarkdownHeadersOnly',
|
|
775
|
-
title: ( localize(
|
|
775
|
+
title: ( localize(7553, "Markdown Headers Only")),
|
|
776
776
|
f1: false,
|
|
777
777
|
toggled: {
|
|
778
778
|
condition: ( ContextKeyExpr.equals('config.notebook.outline.showMarkdownHeadersOnly', true))
|
|
@@ -793,7 +793,7 @@ registerAction2(class ToggleCodeCellEntries extends Action2 {
|
|
|
793
793
|
constructor() {
|
|
794
794
|
super({
|
|
795
795
|
id: 'notebook.outline.toggleCodeCells',
|
|
796
|
-
title: ( localize(
|
|
796
|
+
title: ( localize(7554, "Code Cells")),
|
|
797
797
|
f1: false,
|
|
798
798
|
toggled: {
|
|
799
799
|
condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCells', true))
|
|
@@ -815,7 +815,7 @@ registerAction2(class ToggleCodeCellSymbolEntries extends Action2 {
|
|
|
815
815
|
constructor() {
|
|
816
816
|
super({
|
|
817
817
|
id: 'notebook.outline.toggleCodeCellSymbols',
|
|
818
|
-
title: ( localize(
|
|
818
|
+
title: ( localize(7555, "Code Cell Symbols")),
|
|
819
819
|
f1: false,
|
|
820
820
|
toggled: {
|
|
821
821
|
condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true))
|
|
@@ -64,7 +64,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
64
64
|
if (!enabled) {
|
|
65
65
|
return undefined;
|
|
66
66
|
}
|
|
67
|
-
progress.report({ message: ( localize(
|
|
67
|
+
progress.report({ message: ( localize(7557, "Formatting")) });
|
|
68
68
|
const notebook = workingCopy.model.notebookModel;
|
|
69
69
|
const formatApplied = await this.instantiationService.invokeFunction(CodeActionParticipantUtils.checkAndRunFormatCodeAction, notebook, progress, token);
|
|
70
70
|
const disposable = ( new DisposableStore());
|
|
@@ -82,7 +82,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
82
82
|
}
|
|
83
83
|
return [];
|
|
84
84
|
})));
|
|
85
|
-
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(
|
|
85
|
+
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(7558, "Format Notebook")), code: 'undoredo.formatNotebook', });
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
finally {
|
|
@@ -151,7 +151,7 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
|
|
|
151
151
|
return ( ops.map(op => ( new ResourceTextEdit(model.uri, { ...op, text: op.text || '' }, model.getVersionId()))));
|
|
152
152
|
})));
|
|
153
153
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
154
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
154
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(7559, "Notebook Trim Trailing Whitespace")), code: 'undoredo.notebookTrimTrailingWhitespace' });
|
|
155
155
|
}
|
|
156
156
|
finally {
|
|
157
157
|
progress.report({ increment: 100 });
|
|
@@ -228,7 +228,7 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
|
|
|
228
228
|
));
|
|
229
229
|
})));
|
|
230
230
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
231
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
231
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(7560, "Trim Final New Lines")), code: 'undoredo.trimFinalNewLines' });
|
|
232
232
|
}
|
|
233
233
|
finally {
|
|
234
234
|
progress.report({ increment: 100 });
|
|
@@ -282,7 +282,7 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
|
|
|
282
282
|
)), text: cell.textBuffer.getEOL() }, cell.textModel?.getVersionId()));
|
|
283
283
|
})));
|
|
284
284
|
const filteredEdits = allCellEdits.filter(edit => edit !== undefined);
|
|
285
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
285
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(7561, "Insert Final New Line")), code: 'undoredo.insertFinalNewLine' });
|
|
286
286
|
if (activeCellEditor && selections) {
|
|
287
287
|
activeCellEditor.setSelections(selections);
|
|
288
288
|
}
|
|
@@ -338,7 +338,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
338
338
|
const notebookCodeActionsOnSave = includedActions.filter(x => CodeActionKind.Notebook.contains(x));
|
|
339
339
|
if (notebookCodeActionsOnSave.length) {
|
|
340
340
|
const nbDisposable = ( new DisposableStore());
|
|
341
|
-
progress.report({ message: ( localize(
|
|
341
|
+
progress.report({ message: ( localize(7562, "Running 'Notebook' code actions")) });
|
|
342
342
|
try {
|
|
343
343
|
const cell = notebookModel.cells[0];
|
|
344
344
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -370,7 +370,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
const cellDisposable = ( new DisposableStore());
|
|
373
|
-
progress.report({ message: ( localize(
|
|
373
|
+
progress.report({ message: ( localize(7563, "Running 'Cell' code actions")) });
|
|
374
374
|
try {
|
|
375
375
|
await Promise.all(( notebookModel.cells.map(async (cell) => {
|
|
376
376
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -410,7 +410,7 @@ class CodeActionParticipantUtils {
|
|
|
410
410
|
const configurationService = accessor.get(IConfigurationService);
|
|
411
411
|
const formatDisposable = ( new DisposableStore());
|
|
412
412
|
let formatResult = false;
|
|
413
|
-
progress.report({ message: ( localize(
|
|
413
|
+
progress.report({ message: ( localize(7564, "Running 'Format' code actions")) });
|
|
414
414
|
try {
|
|
415
415
|
const cell = notebookModel.cells[0];
|
|
416
416
|
const ref = await textModelService.createModelReference(cell.uri);
|
|
@@ -439,7 +439,7 @@ class CodeActionParticipantUtils {
|
|
|
439
439
|
_report() {
|
|
440
440
|
progress.report({
|
|
441
441
|
message: ( localize(
|
|
442
|
-
|
|
442
|
+
7565,
|
|
443
443
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
444
444
|
( [...this._names].map(name => `'${name}'`)).join(', '),
|
|
445
445
|
'command:workbench.action.openSettings?%5B%22notebook.codeActionsOnSave%22%5D'
|
|
@@ -479,7 +479,7 @@ class CodeActionParticipantUtils {
|
|
|
479
479
|
logService.warn('Failed to apply code action on save, applied to multiple resources.');
|
|
480
480
|
continue;
|
|
481
481
|
}
|
|
482
|
-
progress.report({ message: ( localize(
|
|
482
|
+
progress.report({ message: ( localize(7566, "Applying code action '{0}'.", action.action.title)) });
|
|
483
483
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
484
484
|
if (token.isCancellationRequested) {
|
|
485
485
|
return;
|
|
@@ -504,7 +504,7 @@ class CodeActionParticipantUtils {
|
|
|
504
504
|
_report() {
|
|
505
505
|
progress.report({
|
|
506
506
|
message: ( localize(
|
|
507
|
-
|
|
507
|
+
7565,
|
|
508
508
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
509
509
|
( [...this._names].map(name => `'${name}'`)).join(', '),
|
|
510
510
|
'command:workbench.action.openSettings?%5B%22notebook.defaultFormatter%22%5D'
|
|
@@ -531,7 +531,7 @@ class CodeActionParticipantUtils {
|
|
|
531
531
|
if (!action) {
|
|
532
532
|
return false;
|
|
533
533
|
}
|
|
534
|
-
progress.report({ message: ( localize(
|
|
534
|
+
progress.report({ message: ( localize(7566, "Applying code action '{0}'.", action.action.title)) });
|
|
535
535
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
536
536
|
if (token.isCancellationRequested) {
|
|
537
537
|
return false;
|
|
@@ -95,7 +95,7 @@ registerAction2(class extends Action2 {
|
|
|
95
95
|
constructor() {
|
|
96
96
|
super({
|
|
97
97
|
id: 'notebook.toggleLayoutTroubleshoot',
|
|
98
|
-
title: ( localize2(
|
|
98
|
+
title: ( localize2(7567, "Toggle Layout Troubleshoot")),
|
|
99
99
|
category: Categories.Developer,
|
|
100
100
|
f1: true
|
|
101
101
|
});
|
|
@@ -114,7 +114,7 @@ registerAction2(class extends Action2 {
|
|
|
114
114
|
constructor() {
|
|
115
115
|
super({
|
|
116
116
|
id: 'notebook.inspectLayout',
|
|
117
|
-
title: ( localize2(
|
|
117
|
+
title: ( localize2(7568, "Inspect Notebook Layout")),
|
|
118
118
|
category: Categories.Developer,
|
|
119
119
|
f1: true
|
|
120
120
|
});
|
|
@@ -135,7 +135,7 @@ registerAction2(class extends Action2 {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
super({
|
|
137
137
|
id: 'notebook.clearNotebookEdtitorTypeCache',
|
|
138
|
-
title: ( localize2(
|
|
138
|
+
title: ( localize2(7569, "Clear Notebook Editor Type Cache")),
|
|
139
139
|
category: Categories.Developer,
|
|
140
140
|
f1: true
|
|
141
141
|
});
|
|
@@ -27,7 +27,7 @@ registerAction2(class extends NotebookAction {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
super({
|
|
29
29
|
id: 'notebook.cell.chat.accept',
|
|
30
|
-
title: ( localize2(
|
|
30
|
+
title: ( localize2(7575, "Make Request")),
|
|
31
31
|
icon: Codicon.send,
|
|
32
32
|
keybinding: {
|
|
33
33
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -51,7 +51,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
51
51
|
constructor() {
|
|
52
52
|
super({
|
|
53
53
|
id: 'notebook.cell.chat.arrowOutUp',
|
|
54
|
-
title: ( localize(
|
|
54
|
+
title: ( localize(7576, 'Cursor Up')),
|
|
55
55
|
keybinding: {
|
|
56
56
|
when: ( ContextKeyExpr.and(
|
|
57
57
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -86,7 +86,7 @@ registerAction2(class extends NotebookAction {
|
|
|
86
86
|
constructor() {
|
|
87
87
|
super({
|
|
88
88
|
id: 'notebook.cell.chat.arrowOutDown',
|
|
89
|
-
title: ( localize(
|
|
89
|
+
title: ( localize(7577, 'Cursor Down')),
|
|
90
90
|
keybinding: {
|
|
91
91
|
when: ( ContextKeyExpr.and(
|
|
92
92
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -109,7 +109,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
109
109
|
constructor() {
|
|
110
110
|
super({
|
|
111
111
|
id: 'notebook.cell.focusChatWidget',
|
|
112
|
-
title: ( localize(
|
|
112
|
+
title: ( localize(7578, 'Focus Chat Widget')),
|
|
113
113
|
keybinding: {
|
|
114
114
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
115
115
|
weight: KeybindingWeight.EditorCore + 7,
|
|
@@ -127,7 +127,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
127
127
|
constructor() {
|
|
128
128
|
super({
|
|
129
129
|
id: 'notebook.cell.focusNextChatWidget',
|
|
130
|
-
title: ( localize(
|
|
130
|
+
title: ( localize(7579, 'Focus Next Cell Chat Widget')),
|
|
131
131
|
keybinding: {
|
|
132
132
|
when: ( ContextKeyExpr.and(( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
133
133
|
weight: KeybindingWeight.EditorCore + 7,
|
|
@@ -146,7 +146,7 @@ registerAction2(class extends NotebookAction {
|
|
|
146
146
|
constructor() {
|
|
147
147
|
super({
|
|
148
148
|
id: 'notebook.cell.chat.stop',
|
|
149
|
-
title: ( localize2(
|
|
149
|
+
title: ( localize2(7580, "Stop Request")),
|
|
150
150
|
icon: Codicon.debugStop,
|
|
151
151
|
menu: {
|
|
152
152
|
id: MENU_CELL_CHAT_INPUT,
|
|
@@ -165,7 +165,7 @@ registerAction2(class extends NotebookAction {
|
|
|
165
165
|
constructor() {
|
|
166
166
|
super({
|
|
167
167
|
id: 'notebook.cell.chat.close',
|
|
168
|
-
title: ( localize2(
|
|
168
|
+
title: ( localize2(7581, "Close Chat")),
|
|
169
169
|
icon: Codicon.close,
|
|
170
170
|
menu: {
|
|
171
171
|
id: MENU_CELL_CHAT_WIDGET,
|
|
@@ -183,10 +183,10 @@ registerAction2(class extends NotebookAction {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: 'notebook.cell.chat.acceptChanges',
|
|
186
|
-
title: ( localize2(
|
|
187
|
-
shortTitle: ( localize(
|
|
186
|
+
title: ( localize2(7582, "Accept Changes")),
|
|
187
|
+
shortTitle: ( localize(7583, 'Accept')),
|
|
188
188
|
icon: Codicon.check,
|
|
189
|
-
tooltip: ( localize(
|
|
189
|
+
tooltip: ( localize(7584, 'Accept Changes')),
|
|
190
190
|
keybinding: [
|
|
191
191
|
{
|
|
192
192
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -233,7 +233,7 @@ registerAction2(class extends NotebookAction {
|
|
|
233
233
|
constructor() {
|
|
234
234
|
super({
|
|
235
235
|
id: 'notebook.cell.chat.discard',
|
|
236
|
-
title: ( localize(
|
|
236
|
+
title: ( localize(7585, 'Discard')),
|
|
237
237
|
icon: Codicon.discard,
|
|
238
238
|
keybinding: {
|
|
239
239
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()), ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -274,12 +274,12 @@ registerAction2(class extends NotebookAction {
|
|
|
274
274
|
super({
|
|
275
275
|
id: 'notebook.cell.chat.start',
|
|
276
276
|
title: {
|
|
277
|
-
value: '$(sparkle) ' + ( localize(
|
|
277
|
+
value: '$(sparkle) ' + ( localize(7586, "Generate")),
|
|
278
278
|
original: '$(sparkle) Generate',
|
|
279
279
|
},
|
|
280
|
-
tooltip: ( localize(
|
|
280
|
+
tooltip: ( localize(7587, "Start Chat to Generate Code")),
|
|
281
281
|
metadata: {
|
|
282
|
-
description: ( localize(
|
|
282
|
+
description: ( localize(7587, "Start Chat to Generate Code")),
|
|
283
283
|
args: [
|
|
284
284
|
{
|
|
285
285
|
name: 'args',
|
|
@@ -361,10 +361,10 @@ registerAction2(class extends NotebookAction {
|
|
|
361
361
|
super({
|
|
362
362
|
id: 'notebook.cell.chat.startAtTop',
|
|
363
363
|
title: {
|
|
364
|
-
value: '$(sparkle) ' + ( localize(
|
|
364
|
+
value: '$(sparkle) ' + ( localize(7586, "Generate")),
|
|
365
365
|
original: '$(sparkle) Generate',
|
|
366
366
|
},
|
|
367
|
-
tooltip: ( localize(
|
|
367
|
+
tooltip: ( localize(7587, "Start Chat to Generate Code")),
|
|
368
368
|
f1: false,
|
|
369
369
|
menu: [
|
|
370
370
|
{
|
|
@@ -384,8 +384,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
384
384
|
command: {
|
|
385
385
|
id: 'notebook.cell.chat.start',
|
|
386
386
|
icon: Codicon.sparkle,
|
|
387
|
-
title: ( localize(
|
|
388
|
-
tooltip: ( localize(
|
|
387
|
+
title: ( localize(7588, "Generate")),
|
|
388
|
+
tooltip: ( localize(7589, "Start Chat to Generate Code"))
|
|
389
389
|
},
|
|
390
390
|
order: -10,
|
|
391
391
|
group: 'navigation/add',
|
|
@@ -395,7 +395,7 @@ registerAction2(class extends NotebookAction {
|
|
|
395
395
|
constructor() {
|
|
396
396
|
super({
|
|
397
397
|
id: 'notebook.cell.chat.focus',
|
|
398
|
-
title: ( localize(
|
|
398
|
+
title: ( localize(7590, 'Focus Chat')),
|
|
399
399
|
keybinding: [
|
|
400
400
|
{
|
|
401
401
|
when: ( ContextKeyExpr.and(
|
|
@@ -427,7 +427,7 @@ registerAction2(class extends NotebookAction {
|
|
|
427
427
|
constructor() {
|
|
428
428
|
super({
|
|
429
429
|
id: 'notebook.cell.chat.focusNextCell',
|
|
430
|
-
title: ( localize(
|
|
430
|
+
title: ( localize(7591, 'Focus Next Cell')),
|
|
431
431
|
keybinding: [
|
|
432
432
|
{
|
|
433
433
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -446,7 +446,7 @@ registerAction2(class extends NotebookAction {
|
|
|
446
446
|
constructor() {
|
|
447
447
|
super({
|
|
448
448
|
id: 'notebook.cell.chat.focusPreviousCell',
|
|
449
|
-
title: ( localize(
|
|
449
|
+
title: ( localize(7592, 'Focus Previous Cell')),
|
|
450
450
|
keybinding: [
|
|
451
451
|
{
|
|
452
452
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -465,7 +465,7 @@ registerAction2(class extends NotebookAction {
|
|
|
465
465
|
constructor() {
|
|
466
466
|
super({
|
|
467
467
|
id: 'notebook.cell.chat.previousFromHistory',
|
|
468
|
-
title: ( localize2(
|
|
468
|
+
title: ( localize2(7593, "Previous From History")),
|
|
469
469
|
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
470
470
|
keybinding: {
|
|
471
471
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -483,7 +483,7 @@ registerAction2(class extends NotebookAction {
|
|
|
483
483
|
constructor() {
|
|
484
484
|
super({
|
|
485
485
|
id: 'notebook.cell.chat.nextFromHistory',
|
|
486
|
-
title: ( localize2(
|
|
486
|
+
title: ( localize2(7594, "Next From History")),
|
|
487
487
|
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
488
488
|
keybinding: {
|
|
489
489
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -501,7 +501,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
501
501
|
constructor() {
|
|
502
502
|
super({
|
|
503
503
|
id: 'notebook.cell.chat.restore',
|
|
504
|
-
title: ( localize2(
|
|
504
|
+
title: ( localize2(7595, "Generate")),
|
|
505
505
|
icon: Codicon.sparkle,
|
|
506
506
|
menu: {
|
|
507
507
|
id: MenuId.NotebookCellTitle,
|
|
@@ -532,9 +532,9 @@ class AcceptChangesAndRun extends AbstractInlineChatAction {
|
|
|
532
532
|
constructor() {
|
|
533
533
|
super({
|
|
534
534
|
id: 'notebook.inlineChat.acceptChangesAndRun',
|
|
535
|
-
title: ( localize2(
|
|
536
|
-
shortTitle: ( localize(
|
|
537
|
-
tooltip: ( localize(
|
|
535
|
+
title: ( localize2(7596, "Accept and Run")),
|
|
536
|
+
shortTitle: ( localize(7597, 'Accept & Run')),
|
|
537
|
+
tooltip: ( localize(7598, 'Accept the changes and run the cell')),
|
|
538
538
|
icon: Codicon.check,
|
|
539
539
|
f1: true,
|
|
540
540
|
precondition: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_INLINE_CHAT_VISIBLE)),
|
|
@@ -66,7 +66,7 @@ let NotebookChatContribution = class NotebookChatContribution extends Disposable
|
|
|
66
66
|
result.suggestions.push({
|
|
67
67
|
label: `${chatVariableLeader}${NotebookKernelVariableKey}`,
|
|
68
68
|
insertText: `${chatVariableLeader}${NotebookKernelVariableKey}:`,
|
|
69
|
-
detail: ( localize(
|
|
69
|
+
detail: ( localize(7599, "Pick a variable from the kernel")),
|
|
70
70
|
range,
|
|
71
71
|
kind: CompletionItemKind.Text,
|
|
72
72
|
command: { id: SelectAndInsertKernelVariableAction.ID, title: SelectAndInsertKernelVariableAction.ID, arguments: [{ widget, range: afterRange }] },
|