@codingame/monaco-vscode-notebook-service-override 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +30 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +40 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +94 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +25 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +71 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +128 -177
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +162 -264
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +41 -76
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +42 -45
- package/notebook.d.ts +0 -5
|
@@ -10,6 +10,7 @@ import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE } from 'vscode/vsc
|
|
|
10
10
|
import { CellKind, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
11
|
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
12
12
|
|
|
13
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/controller/insertCellActions";
|
|
13
14
|
const INSERT_CODE_CELL_ABOVE_COMMAND_ID = 'notebook.cell.insertCodeCellAbove';
|
|
14
15
|
const INSERT_CODE_CELL_BELOW_COMMAND_ID = 'notebook.cell.insertCodeCellBelow';
|
|
15
16
|
const INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID = 'notebook.cell.insertCodeCellAboveAndFocusContainer';
|
|
@@ -53,14 +54,13 @@ registerAction2(class InsertCodeCellAboveAction extends InsertCellCommand {
|
|
|
53
54
|
constructor() {
|
|
54
55
|
super({
|
|
55
56
|
id: INSERT_CODE_CELL_ABOVE_COMMAND_ID,
|
|
56
|
-
title: ( localizeWithPath(
|
|
57
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
58
|
-
'notebookActions.insertCodeCellAbove',
|
|
59
|
-
"Insert Code Cell Above"
|
|
60
|
-
)),
|
|
57
|
+
title: ( localizeWithPath(_moduleId, 0, "Insert Code Cell Above")),
|
|
61
58
|
keybinding: {
|
|
62
59
|
primary: 2048 | 1024 | 3 ,
|
|
63
|
-
when: ( ContextKeyExpr.and(
|
|
60
|
+
when: ( (ContextKeyExpr.and(
|
|
61
|
+
NOTEBOOK_CELL_LIST_FOCUSED,
|
|
62
|
+
(InputFocusedContext.toNegated())
|
|
63
|
+
))),
|
|
64
64
|
weight: 200
|
|
65
65
|
},
|
|
66
66
|
menu: {
|
|
@@ -74,11 +74,7 @@ registerAction2(class InsertCodeCellAboveAndFocusContainerAction extends InsertC
|
|
|
74
74
|
constructor() {
|
|
75
75
|
super({
|
|
76
76
|
id: INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID,
|
|
77
|
-
title: ( localizeWithPath(
|
|
78
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
79
|
-
'notebookActions.insertCodeCellAboveAndFocusContainer',
|
|
80
|
-
"Insert Code Cell Above and Focus Container"
|
|
81
|
-
))
|
|
77
|
+
title: ( localizeWithPath(_moduleId, 1, "Insert Code Cell Above and Focus Container"))
|
|
82
78
|
}, CellKind.Code, 'above', false);
|
|
83
79
|
}
|
|
84
80
|
});
|
|
@@ -86,14 +82,14 @@ registerAction2(class InsertCodeCellBelowAction extends InsertCellCommand {
|
|
|
86
82
|
constructor() {
|
|
87
83
|
super({
|
|
88
84
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
89
|
-
title: ( localizeWithPath(
|
|
90
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
91
|
-
'notebookActions.insertCodeCellBelow',
|
|
92
|
-
"Insert Code Cell Below"
|
|
93
|
-
)),
|
|
85
|
+
title: ( localizeWithPath(_moduleId, 2, "Insert Code Cell Below")),
|
|
94
86
|
keybinding: {
|
|
95
87
|
primary: 2048 | 3 ,
|
|
96
|
-
when: ( ContextKeyExpr.and(
|
|
88
|
+
when: ( (ContextKeyExpr.and(
|
|
89
|
+
NOTEBOOK_CELL_LIST_FOCUSED,
|
|
90
|
+
(InputFocusedContext.toNegated()),
|
|
91
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
92
|
+
))),
|
|
97
93
|
weight: 200
|
|
98
94
|
},
|
|
99
95
|
menu: {
|
|
@@ -107,11 +103,7 @@ registerAction2(class InsertCodeCellBelowAndFocusContainerAction extends InsertC
|
|
|
107
103
|
constructor() {
|
|
108
104
|
super({
|
|
109
105
|
id: INSERT_CODE_CELL_BELOW_AND_FOCUS_CONTAINER_COMMAND_ID,
|
|
110
|
-
title: ( localizeWithPath(
|
|
111
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
112
|
-
'notebookActions.insertCodeCellBelowAndFocusContainer',
|
|
113
|
-
"Insert Code Cell Below and Focus Container"
|
|
114
|
-
)),
|
|
106
|
+
title: ( localizeWithPath(_moduleId, 3, "Insert Code Cell Below and Focus Container")),
|
|
115
107
|
}, CellKind.Code, 'below', false);
|
|
116
108
|
}
|
|
117
109
|
});
|
|
@@ -119,11 +111,7 @@ registerAction2(class InsertMarkdownCellAboveAction extends InsertCellCommand {
|
|
|
119
111
|
constructor() {
|
|
120
112
|
super({
|
|
121
113
|
id: INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID,
|
|
122
|
-
title: ( localizeWithPath(
|
|
123
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
124
|
-
'notebookActions.insertMarkdownCellAbove',
|
|
125
|
-
"Insert Markdown Cell Above"
|
|
126
|
-
)),
|
|
114
|
+
title: ( localizeWithPath(_moduleId, 4, "Insert Markdown Cell Above")),
|
|
127
115
|
menu: {
|
|
128
116
|
id: MenuId.NotebookCellInsert,
|
|
129
117
|
order: 2
|
|
@@ -135,11 +123,7 @@ registerAction2(class InsertMarkdownCellBelowAction extends InsertCellCommand {
|
|
|
135
123
|
constructor() {
|
|
136
124
|
super({
|
|
137
125
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
138
|
-
title: ( localizeWithPath(
|
|
139
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
140
|
-
'notebookActions.insertMarkdownCellBelow',
|
|
141
|
-
"Insert Markdown Cell Below"
|
|
142
|
-
)),
|
|
126
|
+
title: ( localizeWithPath(_moduleId, 5, "Insert Markdown Cell Below")),
|
|
143
127
|
menu: {
|
|
144
128
|
id: MenuId.NotebookCellInsert,
|
|
145
129
|
order: 3
|
|
@@ -151,11 +135,7 @@ registerAction2(class InsertCodeCellAtTopAction extends NotebookAction {
|
|
|
151
135
|
constructor() {
|
|
152
136
|
super({
|
|
153
137
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
154
|
-
title: ( localizeWithPath(
|
|
155
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
156
|
-
'notebookActions.insertCodeCellAtTop',
|
|
157
|
-
"Add Code Cell At Top"
|
|
158
|
-
)),
|
|
138
|
+
title: ( localizeWithPath(_moduleId, 6, "Add Code Cell At Top")),
|
|
159
139
|
f1: false
|
|
160
140
|
});
|
|
161
141
|
}
|
|
@@ -177,11 +157,7 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
|
|
|
177
157
|
constructor() {
|
|
178
158
|
super({
|
|
179
159
|
id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
|
|
180
|
-
title: ( localizeWithPath(
|
|
181
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
182
|
-
'notebookActions.insertMarkdownCellAtTop',
|
|
183
|
-
"Add Markdown Cell At Top"
|
|
184
|
-
)),
|
|
160
|
+
title: ( localizeWithPath(_moduleId, 7, "Add Markdown Cell At Top")),
|
|
185
161
|
f1: false
|
|
186
162
|
});
|
|
187
163
|
}
|
|
@@ -202,150 +178,114 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
|
|
|
202
178
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
203
179
|
command: {
|
|
204
180
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
205
|
-
title: '$(add) ' + ( localizeWithPath(
|
|
206
|
-
|
|
207
|
-
'notebookActions.menu.insertCode',
|
|
208
|
-
"Code"
|
|
209
|
-
)),
|
|
210
|
-
tooltip: ( localizeWithPath(
|
|
211
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
212
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
213
|
-
"Add Code Cell"
|
|
214
|
-
))
|
|
181
|
+
title: '$(add) ' + ( localizeWithPath(_moduleId, 8, "Code")),
|
|
182
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Add Code Cell"))
|
|
215
183
|
},
|
|
216
184
|
order: 0,
|
|
217
185
|
group: 'inline',
|
|
218
|
-
when: ( ContextKeyExpr.and(
|
|
186
|
+
when: ( (ContextKeyExpr.and(
|
|
187
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
188
|
+
(ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
189
|
+
)))
|
|
219
190
|
});
|
|
220
191
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
221
192
|
command: {
|
|
222
193
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
223
|
-
title: ( localizeWithPath(
|
|
224
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
225
|
-
'notebookActions.menu.insertCode.minimalToolbar',
|
|
226
|
-
"Add Code"
|
|
227
|
-
)),
|
|
194
|
+
title: ( localizeWithPath(_moduleId, 10, "Add Code")),
|
|
228
195
|
icon: Codicon.add,
|
|
229
|
-
tooltip: ( localizeWithPath(
|
|
230
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
231
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
232
|
-
"Add Code Cell"
|
|
233
|
-
))
|
|
196
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Add Code Cell"))
|
|
234
197
|
},
|
|
235
198
|
order: 0,
|
|
236
199
|
group: 'inline',
|
|
237
|
-
when: ( ContextKeyExpr.and(
|
|
200
|
+
when: ( (ContextKeyExpr.and(
|
|
201
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
202
|
+
(ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
203
|
+
)))
|
|
238
204
|
});
|
|
239
205
|
MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
240
206
|
command: {
|
|
241
207
|
id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
|
|
242
208
|
icon: Codicon.add,
|
|
243
|
-
title: ( localizeWithPath(
|
|
244
|
-
|
|
245
|
-
'notebookActions.menu.insertCode.ontoolbar',
|
|
246
|
-
"Code"
|
|
247
|
-
)),
|
|
248
|
-
tooltip: ( localizeWithPath(
|
|
249
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
250
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
251
|
-
"Add Code Cell"
|
|
252
|
-
))
|
|
209
|
+
title: ( localizeWithPath(_moduleId, 11, "Code")),
|
|
210
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Add Code Cell"))
|
|
253
211
|
},
|
|
254
212
|
order: -5,
|
|
255
213
|
group: 'navigation/add',
|
|
256
|
-
when: ( ContextKeyExpr.and(
|
|
214
|
+
when: ( (ContextKeyExpr.and(
|
|
215
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
216
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
|
|
217
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden'))
|
|
218
|
+
)))
|
|
257
219
|
});
|
|
258
220
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
259
221
|
command: {
|
|
260
222
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
261
|
-
title: '$(add) ' + ( localizeWithPath(
|
|
262
|
-
|
|
263
|
-
'notebookActions.menu.insertCode',
|
|
264
|
-
"Code"
|
|
265
|
-
)),
|
|
266
|
-
tooltip: ( localizeWithPath(
|
|
267
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
268
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
269
|
-
"Add Code Cell"
|
|
270
|
-
))
|
|
223
|
+
title: '$(add) ' + ( localizeWithPath(_moduleId, 8, "Code")),
|
|
224
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Add Code Cell"))
|
|
271
225
|
},
|
|
272
226
|
order: 0,
|
|
273
227
|
group: 'inline',
|
|
274
|
-
when: ( ContextKeyExpr.and(
|
|
228
|
+
when: ( (ContextKeyExpr.and(
|
|
229
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
230
|
+
(ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
231
|
+
)))
|
|
275
232
|
});
|
|
276
233
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
277
234
|
command: {
|
|
278
235
|
id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
|
|
279
|
-
title: ( localizeWithPath(
|
|
280
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
281
|
-
'notebookActions.menu.insertCode.minimaltoolbar',
|
|
282
|
-
"Add Code"
|
|
283
|
-
)),
|
|
236
|
+
title: ( localizeWithPath(_moduleId, 12, "Add Code")),
|
|
284
237
|
icon: Codicon.add,
|
|
285
|
-
tooltip: ( localizeWithPath(
|
|
286
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
287
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
288
|
-
"Add Code Cell"
|
|
289
|
-
))
|
|
238
|
+
tooltip: ( localizeWithPath(_moduleId, 9, "Add Code Cell"))
|
|
290
239
|
},
|
|
291
240
|
order: 0,
|
|
292
241
|
group: 'inline',
|
|
293
|
-
when: ( ContextKeyExpr.and(
|
|
242
|
+
when: ( (ContextKeyExpr.and(
|
|
243
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
244
|
+
(ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
245
|
+
)))
|
|
294
246
|
});
|
|
295
247
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
|
|
296
248
|
command: {
|
|
297
249
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
298
|
-
title: '$(add) ' + ( localizeWithPath(
|
|
299
|
-
|
|
300
|
-
'notebookActions.menu.insertMarkdown',
|
|
301
|
-
"Markdown"
|
|
302
|
-
)),
|
|
303
|
-
tooltip: ( localizeWithPath(
|
|
304
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
305
|
-
'notebookActions.menu.insertMarkdown.tooltip',
|
|
306
|
-
"Add Markdown Cell"
|
|
307
|
-
))
|
|
250
|
+
title: '$(add) ' + ( localizeWithPath(_moduleId, 13, "Markdown")),
|
|
251
|
+
tooltip: ( localizeWithPath(_moduleId, 14, "Add Markdown Cell"))
|
|
308
252
|
},
|
|
309
253
|
order: 1,
|
|
310
254
|
group: 'inline',
|
|
311
|
-
when: ( ContextKeyExpr.and(
|
|
255
|
+
when: ( (ContextKeyExpr.and(
|
|
256
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
257
|
+
(ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
258
|
+
)))
|
|
312
259
|
});
|
|
313
260
|
MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
314
261
|
command: {
|
|
315
262
|
id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
|
|
316
263
|
icon: Codicon.add,
|
|
317
|
-
title: ( localizeWithPath(
|
|
318
|
-
|
|
319
|
-
'notebookActions.menu.insertMarkdown.ontoolbar',
|
|
320
|
-
"Markdown"
|
|
321
|
-
)),
|
|
322
|
-
tooltip: ( localizeWithPath(
|
|
323
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
324
|
-
'notebookActions.menu.insertMarkdown.tooltip',
|
|
325
|
-
"Add Markdown Cell"
|
|
326
|
-
))
|
|
264
|
+
title: ( localizeWithPath(_moduleId, 15, "Markdown")),
|
|
265
|
+
tooltip: ( localizeWithPath(_moduleId, 14, "Add Markdown Cell"))
|
|
327
266
|
},
|
|
328
267
|
order: -5,
|
|
329
268
|
group: 'navigation/add',
|
|
330
|
-
when: ( ContextKeyExpr.and(
|
|
269
|
+
when: ( (ContextKeyExpr.and(
|
|
270
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
271
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
|
|
272
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')),
|
|
273
|
+
(ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, false)),
|
|
274
|
+
(ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, 'never'))
|
|
275
|
+
)))
|
|
331
276
|
});
|
|
332
277
|
MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
|
|
333
278
|
command: {
|
|
334
279
|
id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
|
|
335
|
-
title: '$(add) ' + ( localizeWithPath(
|
|
336
|
-
|
|
337
|
-
'notebookActions.menu.insertMarkdown',
|
|
338
|
-
"Markdown"
|
|
339
|
-
)),
|
|
340
|
-
tooltip: ( localizeWithPath(
|
|
341
|
-
'vs/workbench/contrib/notebook/browser/controller/insertCellActions',
|
|
342
|
-
'notebookActions.menu.insertMarkdown.tooltip',
|
|
343
|
-
"Add Markdown Cell"
|
|
344
|
-
))
|
|
280
|
+
title: '$(add) ' + ( localizeWithPath(_moduleId, 13, "Markdown")),
|
|
281
|
+
tooltip: ( localizeWithPath(_moduleId, 14, "Add Markdown Cell"))
|
|
345
282
|
},
|
|
346
283
|
order: 1,
|
|
347
284
|
group: 'inline',
|
|
348
|
-
when: ( ContextKeyExpr.and(
|
|
285
|
+
when: ( (ContextKeyExpr.and(
|
|
286
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
287
|
+
(ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
|
|
288
|
+
)))
|
|
349
289
|
});
|
|
350
290
|
|
|
351
291
|
export { InsertCellCommand, insertNewCell };
|
|
@@ -16,29 +16,33 @@ import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/co
|
|
|
16
16
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
17
|
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/controller/layoutActions";
|
|
19
20
|
registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
20
21
|
constructor() {
|
|
21
22
|
super({
|
|
22
23
|
id: 'workbench.notebook.layout.select',
|
|
23
|
-
title: ( localize2WithPath(
|
|
24
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
25
|
-
'workbench.notebook.layout.select.label',
|
|
26
|
-
"Select between Notebook Layouts"
|
|
27
|
-
)),
|
|
24
|
+
title: ( localize2WithPath(_moduleId, 0, "Select between Notebook Layouts")),
|
|
28
25
|
f1: true,
|
|
29
|
-
precondition: ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)),
|
|
26
|
+
precondition: ( (ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))),
|
|
30
27
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
31
28
|
menu: [
|
|
32
29
|
{
|
|
33
30
|
id: MenuId.EditorTitle,
|
|
34
31
|
group: 'notebookLayout',
|
|
35
|
-
when: ( ContextKeyExpr.and(
|
|
32
|
+
when: ( (ContextKeyExpr.and(
|
|
33
|
+
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
34
|
+
(ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)),
|
|
35
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))
|
|
36
|
+
))),
|
|
36
37
|
order: 0
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
id: MenuId.NotebookToolbar,
|
|
40
41
|
group: 'notebookLayout',
|
|
41
|
-
when: ( ContextKeyExpr.and(
|
|
42
|
+
when: ( (ContextKeyExpr.and(
|
|
43
|
+
(ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
|
|
44
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))
|
|
45
|
+
))),
|
|
42
46
|
order: 0
|
|
43
47
|
}
|
|
44
48
|
]
|
|
@@ -52,18 +56,14 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
|
52
56
|
constructor() {
|
|
53
57
|
super({
|
|
54
58
|
id: 'workbench.notebook.layout.configure',
|
|
55
|
-
title: ( localize2WithPath(
|
|
56
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
57
|
-
'workbench.notebook.layout.configure.label',
|
|
58
|
-
"Customize Notebook Layout"
|
|
59
|
-
)),
|
|
59
|
+
title: ( localize2WithPath(_moduleId, 1, "Customize Notebook Layout")),
|
|
60
60
|
f1: true,
|
|
61
61
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
62
62
|
menu: [
|
|
63
63
|
{
|
|
64
64
|
id: MenuId.NotebookToolbar,
|
|
65
65
|
group: 'notebookLayout',
|
|
66
|
-
when: ( ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
|
|
66
|
+
when: ( (ContextKeyExpr.equals('config.notebook.globalToolbar', true))),
|
|
67
67
|
order: 1
|
|
68
68
|
}
|
|
69
69
|
]
|
|
@@ -77,11 +77,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
|
|
|
77
77
|
constructor() {
|
|
78
78
|
super({
|
|
79
79
|
id: 'workbench.notebook.layout.configure.editorTitle',
|
|
80
|
-
title: ( localize2WithPath(
|
|
81
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
82
|
-
'workbench.notebook.layout.configure.label',
|
|
83
|
-
"Customize Notebook Layout"
|
|
84
|
-
)),
|
|
80
|
+
title: ( localize2WithPath(_moduleId, 1, "Customize Notebook Layout")),
|
|
85
81
|
f1: false,
|
|
86
82
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
87
83
|
menu: [
|
|
@@ -101,11 +97,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
|
|
|
101
97
|
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
|
102
98
|
submenu: MenuId.NotebookEditorLayoutConfigure,
|
|
103
99
|
rememberDefaultAction: false,
|
|
104
|
-
title: ( localize2WithPath(
|
|
105
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
106
|
-
'customizeNotebook',
|
|
107
|
-
"Customize Notebook..."
|
|
108
|
-
)),
|
|
100
|
+
title: ( localize2WithPath(_moduleId, 2, "Customize Notebook...")),
|
|
109
101
|
icon: Codicon.gear,
|
|
110
102
|
group: 'navigation',
|
|
111
103
|
order: -1,
|
|
@@ -115,11 +107,7 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
|
|
|
115
107
|
constructor() {
|
|
116
108
|
super({
|
|
117
109
|
id: 'notebook.toggleLineNumbersFromEditorTitle',
|
|
118
|
-
title: ( localize2WithPath(
|
|
119
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
120
|
-
'notebook.toggleLineNumbers',
|
|
121
|
-
'Toggle Notebook Line Numbers'
|
|
122
|
-
)),
|
|
110
|
+
title: ( localize2WithPath(_moduleId, 3, 'Toggle Notebook Line Numbers')),
|
|
123
111
|
precondition: NOTEBOOK_EDITOR_FOCUSED,
|
|
124
112
|
menu: [
|
|
125
113
|
{
|
|
@@ -132,12 +120,8 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
|
|
|
132
120
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
133
121
|
f1: true,
|
|
134
122
|
toggled: {
|
|
135
|
-
condition: ( ContextKeyExpr.notEquals('config.notebook.lineNumbers', 'off')),
|
|
136
|
-
title: ( localizeWithPath(
|
|
137
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
138
|
-
'notebook.showLineNumbers',
|
|
139
|
-
"Notebook Line Numbers"
|
|
140
|
-
)),
|
|
123
|
+
condition: ( (ContextKeyExpr.notEquals('config.notebook.lineNumbers', 'off'))),
|
|
124
|
+
title: ( localizeWithPath(_moduleId, 4, "Notebook Line Numbers")),
|
|
141
125
|
}
|
|
142
126
|
});
|
|
143
127
|
}
|
|
@@ -149,11 +133,7 @@ registerAction2(class ToggleCellToolbarPositionFromEditorTitle extends Action2 {
|
|
|
149
133
|
constructor() {
|
|
150
134
|
super({
|
|
151
135
|
id: 'notebook.toggleCellToolbarPositionFromEditorTitle',
|
|
152
|
-
title: ( localize2WithPath(
|
|
153
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
154
|
-
'notebook.toggleCellToolbarPosition',
|
|
155
|
-
'Toggle Cell Toolbar Position'
|
|
156
|
-
)),
|
|
136
|
+
title: ( localize2WithPath(_moduleId, 5, 'Toggle Cell Toolbar Position')),
|
|
157
137
|
menu: [{
|
|
158
138
|
id: MenuId.NotebookEditorLayoutConfigure,
|
|
159
139
|
group: 'notebookLayoutDetails',
|
|
@@ -171,11 +151,7 @@ registerAction2(class ToggleBreadcrumbFromEditorTitle extends Action2 {
|
|
|
171
151
|
constructor() {
|
|
172
152
|
super({
|
|
173
153
|
id: 'breadcrumbs.toggleFromEditorTitle',
|
|
174
|
-
title: ( localize2WithPath(
|
|
175
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
176
|
-
'notebook.toggleBreadcrumb',
|
|
177
|
-
'Toggle Breadcrumbs'
|
|
178
|
-
)),
|
|
154
|
+
title: ( localize2WithPath(_moduleId, 6, 'Toggle Breadcrumbs')),
|
|
179
155
|
menu: [{
|
|
180
156
|
id: MenuId.NotebookEditorLayoutConfigure,
|
|
181
157
|
group: 'notebookLayoutDetails',
|
|
@@ -192,11 +168,7 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
|
|
|
192
168
|
constructor() {
|
|
193
169
|
super({
|
|
194
170
|
id: 'notebook.saveMimeTypeOrder',
|
|
195
|
-
title: ( localize2WithPath(
|
|
196
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
197
|
-
'notebook.saveMimeTypeOrder',
|
|
198
|
-
"Save Mimetype Display Order"
|
|
199
|
-
)),
|
|
171
|
+
title: ( localize2WithPath(_moduleId, 7, "Save Mimetype Display Order")),
|
|
200
172
|
f1: true,
|
|
201
173
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
202
174
|
precondition: NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
@@ -205,22 +177,10 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
|
|
|
205
177
|
run(accessor) {
|
|
206
178
|
const service = accessor.get(INotebookService);
|
|
207
179
|
const qp = accessor.get(IQuickInputService).createQuickPick();
|
|
208
|
-
qp.placeholder = ( localizeWithPath(
|
|
209
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
210
|
-
'notebook.placeholder',
|
|
211
|
-
'Settings file to save in'
|
|
212
|
-
));
|
|
180
|
+
qp.placeholder = ( localizeWithPath(_moduleId, 8, 'Settings file to save in'));
|
|
213
181
|
qp.items = [
|
|
214
|
-
{ target: 2 , label: ( localizeWithPath(
|
|
215
|
-
|
|
216
|
-
'saveTarget.machine',
|
|
217
|
-
'User Settings'
|
|
218
|
-
)) },
|
|
219
|
-
{ target: 5 , label: ( localizeWithPath(
|
|
220
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
221
|
-
'saveTarget.workspace',
|
|
222
|
-
'Workspace Settings'
|
|
223
|
-
)) },
|
|
182
|
+
{ target: 2 , label: ( localizeWithPath(_moduleId, 9, 'User Settings')) },
|
|
183
|
+
{ target: 5 , label: ( localizeWithPath(_moduleId, 10, 'Workspace Settings')) },
|
|
224
184
|
];
|
|
225
185
|
qp.onDidAccept(() => {
|
|
226
186
|
const target = qp.selectedItems[0]?.target;
|
|
@@ -237,11 +197,7 @@ registerAction2(class NotebookWebviewResetAction extends Action2 {
|
|
|
237
197
|
constructor() {
|
|
238
198
|
super({
|
|
239
199
|
id: 'workbench.notebook.layout.webview.reset',
|
|
240
|
-
title: ( localize2WithPath(
|
|
241
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
242
|
-
'workbench.notebook.layout.webview.reset.label',
|
|
243
|
-
"Reset Notebook Webview"
|
|
244
|
-
)),
|
|
200
|
+
title: ( localize2WithPath(_moduleId, 11, "Reset Notebook Webview")),
|
|
245
201
|
f1: false,
|
|
246
202
|
category: NOTEBOOK_ACTIONS_CATEGORY
|
|
247
203
|
});
|
|
@@ -251,7 +207,7 @@ registerAction2(class NotebookWebviewResetAction extends Action2 {
|
|
|
251
207
|
if (args) {
|
|
252
208
|
const uri = URI.revive(args);
|
|
253
209
|
const notebookEditorService = accessor.get(INotebookEditorService);
|
|
254
|
-
const widgets = notebookEditorService.listNotebookEditors().filter(widget => widget.hasModel() && ( widget.textModel.uri.toString()) === ( uri.toString()));
|
|
210
|
+
const widgets = notebookEditorService.listNotebookEditors().filter(widget => widget.hasModel() && ( (widget.textModel.uri.toString())) === ( (uri.toString())));
|
|
255
211
|
for (const widget of widgets) {
|
|
256
212
|
if (widget.hasModel()) {
|
|
257
213
|
widget.getInnerWebview()?.reload();
|
|
@@ -272,30 +228,14 @@ registerAction2(class ToggleNotebookStickyScroll extends Action2 {
|
|
|
272
228
|
super({
|
|
273
229
|
id: 'notebook.action.toggleNotebookStickyScroll',
|
|
274
230
|
title: {
|
|
275
|
-
...( localize2WithPath(
|
|
276
|
-
|
|
277
|
-
'toggleStickyScroll',
|
|
278
|
-
"Toggle Notebook Sticky Scroll"
|
|
279
|
-
)),
|
|
280
|
-
mnemonicTitle: ( localizeWithPath(
|
|
281
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
282
|
-
{ key: 'mitoggleNotebookStickyScroll', comment: ['&& denotes a mnemonic'] },
|
|
283
|
-
"&&Toggle Notebook Sticky Scroll"
|
|
284
|
-
)),
|
|
231
|
+
...( localize2WithPath(_moduleId, 12, "Toggle Notebook Sticky Scroll")),
|
|
232
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 13, "&&Toggle Notebook Sticky Scroll")),
|
|
285
233
|
},
|
|
286
234
|
category: Categories.View,
|
|
287
235
|
toggled: {
|
|
288
|
-
condition: ( ContextKeyExpr.equals('config.notebook.stickyScroll.enabled', true)),
|
|
289
|
-
title: ( localizeWithPath(
|
|
290
|
-
|
|
291
|
-
'notebookStickyScroll',
|
|
292
|
-
"Toggle Notebook Sticky Scroll"
|
|
293
|
-
)),
|
|
294
|
-
mnemonicTitle: ( localizeWithPath(
|
|
295
|
-
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
296
|
-
{ key: 'mitoggleNotebookStickyScroll', comment: ['&& denotes a mnemonic'] },
|
|
297
|
-
"&&Toggle Notebook Sticky Scroll"
|
|
298
|
-
)),
|
|
236
|
+
condition: ( (ContextKeyExpr.equals('config.notebook.stickyScroll.enabled', true))),
|
|
237
|
+
title: ( localizeWithPath(_moduleId, 14, "Toggle Notebook Sticky Scroll")),
|
|
238
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 13, "&&Toggle Notebook Sticky Scroll")),
|
|
299
239
|
},
|
|
300
240
|
menu: [
|
|
301
241
|
{ id: MenuId.CommandPalette },
|