@codingame/monaco-vscode-notebook-service-override 21.3.2 → 21.3.3
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 -24
- 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 +3 -3
- 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 +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +25 -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 +68 -68
- 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.js +3 -3
- 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 +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
|
+
8773,
|
|
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(8774, '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')), ( ContextKeyExpr.or(( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo('end')), ( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo('both')))))), ( 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(8775, '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')), ( ContextKeyExpr.or(( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo('start')), ( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo('both')))))), ( 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(8776, '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(8777, '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(8778, '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(8779, '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(8780, "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(8781, "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(8782, "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(8783, "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(8784, "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
|
+
8785,
|
|
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
|
}
|
|
@@ -507,7 +507,7 @@ registerAction2(class ClearNotebookInlineValues extends NotebookAction {
|
|
|
507
507
|
constructor() {
|
|
508
508
|
super({
|
|
509
509
|
id: 'notebook.clearAllInlineValues',
|
|
510
|
-
title: ( localize(
|
|
510
|
+
title: ( localize(8786, 'Clear All Inline Values')),
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
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(8789, "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(8790, "Display limit reached")),
|
|
82
82
|
value: '',
|
|
83
83
|
indexedChildrenCount: 0,
|
|
84
84
|
hasNamedChildren: false
|
|
@@ -12,8 +12,8 @@ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
12
12
|
var NotebookVariableRenderer_1;
|
|
13
13
|
const $ = $$1;
|
|
14
14
|
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
|
15
|
-
const NOTEBOOK_TITLE = ( localize2(
|
|
16
|
-
const REPL_TITLE = ( localize2(
|
|
15
|
+
const NOTEBOOK_TITLE = ( localize2(8791, "Notebook Variables"));
|
|
16
|
+
const REPL_TITLE = ( localize2(8792, "REPL Variables"));
|
|
17
17
|
class NotebookVariablesDelegate {
|
|
18
18
|
getHeight(element) {
|
|
19
19
|
return 22;
|
|
@@ -69,7 +69,7 @@ class NotebookVariableAccessibilityProvider {
|
|
|
69
69
|
this._widgetAriaLabel.set(label, undefined);
|
|
70
70
|
}
|
|
71
71
|
getAriaLabel(element) {
|
|
72
|
-
return localize(
|
|
72
|
+
return localize(8793, "Variable {0}, value {1}", element.name, element.value);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -728,33 +728,33 @@ const NotebookOutlineContext = {
|
|
|
728
728
|
type: 'boolean',
|
|
729
729
|
default: true,
|
|
730
730
|
markdownDescription: ( localize(
|
|
731
|
-
|
|
731
|
+
8794,
|
|
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(8795, "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
|
+
8796,
|
|
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(8797, "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
|
+
8798,
|
|
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(8799, "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(8800, "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(8801, "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(8802, "Code Cell Symbols")),
|
|
819
819
|
f1: false,
|
|
820
820
|
toggled: {
|
|
821
821
|
condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true))
|
|
@@ -65,7 +65,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
65
65
|
if (!enabled) {
|
|
66
66
|
return undefined;
|
|
67
67
|
}
|
|
68
|
-
progress.report({ message: ( localize(
|
|
68
|
+
progress.report({ message: ( localize(8804, "Formatting")) });
|
|
69
69
|
const notebook = workingCopy.model.notebookModel;
|
|
70
70
|
const formatApplied = await this.instantiationService.invokeFunction(CodeActionParticipantUtils.checkAndRunFormatCodeAction, notebook, progress, token);
|
|
71
71
|
const disposable = ( new DisposableStore());
|
|
@@ -83,7 +83,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
83
83
|
}
|
|
84
84
|
return [];
|
|
85
85
|
})));
|
|
86
|
-
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(
|
|
86
|
+
await this.bulkEditService.apply( allCellEdits.flat(), { label: ( localize(8805, "Format Notebook")), code: 'undoredo.formatNotebook', });
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
finally {
|
|
@@ -152,7 +152,7 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
|
|
|
152
152
|
return ( ops.map(op => ( new ResourceTextEdit(model.uri, { ...op, text: op.text || '' }, model.getVersionId()))));
|
|
153
153
|
})));
|
|
154
154
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
155
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
155
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8806, "Notebook Trim Trailing Whitespace")), code: 'undoredo.notebookTrimTrailingWhitespace' });
|
|
156
156
|
}
|
|
157
157
|
finally {
|
|
158
158
|
progress.report({ increment: 100 });
|
|
@@ -229,7 +229,7 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
|
|
|
229
229
|
));
|
|
230
230
|
})));
|
|
231
231
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
232
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
232
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8807, "Trim Final New Lines")), code: 'undoredo.trimFinalNewLines' });
|
|
233
233
|
}
|
|
234
234
|
finally {
|
|
235
235
|
progress.report({ increment: 100 });
|
|
@@ -283,7 +283,7 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
|
|
|
283
283
|
)), text: cell.textBuffer.getEOL() }, cell.textModel?.getVersionId()));
|
|
284
284
|
})));
|
|
285
285
|
const filteredEdits = allCellEdits.filter(edit => edit !== undefined);
|
|
286
|
-
await this.bulkEditService.apply(filteredEdits, { label: ( localize(
|
|
286
|
+
await this.bulkEditService.apply(filteredEdits, { label: ( localize(8808, "Insert Final New Line")), code: 'undoredo.insertFinalNewLine' });
|
|
287
287
|
if (activeCellEditor && selections) {
|
|
288
288
|
activeCellEditor.setSelections(selections);
|
|
289
289
|
}
|
|
@@ -339,7 +339,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
339
339
|
const notebookCodeActionsOnSave = includedActions.filter(x => CodeActionKind.Notebook.contains(x));
|
|
340
340
|
if (notebookCodeActionsOnSave.length) {
|
|
341
341
|
const nbDisposable = ( new DisposableStore());
|
|
342
|
-
progress.report({ message: ( localize(
|
|
342
|
+
progress.report({ message: ( localize(8809, "Running 'Notebook' code actions")) });
|
|
343
343
|
try {
|
|
344
344
|
const cell = notebookModel.cells[0];
|
|
345
345
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -371,7 +371,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
const cellDisposable = ( new DisposableStore());
|
|
374
|
-
progress.report({ message: ( localize(
|
|
374
|
+
progress.report({ message: ( localize(8810, "Running 'Cell' code actions")) });
|
|
375
375
|
try {
|
|
376
376
|
await Promise.all(( notebookModel.cells.map(async (cell) => {
|
|
377
377
|
const ref = await this.textModelService.createModelReference(cell.uri);
|
|
@@ -411,7 +411,7 @@ class CodeActionParticipantUtils {
|
|
|
411
411
|
const configurationService = accessor.get(IConfigurationService);
|
|
412
412
|
const formatDisposable = ( new DisposableStore());
|
|
413
413
|
let formatResult = false;
|
|
414
|
-
progress.report({ message: ( localize(
|
|
414
|
+
progress.report({ message: ( localize(8811, "Running 'Format' code actions")) });
|
|
415
415
|
try {
|
|
416
416
|
const cell = notebookModel.cells[0];
|
|
417
417
|
const ref = await textModelService.createModelReference(cell.uri);
|
|
@@ -440,7 +440,7 @@ class CodeActionParticipantUtils {
|
|
|
440
440
|
_report() {
|
|
441
441
|
progress.report({
|
|
442
442
|
message: ( localize(
|
|
443
|
-
|
|
443
|
+
8812,
|
|
444
444
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
445
445
|
( [...this._names].map(name => `'${name}'`)).join(', '),
|
|
446
446
|
'command:workbench.action.openSettings?%5B%22notebook.codeActionsOnSave%22%5D'
|
|
@@ -480,7 +480,7 @@ class CodeActionParticipantUtils {
|
|
|
480
480
|
logService.warn('Failed to apply code action on save, applied to multiple resources.');
|
|
481
481
|
continue;
|
|
482
482
|
}
|
|
483
|
-
progress.report({ message: ( localize(
|
|
483
|
+
progress.report({ message: ( localize(8813, "Applying code action '{0}'.", action.action.title)) });
|
|
484
484
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
485
485
|
if (token.isCancellationRequested) {
|
|
486
486
|
return;
|
|
@@ -505,7 +505,7 @@ class CodeActionParticipantUtils {
|
|
|
505
505
|
_report() {
|
|
506
506
|
progress.report({
|
|
507
507
|
message: ( localize(
|
|
508
|
-
|
|
508
|
+
8812,
|
|
509
509
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
510
510
|
( [...this._names].map(name => `'${name}'`)).join(', '),
|
|
511
511
|
'command:workbench.action.openSettings?%5B%22notebook.defaultFormatter%22%5D'
|
|
@@ -532,7 +532,7 @@ class CodeActionParticipantUtils {
|
|
|
532
532
|
if (!action) {
|
|
533
533
|
return false;
|
|
534
534
|
}
|
|
535
|
-
progress.report({ message: ( localize(
|
|
535
|
+
progress.report({ message: ( localize(8813, "Applying code action '{0}'.", action.action.title)) });
|
|
536
536
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
537
537
|
if (token.isCancellationRequested) {
|
|
538
538
|
return false;
|
|
@@ -283,7 +283,7 @@ registerAction2(class extends Action2 {
|
|
|
283
283
|
constructor() {
|
|
284
284
|
super({
|
|
285
285
|
id: 'notebook.toggleLayoutTroubleshoot',
|
|
286
|
-
title: ( localize2(
|
|
286
|
+
title: ( localize2(8814, "Toggle Notebook Layout Troubleshoot")),
|
|
287
287
|
category: Categories.Developer,
|
|
288
288
|
f1: true
|
|
289
289
|
});
|
|
@@ -302,7 +302,7 @@ registerAction2(class extends Action2 {
|
|
|
302
302
|
constructor() {
|
|
303
303
|
super({
|
|
304
304
|
id: 'notebook.inspectLayout',
|
|
305
|
-
title: ( localize2(
|
|
305
|
+
title: ( localize2(8815, "Inspect Notebook Layout")),
|
|
306
306
|
category: Categories.Developer,
|
|
307
307
|
f1: true
|
|
308
308
|
});
|
|
@@ -323,7 +323,7 @@ registerAction2(class extends Action2 {
|
|
|
323
323
|
constructor() {
|
|
324
324
|
super({
|
|
325
325
|
id: 'notebook.clearNotebookEdtitorTypeCache',
|
|
326
|
-
title: ( localize2(
|
|
326
|
+
title: ( localize2(8816, "Clear Notebook Editor Type Cache")),
|
|
327
327
|
category: Categories.Developer,
|
|
328
328
|
f1: true
|
|
329
329
|
});
|
|
@@ -28,7 +28,7 @@ registerAction2(class extends NotebookAction {
|
|
|
28
28
|
constructor() {
|
|
29
29
|
super({
|
|
30
30
|
id: 'notebook.cell.chat.accept',
|
|
31
|
-
title: ( localize2(
|
|
31
|
+
title: ( localize2(8823, "Make Request")),
|
|
32
32
|
icon: Codicon.send,
|
|
33
33
|
keybinding: {
|
|
34
34
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -52,7 +52,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
52
52
|
constructor() {
|
|
53
53
|
super({
|
|
54
54
|
id: 'notebook.cell.chat.arrowOutUp',
|
|
55
|
-
title: ( localize(
|
|
55
|
+
title: ( localize(8824, 'Cursor Up')),
|
|
56
56
|
keybinding: {
|
|
57
57
|
when: ( ContextKeyExpr.and(
|
|
58
58
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -87,7 +87,7 @@ registerAction2(class extends NotebookAction {
|
|
|
87
87
|
constructor() {
|
|
88
88
|
super({
|
|
89
89
|
id: 'notebook.cell.chat.arrowOutDown',
|
|
90
|
-
title: ( localize(
|
|
90
|
+
title: ( localize(8825, 'Cursor Down')),
|
|
91
91
|
keybinding: {
|
|
92
92
|
when: ( ContextKeyExpr.and(
|
|
93
93
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
@@ -110,7 +110,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
110
110
|
constructor() {
|
|
111
111
|
super({
|
|
112
112
|
id: 'notebook.cell.focusChatWidget',
|
|
113
|
-
title: ( localize(
|
|
113
|
+
title: ( localize(8826, 'Focus Chat Widget')),
|
|
114
114
|
keybinding: {
|
|
115
115
|
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()))),
|
|
116
116
|
weight: KeybindingWeight.EditorCore + 7,
|
|
@@ -128,7 +128,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
128
128
|
constructor() {
|
|
129
129
|
super({
|
|
130
130
|
id: 'notebook.cell.focusNextChatWidget',
|
|
131
|
-
title: ( localize(
|
|
131
|
+
title: ( localize(8827, 'Focus Next Cell Chat Widget')),
|
|
132
132
|
keybinding: {
|
|
133
133
|
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()))),
|
|
134
134
|
weight: KeybindingWeight.EditorCore + 7,
|
|
@@ -147,7 +147,7 @@ registerAction2(class extends NotebookAction {
|
|
|
147
147
|
constructor() {
|
|
148
148
|
super({
|
|
149
149
|
id: 'notebook.cell.chat.stop',
|
|
150
|
-
title: ( localize2(
|
|
150
|
+
title: ( localize2(8828, "Stop Request")),
|
|
151
151
|
icon: Codicon.debugStop,
|
|
152
152
|
menu: {
|
|
153
153
|
id: MENU_CELL_CHAT_INPUT,
|
|
@@ -166,7 +166,7 @@ registerAction2(class extends NotebookAction {
|
|
|
166
166
|
constructor() {
|
|
167
167
|
super({
|
|
168
168
|
id: 'notebook.cell.chat.close',
|
|
169
|
-
title: ( localize2(
|
|
169
|
+
title: ( localize2(8829, "Close Chat")),
|
|
170
170
|
icon: Codicon.close,
|
|
171
171
|
menu: {
|
|
172
172
|
id: MENU_CELL_CHAT_WIDGET,
|
|
@@ -184,10 +184,10 @@ registerAction2(class extends NotebookAction {
|
|
|
184
184
|
constructor() {
|
|
185
185
|
super({
|
|
186
186
|
id: 'notebook.cell.chat.acceptChanges',
|
|
187
|
-
title: ( localize2(
|
|
188
|
-
shortTitle: ( localize(
|
|
187
|
+
title: ( localize2(8830, "Accept Changes")),
|
|
188
|
+
shortTitle: ( localize(8831, 'Accept')),
|
|
189
189
|
icon: Codicon.check,
|
|
190
|
-
tooltip: ( localize(
|
|
190
|
+
tooltip: ( localize(8832, 'Accept Changes')),
|
|
191
191
|
keybinding: [
|
|
192
192
|
{
|
|
193
193
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -234,7 +234,7 @@ registerAction2(class extends NotebookAction {
|
|
|
234
234
|
constructor() {
|
|
235
235
|
super({
|
|
236
236
|
id: 'notebook.cell.chat.discard',
|
|
237
|
-
title: ( localize(
|
|
237
|
+
title: ( localize(8833, 'Discard')),
|
|
238
238
|
icon: Codicon.discard,
|
|
239
239
|
keybinding: {
|
|
240
240
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()), ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
@@ -275,12 +275,12 @@ registerAction2(class extends NotebookAction {
|
|
|
275
275
|
super({
|
|
276
276
|
id: 'notebook.cell.chat.start',
|
|
277
277
|
title: {
|
|
278
|
-
value: '$(sparkle) ' + ( localize(
|
|
278
|
+
value: '$(sparkle) ' + ( localize(8834, "Generate")),
|
|
279
279
|
original: '$(sparkle) Generate',
|
|
280
280
|
},
|
|
281
|
-
tooltip: ( localize(
|
|
281
|
+
tooltip: ( localize(8835, "Start Chat to Generate Code")),
|
|
282
282
|
metadata: {
|
|
283
|
-
description: ( localize(
|
|
283
|
+
description: ( localize(8835, "Start Chat to Generate Code")),
|
|
284
284
|
args: [
|
|
285
285
|
{
|
|
286
286
|
name: 'args',
|
|
@@ -362,10 +362,10 @@ registerAction2(class extends NotebookAction {
|
|
|
362
362
|
super({
|
|
363
363
|
id: 'notebook.cell.chat.startAtTop',
|
|
364
364
|
title: {
|
|
365
|
-
value: '$(sparkle) ' + ( localize(
|
|
365
|
+
value: '$(sparkle) ' + ( localize(8834, "Generate")),
|
|
366
366
|
original: '$(sparkle) Generate',
|
|
367
367
|
},
|
|
368
|
-
tooltip: ( localize(
|
|
368
|
+
tooltip: ( localize(8835, "Start Chat to Generate Code")),
|
|
369
369
|
f1: false,
|
|
370
370
|
menu: [
|
|
371
371
|
{
|
|
@@ -385,8 +385,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
385
385
|
command: {
|
|
386
386
|
id: 'notebook.cell.chat.start',
|
|
387
387
|
icon: Codicon.sparkle,
|
|
388
|
-
title: ( localize(
|
|
389
|
-
tooltip: ( localize(
|
|
388
|
+
title: ( localize(8836, "Generate")),
|
|
389
|
+
tooltip: ( localize(8837, "Start Chat to Generate Code"))
|
|
390
390
|
},
|
|
391
391
|
order: -10,
|
|
392
392
|
group: 'navigation/add',
|
|
@@ -396,7 +396,7 @@ registerAction2(class extends NotebookAction {
|
|
|
396
396
|
constructor() {
|
|
397
397
|
super({
|
|
398
398
|
id: 'notebook.cell.chat.focus',
|
|
399
|
-
title: ( localize(
|
|
399
|
+
title: ( localize(8838, 'Focus Chat')),
|
|
400
400
|
keybinding: [
|
|
401
401
|
{
|
|
402
402
|
when: ( ContextKeyExpr.and(
|
|
@@ -428,7 +428,7 @@ registerAction2(class extends NotebookAction {
|
|
|
428
428
|
constructor() {
|
|
429
429
|
super({
|
|
430
430
|
id: 'notebook.cell.chat.focusNextCell',
|
|
431
|
-
title: ( localize(
|
|
431
|
+
title: ( localize(8839, 'Focus Next Cell')),
|
|
432
432
|
keybinding: [
|
|
433
433
|
{
|
|
434
434
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -447,7 +447,7 @@ registerAction2(class extends NotebookAction {
|
|
|
447
447
|
constructor() {
|
|
448
448
|
super({
|
|
449
449
|
id: 'notebook.cell.chat.focusPreviousCell',
|
|
450
|
-
title: ( localize(
|
|
450
|
+
title: ( localize(8840, 'Focus Previous Cell')),
|
|
451
451
|
keybinding: [
|
|
452
452
|
{
|
|
453
453
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -466,7 +466,7 @@ registerAction2(class extends NotebookAction {
|
|
|
466
466
|
constructor() {
|
|
467
467
|
super({
|
|
468
468
|
id: 'notebook.cell.chat.previousFromHistory',
|
|
469
|
-
title: ( localize2(
|
|
469
|
+
title: ( localize2(8841, "Previous From History")),
|
|
470
470
|
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
471
471
|
keybinding: {
|
|
472
472
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -484,7 +484,7 @@ registerAction2(class extends NotebookAction {
|
|
|
484
484
|
constructor() {
|
|
485
485
|
super({
|
|
486
486
|
id: 'notebook.cell.chat.nextFromHistory',
|
|
487
|
-
title: ( localize2(
|
|
487
|
+
title: ( localize2(8842, "Next From History")),
|
|
488
488
|
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
489
489
|
keybinding: {
|
|
490
490
|
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
@@ -502,7 +502,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
502
502
|
constructor() {
|
|
503
503
|
super({
|
|
504
504
|
id: 'notebook.cell.chat.restore',
|
|
505
|
-
title: ( localize2(
|
|
505
|
+
title: ( localize2(8843, "Generate")),
|
|
506
506
|
icon: Codicon.sparkle,
|
|
507
507
|
menu: {
|
|
508
508
|
id: MenuId.NotebookCellTitle,
|
|
@@ -533,9 +533,9 @@ class AcceptChangesAndRun extends EditorAction2 {
|
|
|
533
533
|
constructor() {
|
|
534
534
|
super({
|
|
535
535
|
id: 'notebook.inlineChat.acceptChangesAndRun',
|
|
536
|
-
title: ( localize2(
|
|
537
|
-
shortTitle: ( localize(
|
|
538
|
-
tooltip: ( localize(
|
|
536
|
+
title: ( localize2(8844, "Accept and Run")),
|
|
537
|
+
shortTitle: ( localize(8845, 'Accept & Run')),
|
|
538
|
+
tooltip: ( localize(8846, 'Accept the changes and run the cell')),
|
|
539
539
|
icon: Codicon.check,
|
|
540
540
|
f1: true,
|
|
541
541
|
precondition: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_INLINE_CHAT_VISIBLE)),
|
|
@@ -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(8847, "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(8848, "Select a kernel variable"))
|
|
178
|
+
: ( localize(8849, "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(8850, '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(8851, '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(8852, "Add Cell Output to Chat")),
|
|
270
270
|
menu: {
|
|
271
271
|
id: MenuId.NotebookOutputToolbar,
|
|
272
272
|
when: ( ContextKeyExpr.and(
|