@codingame/monaco-vscode-notebook-service-override 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +30 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +40 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +94 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +25 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +71 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +128 -177
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +162 -264
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +41 -76
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +42 -45
- package/notebook.d.ts +0 -5
|
@@ -9,6 +9,7 @@ import { INotebookKernelService, INotebookKernelHistoryService } from 'vscode/vs
|
|
|
9
9
|
import { INotebookLoggingService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
|
|
10
10
|
|
|
11
11
|
var NotebookKernelHistoryService_1;
|
|
12
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl";
|
|
12
13
|
const MAX_KERNELS_IN_HISTORY = 5;
|
|
13
14
|
let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Disposable {
|
|
14
15
|
static { NotebookKernelHistoryService_1 = this; }
|
|
@@ -21,7 +22,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
21
22
|
this._mostRecentKernelsMap = {};
|
|
22
23
|
this._loadState();
|
|
23
24
|
this._register(this._storageService.onWillSaveState(() => this._saveState()));
|
|
24
|
-
this._register(this._storageService.onDidChangeValue(1 , NotebookKernelHistoryService_1.STORAGE_KEY, this._register(( new DisposableStore())))(() => {
|
|
25
|
+
this._register(this._storageService.onDidChangeValue(1 , NotebookKernelHistoryService_1.STORAGE_KEY, this._register(( (new DisposableStore()))))(() => {
|
|
25
26
|
this._loadState();
|
|
26
27
|
}));
|
|
27
28
|
}
|
|
@@ -31,8 +32,8 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
31
32
|
const selectedKernel = allAvailableKernels.selected;
|
|
32
33
|
const suggested = allAvailableKernels.all.length === 1 ? allAvailableKernels.all[0] : undefined;
|
|
33
34
|
this._notebookLoggingService.debug('History', `getMatchingKernels: ${allAvailableKernels.all.length} kernels available for ${notebook.uri.path}. Selected: ${allAvailableKernels.selected?.label}. Suggested: ${suggested?.label}`);
|
|
34
|
-
const mostRecentKernelIds = this._mostRecentKernelsMap[notebook.viewType] ? [...( this._mostRecentKernelsMap[notebook.viewType].values())] : [];
|
|
35
|
-
const all = ( mostRecentKernelIds.map(kernelId => allKernels.find(kernel => kernel.id === kernelId))).filter(kernel => !!kernel);
|
|
35
|
+
const mostRecentKernelIds = this._mostRecentKernelsMap[notebook.viewType] ? [...( (this._mostRecentKernelsMap[notebook.viewType].values()))] : [];
|
|
36
|
+
const all = ( (mostRecentKernelIds.map(kernelId => allKernels.find(kernel => kernel.id === kernelId)))).filter(kernel => !!kernel);
|
|
36
37
|
this._notebookLoggingService.debug('History', `mru: ${mostRecentKernelIds.length} kernels in history, ${all.length} registered already.`);
|
|
37
38
|
return {
|
|
38
39
|
selected: selectedKernel ?? suggested,
|
|
@@ -42,7 +43,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
42
43
|
addMostRecentKernel(kernel) {
|
|
43
44
|
const key = kernel.id;
|
|
44
45
|
const viewType = kernel.viewType;
|
|
45
|
-
const recentKeynels = this._mostRecentKernelsMap[viewType] ?? ( new LinkedMap());
|
|
46
|
+
const recentKeynels = this._mostRecentKernelsMap[viewType] ?? ( (new LinkedMap()));
|
|
46
47
|
recentKeynels.set(key, key, 1 );
|
|
47
48
|
if (recentKeynels.size > MAX_KERNELS_IN_HISTORY) {
|
|
48
49
|
const reserved = [...recentKeynels.entries()].slice(0, MAX_KERNELS_IN_HISTORY);
|
|
@@ -81,7 +82,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
81
82
|
const result = Object.create(null);
|
|
82
83
|
for (const [viewType, kernels] of Object.entries(this._mostRecentKernelsMap)) {
|
|
83
84
|
result[viewType] = {
|
|
84
|
-
entries: [...( kernels.values())]
|
|
85
|
+
entries: [...( (kernels.values()))]
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
88
|
return result;
|
|
@@ -89,7 +90,7 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
89
90
|
_deserialize(serialized) {
|
|
90
91
|
this._mostRecentKernelsMap = {};
|
|
91
92
|
for (const [viewType, kernels] of Object.entries(serialized)) {
|
|
92
|
-
const linkedMap = ( new LinkedMap());
|
|
93
|
+
const linkedMap = ( (new LinkedMap()));
|
|
93
94
|
const mapValues = [];
|
|
94
95
|
for (const entry of kernels.entries) {
|
|
95
96
|
mapValues.push([entry, entry]);
|
|
@@ -103,20 +104,16 @@ let NotebookKernelHistoryService = class NotebookKernelHistoryService extends Di
|
|
|
103
104
|
this._saveState();
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
|
-
NotebookKernelHistoryService = NotebookKernelHistoryService_1 = ( __decorate([
|
|
107
|
-
( __param(0, IStorageService)),
|
|
108
|
-
( __param(1, INotebookKernelService)),
|
|
109
|
-
( __param(2, INotebookLoggingService))
|
|
110
|
-
], NotebookKernelHistoryService));
|
|
107
|
+
NotebookKernelHistoryService = NotebookKernelHistoryService_1 = ( (__decorate([
|
|
108
|
+
( (__param(0, IStorageService))),
|
|
109
|
+
( (__param(1, INotebookKernelService))),
|
|
110
|
+
( (__param(2, INotebookLoggingService)))
|
|
111
|
+
], NotebookKernelHistoryService)));
|
|
111
112
|
registerAction2(class extends Action2 {
|
|
112
113
|
constructor() {
|
|
113
114
|
super({
|
|
114
115
|
id: 'notebook.clearNotebookKernelsMRUCache',
|
|
115
|
-
title: ( localize2WithPath(
|
|
116
|
-
'vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl',
|
|
117
|
-
'workbench.notebook.clearNotebookKernelsMRUCache',
|
|
118
|
-
"Clear Notebook Kernels MRU Cache"
|
|
119
|
-
)),
|
|
116
|
+
title: ( localize2WithPath(_moduleId, 0, "Clear Notebook Kernels MRU Cache")),
|
|
120
117
|
category: Categories.Developer,
|
|
121
118
|
f1: true
|
|
122
119
|
});
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js
CHANGED
|
@@ -157,7 +157,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
157
157
|
}
|
|
158
158
|
registerKernel(kernel) {
|
|
159
159
|
if (( this._kernels.has(kernel.id))) {
|
|
160
|
-
throw new Error(`NOTEBOOK CONTROLLER with id '${kernel.id}' already exists`);
|
|
160
|
+
throw ( new Error(`NOTEBOOK CONTROLLER with id '${kernel.id}' already exists`));
|
|
161
161
|
}
|
|
162
162
|
this._kernels.set(kernel.id, ( new KernelInfo(kernel)));
|
|
163
163
|
this._onDidAddKernel.fire(kernel);
|
|
@@ -232,7 +232,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
|
|
|
232
232
|
updateKernelNotebookAffinity(kernel, notebook, preference) {
|
|
233
233
|
const info = this._kernels.get(kernel.id);
|
|
234
234
|
if (!info) {
|
|
235
|
-
throw new Error(`UNKNOWN kernel '${kernel.id}'`);
|
|
235
|
+
throw ( new Error(`UNKNOWN kernel '${kernel.id}'`));
|
|
236
236
|
}
|
|
237
237
|
if (preference === undefined) {
|
|
238
238
|
info.notebookPriorities.delete(notebook);
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js
CHANGED
|
@@ -16,18 +16,19 @@ import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
|
16
16
|
import { distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
17
17
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl";
|
|
19
20
|
function onExtensionChanged(accessor) {
|
|
20
21
|
const extensionService = accessor.get(IExtensionManagementService);
|
|
21
22
|
const extensionEnablementService = accessor.get(IWorkbenchExtensionEnablementService);
|
|
22
|
-
const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( $.filter(e => ( e.some(({ operation }) => operation === 2 )))
|
|
23
|
-
.map(e => ( e.map(({ identifier }) => identifier)))));
|
|
24
|
-
return Event.debounce(Event.any(Event.any(onDidInstallExtensions, ( Event.map(extensionService.onDidUninstallExtension, e => [e.identifier]))), ( Event.map(
|
|
23
|
+
const onDidInstallExtensions = Event.chain(extensionService.onDidInstallExtensions, $ => ( ($.filter(e => ( (e.some(({ operation }) => operation === 2 ))))
|
|
24
|
+
.map(e => ( (e.map(({ identifier }) => identifier)))))));
|
|
25
|
+
return Event.debounce(Event.any(Event.any(onDidInstallExtensions, ( (Event.map(extensionService.onDidUninstallExtension, e => [e.identifier])))), ( (Event.map(
|
|
25
26
|
extensionEnablementService.onEnablementChanged,
|
|
26
|
-
extensions => ( extensions.map(e => e.identifier))
|
|
27
|
-
))), (result, identifiers) => {
|
|
27
|
+
extensions => ( (extensions.map(e => e.identifier)))
|
|
28
|
+
)))), (result, identifiers) => {
|
|
28
29
|
result = result || (identifiers.length ? [identifiers[0]] : []);
|
|
29
30
|
for (const identifier of identifiers) {
|
|
30
|
-
if (( result.some(l => !areSameExtensions(l, identifier)))) {
|
|
31
|
+
if (( (result.some(l => !areSameExtensions(l, identifier))))) {
|
|
31
32
|
result.push(identifier);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -41,11 +42,11 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
|
|
|
41
42
|
this.instantiationService = instantiationService;
|
|
42
43
|
this.extensionEnablementService = extensionEnablementService;
|
|
43
44
|
this.notificationService = notificationService;
|
|
44
|
-
this.notebookKeymapMemento = ( new Memento('notebookKeymap', storageService));
|
|
45
|
+
this.notebookKeymapMemento = ( (new Memento('notebookKeymap', storageService)));
|
|
45
46
|
this.notebookKeymap = this.notebookKeymapMemento.getMemento(0 , 0 );
|
|
46
47
|
this._register(lifecycleService.onDidShutdown(() => this.dispose()));
|
|
47
48
|
this._register(this.instantiationService.invokeFunction(onExtensionChanged)((identifiers => {
|
|
48
|
-
Promise.all(( identifiers.map(identifier => this.checkForOtherKeymaps(identifier))))
|
|
49
|
+
Promise.all(( (identifiers.map(identifier => this.checkForOtherKeymaps(identifier)))))
|
|
49
50
|
.then(undefined, onUnexpectedError);
|
|
50
51
|
})));
|
|
51
52
|
}
|
|
@@ -67,38 +68,30 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
|
|
|
67
68
|
promptForDisablingOtherKeymaps(newKeymap, oldKeymaps) {
|
|
68
69
|
const onPrompt = (confirmed) => {
|
|
69
70
|
if (confirmed) {
|
|
70
|
-
this.extensionEnablementService.setEnablement(( oldKeymaps.map(keymap => keymap.local)), 6 );
|
|
71
|
+
this.extensionEnablementService.setEnablement(( (oldKeymaps.map(keymap => keymap.local))), 6 );
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
this.notificationService.prompt(Severity$1.Info, ( localizeWithPath(
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
_moduleId,
|
|
76
|
+
0,
|
|
76
77
|
"Disable other keymaps ({0}) to avoid conflicts between keybindings?",
|
|
77
|
-
( distinct(( oldKeymaps.map(k => k.local.manifest.displayName))).map(name => `'${name}'`)).join(', ')
|
|
78
|
+
( (distinct(( (oldKeymaps.map(k => k.local.manifest.displayName)))).map(name => `'${name}'`))).join(', ')
|
|
78
79
|
)), [{
|
|
79
|
-
label: ( localizeWithPath(
|
|
80
|
-
'vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl',
|
|
81
|
-
'yes',
|
|
82
|
-
"Yes"
|
|
83
|
-
)),
|
|
80
|
+
label: ( localizeWithPath(_moduleId, 1, "Yes")),
|
|
84
81
|
run: () => onPrompt(true)
|
|
85
82
|
}, {
|
|
86
|
-
label: ( localizeWithPath(
|
|
87
|
-
'vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl',
|
|
88
|
-
'no',
|
|
89
|
-
"No"
|
|
90
|
-
)),
|
|
83
|
+
label: ( localizeWithPath(_moduleId, 2, "No")),
|
|
91
84
|
run: () => onPrompt(false)
|
|
92
85
|
}]);
|
|
93
86
|
}
|
|
94
87
|
};
|
|
95
|
-
NotebookKeymapService = ( __decorate([
|
|
96
|
-
( __param(0, IInstantiationService)),
|
|
97
|
-
( __param(1, IWorkbenchExtensionEnablementService)),
|
|
98
|
-
( __param(2, INotificationService)),
|
|
99
|
-
( __param(3, IStorageService)),
|
|
100
|
-
( __param(4, ILifecycleService))
|
|
101
|
-
], NotebookKeymapService));
|
|
88
|
+
NotebookKeymapService = ( (__decorate([
|
|
89
|
+
( (__param(0, IInstantiationService))),
|
|
90
|
+
( (__param(1, IWorkbenchExtensionEnablementService))),
|
|
91
|
+
( (__param(2, INotificationService))),
|
|
92
|
+
( (__param(3, IStorageService))),
|
|
93
|
+
( (__param(4, ILifecycleService)))
|
|
94
|
+
], NotebookKeymapService)));
|
|
102
95
|
function isNotebookKeymapExtension(extension) {
|
|
103
96
|
if (extension.local.manifest.extensionPack) {
|
|
104
97
|
return false;
|
package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js
CHANGED
|
@@ -3,16 +3,13 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
5
5
|
|
|
6
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl";
|
|
6
7
|
const logChannelId = 'notebook.rendering';
|
|
7
8
|
let NotebookLoggingService = class NotebookLoggingService extends Disposable {
|
|
8
9
|
static { this.ID = 'notebook'; }
|
|
9
10
|
constructor(loggerService) {
|
|
10
11
|
super();
|
|
11
|
-
this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localizeWithPath(
|
|
12
|
-
'vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl',
|
|
13
|
-
'renderChannelName',
|
|
14
|
-
"Notebook rendering"
|
|
15
|
-
)) }));
|
|
12
|
+
this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localizeWithPath(_moduleId, 0, "Notebook rendering")) }));
|
|
16
13
|
}
|
|
17
14
|
debug(category, output) {
|
|
18
15
|
this._logger.debug(`[${category}] ${output}`);
|
|
@@ -21,8 +18,8 @@ let NotebookLoggingService = class NotebookLoggingService extends Disposable {
|
|
|
21
18
|
this._logger.info(`[${category}] ${output}`);
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
NotebookLoggingService = ( __decorate([
|
|
25
|
-
( __param(0, ILoggerService))
|
|
26
|
-
], NotebookLoggingService));
|
|
21
|
+
NotebookLoggingService = ( (__decorate([
|
|
22
|
+
( (__param(0, ILoggerService)))
|
|
23
|
+
], NotebookLoggingService)));
|
|
27
24
|
|
|
28
25
|
export { NotebookLoggingService };
|