@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,16 +1,16 @@
|
|
|
1
|
-
import { NOTEBOOK_EDITOR_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
1
|
+
import { NOTEBOOK_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
2
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import {
|
|
4
|
-
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
3
|
+
import { AccessibleContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
5
4
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
6
5
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
6
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
7
|
|
|
8
8
|
class NotebookAccessibilityHelp {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.priority = 105;
|
|
11
11
|
this.name = 'notebook';
|
|
12
|
-
this.when = NOTEBOOK_EDITOR_FOCUSED;
|
|
13
|
-
this.type =
|
|
12
|
+
this.when = ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, (IS_COMPOSITE_NOTEBOOK.negate()))));
|
|
13
|
+
this.type = "help" ;
|
|
14
14
|
}
|
|
15
15
|
getProvider(accessor) {
|
|
16
16
|
const activeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor()
|
|
@@ -25,51 +25,51 @@ class NotebookAccessibilityHelp {
|
|
|
25
25
|
function getAccessibilityHelpText() {
|
|
26
26
|
return [
|
|
27
27
|
( localize(
|
|
28
|
-
|
|
28
|
+
8134,
|
|
29
29
|
'The notebook view is a collection of code and markdown cells. Code cells can be executed and will produce output directly below the cell.'
|
|
30
30
|
)),
|
|
31
31
|
( localize(
|
|
32
|
-
|
|
32
|
+
8135,
|
|
33
33
|
'The Edit Cell command{0} will focus on the cell input.',
|
|
34
34
|
'<keybinding:notebook.cell.edit>'
|
|
35
35
|
)),
|
|
36
36
|
( localize(
|
|
37
|
-
|
|
37
|
+
8136,
|
|
38
38
|
'The Quit Edit command{0} will set focus on the cell container. The default (Escape) key may need to be pressed twice first exit the virtual cursor if active.',
|
|
39
39
|
'<keybinding:notebook.cell.quitEdit>'
|
|
40
40
|
)),
|
|
41
41
|
( localize(
|
|
42
|
-
|
|
42
|
+
8137,
|
|
43
43
|
'The Focus Output command{0} will set focus in the cell\'s output.',
|
|
44
44
|
'<keybinding:notebook.cell.focusInOutput>'
|
|
45
45
|
)),
|
|
46
46
|
( localize(
|
|
47
|
-
|
|
47
|
+
8138,
|
|
48
48
|
'The Focus Next Cell Editor command{0} will set focus in the next cell\'s editor.',
|
|
49
49
|
'<keybinding:notebook.focusNextEditor>'
|
|
50
50
|
)),
|
|
51
51
|
( localize(
|
|
52
|
-
|
|
52
|
+
8139,
|
|
53
53
|
'The Focus Previous Cell Editor command{0} will set focus in the previous cell\'s editor.',
|
|
54
54
|
'<keybinding:notebook.focusPreviousEditor>'
|
|
55
55
|
)),
|
|
56
56
|
( localize(
|
|
57
|
-
|
|
57
|
+
8140,
|
|
58
58
|
'The up and down arrows will also move focus between cells while focused on the outer cell container.'
|
|
59
59
|
)),
|
|
60
60
|
( localize(
|
|
61
|
-
|
|
61
|
+
8141,
|
|
62
62
|
'The Execute Cell command{0} executes the cell that currently has focus.',
|
|
63
63
|
'<keybinding:notebook.cell.executeAndFocusContainer>'
|
|
64
64
|
)),
|
|
65
65
|
( localize(
|
|
66
|
-
|
|
66
|
+
8142,
|
|
67
67
|
'The Insert Cell Above{0} and Below{1} commands will create new empty code cells.',
|
|
68
68
|
'<keybinding:notebook.cell.insertCodeCellAbove>',
|
|
69
69
|
'<keybinding:notebook.cell.insertCodeCellBelow>'
|
|
70
70
|
)),
|
|
71
71
|
( localize(
|
|
72
|
-
|
|
72
|
+
8143,
|
|
73
73
|
'The Change Cell to Code/Markdown commands are used to switch between cell types.'
|
|
74
74
|
))
|
|
75
75
|
].join('\n');
|
|
@@ -78,13 +78,13 @@ function getAccessibilityHelpProvider(accessor, editor) {
|
|
|
78
78
|
const helpText = getAccessibilityHelpText();
|
|
79
79
|
return (
|
|
80
80
|
(new AccessibleContentProvider(
|
|
81
|
-
|
|
82
|
-
{ type:
|
|
81
|
+
"notebook" ,
|
|
82
|
+
{ type: "help" },
|
|
83
83
|
() => helpText,
|
|
84
84
|
() => editor.focus(),
|
|
85
|
-
|
|
85
|
+
"accessibility.verbosity.notebook"
|
|
86
86
|
))
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export { NotebookAccessibilityHelp
|
|
90
|
+
export { NotebookAccessibilityHelp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccessibleContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
2
2
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
-
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
4
3
|
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
5
4
|
import { NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
6
5
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -9,7 +8,7 @@ class NotebookAccessibleView {
|
|
|
9
8
|
constructor() {
|
|
10
9
|
this.priority = 100;
|
|
11
10
|
this.name = 'notebook';
|
|
12
|
-
this.type =
|
|
11
|
+
this.type = "view" ;
|
|
13
12
|
this.when = ( ContextKeyExpr.and(NOTEBOOK_OUTPUT_FOCUSED, ( ContextKeyExpr.equals('resourceExtname', '.ipynb'))));
|
|
14
13
|
}
|
|
15
14
|
getProvider(accessor) {
|
|
@@ -58,14 +57,14 @@ function getAccessibleOutputProvider(editorService) {
|
|
|
58
57
|
return;
|
|
59
58
|
}
|
|
60
59
|
return ( new AccessibleContentProvider(
|
|
61
|
-
|
|
62
|
-
{ type:
|
|
60
|
+
"notebook" ,
|
|
61
|
+
{ type: "view" },
|
|
63
62
|
() => { return outputContent; },
|
|
64
63
|
() => {
|
|
65
64
|
notebookEditor?.setFocus(selections[0]);
|
|
66
65
|
activePane?.focus();
|
|
67
66
|
},
|
|
68
|
-
|
|
67
|
+
"accessibility.verbosity.notebook"
|
|
69
68
|
));
|
|
70
69
|
}
|
|
71
70
|
|
|
@@ -27,7 +27,7 @@ const NotebookPreloadContribution = ( (Object.freeze({
|
|
|
27
27
|
localResourceRoots: 'localResourceRoots',
|
|
28
28
|
})));
|
|
29
29
|
const notebookProviderContribution = {
|
|
30
|
-
description: ( localize(
|
|
30
|
+
description: ( localize(7687, 'Contributes notebook document provider.')),
|
|
31
31
|
type: 'array',
|
|
32
32
|
defaultSnippets: [{ body: [{ type: '', displayName: '', 'selector': [{ 'filenamePattern': '' }] }] }],
|
|
33
33
|
items: {
|
|
@@ -40,25 +40,25 @@ const notebookProviderContribution = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
[NotebookEditorContribution.type]: {
|
|
42
42
|
type: 'string',
|
|
43
|
-
description: ( localize(
|
|
43
|
+
description: ( localize(7688, 'Type of the notebook.')),
|
|
44
44
|
},
|
|
45
45
|
[NotebookEditorContribution.displayName]: {
|
|
46
46
|
type: 'string',
|
|
47
|
-
description: ( localize(
|
|
47
|
+
description: ( localize(7689, 'Human readable name of the notebook.')),
|
|
48
48
|
},
|
|
49
49
|
[NotebookEditorContribution.selector]: {
|
|
50
50
|
type: 'array',
|
|
51
|
-
description: ( localize(
|
|
51
|
+
description: ( localize(7690, 'Set of globs that the notebook is for.')),
|
|
52
52
|
items: {
|
|
53
53
|
type: 'object',
|
|
54
54
|
properties: {
|
|
55
55
|
filenamePattern: {
|
|
56
56
|
type: 'string',
|
|
57
|
-
description: ( localize(
|
|
57
|
+
description: ( localize(7691, 'Glob that the notebook is enabled for.')),
|
|
58
58
|
},
|
|
59
59
|
excludeFileNamePattern: {
|
|
60
60
|
type: 'string',
|
|
61
|
-
description: ( localize(
|
|
61
|
+
description: ( localize(7692, 'Glob that the notebook is disabled for.'))
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ const notebookProviderContribution = {
|
|
|
66
66
|
[NotebookEditorContribution.priority]: {
|
|
67
67
|
type: 'string',
|
|
68
68
|
markdownDeprecationMessage: ( localize(
|
|
69
|
-
|
|
69
|
+
7693,
|
|
70
70
|
'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
|
|
71
71
|
)),
|
|
72
72
|
enum: [
|
|
@@ -75,11 +75,11 @@ const notebookProviderContribution = {
|
|
|
75
75
|
],
|
|
76
76
|
markdownEnumDescriptions: [
|
|
77
77
|
( localize(
|
|
78
|
-
|
|
78
|
+
7694,
|
|
79
79
|
'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
|
|
80
80
|
)),
|
|
81
81
|
( localize(
|
|
82
|
-
|
|
82
|
+
7695,
|
|
83
83
|
'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
|
|
84
84
|
)),
|
|
85
85
|
],
|
|
@@ -90,7 +90,7 @@ const notebookProviderContribution = {
|
|
|
90
90
|
};
|
|
91
91
|
const defaultRendererSnippet = ( (Object.freeze({ id: '', displayName: '', mimeTypes: [''], entrypoint: '' })));
|
|
92
92
|
const notebookRendererContribution = {
|
|
93
|
-
description: ( localize(
|
|
93
|
+
description: ( localize(7696, 'Contributes notebook output renderer provider.')),
|
|
94
94
|
type: 'array',
|
|
95
95
|
defaultSnippets: [{ body: [defaultRendererSnippet] }],
|
|
96
96
|
items: {
|
|
@@ -105,18 +105,18 @@ const notebookRendererContribution = {
|
|
|
105
105
|
properties: {
|
|
106
106
|
[NotebookRendererContribution.id]: {
|
|
107
107
|
type: 'string',
|
|
108
|
-
description: ( localize(
|
|
108
|
+
description: ( localize(7697, 'Unique identifier of the notebook output renderer.')),
|
|
109
109
|
},
|
|
110
110
|
[NotebookRendererContribution.displayName]: {
|
|
111
111
|
type: 'string',
|
|
112
|
-
description: ( localize(
|
|
112
|
+
description: ( localize(7698, 'Human readable name of the notebook output renderer.')),
|
|
113
113
|
},
|
|
114
114
|
[NotebookRendererContribution.hardDependencies]: {
|
|
115
115
|
type: 'array',
|
|
116
116
|
uniqueItems: true,
|
|
117
117
|
items: { type: 'string' },
|
|
118
118
|
markdownDescription: ( localize(
|
|
119
|
-
|
|
119
|
+
7699,
|
|
120
120
|
'List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used.'
|
|
121
121
|
)),
|
|
122
122
|
},
|
|
@@ -125,7 +125,7 @@ const notebookRendererContribution = {
|
|
|
125
125
|
uniqueItems: true,
|
|
126
126
|
items: { type: 'string' },
|
|
127
127
|
markdownDescription: ( localize(
|
|
128
|
-
|
|
128
|
+
7700,
|
|
129
129
|
'List of soft kernel dependencies the renderer can make use of. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer will be preferred over renderers that don\'t interact with the kernel.'
|
|
130
130
|
)),
|
|
131
131
|
},
|
|
@@ -138,17 +138,17 @@ const notebookRendererContribution = {
|
|
|
138
138
|
],
|
|
139
139
|
enumDescriptions: [
|
|
140
140
|
( localize(
|
|
141
|
-
|
|
141
|
+
7701,
|
|
142
142
|
'Messaging is required. The renderer will only be used when it\'s part of an extension that can be run in an extension host.'
|
|
143
143
|
)),
|
|
144
144
|
( localize(
|
|
145
|
-
|
|
145
|
+
7702,
|
|
146
146
|
'The renderer is better with messaging available, but it\'s not requried.'
|
|
147
147
|
)),
|
|
148
|
-
( localize(
|
|
148
|
+
( localize(7703, 'The renderer does not require messaging.')),
|
|
149
149
|
],
|
|
150
150
|
description: ( localize(
|
|
151
|
-
|
|
151
|
+
7704,
|
|
152
152
|
'Defines how and if the renderer needs to communicate with an extension host, via `createRendererMessaging`. Renderers with stronger messaging requirements may not work in all environments.'
|
|
153
153
|
)),
|
|
154
154
|
},
|
|
@@ -164,13 +164,13 @@ const notebookRendererContribution = {
|
|
|
164
164
|
properties: {
|
|
165
165
|
[NotebookRendererContribution.mimeTypes]: {
|
|
166
166
|
type: 'array',
|
|
167
|
-
description: ( localize(
|
|
167
|
+
description: ( localize(7705, 'Set of globs that the notebook is for.')),
|
|
168
168
|
items: {
|
|
169
169
|
type: 'string'
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
[NotebookRendererContribution.entrypoint]: {
|
|
173
|
-
description: ( localize(
|
|
173
|
+
description: ( localize(7706, 'File to load in the webview to render the extension.')),
|
|
174
174
|
type: 'string',
|
|
175
175
|
},
|
|
176
176
|
}
|
|
@@ -181,17 +181,17 @@ const notebookRendererContribution = {
|
|
|
181
181
|
],
|
|
182
182
|
properties: {
|
|
183
183
|
[NotebookRendererContribution.entrypoint]: {
|
|
184
|
-
description: ( localize(
|
|
184
|
+
description: ( localize(7706, 'File to load in the webview to render the extension.')),
|
|
185
185
|
type: 'object',
|
|
186
186
|
required: ['extends', 'path'],
|
|
187
187
|
properties: {
|
|
188
188
|
extends: {
|
|
189
189
|
type: 'string',
|
|
190
|
-
description: ( localize(
|
|
190
|
+
description: ( localize(7707, 'Existing renderer that this one extends.')),
|
|
191
191
|
},
|
|
192
192
|
path: {
|
|
193
193
|
type: 'string',
|
|
194
|
-
description: ( localize(
|
|
194
|
+
description: ( localize(7706, 'File to load in the webview to render the extension.')),
|
|
195
195
|
},
|
|
196
196
|
}
|
|
197
197
|
},
|
|
@@ -203,7 +203,7 @@ const notebookRendererContribution = {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
const notebookPreloadContribution = {
|
|
206
|
-
description: ( localize(
|
|
206
|
+
description: ( localize(7708, 'Contributes notebook preloads.')),
|
|
207
207
|
type: 'array',
|
|
208
208
|
defaultSnippets: [{ body: [{ type: '', entrypoint: '' }] }],
|
|
209
209
|
items: {
|
|
@@ -215,17 +215,17 @@ const notebookPreloadContribution = {
|
|
|
215
215
|
properties: {
|
|
216
216
|
[NotebookPreloadContribution.type]: {
|
|
217
217
|
type: 'string',
|
|
218
|
-
description: ( localize(
|
|
218
|
+
description: ( localize(7709, 'Type of the notebook.')),
|
|
219
219
|
},
|
|
220
220
|
[NotebookPreloadContribution.entrypoint]: {
|
|
221
221
|
type: 'string',
|
|
222
|
-
description: ( localize(
|
|
222
|
+
description: ( localize(7710, 'Path to file loaded in the webview.')),
|
|
223
223
|
},
|
|
224
224
|
[NotebookPreloadContribution.localResourceRoots]: {
|
|
225
225
|
type: 'array',
|
|
226
226
|
items: { type: 'string' },
|
|
227
227
|
description: ( localize(
|
|
228
|
-
|
|
228
|
+
7711,
|
|
229
229
|
'Paths to additional resources that should be allowed in the webview.'
|
|
230
230
|
)),
|
|
231
231
|
},
|
|
@@ -272,8 +272,8 @@ class NotebooksDataRenderer extends Disposable {
|
|
|
272
272
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
273
273
|
}
|
|
274
274
|
const headers = [
|
|
275
|
-
( localize(
|
|
276
|
-
( localize(
|
|
275
|
+
( localize(7712, "ID")),
|
|
276
|
+
( localize(7713, "Name")),
|
|
277
277
|
];
|
|
278
278
|
const rows = ( (contrib
|
|
279
279
|
.sort((a, b) => a.type.localeCompare(b.type))
|
|
@@ -306,8 +306,8 @@ class NotebookRenderersDataRenderer extends Disposable {
|
|
|
306
306
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
307
307
|
}
|
|
308
308
|
const headers = [
|
|
309
|
-
( localize(
|
|
310
|
-
( localize(
|
|
309
|
+
( localize(7714, "Name")),
|
|
310
|
+
( localize(7715, "Mimetypes")),
|
|
311
311
|
];
|
|
312
312
|
const rows = ( (contrib
|
|
313
313
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
@@ -328,7 +328,7 @@ class NotebookRenderersDataRenderer extends Disposable {
|
|
|
328
328
|
}
|
|
329
329
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
330
330
|
id: 'notebooks',
|
|
331
|
-
label: ( localize(
|
|
331
|
+
label: ( localize(7716, "Notebooks")),
|
|
332
332
|
access: {
|
|
333
333
|
canToggle: false
|
|
334
334
|
},
|
|
@@ -336,7 +336,7 @@ class NotebookRenderersDataRenderer extends Disposable {
|
|
|
336
336
|
});
|
|
337
337
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
338
338
|
id: 'notebookRenderer',
|
|
339
|
-
label: ( localize(
|
|
339
|
+
label: ( localize(7717, "Notebook Renderers")),
|
|
340
340
|
access: {
|
|
341
341
|
canToggle: false
|
|
342
342
|
},
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js
CHANGED
|
@@ -6,7 +6,6 @@ import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor
|
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { NotebookEditorInput, isCompositeNotebookEditorInput, isNotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
8
8
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
-
import { GroupModelChangeKind } from 'vscode/vscode/vs/workbench/common/editor';
|
|
10
9
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
10
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
12
11
|
import { InteractiveWindowOpen } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
@@ -80,13 +79,13 @@ let NotebookEditorWidgetService = class NotebookEditorWidgetService {
|
|
|
80
79
|
}));
|
|
81
80
|
const interactiveWindowOpen = InteractiveWindowOpen.bindTo(contextKeyService);
|
|
82
81
|
this._disposables.add(editorService.onDidEditorsChange(e => {
|
|
83
|
-
if (e.event.kind ===
|
|
84
|
-
if (editorService.editors.find(editor => editor
|
|
82
|
+
if (e.event.kind === 5 && !interactiveWindowOpen.get()) {
|
|
83
|
+
if (editorService.editors.find(editor => isCompositeNotebookEditorInput(editor))) {
|
|
85
84
|
interactiveWindowOpen.set(true);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
|
-
else if (e.event.kind ===
|
|
89
|
-
if (!editorService.editors.find(editor => editor
|
|
87
|
+
else if (e.event.kind === 6 && interactiveWindowOpen.get()) {
|
|
88
|
+
if (!editorService.editors.find(editor => isCompositeNotebookEditorInput(editor))) {
|
|
90
89
|
interactiveWindowOpen.set(false);
|
|
91
90
|
}
|
|
92
91
|
}
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js
CHANGED
|
@@ -26,7 +26,7 @@ let NotebookExecutionService = class NotebookExecutionService {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
this._logService.debug(`Execution`, `${JSON.stringify(( (cellsArr.map(c => c.handle))))}`);
|
|
29
|
-
const message = ( localize(
|
|
29
|
+
const message = ( localize(3294, "Executing a notebook cell will run code from this workspace."));
|
|
30
30
|
const trust = await this._workspaceTrustRequestService.requestWorkspaceTrust({ message });
|
|
31
31
|
if (!trust) {
|
|
32
32
|
return;
|
|
@@ -8,7 +8,7 @@ import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySign
|
|
|
8
8
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
9
9
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
10
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
11
|
-
import { CellUri, NotebookCellExecutionState,
|
|
11
|
+
import { CellUri, NotebookCellExecutionState, NotebookExecutionState } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { CellExecutionUpdateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
|
|
13
13
|
import { INotebookExecutionService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService.service';
|
|
14
14
|
import { NotebookExecutionType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
@@ -334,7 +334,7 @@ NotebookExecutionListeners = ( __decorate([
|
|
|
334
334
|
function updateToEdit(update, cellHandle) {
|
|
335
335
|
if (update.editType === CellExecutionUpdateType.Output) {
|
|
336
336
|
return {
|
|
337
|
-
editType:
|
|
337
|
+
editType: 2 ,
|
|
338
338
|
handle: update.cellHandle,
|
|
339
339
|
append: update.append,
|
|
340
340
|
outputs: update.outputs,
|
|
@@ -342,7 +342,7 @@ function updateToEdit(update, cellHandle) {
|
|
|
342
342
|
}
|
|
343
343
|
else if (update.editType === CellExecutionUpdateType.OutputItems) {
|
|
344
344
|
return {
|
|
345
|
-
editType:
|
|
345
|
+
editType: 7 ,
|
|
346
346
|
items: update.items,
|
|
347
347
|
append: update.append,
|
|
348
348
|
outputId: update.outputId
|
|
@@ -357,7 +357,7 @@ function updateToEdit(update, cellHandle) {
|
|
|
357
357
|
newInternalMetadata.runStartTime = update.runStartTime;
|
|
358
358
|
}
|
|
359
359
|
return {
|
|
360
|
-
editType:
|
|
360
|
+
editType: 9 ,
|
|
361
361
|
handle: cellHandle,
|
|
362
362
|
internalMetadata: newInternalMetadata
|
|
363
363
|
};
|
|
@@ -393,7 +393,7 @@ let CellExecution = class CellExecution extends Disposable {
|
|
|
393
393
|
}
|
|
394
394
|
initialize() {
|
|
395
395
|
const startExecuteEdit = {
|
|
396
|
-
editType:
|
|
396
|
+
editType: 9 ,
|
|
397
397
|
handle: this.cellHandle,
|
|
398
398
|
internalMetadata: {
|
|
399
399
|
executionId: generateUuid(),
|
|
@@ -449,7 +449,7 @@ let CellExecution = class CellExecution extends Disposable {
|
|
|
449
449
|
}
|
|
450
450
|
else {
|
|
451
451
|
const edit = {
|
|
452
|
-
editType:
|
|
452
|
+
editType: 9 ,
|
|
453
453
|
handle: this.cellHandle,
|
|
454
454
|
internalMetadata: {
|
|
455
455
|
lastRunSuccess: completionData.lastRunSuccess,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { LinkedMap
|
|
3
|
+
import { LinkedMap } from 'vscode/vscode/vs/base/common/map';
|
|
4
4
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
5
5
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
6
6
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
8
7
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
9
8
|
import { INotebookKernelService, INotebookKernelHistoryService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
10
9
|
import { INotebookLoggingService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
|
|
@@ -22,7 +21,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
22
21
|
this._mostRecentKernelsMap = {};
|
|
23
22
|
this._loadState();
|
|
24
23
|
this._register(this._storageService.onWillSaveState(() => this._saveState()));
|
|
25
|
-
this._register(this._storageService.onDidChangeValue(
|
|
24
|
+
this._register(this._storageService.onDidChangeValue(1 , NotebookKernelHistoryService_1.STORAGE_KEY, this._register(( (new DisposableStore()))))(() => {
|
|
26
25
|
this._loadState();
|
|
27
26
|
}));
|
|
28
27
|
}
|
|
@@ -44,7 +43,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
44
43
|
const key = kernel.id;
|
|
45
44
|
const viewType = kernel.viewType;
|
|
46
45
|
const recentKeynels = this._mostRecentKernelsMap[viewType] ?? ( (new LinkedMap()));
|
|
47
|
-
recentKeynels.set(key, key,
|
|
46
|
+
recentKeynels.set(key, key, 1 );
|
|
48
47
|
if (recentKeynels.size > MAX_KERNELS_IN_HISTORY) {
|
|
49
48
|
const reserved = [...recentKeynels.entries()].slice(0, MAX_KERNELS_IN_HISTORY);
|
|
50
49
|
recentKeynels.fromJSON(reserved);
|
|
@@ -58,14 +57,14 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
58
57
|
}
|
|
59
58
|
if (notEmpty) {
|
|
60
59
|
const serialized = this._serialize();
|
|
61
|
-
this._storageService.store(NotebookKernelHistoryService_1.STORAGE_KEY, JSON.stringify(serialized),
|
|
60
|
+
this._storageService.store(NotebookKernelHistoryService_1.STORAGE_KEY, JSON.stringify(serialized), 1 , 0 );
|
|
62
61
|
}
|
|
63
62
|
else {
|
|
64
|
-
this._storageService.remove(NotebookKernelHistoryService_1.STORAGE_KEY,
|
|
63
|
+
this._storageService.remove(NotebookKernelHistoryService_1.STORAGE_KEY, 1 );
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
_loadState() {
|
|
68
|
-
const serialized = this._storageService.get(NotebookKernelHistoryService_1.STORAGE_KEY,
|
|
67
|
+
const serialized = this._storageService.get(NotebookKernelHistoryService_1.STORAGE_KEY, 1 );
|
|
69
68
|
if (serialized) {
|
|
70
69
|
try {
|
|
71
70
|
this._deserialize(JSON.parse(serialized));
|
|
@@ -113,7 +112,7 @@ registerAction2(class extends Action2 {
|
|
|
113
112
|
constructor() {
|
|
114
113
|
super({
|
|
115
114
|
id: 'notebook.clearNotebookKernelsMRUCache',
|
|
116
|
-
title: ( localize2(
|
|
115
|
+
title: ( localize2(3298, "Clear Notebook Kernels MRU Cache")),
|
|
117
116
|
category: Categories.Developer,
|
|
118
117
|
f1: true
|
|
119
118
|
});
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js
CHANGED
|
@@ -2,14 +2,12 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { ResourceMap, LRUCache } from 'vscode/vscode/vs/base/common/map';
|
|
5
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
6
5
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
7
6
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
7
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
9
8
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
10
9
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
11
10
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
12
|
-
import { MarshalledId } from 'vscode/vscode/vs/base/common/marshallingIds';
|
|
13
11
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
14
12
|
import { runWhenWindowIdle, getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
15
13
|
|
|
@@ -58,7 +56,7 @@ class SourceAction extends Disposable {
|
|
|
58
56
|
try {
|
|
59
57
|
await this.action.run({
|
|
60
58
|
uri: this.model.uri,
|
|
61
|
-
$mid:
|
|
59
|
+
$mid: 14
|
|
62
60
|
});
|
|
63
61
|
}
|
|
64
62
|
catch (error) {
|
|
@@ -106,7 +104,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
106
104
|
this._kernelSourceActionsUpdates.delete(id);
|
|
107
105
|
}));
|
|
108
106
|
try {
|
|
109
|
-
const data = JSON.parse(this._storageService.get(NotebookKernelService_1._storageNotebookBinding,
|
|
107
|
+
const data = JSON.parse(this._storageService.get(NotebookKernelService_1._storageNotebookBinding, 1 , '[]'));
|
|
110
108
|
this._notebookBindings.fromJSON(data);
|
|
111
109
|
}
|
|
112
110
|
catch {
|
|
@@ -127,7 +125,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
127
125
|
_persistMementos() {
|
|
128
126
|
this._persistSoonHandle?.dispose();
|
|
129
127
|
this._persistSoonHandle = runWhenWindowIdle(getActiveWindow(), () => {
|
|
130
|
-
this._storageService.store(NotebookKernelService_1._storageNotebookBinding, JSON.stringify(this._notebookBindings),
|
|
128
|
+
this._storageService.store(NotebookKernelService_1._storageNotebookBinding, JSON.stringify(this._notebookBindings), 1 , 1 );
|
|
131
129
|
}, 100);
|
|
132
130
|
}
|
|
133
131
|
static _score(kernel, notebook) {
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js
CHANGED
|
@@ -7,13 +7,10 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
7
7
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
8
8
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
9
9
|
import { getInstalledExtensions } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensionsUtils';
|
|
10
|
-
import { EnablementState } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
11
10
|
import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
12
11
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
13
|
-
import { InstallOperation } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
14
12
|
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
15
13
|
import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
16
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
17
14
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
18
15
|
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
19
16
|
import { distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
@@ -22,7 +19,7 @@ import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
|
22
19
|
function onExtensionChanged(accessor) {
|
|
23
20
|
const extensionService = accessor.get(IExtensionManagementService);
|
|
24
21
|
const extensionEnablementService = accessor.get(IWorkbenchExtensionEnablementService);
|
|
25
|
-
const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( ($.filter(e => ( (e.some(({ operation }) => operation ===
|
|
22
|
+
const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( ($.filter(e => ( (e.some(({ operation }) => operation === 2 ))))
|
|
26
23
|
.map(e => ( (e.map(({ identifier }) => identifier)))))));
|
|
27
24
|
return Event.debounce(Event.any(Event.any(onDidInstallExtensions, ( (Event.map(extensionService.onDidUninstallExtension, e => [e.identifier])))), ( (Event.map(
|
|
28
25
|
extensionEnablementService.onEnablementChanged,
|
|
@@ -45,7 +42,7 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
|
|
|
45
42
|
this.extensionEnablementService = extensionEnablementService;
|
|
46
43
|
this.notificationService = notificationService;
|
|
47
44
|
this.notebookKeymapMemento = ( (new Memento('notebookKeymap', storageService)));
|
|
48
|
-
this.notebookKeymap = this.notebookKeymapMemento.getMemento(
|
|
45
|
+
this.notebookKeymap = this.notebookKeymapMemento.getMemento(0 , 0 );
|
|
49
46
|
this._register(lifecycleService.onDidShutdown(() => this.dispose()));
|
|
50
47
|
this._register(this.instantiationService.invokeFunction(onExtensionChanged)((identifiers => {
|
|
51
48
|
Promise.all(( (identifiers.map(identifier => this.checkForOtherKeymaps(identifier)))))
|
|
@@ -70,18 +67,18 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
|
|
|
70
67
|
promptForDisablingOtherKeymaps(newKeymap, oldKeymaps) {
|
|
71
68
|
const onPrompt = (confirmed) => {
|
|
72
69
|
if (confirmed) {
|
|
73
|
-
this.extensionEnablementService.setEnablement(( (oldKeymaps.map(keymap => keymap.local))),
|
|
70
|
+
this.extensionEnablementService.setEnablement(( (oldKeymaps.map(keymap => keymap.local))), 7 );
|
|
74
71
|
}
|
|
75
72
|
};
|
|
76
73
|
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
77
|
-
|
|
74
|
+
3295,
|
|
78
75
|
"Disable other keymaps ({0}) to avoid conflicts between keybindings?",
|
|
79
76
|
( (distinct(( (oldKeymaps.map(k => k.local.manifest.displayName)))).map(name => `'${name}'`))).join(', ')
|
|
80
77
|
)), [{
|
|
81
|
-
label: ( localize(
|
|
78
|
+
label: ( localize(3296, "Yes")),
|
|
82
79
|
run: () => onPrompt(true)
|
|
83
80
|
}, {
|
|
84
|
-
label: ( localize(
|
|
81
|
+
label: ( localize(3297, "No")),
|
|
85
82
|
run: () => onPrompt(false)
|
|
86
83
|
}]);
|
|
87
84
|
}
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js
CHANGED
|
@@ -8,7 +8,7 @@ let NotebookLoggingService = class NotebookLoggingService extends Disposable {
|
|
|
8
8
|
static { this.ID = 'notebook'; }
|
|
9
9
|
constructor(loggerService) {
|
|
10
10
|
super();
|
|
11
|
-
this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localize(
|
|
11
|
+
this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localize(3299, "Notebook")) }));
|
|
12
12
|
}
|
|
13
13
|
debug(category, output) {
|
|
14
14
|
this._logger.debug(`[${category}] ${output}`);
|