@codingame/monaco-vscode-notebook-service-override 3.2.2 → 4.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/notebook.js +1 -1
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +9 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +11 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +9 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +293 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +16 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +107 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +15 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +199 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +47 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +11 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +20 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +15 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +54 -55
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +3 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +11 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +0 -608
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +0 -744
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +0 -237
package/notebook.js
CHANGED
|
@@ -23,7 +23,7 @@ import { NotebookKernelHistoryService } from './vscode/src/vs/workbench/contrib/
|
|
|
23
23
|
import { INotebookLoggingService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService';
|
|
24
24
|
import { NotebookLoggingService } from './vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js';
|
|
25
25
|
import { INotebookSearchService } from 'vscode/vscode/vs/workbench/contrib/search/common/notebookSearch';
|
|
26
|
-
import { NotebookSearchService } from '
|
|
26
|
+
import { NotebookSearchService } from 'vscode/vscode/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService';
|
|
27
27
|
import './vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js';
|
|
28
28
|
import { INotebookDocumentService, NotebookDocumentWorkbenchService } from 'vscode/vscode/vs/workbench/services/notebook/common/notebookDocumentService';
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notebook-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import './emptyTextEditorHint.css.js';
|
|
3
|
-
import { addDisposableListener, $ as $$1 } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
|
-
import {
|
|
3
|
+
import { addDisposableListener, EventType, $ as $$1 } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
|
+
import { DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
6
6
|
import { ChangeLanguageAction } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorStatus';
|
|
7
7
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
@@ -25,6 +25,8 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
|
25
25
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
26
26
|
import { OUTPUT_MODE_ID, LOG_MODE_ID } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
27
27
|
import { SEARCH_RESULT_LANGUAGE_ID } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
28
|
+
import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
|
|
29
|
+
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
28
30
|
|
|
29
31
|
const $ = $$1;
|
|
30
32
|
( Registry.as(Extensions.ConfigurationMigration))
|
|
@@ -190,7 +192,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
190
192
|
id: 'inlineChat.hintAction',
|
|
191
193
|
from: 'hint'
|
|
192
194
|
});
|
|
193
|
-
|
|
195
|
+
this.commandService.executeCommand(inlineChatId, { from: 'hint' });
|
|
194
196
|
};
|
|
195
197
|
const hintHandler = {
|
|
196
198
|
disposables: this.toDispose,
|
|
@@ -219,7 +221,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
219
221
|
const hintPart = $('a', undefined, fragment);
|
|
220
222
|
hintPart.style.fontStyle = 'italic';
|
|
221
223
|
hintPart.style.cursor = 'pointer';
|
|
222
|
-
hintPart.
|
|
224
|
+
this.toDispose.add(addDisposableListener(hintPart, EventType.CLICK, handleClick));
|
|
223
225
|
return hintPart;
|
|
224
226
|
}
|
|
225
227
|
else {
|
|
@@ -229,13 +231,13 @@ class EmptyTextEditorHintContentWidget {
|
|
|
229
231
|
}
|
|
230
232
|
}));
|
|
231
233
|
hintElement.appendChild(before);
|
|
232
|
-
const label = ( new KeybindingLabel(hintElement, OS));
|
|
234
|
+
const label = hintHandler.disposables.add(( new KeybindingLabel(hintElement, OS)));
|
|
233
235
|
label.set(keybindingHint);
|
|
234
236
|
label.element.style.width = 'min-content';
|
|
235
237
|
label.element.style.display = 'inline';
|
|
236
238
|
if (this.options.clickable) {
|
|
237
239
|
label.element.style.cursor = 'pointer';
|
|
238
|
-
label.element.
|
|
240
|
+
this.toDispose.add(addDisposableListener(label.element, EventType.CLICK, handleClick));
|
|
239
241
|
}
|
|
240
242
|
hintElement.appendChild(after);
|
|
241
243
|
const typeToDismiss = ( localizeWithPath(
|
|
@@ -348,7 +350,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
348
350
|
anchor.style.cursor = 'pointer';
|
|
349
351
|
const id = keybindingsLookup.shift();
|
|
350
352
|
const title = id && this.keybindingService.lookupKeybinding(id)?.getLabel();
|
|
351
|
-
|
|
353
|
+
hintHandler.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), anchor, title ?? ''));
|
|
352
354
|
}
|
|
353
355
|
return { hintElement, ariaLabel };
|
|
354
356
|
}
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js
CHANGED
|
@@ -3,7 +3,7 @@ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
5
5
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
6
|
-
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
6
|
+
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
7
7
|
import { getNotebookEditorFromEditorPane, expandCellRangesWithHiddenCells, cellRangeToViewCells } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
8
8
|
import { CopyAction, PasteAction, CutAction } from 'vscode/vscode/vs/editor/contrib/clipboard/browser/clipboard';
|
|
9
9
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService';
|
|
@@ -12,7 +12,7 @@ import { SelectionStateType } from 'vscode/vscode/vs/workbench/contrib/notebook/
|
|
|
12
12
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
13
13
|
import { isNative } from 'vscode/vscode/vs/base/common/platform';
|
|
14
14
|
import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
15
|
-
import { NotebookCellAction, NotebookAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
15
|
+
import { NotebookCellAction, NotebookAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
16
16
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
17
17
|
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
18
18
|
import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
@@ -31,7 +31,7 @@ function _log(loggerService, str) {
|
|
|
31
31
|
loggerService.info(`[NotebookClipboard]: ${str}`);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function getFocusedEditor(accessor) {
|
|
35
35
|
const loggerService = accessor.get(ILogService);
|
|
36
36
|
const editorService = accessor.get(IEditorService);
|
|
37
37
|
const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
@@ -47,8 +47,19 @@ function getFocusedWebviewDelegate(accessor) {
|
|
|
47
47
|
_log(loggerService, '[Revive Webview] Notebook editor backlayer webview is not focused, bypass');
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
const view = editor.getViewModel();
|
|
51
|
+
if (view && view.viewCells.every(cell => !cell.outputIsFocused && !cell.outputIsHovered)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
return { editor, loggerService };
|
|
55
|
+
}
|
|
56
|
+
function getFocusedWebviewDelegate(accessor) {
|
|
57
|
+
const result = getFocusedEditor(accessor);
|
|
58
|
+
if (!result) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const webview = result.editor.getInnerWebview();
|
|
62
|
+
_log(result.loggerService, '[Revive Webview] Notebook editor backlayer webview is focused');
|
|
52
63
|
return webview;
|
|
53
64
|
}
|
|
54
65
|
function withWebview(accessor, f) {
|
|
@@ -59,6 +70,10 @@ function withWebview(accessor, f) {
|
|
|
59
70
|
}
|
|
60
71
|
return false;
|
|
61
72
|
}
|
|
73
|
+
function withEditor(accessor, f) {
|
|
74
|
+
const result = getFocusedEditor(accessor);
|
|
75
|
+
return result ? f(result.editor) : false;
|
|
76
|
+
}
|
|
62
77
|
const PRIORITY = 105;
|
|
63
78
|
UndoCommand.addImplementation(PRIORITY, 'notebook-webview', accessor => {
|
|
64
79
|
return withWebview(accessor, webview => webview.undo());
|
|
@@ -341,6 +356,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
341
356
|
id: MenuId.NotebookCellTitle,
|
|
342
357
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
343
358
|
group: "1_copy" ,
|
|
359
|
+
order: 2,
|
|
344
360
|
},
|
|
345
361
|
keybinding: isNative ? undefined : {
|
|
346
362
|
primary: 2048 | 33 ,
|
|
@@ -367,6 +383,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
367
383
|
id: MenuId.NotebookCellTitle,
|
|
368
384
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
|
|
369
385
|
group: "1_copy" ,
|
|
386
|
+
order: 1,
|
|
370
387
|
},
|
|
371
388
|
keybinding: isNative ? undefined : {
|
|
372
389
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -393,6 +410,7 @@ registerAction2(class extends NotebookAction {
|
|
|
393
410
|
id: MenuId.NotebookCellTitle,
|
|
394
411
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
|
|
395
412
|
group: "1_copy" ,
|
|
413
|
+
order: 3,
|
|
396
414
|
},
|
|
397
415
|
keybinding: isNative ? undefined : {
|
|
398
416
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
@@ -484,5 +502,43 @@ registerAction2(class extends Action2 {
|
|
|
484
502
|
}
|
|
485
503
|
}
|
|
486
504
|
});
|
|
505
|
+
registerAction2(class extends NotebookCellAction {
|
|
506
|
+
constructor() {
|
|
507
|
+
super({
|
|
508
|
+
id: 'notebook.cell.output.selectAll',
|
|
509
|
+
title: ( localizeWithPath(
|
|
510
|
+
'vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard',
|
|
511
|
+
'notebook.cell.output.selectAll',
|
|
512
|
+
"Select All"
|
|
513
|
+
)),
|
|
514
|
+
keybinding: {
|
|
515
|
+
primary: 2048 | 31 ,
|
|
516
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
|
517
|
+
weight: NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
async runWithContext(accessor, _context) {
|
|
522
|
+
withEditor(accessor, editor => {
|
|
523
|
+
if (!editor.hasEditorFocus()) {
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
if (editor.hasEditorFocus() && !editor.hasWebviewFocus()) {
|
|
527
|
+
return true;
|
|
528
|
+
}
|
|
529
|
+
const cell = editor.getActiveCell();
|
|
530
|
+
if (!cell || !cell.outputIsFocused || !editor.hasWebviewFocus()) {
|
|
531
|
+
return true;
|
|
532
|
+
}
|
|
533
|
+
if (cell.inputInOutputIsFocused) {
|
|
534
|
+
editor.selectInputContents(cell);
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
editor.selectOutputContent(cell);
|
|
538
|
+
}
|
|
539
|
+
return true;
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
});
|
|
487
543
|
|
|
488
544
|
export { NotebookClipboardContribution, runCopyCells, runCutCells, runPasteCells };
|
|
@@ -8,7 +8,17 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
8
8
|
import { NotebookOverviewRulerLane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
9
9
|
import { registerNotebookContribution } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
10
10
|
import { throttle } from 'vscode/vscode/vs/base/common/decorators';
|
|
11
|
-
import
|
|
11
|
+
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
12
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
13
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
14
|
+
import { editorErrorForeground, editorWarningForeground } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
15
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
16
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
17
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
18
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
19
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
20
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
21
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
12
22
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
13
23
|
|
|
14
24
|
let MarkerListProvider = class MarkerListProvider {
|
|
@@ -9,7 +9,7 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
|
|
|
9
9
|
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
10
10
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
11
11
|
import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
12
|
-
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '
|
|
12
|
+
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
13
13
|
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
14
14
|
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
15
15
|
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
@@ -312,7 +312,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
312
312
|
)),
|
|
313
313
|
keybinding: [
|
|
314
314
|
{
|
|
315
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
315
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
316
316
|
primary: 1024 | 11 ,
|
|
317
317
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
318
318
|
}
|
|
@@ -356,7 +356,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
356
356
|
)),
|
|
357
357
|
keybinding: [
|
|
358
358
|
{
|
|
359
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
359
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
360
360
|
primary: 1024 | 12 ,
|
|
361
361
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
362
362
|
}
|
|
@@ -47,12 +47,14 @@ class NotebookVariableDataSource {
|
|
|
47
47
|
async getIndexedChildren(parent, kernel) {
|
|
48
48
|
const childNodes = [];
|
|
49
49
|
if (parent.indexedChildrenCount > variablePageSize) {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
const nestedPageSize = Math.floor(Math.max(parent.indexedChildrenCount / variablePageSize, 100));
|
|
51
|
+
const indexedChildCountLimit = 1_000_000;
|
|
52
|
+
let start = parent.indexStart ?? 0;
|
|
53
|
+
const last = start + Math.min(parent.indexedChildrenCount, indexedChildCountLimit);
|
|
54
|
+
for (; start < last; start += nestedPageSize) {
|
|
55
|
+
let end = start + nestedPageSize;
|
|
56
|
+
if (end > last) {
|
|
57
|
+
end = last;
|
|
56
58
|
}
|
|
57
59
|
childNodes.push({
|
|
58
60
|
kind: 'variable',
|
|
@@ -70,7 +72,7 @@ class NotebookVariableDataSource {
|
|
|
70
72
|
childNodes.push({
|
|
71
73
|
kind: 'variable',
|
|
72
74
|
notebook: parent.notebook,
|
|
73
|
-
id: parent.id + `${
|
|
75
|
+
id: parent.id + `${last + 1}`,
|
|
74
76
|
extHostId: parent.extHostId,
|
|
75
77
|
name: ( localizeWithPath(
|
|
76
78
|
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { append, $ as $$1 } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import 'vscode/vscode/vs/platform/list/browser/listService';
|
|
3
4
|
import { renderExpressionValue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
4
5
|
|
|
5
6
|
const $ = $$1;
|
|
@@ -16,7 +16,7 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
16
16
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
17
17
|
import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
18
18
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
19
|
-
import { CONTEXT_VARIABLE_NAME, CONTEXT_VARIABLE_VALUE, CONTEXT_VARIABLE_TYPE, CONTEXT_VARIABLE_LANGUAGE, CONTEXT_VARIABLE_EXTENSIONID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
19
|
+
import { CONTEXT_VARIABLE_NAME, CONTEXT_VARIABLE_VALUE, CONTEXT_VARIABLE_TYPE, CONTEXT_VARIABLE_INTERFACES, CONTEXT_VARIABLE_LANGUAGE, CONTEXT_VARIABLE_EXTENSIONID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
20
20
|
import { NotebookVariableDataSource } from './notebookVariablesDataSource.js';
|
|
21
21
|
import { NotebookVariablesDelegate, NotebookVariableRenderer, NotebookVariableAccessibilityProvider } from './notebookVariablesTree.js';
|
|
22
22
|
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
@@ -66,6 +66,7 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
66
66
|
const element = e.element;
|
|
67
67
|
const arg = {
|
|
68
68
|
source: ( element.notebook.uri.toString()),
|
|
69
|
+
name: element.name,
|
|
69
70
|
value: element.value,
|
|
70
71
|
type: element.type,
|
|
71
72
|
expression: element.expression,
|
|
@@ -77,6 +78,7 @@ let NotebookVariablesView = class NotebookVariablesView extends ViewPane {
|
|
|
77
78
|
[CONTEXT_VARIABLE_NAME.key, element.name],
|
|
78
79
|
[CONTEXT_VARIABLE_VALUE.key, element.value],
|
|
79
80
|
[CONTEXT_VARIABLE_TYPE.key, element.type],
|
|
81
|
+
[CONTEXT_VARIABLE_INTERFACES.key, element.interfaces],
|
|
80
82
|
[CONTEXT_VARIABLE_LANGUAGE.key, element.language],
|
|
81
83
|
[CONTEXT_VARIABLE_EXTENSIONID.key, element.extensionId]
|
|
82
84
|
]);
|