@codingame/monaco-vscode-notebook-service-override 23.0.2 → 23.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 +25 -25
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +4 -4
- 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 +10 -10
- 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/chat/notebookChatContext.js +1 -1
- 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/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +14 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
|
@@ -33,7 +33,7 @@ registerAction2(class extends Action2 {
|
|
|
33
33
|
super({
|
|
34
34
|
id: 'notebook.cell.nullAction',
|
|
35
35
|
title: ( localize(
|
|
36
|
-
|
|
36
|
+
9128,
|
|
37
37
|
"Keypresses that should be handled by the focused element in the cell output."
|
|
38
38
|
)),
|
|
39
39
|
keybinding: [{
|
|
@@ -56,7 +56,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
56
56
|
constructor() {
|
|
57
57
|
super({
|
|
58
58
|
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
59
|
-
title: ( localize(
|
|
59
|
+
title: ( localize(9129, 'Focus Next Cell Editor')),
|
|
60
60
|
keybinding: [
|
|
61
61
|
{
|
|
62
62
|
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()))),
|
|
@@ -110,7 +110,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
110
110
|
constructor() {
|
|
111
111
|
super({
|
|
112
112
|
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
113
|
-
title: ( localize(
|
|
113
|
+
title: ( localize(9130, 'Focus Previous Cell Editor')),
|
|
114
114
|
keybinding: [
|
|
115
115
|
{
|
|
116
116
|
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()))),
|
|
@@ -155,7 +155,7 @@ registerAction2(class extends NotebookAction {
|
|
|
155
155
|
constructor() {
|
|
156
156
|
super({
|
|
157
157
|
id: NOTEBOOK_FOCUS_TOP,
|
|
158
|
-
title: ( localize(
|
|
158
|
+
title: ( localize(9131, 'Focus First Cell')),
|
|
159
159
|
keybinding: [
|
|
160
160
|
{
|
|
161
161
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -183,7 +183,7 @@ registerAction2(class extends NotebookAction {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
186
|
-
title: ( localize(
|
|
186
|
+
title: ( localize(9132, 'Focus Last Cell')),
|
|
187
187
|
keybinding: [
|
|
188
188
|
{
|
|
189
189
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -216,7 +216,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
216
216
|
constructor() {
|
|
217
217
|
super({
|
|
218
218
|
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
219
|
-
title: ( localize2(
|
|
219
|
+
title: ( localize2(9133, 'Focus In Active Cell Output')),
|
|
220
220
|
f1: true,
|
|
221
221
|
keybinding: [{
|
|
222
222
|
when: ( ContextKeyExpr.and(( IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext, NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
@@ -240,7 +240,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
240
240
|
constructor() {
|
|
241
241
|
super({
|
|
242
242
|
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
243
|
-
title: ( localize(
|
|
243
|
+
title: ( localize(9134, 'Focus Out Active Cell Output')),
|
|
244
244
|
keybinding: {
|
|
245
245
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
|
|
246
246
|
mac: { primary: KeyMod.WinCtrl | KeyMod.CtrlCmd | KeyCode.UpArrow, },
|
|
@@ -259,7 +259,7 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
259
259
|
constructor() {
|
|
260
260
|
super({
|
|
261
261
|
id: CENTER_ACTIVE_CELL,
|
|
262
|
-
title: ( localize(
|
|
262
|
+
title: ( localize(9135, "Center Active Cell")),
|
|
263
263
|
keybinding: {
|
|
264
264
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
265
265
|
primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
|
@@ -278,7 +278,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
278
278
|
constructor() {
|
|
279
279
|
super({
|
|
280
280
|
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
281
|
-
title: ( localize(
|
|
281
|
+
title: ( localize(9136, "Cell Cursor Page Up")),
|
|
282
282
|
keybinding: [
|
|
283
283
|
{
|
|
284
284
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
@@ -296,7 +296,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
296
296
|
constructor() {
|
|
297
297
|
super({
|
|
298
298
|
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
299
|
-
title: ( localize(
|
|
299
|
+
title: ( localize(9137, "Cell Cursor Page Up Select")),
|
|
300
300
|
keybinding: [
|
|
301
301
|
{
|
|
302
302
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
@@ -314,7 +314,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
314
314
|
constructor() {
|
|
315
315
|
super({
|
|
316
316
|
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
317
|
-
title: ( localize(
|
|
317
|
+
title: ( localize(9138, "Cell Cursor Page Down")),
|
|
318
318
|
keybinding: [
|
|
319
319
|
{
|
|
320
320
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
@@ -332,7 +332,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
332
332
|
constructor() {
|
|
333
333
|
super({
|
|
334
334
|
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
335
|
-
title: ( localize(
|
|
335
|
+
title: ( localize(9139, "Cell Cursor Page Down Select")),
|
|
336
336
|
keybinding: [
|
|
337
337
|
{
|
|
338
338
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
@@ -361,7 +361,7 @@ function getPageSize(context) {
|
|
|
361
361
|
type: 'boolean',
|
|
362
362
|
default: true,
|
|
363
363
|
markdownDescription: ( localize(
|
|
364
|
-
|
|
364
|
+
9140,
|
|
365
365
|
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
366
366
|
))
|
|
367
367
|
}
|
|
@@ -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(9141, '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(9144, "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
|
};
|
|
@@ -75,7 +75,7 @@ class NotebookVariableDataSource {
|
|
|
75
75
|
notebook: parent.notebook,
|
|
76
76
|
id: parent.id + `${last + 1}`,
|
|
77
77
|
extHostId: parent.extHostId,
|
|
78
|
-
name: ( localize(
|
|
78
|
+
name: ( localize(9145, "Display limit reached")),
|
|
79
79
|
value: '',
|
|
80
80
|
indexedChildrenCount: 0,
|
|
81
81
|
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(9146, "Notebook Variables"));
|
|
16
|
+
const REPL_TITLE = ( localize2(9147, "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(9148, "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
|
+
9149,
|
|
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(9150, "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
|
+
9151,
|
|
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(9152, "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
|
+
9153,
|
|
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(9154, "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(9155, "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(9156, "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(9157, "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(9159, "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(9160, "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(9161, "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(9162, "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(9163, "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(9164, "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(9165, "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(9166, "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
|
+
9167,
|
|
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(9168, "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
|
+
9167,
|
|
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(9168, "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(9169, "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(9170, "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(9171, "Clear Notebook Editor Type Cache")),
|
|
327
327
|
category: Categories.Developer,
|
|
328
328
|
f1: true
|
|
329
329
|
});
|
|
@@ -42,12 +42,12 @@ registerAction2(class extends NotebookAction {
|
|
|
42
42
|
super({
|
|
43
43
|
id: 'notebook.cell.chat.start',
|
|
44
44
|
title: {
|
|
45
|
-
value: '$(sparkle) ' + ( localize(
|
|
45
|
+
value: '$(sparkle) ' + ( localize(9178, "Generate")),
|
|
46
46
|
original: '$(sparkle) Generate',
|
|
47
47
|
},
|
|
48
|
-
tooltip: ( localize(
|
|
48
|
+
tooltip: ( localize(9179, "Start Chat to Generate Code")),
|
|
49
49
|
metadata: {
|
|
50
|
-
description: ( localize(
|
|
50
|
+
description: ( localize(9179, "Start Chat to Generate Code")),
|
|
51
51
|
args: [
|
|
52
52
|
{
|
|
53
53
|
name: 'args',
|
|
@@ -129,10 +129,10 @@ registerAction2(class extends NotebookAction {
|
|
|
129
129
|
super({
|
|
130
130
|
id: 'notebook.cell.chat.startAtTop',
|
|
131
131
|
title: {
|
|
132
|
-
value: '$(sparkle) ' + ( localize(
|
|
132
|
+
value: '$(sparkle) ' + ( localize(9178, "Generate")),
|
|
133
133
|
original: '$(sparkle) Generate',
|
|
134
134
|
},
|
|
135
|
-
tooltip: ( localize(
|
|
135
|
+
tooltip: ( localize(9179, "Start Chat to Generate Code")),
|
|
136
136
|
f1: false,
|
|
137
137
|
menu: [
|
|
138
138
|
{
|
|
@@ -152,8 +152,8 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
152
152
|
command: {
|
|
153
153
|
id: 'notebook.cell.chat.start',
|
|
154
154
|
icon: Codicon.sparkle,
|
|
155
|
-
title: ( localize(
|
|
156
|
-
tooltip: ( localize(
|
|
155
|
+
title: ( localize(9180, "Generate")),
|
|
156
|
+
tooltip: ( localize(9181, "Start Chat to Generate Code"))
|
|
157
157
|
},
|
|
158
158
|
order: -10,
|
|
159
159
|
group: 'navigation/add',
|
|
@@ -163,9 +163,9 @@ class AcceptChangesAndRun extends EditorAction2 {
|
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
165
165
|
id: 'notebook.inlineChat.acceptChangesAndRun',
|
|
166
|
-
title: ( localize2(
|
|
167
|
-
shortTitle: ( localize(
|
|
168
|
-
tooltip: ( localize(
|
|
166
|
+
title: ( localize2(9182, "Accept and Run")),
|
|
167
|
+
shortTitle: ( localize(9183, 'Accept & Run')),
|
|
168
|
+
tooltip: ( localize(9184, 'Accept the changes and run the cell')),
|
|
169
169
|
icon: Codicon.check,
|
|
170
170
|
f1: true,
|
|
171
171
|
precondition: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_INLINE_CHAT_VISIBLE)),
|
|
@@ -79,7 +79,7 @@ let NotebookChatContribution = class NotebookChatContribution extends Disposable
|
|
|
79
79
|
result.suggestions.push({
|
|
80
80
|
label: `${chatVariableLeader}${NotebookKernelVariableKey}`,
|
|
81
81
|
insertText: `${chatVariableLeader}${NotebookKernelVariableKey}:`,
|
|
82
|
-
detail: ( localize(
|
|
82
|
+
detail: ( localize(9185, "Pick a variable from the kernel")),
|
|
83
83
|
range,
|
|
84
84
|
kind: CompletionItemKind.Text,
|
|
85
85
|
command: { id: SelectAndInsertKernelVariableAction.ID, title: SelectAndInsertKernelVariableAction.ID, arguments: [{ widget, range: afterRange }] },
|
|
@@ -175,8 +175,8 @@ class SelectAndInsertKernelVariableAction extends Action2 {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
const placeHolder = quickPickItems.length > 0
|
|
178
|
-
? ( localize(
|
|
179
|
-
: ( localize(
|
|
178
|
+
? ( localize(9186, "Select a kernel variable"))
|
|
179
|
+
: ( localize(9187, "No kernel variables found"));
|
|
180
180
|
const pickedVariable = await quickInputService.pick(quickPickItems, { placeHolder });
|
|
181
181
|
if (!pickedVariable) {
|
|
182
182
|
return;
|
|
@@ -217,7 +217,7 @@ let KernelVariableContextPicker = class KernelVariableContextPicker {
|
|
|
217
217
|
this.editorService = editorService;
|
|
218
218
|
this.notebookKernelService = notebookKernelService;
|
|
219
219
|
this.type = 'pickerPick';
|
|
220
|
-
this.label = ( localize(
|
|
220
|
+
this.label = ( localize(9188, 'Kernel Variable...'));
|
|
221
221
|
this.icon = Codicon.serverEnvironment;
|
|
222
222
|
}
|
|
223
223
|
isEnabled(widget) {
|
|
@@ -254,7 +254,7 @@ let KernelVariableContextPicker = class KernelVariableContextPicker {
|
|
|
254
254
|
return result;
|
|
255
255
|
})();
|
|
256
256
|
return {
|
|
257
|
-
placeholder: ( localize(
|
|
257
|
+
placeholder: ( localize(9189, 'Select a kernel variable')),
|
|
258
258
|
picks
|
|
259
259
|
};
|
|
260
260
|
}
|
|
@@ -267,7 +267,7 @@ registerAction2(class CopyCellOutputAction extends Action2 {
|
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: 'notebook.cellOutput.addToChat',
|
|
270
|
-
title: ( localize(
|
|
270
|
+
title: ( localize(9190, "Add Cell Output to Chat")),
|
|
271
271
|
menu: {
|
|
272
272
|
id: MenuId.NotebookOutputToolbar,
|
|
273
273
|
when: ( ContextKeyExpr.and(
|
package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
4
|
|
|
5
|
-
const CTX_NOTEBOOK_CHAT_HAS_AGENT = ( new RawContextKey('notebookChatAgentRegistered', false, ( localize(
|
|
5
|
+
const CTX_NOTEBOOK_CHAT_HAS_AGENT = ( new RawContextKey('notebookChatAgentRegistered', false, ( localize(9191, "Whether a chat agent for notebook is registered"))));
|
|
6
6
|
|
|
7
7
|
export { CTX_NOTEBOOK_CHAT_HAS_AGENT };
|