@codingame/monaco-vscode-extensions-service-override 2.2.2 → 3.1.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 +3 -3
- package/package.json +9 -9
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +497 -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
|
@@ -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
|
});
|