@codingame/monaco-vscode-notebook-service-override 9.0.2 → 10.0.0
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 +16 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +62 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +8 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +35 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +16 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +17 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +15 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +4 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +319 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +64 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +2 -2
- 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 +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +48 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +35 -37
- 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 +45 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +124 -71
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +179 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +52 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +30 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +28 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +17 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +20 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +126 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +171 -83
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +5 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +3 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +13 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +90 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +3 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +40 -31
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +10 -11
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +29 -55
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +15 -17
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +12 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +2 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -33
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { timeout } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
-
import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
2
|
import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
4
3
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
5
4
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
@@ -7,15 +6,14 @@ import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/ac
|
|
|
7
6
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
8
7
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
9
8
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
|
-
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
11
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
9
|
+
import { InputFocusedContextKey, IsWindowsContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
12
10
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
13
11
|
import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
14
12
|
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
15
13
|
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
16
14
|
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
17
15
|
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
18
|
-
import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
16
|
+
import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
19
17
|
|
|
20
18
|
const NOTEBOOK_FOCUS_TOP = 'notebook.focusTop';
|
|
21
19
|
const NOTEBOOK_FOCUS_BOTTOM = 'notebook.focusBottom';
|
|
@@ -33,17 +31,17 @@ registerAction2(class extends Action2 {
|
|
|
33
31
|
super({
|
|
34
32
|
id: 'notebook.cell.nullAction',
|
|
35
33
|
title: ( localize(
|
|
36
|
-
|
|
34
|
+
8045,
|
|
37
35
|
"Keypresses that should be handled by the focused element in the cell output."
|
|
38
36
|
)),
|
|
39
37
|
keybinding: [{
|
|
40
38
|
when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
|
|
41
|
-
primary:
|
|
42
|
-
weight:
|
|
39
|
+
primary: 18 ,
|
|
40
|
+
weight: 200 + 1
|
|
43
41
|
}, {
|
|
44
42
|
when: NOTEBOOK_OUTPUT_INPUT_FOCUSED,
|
|
45
|
-
primary:
|
|
46
|
-
weight:
|
|
43
|
+
primary: 16 ,
|
|
44
|
+
weight: 200 + 1
|
|
47
45
|
}],
|
|
48
46
|
f1: false
|
|
49
47
|
});
|
|
@@ -56,7 +54,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
56
54
|
constructor() {
|
|
57
55
|
super({
|
|
58
56
|
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
59
|
-
title: ( localize(
|
|
57
|
+
title: ( localize(8046, 'Focus Next Cell Editor')),
|
|
60
58
|
keybinding: [
|
|
61
59
|
{
|
|
62
60
|
when: ( (ContextKeyExpr.and(
|
|
@@ -71,7 +69,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
71
69
|
)),
|
|
72
70
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
73
71
|
))),
|
|
74
|
-
primary:
|
|
72
|
+
primary: 18 ,
|
|
75
73
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
76
74
|
},
|
|
77
75
|
{
|
|
@@ -86,20 +84,20 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
86
84
|
)),
|
|
87
85
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
88
86
|
))),
|
|
89
|
-
primary:
|
|
90
|
-
weight:
|
|
87
|
+
primary: 18 ,
|
|
88
|
+
weight: 200 ,
|
|
91
89
|
},
|
|
92
90
|
{
|
|
93
91
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
94
|
-
primary:
|
|
95
|
-
mac: { primary:
|
|
96
|
-
weight:
|
|
92
|
+
primary: 2048 | 18 ,
|
|
93
|
+
mac: { primary: 256 | 2048 | 18 , },
|
|
94
|
+
weight: 200
|
|
97
95
|
},
|
|
98
96
|
{
|
|
99
97
|
when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
|
|
100
|
-
primary:
|
|
101
|
-
mac: { primary:
|
|
102
|
-
weight:
|
|
98
|
+
primary: 2048 | 12 ,
|
|
99
|
+
mac: { primary: 256 | 11 , },
|
|
100
|
+
weight: 200 + 1
|
|
103
101
|
},
|
|
104
102
|
]
|
|
105
103
|
});
|
|
@@ -131,7 +129,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
131
129
|
constructor() {
|
|
132
130
|
super({
|
|
133
131
|
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
134
|
-
title: ( localize(
|
|
132
|
+
title: ( localize(8047, 'Focus Previous Cell Editor')),
|
|
135
133
|
keybinding: [
|
|
136
134
|
{
|
|
137
135
|
when: ( (ContextKeyExpr.and(
|
|
@@ -146,7 +144,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
146
144
|
)),
|
|
147
145
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
148
146
|
))),
|
|
149
|
-
primary:
|
|
147
|
+
primary: 16 ,
|
|
150
148
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
151
149
|
},
|
|
152
150
|
{
|
|
@@ -161,14 +159,14 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
161
159
|
)),
|
|
162
160
|
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
163
161
|
))),
|
|
164
|
-
primary:
|
|
165
|
-
weight:
|
|
162
|
+
primary: 16 ,
|
|
163
|
+
weight: 200 ,
|
|
166
164
|
},
|
|
167
165
|
{
|
|
168
166
|
when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
|
|
169
|
-
primary:
|
|
170
|
-
mac: { primary:
|
|
171
|
-
weight:
|
|
167
|
+
primary: 2048 | 11 ,
|
|
168
|
+
mac: { primary: 256 | 11 , },
|
|
169
|
+
weight: 200 + 1
|
|
172
170
|
},
|
|
173
171
|
],
|
|
174
172
|
});
|
|
@@ -197,12 +195,12 @@ registerAction2(class extends NotebookAction {
|
|
|
197
195
|
constructor() {
|
|
198
196
|
super({
|
|
199
197
|
id: NOTEBOOK_FOCUS_TOP,
|
|
200
|
-
title: ( localize(
|
|
198
|
+
title: ( localize(8048, 'Focus First Cell')),
|
|
201
199
|
keybinding: [
|
|
202
200
|
{
|
|
203
201
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
204
|
-
primary:
|
|
205
|
-
weight:
|
|
202
|
+
primary: 2048 | 14 ,
|
|
203
|
+
weight: 200
|
|
206
204
|
},
|
|
207
205
|
{
|
|
208
206
|
when: ( (ContextKeyExpr.and(
|
|
@@ -210,8 +208,8 @@ registerAction2(class extends NotebookAction {
|
|
|
210
208
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
211
209
|
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
212
210
|
))),
|
|
213
|
-
mac: { primary:
|
|
214
|
-
weight:
|
|
211
|
+
mac: { primary: 2048 | 16 },
|
|
212
|
+
weight: 200
|
|
215
213
|
}
|
|
216
214
|
],
|
|
217
215
|
});
|
|
@@ -229,13 +227,13 @@ registerAction2(class extends NotebookAction {
|
|
|
229
227
|
constructor() {
|
|
230
228
|
super({
|
|
231
229
|
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
232
|
-
title: ( localize(
|
|
230
|
+
title: ( localize(8049, 'Focus Last Cell')),
|
|
233
231
|
keybinding: [
|
|
234
232
|
{
|
|
235
233
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
236
|
-
primary:
|
|
234
|
+
primary: 2048 | 13 ,
|
|
237
235
|
mac: undefined,
|
|
238
|
-
weight:
|
|
236
|
+
weight: 200
|
|
239
237
|
},
|
|
240
238
|
{
|
|
241
239
|
when: ( (ContextKeyExpr.and(
|
|
@@ -243,8 +241,8 @@ registerAction2(class extends NotebookAction {
|
|
|
243
241
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
244
242
|
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
245
243
|
))),
|
|
246
|
-
mac: { primary:
|
|
247
|
-
weight:
|
|
244
|
+
mac: { primary: 2048 | 18 },
|
|
245
|
+
weight: 200
|
|
248
246
|
}
|
|
249
247
|
],
|
|
250
248
|
});
|
|
@@ -266,13 +264,18 @@ registerAction2(class extends NotebookCellAction {
|
|
|
266
264
|
constructor() {
|
|
267
265
|
super({
|
|
268
266
|
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
269
|
-
title: ( localize(
|
|
270
|
-
keybinding: {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
267
|
+
title: ( localize(8050, 'Focus In Active Cell Output')),
|
|
268
|
+
keybinding: [{
|
|
269
|
+
primary: 2048 | 1024 | 18 ,
|
|
270
|
+
mac: { primary: 256 | 2048 | 18 , },
|
|
271
|
+
weight: 200
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
when: ( (ContextKeyExpr.and( (IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext))),
|
|
275
|
+
primary: 2048 | 18 ,
|
|
276
|
+
weight: 200
|
|
277
|
+
}],
|
|
278
|
+
precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS)))
|
|
276
279
|
});
|
|
277
280
|
}
|
|
278
281
|
async runWithContext(accessor, context) {
|
|
@@ -285,13 +288,13 @@ registerAction2(class extends NotebookCellAction {
|
|
|
285
288
|
constructor() {
|
|
286
289
|
super({
|
|
287
290
|
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
288
|
-
title: ( localize(
|
|
291
|
+
title: ( localize(8051, 'Focus Out Active Cell Output')),
|
|
289
292
|
keybinding: {
|
|
290
|
-
|
|
291
|
-
primary:
|
|
292
|
-
|
|
293
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
293
|
+
primary: 2048 | 1024 | 16 ,
|
|
294
|
+
mac: { primary: 256 | 2048 | 16 , },
|
|
295
|
+
weight: 200
|
|
294
296
|
},
|
|
297
|
+
precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
295
298
|
});
|
|
296
299
|
}
|
|
297
300
|
async runWithContext(accessor, context) {
|
|
@@ -304,14 +307,14 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
304
307
|
constructor() {
|
|
305
308
|
super({
|
|
306
309
|
id: CENTER_ACTIVE_CELL,
|
|
307
|
-
title: ( localize(
|
|
310
|
+
title: ( localize(8052, "Center Active Cell")),
|
|
308
311
|
keybinding: {
|
|
309
312
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
310
|
-
primary:
|
|
313
|
+
primary: 2048 | 42 ,
|
|
311
314
|
mac: {
|
|
312
|
-
primary:
|
|
315
|
+
primary: 256 | 42 ,
|
|
313
316
|
},
|
|
314
|
-
weight:
|
|
317
|
+
weight: 200
|
|
315
318
|
},
|
|
316
319
|
});
|
|
317
320
|
}
|
|
@@ -323,7 +326,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
323
326
|
constructor() {
|
|
324
327
|
super({
|
|
325
328
|
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
326
|
-
title: ( localize(
|
|
329
|
+
title: ( localize(8053, "Cell Cursor Page Up")),
|
|
327
330
|
keybinding: [
|
|
328
331
|
{
|
|
329
332
|
when: ( (ContextKeyExpr.and(
|
|
@@ -331,7 +334,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
331
334
|
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
332
335
|
EditorContextKeys.editorTextFocus
|
|
333
336
|
))),
|
|
334
|
-
primary:
|
|
337
|
+
primary: 11 ,
|
|
335
338
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
336
339
|
}
|
|
337
340
|
]
|
|
@@ -345,7 +348,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
345
348
|
constructor() {
|
|
346
349
|
super({
|
|
347
350
|
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
348
|
-
title: ( localize(
|
|
351
|
+
title: ( localize(8054, "Cell Cursor Page Up Select")),
|
|
349
352
|
keybinding: [
|
|
350
353
|
{
|
|
351
354
|
when: ( (ContextKeyExpr.and(
|
|
@@ -354,7 +357,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
354
357
|
EditorContextKeys.editorTextFocus,
|
|
355
358
|
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
356
359
|
))),
|
|
357
|
-
primary:
|
|
360
|
+
primary: 1024 | 11 ,
|
|
358
361
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
359
362
|
}
|
|
360
363
|
]
|
|
@@ -368,7 +371,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
368
371
|
constructor() {
|
|
369
372
|
super({
|
|
370
373
|
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
371
|
-
title: ( localize(
|
|
374
|
+
title: ( localize(8055, "Cell Cursor Page Down")),
|
|
372
375
|
keybinding: [
|
|
373
376
|
{
|
|
374
377
|
when: ( (ContextKeyExpr.and(
|
|
@@ -376,7 +379,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
376
379
|
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
377
380
|
EditorContextKeys.editorTextFocus
|
|
378
381
|
))),
|
|
379
|
-
primary:
|
|
382
|
+
primary: 12 ,
|
|
380
383
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
381
384
|
}
|
|
382
385
|
]
|
|
@@ -390,7 +393,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
390
393
|
constructor() {
|
|
391
394
|
super({
|
|
392
395
|
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
393
|
-
title: ( localize(
|
|
396
|
+
title: ( localize(8056, "Cell Cursor Page Down Select")),
|
|
394
397
|
keybinding: [
|
|
395
398
|
{
|
|
396
399
|
when: ( (ContextKeyExpr.and(
|
|
@@ -399,7 +402,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
399
402
|
EditorContextKeys.editorTextFocus,
|
|
400
403
|
(NOTEBOOK_OUTPUT_FOCUSED.negate())
|
|
401
404
|
))),
|
|
402
|
-
primary:
|
|
405
|
+
primary: 1024 | 12 ,
|
|
403
406
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
404
407
|
}
|
|
405
408
|
]
|
|
@@ -424,7 +427,7 @@ function getPageSize(context) {
|
|
|
424
427
|
type: 'boolean',
|
|
425
428
|
default: true,
|
|
426
429
|
markdownDescription: ( localize(
|
|
427
|
-
|
|
430
|
+
8057,
|
|
428
431
|
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
429
432
|
))
|
|
430
433
|
}
|
|
@@ -66,9 +66,9 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
66
66
|
if (debugViewContainer) {
|
|
67
67
|
const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
68
68
|
const viewDescriptor = {
|
|
69
|
-
id: 'NOTEBOOK_VARIABLES', name: ( localize2(
|
|
69
|
+
id: 'NOTEBOOK_VARIABLES', name: ( localize2(8133, "Notebook Variables")),
|
|
70
70
|
containerIcon: variablesViewIcon, ctorDescriptor: ( (new SyncDescriptor(NotebookVariablesView))),
|
|
71
|
-
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed:
|
|
71
|
+
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: false, when: NOTEBOOK_VARIABLE_VIEW_ENABLED,
|
|
72
72
|
};
|
|
73
73
|
viewsRegistry.registerViews([viewDescriptor], debugViewContainer);
|
|
74
74
|
return true;
|
|
@@ -74,7 +74,7 @@ class NotebookVariableDataSource {
|
|
|
74
74
|
notebook: parent.notebook,
|
|
75
75
|
id: parent.id + `${last + 1}`,
|
|
76
76
|
extHostId: parent.extHostId,
|
|
77
|
-
name: ( localize(
|
|
77
|
+
name: ( localize(11620, "Display limit reached")),
|
|
78
78
|
value: '',
|
|
79
79
|
indexedChildrenCount: 0,
|
|
80
80
|
hasNamedChildren: false
|
|
@@ -2,9 +2,9 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { $ as $$1, append } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import {
|
|
5
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
6
|
import 'vscode/vscode/vs/platform/list/browser/listService';
|
|
7
|
-
import {
|
|
7
|
+
import { DebugExpressionRenderer } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugExpressionRenderer';
|
|
8
8
|
|
|
9
9
|
var NotebookVariableRenderer_1;
|
|
10
10
|
const $ = $$1;
|
|
@@ -23,8 +23,8 @@ let NotebookVariableRenderer = class NotebookVariableRenderer {
|
|
|
23
23
|
get templateId() {
|
|
24
24
|
return NotebookVariableRenderer_1.ID;
|
|
25
25
|
}
|
|
26
|
-
constructor(
|
|
27
|
-
this.
|
|
26
|
+
constructor(instantiationService) {
|
|
27
|
+
this.expressionRenderer = instantiationService.createInstance(DebugExpressionRenderer);
|
|
28
28
|
}
|
|
29
29
|
renderTemplate(container) {
|
|
30
30
|
const expression = append(container, $('.expression'));
|
|
@@ -37,10 +37,11 @@ let NotebookVariableRenderer = class NotebookVariableRenderer {
|
|
|
37
37
|
const text = element.element.value.trim() !== '' ? `${element.element.name}:` : element.element.name;
|
|
38
38
|
data.name.textContent = text;
|
|
39
39
|
data.name.title = element.element.type ?? '';
|
|
40
|
-
|
|
40
|
+
data.elementDisposables.add(this.expressionRenderer.renderValue(data.value, element.element, {
|
|
41
41
|
colorize: true,
|
|
42
42
|
maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET,
|
|
43
|
-
|
|
43
|
+
session: undefined,
|
|
44
|
+
}));
|
|
44
45
|
}
|
|
45
46
|
disposeElement(element, index, templateData, height) {
|
|
46
47
|
templateData.elementDisposables.clear();
|
|
@@ -50,14 +51,14 @@ let NotebookVariableRenderer = class NotebookVariableRenderer {
|
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
NotebookVariableRenderer = NotebookVariableRenderer_1 = ( (__decorate([
|
|
53
|
-
( (__param(0,
|
|
54
|
+
( (__param(0, IInstantiationService)))
|
|
54
55
|
], NotebookVariableRenderer)));
|
|
55
56
|
class NotebookVariableAccessibilityProvider {
|
|
56
57
|
getWidgetAriaLabel() {
|
|
57
|
-
return ( localize(
|
|
58
|
+
return ( localize(11621, "Notebook Variables"));
|
|
58
59
|
}
|
|
59
60
|
getAriaLabel(element) {
|
|
60
|
-
return ( localize(
|
|
61
|
+
return ( localize(11622, "Variable {0}, value {1}", element.name, element.value));
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
@@ -25,10 +25,14 @@ import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/cont
|
|
|
25
25
|
import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
26
26
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
27
27
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
28
|
+
import { isCompositeNotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
28
29
|
|
|
30
|
+
var NotebookVariablesView_1;
|
|
29
31
|
let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
32
|
+
static { NotebookVariablesView_1 = this; }
|
|
30
33
|
static { this.ID = 'notebookVariablesView'; }
|
|
31
|
-
static { this.
|
|
34
|
+
static { this.NOTEBOOK_TITLE = ( localize2(10871, "Notebook Variables")); }
|
|
35
|
+
static { this.REPL_TITLE = ( localize2(10872, "REPL Variables")); }
|
|
32
36
|
constructor(options, editorService, notebookKernelService, notebookExecutionStateService, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, themeService, telemetryService, hoverService, menuService) {
|
|
33
37
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
34
38
|
this.editorService = editorService;
|
|
@@ -40,14 +44,14 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
40
44
|
this._register(this.editorService.onDidActiveEditorChange(this.handleActiveEditorChange.bind(this)));
|
|
41
45
|
this._register(this.notebookKernelService.onDidNotebookVariablesUpdate(this.handleVariablesChanged.bind(this)));
|
|
42
46
|
this._register(this.notebookExecutionStateService.onDidChangeExecution(this.handleExecutionStateChange.bind(this)));
|
|
43
|
-
this.
|
|
47
|
+
this.activeNotebook = this.getActiveNotebook()?.notebookDocument;
|
|
44
48
|
this.dataSource = ( (new NotebookVariableDataSource(this.notebookKernelService)));
|
|
45
49
|
this.updateScheduler = ( (new RunOnceScheduler(() => this.tree?.updateChildren(), 100)));
|
|
46
50
|
}
|
|
47
51
|
renderBody(container) {
|
|
48
52
|
super.renderBody(container);
|
|
49
53
|
this.element.classList.add('debug-pane');
|
|
50
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'notebookVariablesTree', container, ( (new NotebookVariablesDelegate())), [(
|
|
54
|
+
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'notebookVariablesTree', container, ( (new NotebookVariablesDelegate())), [this.instantiationService.createInstance(NotebookVariableRenderer)], this.dataSource, {
|
|
51
55
|
accessibilityProvider: ( (new NotebookVariableAccessibilityProvider())),
|
|
52
56
|
identityProvider: { getId: (e) => e.id },
|
|
53
57
|
});
|
|
@@ -91,42 +95,62 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
91
95
|
super.layoutBody(height, width);
|
|
92
96
|
this.tree?.layout(height, width);
|
|
93
97
|
}
|
|
94
|
-
setActiveNotebook() {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
this.
|
|
98
|
+
setActiveNotebook(notebookDocument, editor) {
|
|
99
|
+
this.activeNotebook = notebookDocument;
|
|
100
|
+
this.tree?.setInput({ kind: 'root', notebook: notebookDocument });
|
|
101
|
+
this.updateScheduler.schedule();
|
|
102
|
+
if (isCompositeNotebookEditorInput(editor.input)) {
|
|
103
|
+
this.updateTitle(NotebookVariablesView_1.REPL_TITLE.value);
|
|
100
104
|
}
|
|
101
|
-
|
|
105
|
+
else {
|
|
106
|
+
this.updateTitle(NotebookVariablesView_1.NOTEBOOK_TITLE.value);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
getActiveNotebook() {
|
|
110
|
+
const notebookEditor = this.editorService.activeEditorPane;
|
|
111
|
+
const notebookDocument = getNotebookEditorFromEditorPane(notebookEditor)?.textModel;
|
|
112
|
+
return notebookDocument && notebookEditor ? { notebookDocument, notebookEditor } : undefined;
|
|
102
113
|
}
|
|
103
114
|
handleActiveEditorChange() {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.
|
|
115
|
+
const found = this.getActiveNotebook();
|
|
116
|
+
if (found && found.notebookDocument !== this.activeNotebook) {
|
|
117
|
+
this.setActiveNotebook(found.notebookDocument, found.notebookEditor);
|
|
107
118
|
}
|
|
108
119
|
}
|
|
109
120
|
handleExecutionStateChange(event) {
|
|
110
|
-
if (this.activeNotebook) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.updateScheduler.schedule();
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
this.updateScheduler.cancel();
|
|
118
|
-
}
|
|
121
|
+
if (this.activeNotebook && event.affectsNotebook(this.activeNotebook.uri)) {
|
|
122
|
+
this.dataSource.cancel();
|
|
123
|
+
if (event.changed === undefined) {
|
|
124
|
+
this.updateScheduler.schedule();
|
|
119
125
|
}
|
|
126
|
+
else {
|
|
127
|
+
this.updateScheduler.cancel();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (!this.getActiveNotebook()) {
|
|
131
|
+
this.editorService.visibleEditorPanes.forEach(editor => {
|
|
132
|
+
const notebookDocument = getNotebookEditorFromEditorPane(editor)?.textModel;
|
|
133
|
+
if (notebookDocument && event.affectsNotebook(notebookDocument.uri)) {
|
|
134
|
+
this.setActiveNotebook(notebookDocument, editor);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
120
137
|
}
|
|
121
138
|
}
|
|
122
139
|
handleVariablesChanged(notebookUri) {
|
|
123
140
|
if (this.activeNotebook && ( (notebookUri.toString())) === ( (this.activeNotebook.uri.toString()))) {
|
|
124
|
-
this.tree?.setInput({ kind: 'root', notebook: this.activeNotebook });
|
|
125
141
|
this.updateScheduler.schedule();
|
|
126
142
|
}
|
|
143
|
+
else if (!this.getActiveNotebook()) {
|
|
144
|
+
this.editorService.visibleEditorPanes.forEach(editor => {
|
|
145
|
+
const notebookDocument = getNotebookEditorFromEditorPane(editor)?.textModel;
|
|
146
|
+
if (notebookDocument && ( (notebookDocument.uri.toString())) === ( (notebookUri.toString()))) {
|
|
147
|
+
this.setActiveNotebook(notebookDocument, editor);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
127
151
|
}
|
|
128
152
|
};
|
|
129
|
-
NotebookVariablesView = ( (__decorate([
|
|
153
|
+
NotebookVariablesView = NotebookVariablesView_1 = ( (__decorate([
|
|
130
154
|
( (__param(1, IEditorService))),
|
|
131
155
|
( (__param(2, INotebookKernelService))),
|
|
132
156
|
( (__param(3, INotebookExecutionStateService))),
|