@codingame/monaco-vscode-notebook-service-override 4.5.1 → 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/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
|
@@ -15,6 +15,7 @@ import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/brows
|
|
|
15
15
|
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
16
|
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
17
17
|
|
|
18
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/navigation/arrow";
|
|
18
19
|
const NOTEBOOK_FOCUS_TOP = 'notebook.focusTop';
|
|
19
20
|
const NOTEBOOK_FOCUS_BOTTOM = 'notebook.focusBottom';
|
|
20
21
|
const NOTEBOOK_FOCUS_PREVIOUS_EDITOR = 'notebook.focusPreviousEditor';
|
|
@@ -30,24 +31,41 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
30
31
|
constructor() {
|
|
31
32
|
super({
|
|
32
33
|
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
33
|
-
title: ( localizeWithPath(
|
|
34
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
35
|
-
'cursorMoveDown',
|
|
36
|
-
'Focus Next Cell Editor'
|
|
37
|
-
)),
|
|
34
|
+
title: ( localizeWithPath(_moduleId, 0, 'Focus Next Cell Editor')),
|
|
38
35
|
keybinding: [
|
|
39
36
|
{
|
|
40
|
-
when: (
|
|
37
|
+
when: ( (ContextKeyExpr.and(
|
|
38
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
39
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
40
|
+
(ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
|
|
41
|
+
(ContextKeyExpr.and(
|
|
42
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
43
|
+
EditorContextKeys.editorTextFocus,
|
|
44
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')),
|
|
45
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
46
|
+
)),
|
|
47
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
48
|
+
))),
|
|
41
49
|
primary: 18 ,
|
|
42
50
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
43
51
|
},
|
|
44
52
|
{
|
|
45
|
-
when: (
|
|
53
|
+
when: ( (ContextKeyExpr.and(
|
|
54
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
55
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
56
|
+
(ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
|
|
57
|
+
(ContextKeyExpr.and(
|
|
58
|
+
(NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
|
|
59
|
+
(NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)),
|
|
60
|
+
NOTEBOOK_CURSOR_NAVIGATION_MODE
|
|
61
|
+
)),
|
|
62
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
63
|
+
))),
|
|
46
64
|
primary: 18 ,
|
|
47
65
|
weight: 200 ,
|
|
48
66
|
},
|
|
49
67
|
{
|
|
50
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
|
68
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
51
69
|
primary: 2048 | 18 ,
|
|
52
70
|
mac: { primary: 256 | 2048 | 18 , },
|
|
53
71
|
weight: 200
|
|
@@ -88,19 +106,36 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
88
106
|
constructor() {
|
|
89
107
|
super({
|
|
90
108
|
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
91
|
-
title: ( localizeWithPath(
|
|
92
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
93
|
-
'cursorMoveUp',
|
|
94
|
-
'Focus Previous Cell Editor'
|
|
95
|
-
)),
|
|
109
|
+
title: ( localizeWithPath(_moduleId, 1, 'Focus Previous Cell Editor')),
|
|
96
110
|
keybinding: [
|
|
97
111
|
{
|
|
98
|
-
when: (
|
|
112
|
+
when: ( (ContextKeyExpr.and(
|
|
113
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
114
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
115
|
+
(ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
|
|
116
|
+
(ContextKeyExpr.and(
|
|
117
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
118
|
+
EditorContextKeys.editorTextFocus,
|
|
119
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')),
|
|
120
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
121
|
+
)),
|
|
122
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
123
|
+
))),
|
|
99
124
|
primary: 16 ,
|
|
100
125
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
101
126
|
},
|
|
102
127
|
{
|
|
103
|
-
when: (
|
|
128
|
+
when: ( (ContextKeyExpr.and(
|
|
129
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
130
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
131
|
+
(ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)),
|
|
132
|
+
(ContextKeyExpr.and(
|
|
133
|
+
(NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
|
|
134
|
+
(NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)),
|
|
135
|
+
NOTEBOOK_CURSOR_NAVIGATION_MODE
|
|
136
|
+
)),
|
|
137
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
138
|
+
))),
|
|
104
139
|
primary: 16 ,
|
|
105
140
|
weight: 200 ,
|
|
106
141
|
},
|
|
@@ -137,23 +172,19 @@ registerAction2(class extends NotebookAction {
|
|
|
137
172
|
constructor() {
|
|
138
173
|
super({
|
|
139
174
|
id: NOTEBOOK_FOCUS_TOP,
|
|
140
|
-
title: ( localizeWithPath(
|
|
141
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
142
|
-
'focusFirstCell',
|
|
143
|
-
'Focus First Cell'
|
|
144
|
-
)),
|
|
175
|
+
title: ( localizeWithPath(_moduleId, 2, 'Focus First Cell')),
|
|
145
176
|
keybinding: [
|
|
146
177
|
{
|
|
147
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
178
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
148
179
|
primary: 2048 | 14 ,
|
|
149
180
|
weight: 200
|
|
150
181
|
},
|
|
151
182
|
{
|
|
152
|
-
when: ( ContextKeyExpr.and(
|
|
183
|
+
when: ( (ContextKeyExpr.and(
|
|
153
184
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
154
185
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
155
|
-
|
|
156
|
-
)),
|
|
186
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
187
|
+
))),
|
|
157
188
|
mac: { primary: 2048 | 16 },
|
|
158
189
|
weight: 200
|
|
159
190
|
}
|
|
@@ -173,24 +204,20 @@ registerAction2(class extends NotebookAction {
|
|
|
173
204
|
constructor() {
|
|
174
205
|
super({
|
|
175
206
|
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
176
|
-
title: ( localizeWithPath(
|
|
177
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
178
|
-
'focusLastCell',
|
|
179
|
-
'Focus Last Cell'
|
|
180
|
-
)),
|
|
207
|
+
title: ( localizeWithPath(_moduleId, 3, 'Focus Last Cell')),
|
|
181
208
|
keybinding: [
|
|
182
209
|
{
|
|
183
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
210
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
184
211
|
primary: 2048 | 13 ,
|
|
185
212
|
mac: undefined,
|
|
186
213
|
weight: 200
|
|
187
214
|
},
|
|
188
215
|
{
|
|
189
|
-
when: ( ContextKeyExpr.and(
|
|
216
|
+
when: ( (ContextKeyExpr.and(
|
|
190
217
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
191
218
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
192
|
-
|
|
193
|
-
)),
|
|
219
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
220
|
+
))),
|
|
194
221
|
mac: { primary: 2048 | 18 },
|
|
195
222
|
weight: 200
|
|
196
223
|
}
|
|
@@ -214,13 +241,9 @@ registerAction2(class extends NotebookCellAction {
|
|
|
214
241
|
constructor() {
|
|
215
242
|
super({
|
|
216
243
|
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
217
|
-
title: ( localizeWithPath(
|
|
218
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
219
|
-
'focusOutput',
|
|
220
|
-
'Focus In Active Cell Output'
|
|
221
|
-
)),
|
|
244
|
+
title: ( localizeWithPath(_moduleId, 4, 'Focus In Active Cell Output')),
|
|
222
245
|
keybinding: {
|
|
223
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
246
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS))),
|
|
224
247
|
primary: 2048 | 18 ,
|
|
225
248
|
mac: { primary: 256 | 2048 | 18 , },
|
|
226
249
|
weight: 200
|
|
@@ -237,13 +260,9 @@ registerAction2(class extends NotebookCellAction {
|
|
|
237
260
|
constructor() {
|
|
238
261
|
super({
|
|
239
262
|
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
240
|
-
title: ( localizeWithPath(
|
|
241
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
242
|
-
'focusOutputOut',
|
|
243
|
-
'Focus Out Active Cell Output'
|
|
244
|
-
)),
|
|
263
|
+
title: ( localizeWithPath(_moduleId, 5, 'Focus Out Active Cell Output')),
|
|
245
264
|
keybinding: {
|
|
246
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
|
265
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
247
266
|
primary: 2048 | 16 ,
|
|
248
267
|
mac: { primary: 256 | 2048 | 16 , },
|
|
249
268
|
weight: 200
|
|
@@ -260,11 +279,7 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
260
279
|
constructor() {
|
|
261
280
|
super({
|
|
262
281
|
id: CENTER_ACTIVE_CELL,
|
|
263
|
-
title: ( localizeWithPath(
|
|
264
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
265
|
-
'notebookActions.centerActiveCell',
|
|
266
|
-
"Center Active Cell"
|
|
267
|
-
)),
|
|
282
|
+
title: ( localizeWithPath(_moduleId, 6, "Center Active Cell")),
|
|
268
283
|
keybinding: {
|
|
269
284
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
270
285
|
primary: 2048 | 42 ,
|
|
@@ -283,14 +298,14 @@ registerAction2(class extends NotebookCellAction {
|
|
|
283
298
|
constructor() {
|
|
284
299
|
super({
|
|
285
300
|
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
286
|
-
title: ( localizeWithPath(
|
|
287
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
288
|
-
'cursorPageUp',
|
|
289
|
-
"Cell Cursor Page Up"
|
|
290
|
-
)),
|
|
301
|
+
title: ( localizeWithPath(_moduleId, 7, "Cell Cursor Page Up")),
|
|
291
302
|
keybinding: [
|
|
292
303
|
{
|
|
293
|
-
when: ( ContextKeyExpr.and(
|
|
304
|
+
when: ( (ContextKeyExpr.and(
|
|
305
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
306
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
307
|
+
EditorContextKeys.editorTextFocus
|
|
308
|
+
))),
|
|
294
309
|
primary: 11 ,
|
|
295
310
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
296
311
|
}
|
|
@@ -305,14 +320,15 @@ registerAction2(class extends NotebookCellAction {
|
|
|
305
320
|
constructor() {
|
|
306
321
|
super({
|
|
307
322
|
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
308
|
-
title: ( localizeWithPath(
|
|
309
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
310
|
-
'cursorPageUpSelect',
|
|
311
|
-
"Cell Cursor Page Up Select"
|
|
312
|
-
)),
|
|
323
|
+
title: ( localizeWithPath(_moduleId, 8, "Cell Cursor Page Up Select")),
|
|
313
324
|
keybinding: [
|
|
314
325
|
{
|
|
315
|
-
when: ( ContextKeyExpr.and(
|
|
326
|
+
when: ( (ContextKeyExpr.and(
|
|
327
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
328
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
329
|
+
EditorContextKeys.editorTextFocus,
|
|
330
|
+
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
331
|
+
))),
|
|
316
332
|
primary: 1024 | 11 ,
|
|
317
333
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
318
334
|
}
|
|
@@ -327,14 +343,14 @@ registerAction2(class extends NotebookCellAction {
|
|
|
327
343
|
constructor() {
|
|
328
344
|
super({
|
|
329
345
|
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
330
|
-
title: ( localizeWithPath(
|
|
331
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
332
|
-
'cursorPageDown',
|
|
333
|
-
"Cell Cursor Page Down"
|
|
334
|
-
)),
|
|
346
|
+
title: ( localizeWithPath(_moduleId, 9, "Cell Cursor Page Down")),
|
|
335
347
|
keybinding: [
|
|
336
348
|
{
|
|
337
|
-
when: ( ContextKeyExpr.and(
|
|
349
|
+
when: ( (ContextKeyExpr.and(
|
|
350
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
351
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
352
|
+
EditorContextKeys.editorTextFocus
|
|
353
|
+
))),
|
|
338
354
|
primary: 12 ,
|
|
339
355
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
340
356
|
}
|
|
@@ -349,14 +365,15 @@ registerAction2(class extends NotebookCellAction {
|
|
|
349
365
|
constructor() {
|
|
350
366
|
super({
|
|
351
367
|
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
352
|
-
title: ( localizeWithPath(
|
|
353
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
354
|
-
'cursorPageDownSelect',
|
|
355
|
-
"Cell Cursor Page Down Select"
|
|
356
|
-
)),
|
|
368
|
+
title: ( localizeWithPath(_moduleId, 10, "Cell Cursor Page Down Select")),
|
|
357
369
|
keybinding: [
|
|
358
370
|
{
|
|
359
|
-
when: ( ContextKeyExpr.and(
|
|
371
|
+
when: ( (ContextKeyExpr.and(
|
|
372
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
373
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
374
|
+
EditorContextKeys.editorTextFocus,
|
|
375
|
+
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
376
|
+
))),
|
|
360
377
|
primary: 1024 | 12 ,
|
|
361
378
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
362
379
|
}
|
|
@@ -373,7 +390,7 @@ function getPageSize(context) {
|
|
|
373
390
|
const lineHeight = layoutInfo?.fontInfo.lineHeight || 17;
|
|
374
391
|
return Math.max(1, Math.floor((layoutInfo?.height || 0) / lineHeight) - 2);
|
|
375
392
|
}
|
|
376
|
-
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
393
|
+
( (Registry.as(Extensions.Configuration))).registerConfiguration({
|
|
377
394
|
id: 'notebook',
|
|
378
395
|
order: 100,
|
|
379
396
|
type: 'object',
|
|
@@ -382,8 +399,8 @@ function getPageSize(context) {
|
|
|
382
399
|
type: 'boolean',
|
|
383
400
|
default: true,
|
|
384
401
|
markdownDescription: ( localizeWithPath(
|
|
385
|
-
|
|
386
|
-
|
|
402
|
+
_moduleId,
|
|
403
|
+
11,
|
|
387
404
|
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
388
405
|
))
|
|
389
406
|
}
|
|
@@ -17,6 +17,7 @@ import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/noteb
|
|
|
17
17
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
18
18
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
19
19
|
|
|
20
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables";
|
|
20
21
|
let NotebookVariables = class NotebookVariables extends Disposable {
|
|
21
22
|
constructor(contextKeyService, configurationService, editorService, notebookExecutionStateService, notebookKernelService, notebookDocumentService) {
|
|
22
23
|
super();
|
|
@@ -62,16 +63,12 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
62
63
|
return notebook && this.notebookKernelService.getMatchingKernel(notebook).selected?.hasVariableProvider;
|
|
63
64
|
}
|
|
64
65
|
initializeView() {
|
|
65
|
-
const debugViewContainer = ( Registry.as('workbench.registry.view.containers')).get(VIEWLET_ID);
|
|
66
|
+
const debugViewContainer = ( (Registry.as('workbench.registry.view.containers'))).get(VIEWLET_ID);
|
|
66
67
|
if (debugViewContainer) {
|
|
67
|
-
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
68
|
+
const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
68
69
|
const viewDescriptor = {
|
|
69
|
-
id: 'NOTEBOOK_VARIABLES', name: ( localize2WithPath(
|
|
70
|
-
|
|
71
|
-
'notebookVariables',
|
|
72
|
-
"Notebook Variables"
|
|
73
|
-
)),
|
|
74
|
-
containerIcon: variablesViewIcon, ctorDescriptor: ( new SyncDescriptor(NotebookVariablesView)),
|
|
70
|
+
id: 'NOTEBOOK_VARIABLES', name: ( localize2WithPath(_moduleId, 0, "Notebook Variables")),
|
|
71
|
+
containerIcon: variablesViewIcon, ctorDescriptor: ( (new SyncDescriptor(NotebookVariablesView))),
|
|
75
72
|
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: true, when: NOTEBOOK_VARIABLE_VIEW_ENABLED,
|
|
76
73
|
};
|
|
77
74
|
viewsRegistry.registerViews([viewDescriptor], debugViewContainer);
|
|
@@ -85,13 +82,13 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
85
82
|
this.configListener.dispose();
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
|
-
NotebookVariables = ( __decorate([
|
|
89
|
-
( __param(0, IContextKeyService)),
|
|
90
|
-
( __param(1, IConfigurationService)),
|
|
91
|
-
( __param(2, IEditorService)),
|
|
92
|
-
( __param(3, INotebookExecutionStateService)),
|
|
93
|
-
( __param(4, INotebookKernelService)),
|
|
94
|
-
( __param(5, INotebookService))
|
|
95
|
-
], NotebookVariables));
|
|
85
|
+
NotebookVariables = ( (__decorate([
|
|
86
|
+
( (__param(0, IContextKeyService))),
|
|
87
|
+
( (__param(1, IConfigurationService))),
|
|
88
|
+
( (__param(2, IEditorService))),
|
|
89
|
+
( (__param(3, INotebookExecutionStateService))),
|
|
90
|
+
( (__param(4, INotebookKernelService))),
|
|
91
|
+
( (__param(5, INotebookService)))
|
|
92
|
+
], NotebookVariables)));
|
|
96
93
|
|
|
97
94
|
export { NotebookVariables };
|
|
@@ -2,10 +2,11 @@ import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellati
|
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { variablePageSize } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService';
|
|
4
4
|
|
|
5
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource";
|
|
5
6
|
class NotebookVariableDataSource {
|
|
6
7
|
constructor(notebookKernelService) {
|
|
7
8
|
this.notebookKernelService = notebookKernelService;
|
|
8
|
-
this.cancellationTokenSource = ( new CancellationTokenSource());
|
|
9
|
+
this.cancellationTokenSource = ( (new CancellationTokenSource()));
|
|
9
10
|
}
|
|
10
11
|
hasChildren(element) {
|
|
11
12
|
return element.kind === 'root' || element.hasNamedChildren || element.indexedChildrenCount > 0;
|
|
@@ -13,7 +14,7 @@ class NotebookVariableDataSource {
|
|
|
13
14
|
cancel() {
|
|
14
15
|
this.cancellationTokenSource.cancel();
|
|
15
16
|
this.cancellationTokenSource.dispose();
|
|
16
|
-
this.cancellationTokenSource = ( new CancellationTokenSource());
|
|
17
|
+
this.cancellationTokenSource = ( (new CancellationTokenSource()));
|
|
17
18
|
}
|
|
18
19
|
async getChildren(element) {
|
|
19
20
|
if (element.kind === 'root') {
|
|
@@ -29,10 +30,10 @@ class NotebookVariableDataSource {
|
|
|
29
30
|
let children = [];
|
|
30
31
|
if (parent.hasNamedChildren) {
|
|
31
32
|
const variables = selectedKernel.provideVariables(parent.notebook.uri, parent.extHostId, 'named', 0, this.cancellationTokenSource.token);
|
|
32
|
-
const childNodes = await ( variables
|
|
33
|
+
const childNodes = await ( (variables
|
|
33
34
|
.map(
|
|
34
35
|
variable => { return this.createVariableElement(variable, parent.notebook); }
|
|
35
|
-
))
|
|
36
|
+
)))
|
|
36
37
|
.toPromise();
|
|
37
38
|
children = children.concat(childNodes);
|
|
38
39
|
}
|
|
@@ -74,11 +75,7 @@ class NotebookVariableDataSource {
|
|
|
74
75
|
notebook: parent.notebook,
|
|
75
76
|
id: parent.id + `${last + 1}`,
|
|
76
77
|
extHostId: parent.extHostId,
|
|
77
|
-
name: ( localizeWithPath(
|
|
78
|
-
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource',
|
|
79
|
-
'notebook.indexedChildrenLimitReached',
|
|
80
|
-
"Display limit reached"
|
|
81
|
-
)),
|
|
78
|
+
name: ( localizeWithPath(_moduleId, 0, "Display limit reached")),
|
|
82
79
|
value: '',
|
|
83
80
|
indexedChildrenCount: 0,
|
|
84
81
|
hasNamedChildren: false
|
|
@@ -100,8 +97,8 @@ class NotebookVariableDataSource {
|
|
|
100
97
|
const selectedKernel = this.notebookKernelService.getMatchingKernel(notebook).selected;
|
|
101
98
|
if (selectedKernel && selectedKernel.hasVariableProvider) {
|
|
102
99
|
const variables = selectedKernel.provideVariables(notebook.uri, undefined, 'named', 0, this.cancellationTokenSource.token);
|
|
103
|
-
return await ( variables
|
|
104
|
-
.map(variable => { return this.createVariableElement(variable, notebook); }))
|
|
100
|
+
return await ( (variables
|
|
101
|
+
.map(variable => { return this.createVariableElement(variable, notebook); })))
|
|
105
102
|
.toPromise();
|
|
106
103
|
}
|
|
107
104
|
return [];
|
|
@@ -3,6 +3,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import 'vscode/vscode/vs/platform/list/browser/listService';
|
|
4
4
|
import { renderExpressionValue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
5
5
|
|
|
6
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree";
|
|
6
7
|
const $ = $$1;
|
|
7
8
|
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
|
8
9
|
class NotebookVariablesDelegate {
|
|
@@ -40,20 +41,10 @@ class NotebookVariableRenderer {
|
|
|
40
41
|
}
|
|
41
42
|
class NotebookVariableAccessibilityProvider {
|
|
42
43
|
getWidgetAriaLabel() {
|
|
43
|
-
return ( localizeWithPath(
|
|
44
|
-
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree',
|
|
45
|
-
'debugConsole',
|
|
46
|
-
"Notebook Variables"
|
|
47
|
-
));
|
|
44
|
+
return ( localizeWithPath(_moduleId, 0, "Notebook Variables"));
|
|
48
45
|
}
|
|
49
46
|
getAriaLabel(element) {
|
|
50
|
-
return ( localizeWithPath(
|
|
51
|
-
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree',
|
|
52
|
-
'notebookVariableAriaLabel',
|
|
53
|
-
"Variable {0}, value {1}",
|
|
54
|
-
element.name,
|
|
55
|
-
element.value
|
|
56
|
-
));
|
|
47
|
+
return ( localizeWithPath(_moduleId, 1, "Variable {0}, value {1}", element.name, element.value));
|
|
57
48
|
}
|
|
58
49
|
}
|
|
59
50
|
|
|
@@ -25,13 +25,10 @@ import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contr
|
|
|
25
25
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
26
26
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
27
27
|
|
|
28
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView";
|
|
28
29
|
let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
29
30
|
static { this.ID = 'notebookVariablesView'; }
|
|
30
|
-
static { this.TITLE = ( localize2WithPath(
|
|
31
|
-
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView',
|
|
32
|
-
'notebook.notebookVariables',
|
|
33
|
-
"Notebook Variables"
|
|
34
|
-
)); }
|
|
31
|
+
static { this.TITLE = ( localize2WithPath(_moduleId, 0, "Notebook Variables")); }
|
|
35
32
|
constructor(options, editorService, notebookKernelService, notebookExecutionStateService, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, themeService, telemetryService, menuService) {
|
|
36
33
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
37
34
|
this.editorService = editorService;
|
|
@@ -44,14 +41,14 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
44
41
|
this._register(this.notebookKernelService.onDidNotebookVariablesUpdate(this.handleVariablesChanged.bind(this)));
|
|
45
42
|
this._register(this.notebookExecutionStateService.onDidChangeExecution(this.handleExecutionStateChange.bind(this)));
|
|
46
43
|
this.setActiveNotebook();
|
|
47
|
-
this.dataSource = ( new NotebookVariableDataSource(this.notebookKernelService));
|
|
48
|
-
this.updateScheduler = ( new RunOnceScheduler(() => this.tree?.updateChildren(), 100));
|
|
44
|
+
this.dataSource = ( (new NotebookVariableDataSource(this.notebookKernelService)));
|
|
45
|
+
this.updateScheduler = ( (new RunOnceScheduler(() => this.tree?.updateChildren(), 100)));
|
|
49
46
|
}
|
|
50
47
|
renderBody(container) {
|
|
51
48
|
super.renderBody(container);
|
|
52
49
|
this.element.classList.add('debug-pane');
|
|
53
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'notebookVariablesTree', container, ( new NotebookVariablesDelegate()), [( new NotebookVariableRenderer())], this.dataSource, {
|
|
54
|
-
accessibilityProvider: ( new NotebookVariableAccessibilityProvider()),
|
|
50
|
+
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'notebookVariablesTree', container, ( (new NotebookVariablesDelegate())), [( (new NotebookVariableRenderer()))], this.dataSource, {
|
|
51
|
+
accessibilityProvider: ( (new NotebookVariableAccessibilityProvider())),
|
|
55
52
|
identityProvider: { getId: (e) => e.id },
|
|
56
53
|
});
|
|
57
54
|
this.tree.layout();
|
|
@@ -66,7 +63,7 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
66
63
|
}
|
|
67
64
|
const element = e.element;
|
|
68
65
|
const arg = {
|
|
69
|
-
source: ( element.notebook.uri.toString()),
|
|
66
|
+
source: ( (element.notebook.uri.toString())),
|
|
70
67
|
name: element.name,
|
|
71
68
|
value: element.value,
|
|
72
69
|
type: element.type,
|
|
@@ -124,28 +121,28 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
handleVariablesChanged(notebookUri) {
|
|
127
|
-
if (this.activeNotebook && ( notebookUri.toString()) === ( this.activeNotebook.uri.toString())) {
|
|
124
|
+
if (this.activeNotebook && ( (notebookUri.toString())) === ( (this.activeNotebook.uri.toString()))) {
|
|
128
125
|
this.tree?.setInput({ kind: 'root', notebook: this.activeNotebook });
|
|
129
126
|
this.updateScheduler.schedule();
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
129
|
};
|
|
133
|
-
NotebookVariablesView = ( __decorate([
|
|
134
|
-
( __param(1, IEditorService)),
|
|
135
|
-
( __param(2, INotebookKernelService)),
|
|
136
|
-
( __param(3, INotebookExecutionStateService)),
|
|
137
|
-
( __param(4, IKeybindingService)),
|
|
138
|
-
( __param(5, IContextMenuService)),
|
|
139
|
-
( __param(6, IContextKeyService)),
|
|
140
|
-
( __param(7, IConfigurationService)),
|
|
141
|
-
( __param(8, IInstantiationService)),
|
|
142
|
-
( __param(9, IViewDescriptorService)),
|
|
143
|
-
( __param(10, IOpenerService)),
|
|
144
|
-
( __param(11, IQuickInputService)),
|
|
145
|
-
( __param(12, ICommandService)),
|
|
146
|
-
( __param(13, IThemeService)),
|
|
147
|
-
( __param(14, ITelemetryService)),
|
|
148
|
-
( __param(15, IMenuService))
|
|
149
|
-
], NotebookVariablesView));
|
|
130
|
+
NotebookVariablesView = ( (__decorate([
|
|
131
|
+
( (__param(1, IEditorService))),
|
|
132
|
+
( (__param(2, INotebookKernelService))),
|
|
133
|
+
( (__param(3, INotebookExecutionStateService))),
|
|
134
|
+
( (__param(4, IKeybindingService))),
|
|
135
|
+
( (__param(5, IContextMenuService))),
|
|
136
|
+
( (__param(6, IContextKeyService))),
|
|
137
|
+
( (__param(7, IConfigurationService))),
|
|
138
|
+
( (__param(8, IInstantiationService))),
|
|
139
|
+
( (__param(9, IViewDescriptorService))),
|
|
140
|
+
( (__param(10, IOpenerService))),
|
|
141
|
+
( (__param(11, IQuickInputService))),
|
|
142
|
+
( (__param(12, ICommandService))),
|
|
143
|
+
( (__param(13, IThemeService))),
|
|
144
|
+
( (__param(14, ITelemetryService))),
|
|
145
|
+
( (__param(15, IMenuService)))
|
|
146
|
+
], NotebookVariablesView)));
|
|
150
147
|
|
|
151
148
|
export { NotebookVariablesView };
|