@codingame/monaco-vscode-extensions-service-override 2.2.1 → 3.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/extensions.js +1 -82
- package/package.json +9 -9
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +497 -0
- package/vscode/src/vs/workbench/api/browser/extensionHost.contribution.js +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +103 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +23 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +147 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +11 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +9 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +17 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +19 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +25 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +2 -10
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +40 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +10 -10
|
@@ -297,7 +297,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
297
297
|
const config = this._configurationService.getValue();
|
|
298
298
|
if (config.files?.watcherExclude) {
|
|
299
299
|
for (const key in config.files.watcherExclude) {
|
|
300
|
-
if (config.files.watcherExclude[key] === true) {
|
|
300
|
+
if (key && config.files.watcherExclude[key] === true) {
|
|
301
301
|
opts.excludes.push(key);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
@@ -307,7 +307,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
307
307
|
const config = this._configurationService.getValue();
|
|
308
308
|
if (config.files?.watcherExclude) {
|
|
309
309
|
for (const key in config.files.watcherExclude) {
|
|
310
|
-
if (config.files.watcherExclude[key] === true) {
|
|
310
|
+
if (key && config.files.watcherExclude[key] === true) {
|
|
311
311
|
if (!opts.includes) {
|
|
312
312
|
opts.includes = [];
|
|
313
313
|
}
|
|
@@ -391,6 +391,13 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
391
391
|
: undefined
|
|
392
392
|
}));
|
|
393
393
|
}
|
|
394
|
+
$registerNewSymbolNamesProvider(handle, selector) {
|
|
395
|
+
this._registrations.set(handle, this._languageFeaturesService.newSymbolNamesProvider.register(selector, {
|
|
396
|
+
provideNewSymbolNames: (model, range, token) => {
|
|
397
|
+
return this._proxy.$provideNewSymbolNames(handle, model.uri, range, token);
|
|
398
|
+
}
|
|
399
|
+
}));
|
|
400
|
+
}
|
|
394
401
|
$registerDocumentSemanticTokensProvider(handle, selector, legend, eventHandle) {
|
|
395
402
|
let event = undefined;
|
|
396
403
|
if (typeof eventHandle === 'number') {
|
|
@@ -500,6 +507,17 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
500
507
|
};
|
|
501
508
|
this._registrations.set(handle, this._languageFeaturesService.inlineCompletionsProvider.register(selector, provider));
|
|
502
509
|
}
|
|
510
|
+
$registerInlineEditProvider(handle, selector, extensionId) {
|
|
511
|
+
const provider = {
|
|
512
|
+
provideInlineEdit: async (model, context, token) => {
|
|
513
|
+
return this._proxy.$provideInlineEdit(handle, model.uri, context, token);
|
|
514
|
+
},
|
|
515
|
+
freeInlineEdit: (edit) => {
|
|
516
|
+
this._proxy.$freeInlineEdit(handle, edit.pid);
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineEditProvider.register(selector, provider));
|
|
520
|
+
}
|
|
503
521
|
$registerSignatureHelpProvider(handle, selector, metadata) {
|
|
504
522
|
this._registrations.set(handle, this._languageFeaturesService.signatureHelpProvider.register(selector, {
|
|
505
523
|
signatureHelpTriggerCharacters: metadata.triggerCharacters,
|
|
@@ -6,12 +6,14 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
|
|
|
6
6
|
import '../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
7
7
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
8
8
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
9
10
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
10
11
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
11
12
|
|
|
12
13
|
let MainThreadMessageService = class MainThreadMessageService {
|
|
13
|
-
constructor(extHostContext, _notificationService, _dialogService, extensionService) {
|
|
14
|
+
constructor(extHostContext, _notificationService, _commandService, _dialogService, extensionService) {
|
|
14
15
|
this._notificationService = _notificationService;
|
|
16
|
+
this._commandService = _commandService;
|
|
15
17
|
this._dialogService = _dialogService;
|
|
16
18
|
this.extensionsListener = extensionService.onDidChangeExtensions(e => {
|
|
17
19
|
for (const extension of e.removed) {
|
|
@@ -56,6 +58,19 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
56
58
|
));
|
|
57
59
|
}
|
|
58
60
|
const secondaryActions = [];
|
|
61
|
+
if (options.source) {
|
|
62
|
+
secondaryActions.push(toAction({
|
|
63
|
+
id: options.source.identifier.value,
|
|
64
|
+
label: ( localizeWithPath(
|
|
65
|
+
'vs/workbench/api/browser/mainThreadMessageService',
|
|
66
|
+
'manageExtension',
|
|
67
|
+
"Manage Extension"
|
|
68
|
+
)),
|
|
69
|
+
run: () => {
|
|
70
|
+
return this._commandService.executeCommand('_extensions.manage', options.source.identifier.value);
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
59
74
|
const messageHandle = this._notificationService.notify({
|
|
60
75
|
severity,
|
|
61
76
|
message,
|
|
@@ -114,8 +129,9 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
114
129
|
MainThreadMessageService = __decorate([
|
|
115
130
|
extHostNamedCustomer(MainContext.MainThreadMessageService),
|
|
116
131
|
( __param(1, INotificationService)),
|
|
117
|
-
( __param(2,
|
|
118
|
-
( __param(3,
|
|
132
|
+
( __param(2, ICommandService)),
|
|
133
|
+
( __param(3, IDialogService)),
|
|
134
|
+
( __param(4, IExtensionService))
|
|
119
135
|
], MainThreadMessageService);
|
|
120
136
|
|
|
121
137
|
export { MainThreadMessageService };
|
|
@@ -11,7 +11,7 @@ class ExtHostNotebookDocumentSaveParticipant {
|
|
|
11
11
|
constructor(extHostContext) {
|
|
12
12
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostNotebookDocumentSaveParticipant));
|
|
13
13
|
}
|
|
14
|
-
async participate(workingCopy,
|
|
14
|
+
async participate(workingCopy, context, _progress, token) {
|
|
15
15
|
if (!workingCopy.model || !(workingCopy.model instanceof NotebookFileWorkingCopyModel)) {
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
@@ -22,7 +22,7 @@ class ExtHostNotebookDocumentSaveParticipant {
|
|
|
22
22
|
'timeout.onWillSave',
|
|
23
23
|
"Aborted onWillSaveNotebookDocument-event after 1750ms"
|
|
24
24
|
))))), 1750);
|
|
25
|
-
this._proxy.$participateInSave(workingCopy.resource,
|
|
25
|
+
this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
|
|
26
26
|
clearTimeout(_warningTimeout);
|
|
27
27
|
return undefined;
|
|
28
28
|
}).then(resolve, reject);
|
|
@@ -11,7 +11,7 @@ class ExtHostSaveParticipant {
|
|
|
11
11
|
constructor(extHostContext) {
|
|
12
12
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostDocumentSaveParticipant));
|
|
13
13
|
}
|
|
14
|
-
async participate(editorModel,
|
|
14
|
+
async participate(editorModel, context, _progress, token) {
|
|
15
15
|
if (!editorModel.textEditorModel || !shouldSynchronizeModel(editorModel.textEditorModel)) {
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
@@ -21,7 +21,7 @@ class ExtHostSaveParticipant {
|
|
|
21
21
|
'timeout.onWillSave',
|
|
22
22
|
"Aborted onWillSaveTextDocument-event after 1750ms"
|
|
23
23
|
))))), 1750);
|
|
24
|
-
this._proxy.$participateInSave(editorModel.resource,
|
|
24
|
+
this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
|
|
25
25
|
if (!values.every(success => success)) {
|
|
26
26
|
return Promise.reject(( new Error('listener failed')));
|
|
27
27
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
3
|
-
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
2
|
+
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
3
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
4
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
5
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -20,38 +19,44 @@ let MainThreadSpeech = class MainThreadSpeech {
|
|
|
20
19
|
this.logService.trace('[Speech] extension registered provider', metadata.extension.value);
|
|
21
20
|
const registration = this.speechService.registerSpeechProvider(identifier, {
|
|
22
21
|
metadata,
|
|
23
|
-
createSpeechToTextSession: token => {
|
|
22
|
+
createSpeechToTextSession: (token, options) => {
|
|
23
|
+
if (token.isCancellationRequested) {
|
|
24
|
+
return {
|
|
25
|
+
onDidChange: Event.None
|
|
26
|
+
};
|
|
27
|
+
}
|
|
24
28
|
const disposables = ( new DisposableStore());
|
|
25
|
-
const cts = ( new CancellationTokenSource(token));
|
|
26
29
|
const session = Math.random();
|
|
27
|
-
this.proxy.$createSpeechToTextSession(handle, session);
|
|
28
|
-
disposables.add(token.onCancellationRequested(() => this.proxy.$cancelSpeechToTextSession(session)));
|
|
30
|
+
this.proxy.$createSpeechToTextSession(handle, session, options?.language);
|
|
29
31
|
const onDidChange = disposables.add(( new Emitter()));
|
|
30
32
|
this.speechToTextSessions.set(session, { onDidChange });
|
|
33
|
+
disposables.add(token.onCancellationRequested(() => {
|
|
34
|
+
this.proxy.$cancelSpeechToTextSession(session);
|
|
35
|
+
this.speechToTextSessions.delete(session);
|
|
36
|
+
disposables.dispose();
|
|
37
|
+
}));
|
|
31
38
|
return {
|
|
32
|
-
onDidChange: onDidChange.event
|
|
33
|
-
dispose: () => {
|
|
34
|
-
cts.dispose(true);
|
|
35
|
-
this.speechToTextSessions.delete(session);
|
|
36
|
-
disposables.dispose();
|
|
37
|
-
}
|
|
39
|
+
onDidChange: onDidChange.event
|
|
38
40
|
};
|
|
39
41
|
},
|
|
40
42
|
createKeywordRecognitionSession: token => {
|
|
43
|
+
if (token.isCancellationRequested) {
|
|
44
|
+
return {
|
|
45
|
+
onDidChange: Event.None
|
|
46
|
+
};
|
|
47
|
+
}
|
|
41
48
|
const disposables = ( new DisposableStore());
|
|
42
|
-
const cts = ( new CancellationTokenSource(token));
|
|
43
49
|
const session = Math.random();
|
|
44
50
|
this.proxy.$createKeywordRecognitionSession(handle, session);
|
|
45
|
-
disposables.add(token.onCancellationRequested(() => this.proxy.$cancelKeywordRecognitionSession(session)));
|
|
46
51
|
const onDidChange = disposables.add(( new Emitter()));
|
|
47
52
|
this.keywordRecognitionSessions.set(session, { onDidChange });
|
|
53
|
+
disposables.add(token.onCancellationRequested(() => {
|
|
54
|
+
this.proxy.$cancelKeywordRecognitionSession(session);
|
|
55
|
+
this.keywordRecognitionSessions.delete(session);
|
|
56
|
+
disposables.dispose();
|
|
57
|
+
}));
|
|
48
58
|
return {
|
|
49
|
-
onDidChange: onDidChange.event
|
|
50
|
-
dispose: () => {
|
|
51
|
-
cts.dispose(true);
|
|
52
|
-
this.keywordRecognitionSessions.delete(session);
|
|
53
|
-
disposables.dispose();
|
|
54
|
-
}
|
|
59
|
+
onDidChange: onDidChange.event
|
|
55
60
|
};
|
|
56
61
|
}
|
|
57
62
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableStore, MutableDisposable, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
|
+
import { DisposableStore, MutableDisposable, combinedDisposable, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
4
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
5
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -38,6 +38,7 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
38
38
|
this._quickFixProviders = ( new Map());
|
|
39
39
|
this._dataEventTracker = ( new MutableDisposable());
|
|
40
40
|
this._sendCommandEventListener = ( new MutableDisposable());
|
|
41
|
+
this._linkProvider = this._store.add(( new MutableDisposable()));
|
|
41
42
|
this._os = OS;
|
|
42
43
|
this._proxy = ( _extHostContext.getProxy(ExtHostContext.ExtHostTerminalService));
|
|
43
44
|
this._store.add(_terminalService.onDidCreateInstance((instance) => {
|
|
@@ -76,7 +77,6 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
76
77
|
}
|
|
77
78
|
dispose() {
|
|
78
79
|
this._store.dispose();
|
|
79
|
-
this._linkProvider?.dispose();
|
|
80
80
|
for (const provider of ( this._profileProviders.values())) {
|
|
81
81
|
provider.dispose();
|
|
82
82
|
}
|
|
@@ -188,7 +188,7 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
const multiplexer = this._terminalService.createOnInstanceCapabilityEvent(2 , capability => capability.onCommandFinished);
|
|
191
|
-
multiplexer.event(e => {
|
|
191
|
+
const sub = multiplexer.event(e => {
|
|
192
192
|
this._onDidExecuteCommand(e.instance.instanceId, {
|
|
193
193
|
commandLine: e.data.command,
|
|
194
194
|
cwd: e.data.cwd,
|
|
@@ -196,18 +196,16 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
196
196
|
output: e.data.getOutput()
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
|
-
this._sendCommandEventListener.value = multiplexer;
|
|
199
|
+
this._sendCommandEventListener.value = combinedDisposable(multiplexer, sub);
|
|
200
200
|
}
|
|
201
201
|
$stopSendingCommandEvents() {
|
|
202
202
|
this._sendCommandEventListener.clear();
|
|
203
203
|
}
|
|
204
204
|
$startLinkProvider() {
|
|
205
|
-
this._linkProvider
|
|
206
|
-
this._linkProvider = this._terminalLinkProviderService.registerLinkProvider(( new ExtensionTerminalLinkProvider(this._proxy)));
|
|
205
|
+
this._linkProvider.value = this._terminalLinkProviderService.registerLinkProvider(( new ExtensionTerminalLinkProvider(this._proxy)));
|
|
207
206
|
}
|
|
208
207
|
$stopLinkProvider() {
|
|
209
|
-
this._linkProvider
|
|
210
|
-
this._linkProvider = undefined;
|
|
208
|
+
this._linkProvider.clear();
|
|
211
209
|
}
|
|
212
210
|
$registerProcessSupport(isSupported) {
|
|
213
211
|
this._terminalService.registerProcessSupport(isSupported);
|
|
@@ -136,18 +136,10 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
136
136
|
transient: workspace.transient
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
$startFileSearch(
|
|
139
|
+
$startFileSearch(_includeFolder, options, token) {
|
|
140
140
|
const includeFolder = URI.revive(_includeFolder);
|
|
141
141
|
const workspace = this._contextService.getWorkspace();
|
|
142
|
-
const query = this._queryBuilder.file(includeFolder ? [includeFolder] : workspace.folders,
|
|
143
|
-
maxResults: maxResults ?? undefined,
|
|
144
|
-
disregardExcludeSettings: (excludePatternOrDisregardExcludes === false) || undefined,
|
|
145
|
-
disregardSearchExcludeSettings: true,
|
|
146
|
-
disregardIgnoreFiles: true,
|
|
147
|
-
includePattern: includePattern ?? undefined,
|
|
148
|
-
excludePattern: typeof excludePatternOrDisregardExcludes === 'string' ? excludePatternOrDisregardExcludes : undefined,
|
|
149
|
-
_reason: 'startFileSearch'
|
|
150
|
-
});
|
|
142
|
+
const query = this._queryBuilder.file(includeFolder ? [includeFolder] : workspace.folders, options);
|
|
151
143
|
return this._searchService.fileSearch(query, token).then(result => {
|
|
152
144
|
return ( result.results.map(m => m.resource));
|
|
153
145
|
}, err => {
|
|
@@ -2,6 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { Barrier } from 'vscode/vscode/vs/base/common/async';
|
|
3
3
|
import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
|
|
4
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
|
+
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
5
6
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
7
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
7
8
|
import { mark } from 'vscode/vscode/vs/base/common/performance';
|
|
@@ -14,16 +15,19 @@ import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
|
14
15
|
import { ImplicitActivationEvents } from 'vscode/vscode/vs/platform/extensionManagement/common/implicitActivationEvents';
|
|
15
16
|
import { ExtensionIdentifierMap, ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
16
17
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
18
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
17
19
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
20
|
import { handleVetos } from '../../../../platform/lifecycle/common/lifecycle.js';
|
|
19
21
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
20
22
|
import { INotificationService, Severity } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
21
23
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
24
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
22
25
|
import { IRemoteAuthorityResolverService, RemoteAuthorityResolverError, getRemoteAuthorityPrefix, RemoteAuthorityResolverErrorCode } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
23
26
|
import { IRemoteExtensionsScannerService } from 'vscode/vscode/vs/platform/remote/common/remoteExtensionsScanner';
|
|
24
27
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
25
28
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
26
29
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
30
|
+
import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
27
31
|
import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
28
32
|
import { LockableExtensionDescriptionRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
|
29
33
|
import { parseExtensionDevOptions } from './extensionDevOptions.js';
|
|
@@ -233,6 +237,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
233
237
|
))
|
|
234
238
|
});
|
|
235
239
|
}
|
|
240
|
+
this._extensionsProposedApi.updateEnabledApiProposals(toAdd);
|
|
236
241
|
this._doHandleExtensionPoints([].concat(toAdd).concat(toRemove));
|
|
237
242
|
await this._updateExtensionsOnExtHosts(result.versionId, toAdd, ( toRemove.map(e => e.identifier)));
|
|
238
243
|
for (let i = 0; i < toAdd.length; i++) {
|
|
@@ -996,6 +1001,7 @@ class DeltaExtensionsQueueItem {
|
|
|
996
1001
|
}
|
|
997
1002
|
}
|
|
998
1003
|
function checkEnabledAndProposedAPI(logService, extensionEnablementService, extensionsProposedApi, extensions, ignoreWorkspaceTrust) {
|
|
1004
|
+
extensionsProposedApi.updateEnabledApiProposals(extensions);
|
|
999
1005
|
return filterEnabledExtensions(logService, extensionEnablementService, extensions, ignoreWorkspaceTrust);
|
|
1000
1006
|
}
|
|
1001
1007
|
function filterEnabledExtensions(logService, extensionEnablementService, extensions, ignoreWorkspaceTrust) {
|
|
@@ -1094,5 +1100,39 @@ class ImplicitActivationAwareReader {
|
|
|
1094
1100
|
return ImplicitActivationEvents.readActivationEvents(extensionDescription);
|
|
1095
1101
|
}
|
|
1096
1102
|
}
|
|
1103
|
+
class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
1104
|
+
constructor() {
|
|
1105
|
+
super(...arguments);
|
|
1106
|
+
this.type = 'markdown';
|
|
1107
|
+
}
|
|
1108
|
+
shouldRender(manifest) {
|
|
1109
|
+
return !!manifest.activationEvents;
|
|
1110
|
+
}
|
|
1111
|
+
render(manifest) {
|
|
1112
|
+
const activationEvents = manifest.activationEvents || [];
|
|
1113
|
+
const data = ( new MarkdownString());
|
|
1114
|
+
if (activationEvents.length) {
|
|
1115
|
+
for (const activationEvent of activationEvents) {
|
|
1116
|
+
data.appendMarkdown(`- \`${activationEvent}\`\n`);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
return {
|
|
1120
|
+
data,
|
|
1121
|
+
dispose: () => { }
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
1126
|
+
id: 'activationEvents',
|
|
1127
|
+
label: ( localizeWithPath(
|
|
1128
|
+
'vs/workbench/services/extensions/common/abstractExtensionService',
|
|
1129
|
+
'activation',
|
|
1130
|
+
"Activation Events"
|
|
1131
|
+
)),
|
|
1132
|
+
access: {
|
|
1133
|
+
canToggle: false
|
|
1134
|
+
},
|
|
1135
|
+
renderer: ( new SyncDescriptor(ActivationFeatureMarkdowneRenderer)),
|
|
1136
|
+
});
|
|
1097
1137
|
|
|
1098
1138
|
export { AbstractExtensionService, DeltaExtensionsQueueItem, ExtensionHostCrashTracker, ExtensionStatus, ImplicitActivationAwareReader, ResolvedExtensions, checkEnabledAndProposedAPI, filterEnabledExtensions };
|
|
@@ -5,7 +5,7 @@ import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
|
5
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
6
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { StopWatch } from 'vscode/vscode/vs/base/common/stopwatch';
|
|
8
|
-
import {
|
|
8
|
+
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
9
9
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
10
10
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
11
11
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -171,19 +171,21 @@ let ExtensionHostManager = ExtensionHostManager_1 = class ExtensionHostManager e
|
|
|
171
171
|
this._rpcProtocol = ( new RPCProtocol(protocol, logger));
|
|
172
172
|
this._register(this._rpcProtocol.onDidChangeResponsiveState((responsiveState) => this._onDidChangeResponsiveState.fire(responsiveState)));
|
|
173
173
|
let extensionHostProxy = null;
|
|
174
|
+
let mainProxyIdentifiers = [];
|
|
174
175
|
const extHostContext = {
|
|
175
176
|
remoteAuthority: this._extensionHost.remoteAuthority,
|
|
176
177
|
extensionHostKind: this.kind,
|
|
177
178
|
getProxy: (identifier) => ( this._rpcProtocol.getProxy(identifier)),
|
|
178
179
|
set: (identifier, instance) => this._rpcProtocol.set(identifier, instance),
|
|
179
180
|
dispose: () => this._rpcProtocol.dispose(),
|
|
180
|
-
assertRegistered: (identifiers) =>
|
|
181
|
+
assertRegistered: (identifiers) => this._rpcProtocol.assertRegistered(identifiers),
|
|
181
182
|
drain: () => this._rpcProtocol.drain(),
|
|
182
183
|
internalExtensionService: this._internalExtensionService,
|
|
183
184
|
_setExtensionHostProxy: (value) => {
|
|
184
185
|
extensionHostProxy = value;
|
|
185
186
|
},
|
|
186
187
|
_setAllMainProxyIdentifiers: (value) => {
|
|
188
|
+
mainProxyIdentifiers = value;
|
|
187
189
|
},
|
|
188
190
|
};
|
|
189
191
|
const namedCustomers = ExtHostCustomersRegistry.getNamedCustomers();
|
|
@@ -214,6 +216,7 @@ let ExtensionHostManager = ExtensionHostManager_1 = class ExtensionHostManager e
|
|
|
214
216
|
if (!extensionHostProxy) {
|
|
215
217
|
throw new Error(`Missing IExtensionHostProxy!`);
|
|
216
218
|
}
|
|
219
|
+
this._rpcProtocol.assertRegistered(mainProxyIdentifiers);
|
|
217
220
|
return extensionHostProxy;
|
|
218
221
|
}
|
|
219
222
|
async activate(extension, reason) {
|
|
@@ -475,14 +478,11 @@ registerAction2(class MeasureExtHostLatencyAction extends Action2 {
|
|
|
475
478
|
constructor() {
|
|
476
479
|
super({
|
|
477
480
|
id: 'editor.action.measureExtHostLatency',
|
|
478
|
-
title:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
)),
|
|
484
|
-
original: 'Measure Extension Host Latency'
|
|
485
|
-
},
|
|
481
|
+
title: ( localize2WithPath(
|
|
482
|
+
'vs/workbench/services/extensions/common/extensionHostManager',
|
|
483
|
+
'measureExtHostLatency',
|
|
484
|
+
"Measure Extension Host Latency"
|
|
485
|
+
)),
|
|
486
486
|
category: Categories.Developer,
|
|
487
487
|
f1: true
|
|
488
488
|
});
|