@codingame/monaco-vscode-extensions-service-override 4.0.0 → 4.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 +6 -6
- package/package.json +9 -9
- package/_virtual/semver.js +0 -3
- package/external/vscode-semver/semver.js +0 -985
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -8
- package/vscode/src/vs/base/common/console.js +0 -62
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +0 -497
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -44
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -27
- package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -98
- package/vscode/src/vs/workbench/api/browser/extensionHost.contribution.js +0 -104
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -254
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +0 -103
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +0 -207
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -108
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -560
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -579
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -435
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -102
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -69
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -79
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -253
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -370
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -414
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -501
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -317
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -208
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -369
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -1016
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +0 -185
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -93
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -137
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -194
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -123
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -188
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -129
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -131
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +0 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -185
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -493
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -168
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +0 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -731
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -409
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +0 -51
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -219
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -312
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -223
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -110
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -61
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -283
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -135
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -57
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -268
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -35
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -76
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -83
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -285
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -276
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -52
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1149
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -41
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -25
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -512
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -274
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -58
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -80
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +0 -64
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +0 -161
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -49
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -222
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
3
|
-
import { dispose, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
6
|
-
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
7
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
-
import { ISearchService } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
9
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
10
|
-
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
11
|
-
import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
|
|
12
|
-
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
13
|
-
|
|
14
|
-
let MainThreadSearch = class MainThreadSearch {
|
|
15
|
-
constructor(extHostContext, _searchService, _telemetryService, _configurationService, contextKeyService) {
|
|
16
|
-
this._searchService = _searchService;
|
|
17
|
-
this._telemetryService = _telemetryService;
|
|
18
|
-
this.contextKeyService = contextKeyService;
|
|
19
|
-
this._searchProvider = ( new Map());
|
|
20
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSearch));
|
|
21
|
-
this._proxy.$enableExtensionHostSearch();
|
|
22
|
-
}
|
|
23
|
-
dispose() {
|
|
24
|
-
this._searchProvider.forEach(value => value.dispose());
|
|
25
|
-
this._searchProvider.clear();
|
|
26
|
-
}
|
|
27
|
-
$registerTextSearchProvider(handle, scheme) {
|
|
28
|
-
this._searchProvider.set(handle, ( new RemoteSearchProvider(
|
|
29
|
-
this._searchService,
|
|
30
|
-
1 ,
|
|
31
|
-
scheme,
|
|
32
|
-
handle,
|
|
33
|
-
this._proxy
|
|
34
|
-
)));
|
|
35
|
-
}
|
|
36
|
-
$registerAITextSearchProvider(handle, scheme) {
|
|
37
|
-
SearchContext.hasAIResultProvider.bindTo(this.contextKeyService).set(true);
|
|
38
|
-
this._searchProvider.set(handle, ( new RemoteSearchProvider(
|
|
39
|
-
this._searchService,
|
|
40
|
-
2 ,
|
|
41
|
-
scheme,
|
|
42
|
-
handle,
|
|
43
|
-
this._proxy
|
|
44
|
-
)));
|
|
45
|
-
}
|
|
46
|
-
$registerFileSearchProvider(handle, scheme) {
|
|
47
|
-
this._searchProvider.set(handle, ( new RemoteSearchProvider(
|
|
48
|
-
this._searchService,
|
|
49
|
-
0 ,
|
|
50
|
-
scheme,
|
|
51
|
-
handle,
|
|
52
|
-
this._proxy
|
|
53
|
-
)));
|
|
54
|
-
}
|
|
55
|
-
$unregisterProvider(handle) {
|
|
56
|
-
dispose(this._searchProvider.get(handle));
|
|
57
|
-
this._searchProvider.delete(handle);
|
|
58
|
-
}
|
|
59
|
-
$handleFileMatch(handle, session, data) {
|
|
60
|
-
const provider = this._searchProvider.get(handle);
|
|
61
|
-
if (!provider) {
|
|
62
|
-
throw new Error('Got result for unknown provider');
|
|
63
|
-
}
|
|
64
|
-
provider.handleFindMatch(session, data);
|
|
65
|
-
}
|
|
66
|
-
$handleTextMatch(handle, session, data) {
|
|
67
|
-
const provider = this._searchProvider.get(handle);
|
|
68
|
-
if (!provider) {
|
|
69
|
-
throw new Error('Got result for unknown provider');
|
|
70
|
-
}
|
|
71
|
-
provider.handleFindMatch(session, data);
|
|
72
|
-
}
|
|
73
|
-
$handleTelemetry(eventName, data) {
|
|
74
|
-
this._telemetryService.publicLog(eventName, data);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
MainThreadSearch = __decorate([
|
|
78
|
-
extHostNamedCustomer(MainContext.MainThreadSearch),
|
|
79
|
-
( __param(1, ISearchService)),
|
|
80
|
-
( __param(2, ITelemetryService)),
|
|
81
|
-
( __param(3, IConfigurationService)),
|
|
82
|
-
( __param(4, IContextKeyService))
|
|
83
|
-
], MainThreadSearch);
|
|
84
|
-
class SearchOperation {
|
|
85
|
-
static { this._idPool = 0; }
|
|
86
|
-
constructor(progress, id = ++SearchOperation._idPool, matches = ( new Map())) {
|
|
87
|
-
this.progress = progress;
|
|
88
|
-
this.id = id;
|
|
89
|
-
this.matches = matches;
|
|
90
|
-
}
|
|
91
|
-
addMatch(match) {
|
|
92
|
-
const existingMatch = this.matches.get(( match.resource.toString()));
|
|
93
|
-
if (existingMatch) {
|
|
94
|
-
if (existingMatch.results && match.results) {
|
|
95
|
-
existingMatch.results.push(...match.results);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
this.matches.set(( match.resource.toString()), match);
|
|
100
|
-
}
|
|
101
|
-
this.progress?.(match);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
class RemoteSearchProvider {
|
|
105
|
-
constructor(searchService, type, _scheme, _handle, _proxy) {
|
|
106
|
-
this._scheme = _scheme;
|
|
107
|
-
this._handle = _handle;
|
|
108
|
-
this._proxy = _proxy;
|
|
109
|
-
this._registrations = ( new DisposableStore());
|
|
110
|
-
this._searches = ( new Map());
|
|
111
|
-
this._registrations.add(searchService.registerSearchResultProvider(this._scheme, type, this));
|
|
112
|
-
}
|
|
113
|
-
dispose() {
|
|
114
|
-
this._registrations.dispose();
|
|
115
|
-
}
|
|
116
|
-
fileSearch(query, token = CancellationToken.None) {
|
|
117
|
-
return this.doSearch(query, undefined, token);
|
|
118
|
-
}
|
|
119
|
-
textSearch(query, onProgress, token = CancellationToken.None) {
|
|
120
|
-
return this.doSearch(query, onProgress, token);
|
|
121
|
-
}
|
|
122
|
-
doSearch(query, onProgress, token = CancellationToken.None) {
|
|
123
|
-
if (!query.folderQueries.length) {
|
|
124
|
-
throw new Error('Empty folderQueries');
|
|
125
|
-
}
|
|
126
|
-
const search = ( new SearchOperation(onProgress));
|
|
127
|
-
this._searches.set(search.id, search);
|
|
128
|
-
const searchP = this._provideSearchResults(query, search.id, token);
|
|
129
|
-
return Promise.resolve(searchP).then((result) => {
|
|
130
|
-
this._searches.delete(search.id);
|
|
131
|
-
return { results: Array.from(( search.matches.values())), stats: result.stats, limitHit: result.limitHit, messages: result.messages };
|
|
132
|
-
}, err => {
|
|
133
|
-
this._searches.delete(search.id);
|
|
134
|
-
return Promise.reject(err);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
clearCache(cacheKey) {
|
|
138
|
-
return Promise.resolve(this._proxy.$clearCache(cacheKey));
|
|
139
|
-
}
|
|
140
|
-
handleFindMatch(session, dataOrUri) {
|
|
141
|
-
const searchOp = this._searches.get(session);
|
|
142
|
-
if (!searchOp) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
dataOrUri.forEach(result => {
|
|
146
|
-
if (result.results) {
|
|
147
|
-
searchOp.addMatch(revive(result));
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
searchOp.addMatch({
|
|
151
|
-
resource: URI.revive(result)
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
_provideSearchResults(query, session, token) {
|
|
157
|
-
switch (query.type) {
|
|
158
|
-
case 1 :
|
|
159
|
-
return this._proxy.$provideFileSearchResults(this._handle, session, query, token);
|
|
160
|
-
case 2 :
|
|
161
|
-
return this._proxy.$provideTextSearchResults(this._handle, session, query, token);
|
|
162
|
-
default:
|
|
163
|
-
return this._proxy.$provideAITextSearchResults(this._handle, session, query, token);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { MainThreadSearch };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
4
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
|
-
import { SequencerByKey } from 'vscode/vscode/vs/base/common/async';
|
|
7
|
-
import { ISecretStorageService } from 'vscode/vscode/vs/platform/secrets/common/secrets';
|
|
8
|
-
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService';
|
|
9
|
-
|
|
10
|
-
let MainThreadSecretState = class MainThreadSecretState extends Disposable {
|
|
11
|
-
constructor(extHostContext, secretStorageService, logService, environmentService) {
|
|
12
|
-
super();
|
|
13
|
-
this.secretStorageService = secretStorageService;
|
|
14
|
-
this.logService = logService;
|
|
15
|
-
this._sequencer = ( new SequencerByKey());
|
|
16
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSecretState));
|
|
17
|
-
this._register(this.secretStorageService.onDidChangeSecret((e) => {
|
|
18
|
-
try {
|
|
19
|
-
const { extensionId, key } = this.parseKey(e);
|
|
20
|
-
if (extensionId && key) {
|
|
21
|
-
this._proxy.$onDidChangePassword({ extensionId, key });
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
catch (e) {
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
$getPassword(extensionId, key) {
|
|
29
|
-
this.logService.trace(`[mainThreadSecretState] Getting password for ${extensionId} extension: `, key);
|
|
30
|
-
return this._sequencer.queue(extensionId, () => this.doGetPassword(extensionId, key));
|
|
31
|
-
}
|
|
32
|
-
async doGetPassword(extensionId, key) {
|
|
33
|
-
const fullKey = this.getKey(extensionId, key);
|
|
34
|
-
const password = await this.secretStorageService.get(fullKey);
|
|
35
|
-
this.logService.trace(`[mainThreadSecretState] ${password ? 'P' : 'No p'}assword found for: `, extensionId, key);
|
|
36
|
-
return password;
|
|
37
|
-
}
|
|
38
|
-
$setPassword(extensionId, key, value) {
|
|
39
|
-
this.logService.trace(`[mainThreadSecretState] Setting password for ${extensionId} extension: `, key);
|
|
40
|
-
return this._sequencer.queue(extensionId, () => this.doSetPassword(extensionId, key, value));
|
|
41
|
-
}
|
|
42
|
-
async doSetPassword(extensionId, key, value) {
|
|
43
|
-
const fullKey = this.getKey(extensionId, key);
|
|
44
|
-
await this.secretStorageService.set(fullKey, value);
|
|
45
|
-
this.logService.trace('[mainThreadSecretState] Password set for: ', extensionId, key);
|
|
46
|
-
}
|
|
47
|
-
$deletePassword(extensionId, key) {
|
|
48
|
-
this.logService.trace(`[mainThreadSecretState] Deleting password for ${extensionId} extension: `, key);
|
|
49
|
-
return this._sequencer.queue(extensionId, () => this.doDeletePassword(extensionId, key));
|
|
50
|
-
}
|
|
51
|
-
async doDeletePassword(extensionId, key) {
|
|
52
|
-
const fullKey = this.getKey(extensionId, key);
|
|
53
|
-
await this.secretStorageService.delete(fullKey);
|
|
54
|
-
this.logService.trace('[mainThreadSecretState] Password deleted for: ', extensionId, key);
|
|
55
|
-
}
|
|
56
|
-
getKey(extensionId, key) {
|
|
57
|
-
return JSON.stringify({ extensionId, key });
|
|
58
|
-
}
|
|
59
|
-
parseKey(key) {
|
|
60
|
-
return JSON.parse(key);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
MainThreadSecretState = __decorate([
|
|
64
|
-
extHostNamedCustomer(MainContext.MainThreadSecretState),
|
|
65
|
-
( __param(1, ISecretStorageService)),
|
|
66
|
-
( __param(2, ILogService)),
|
|
67
|
-
( __param(3, IBrowserWorkbenchEnvironmentService))
|
|
68
|
-
], MainThreadSecretState);
|
|
69
|
-
|
|
70
|
-
export { MainThreadSecretState };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
3
|
-
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
|
-
import { IShareService } from 'vscode/vscode/vs/workbench/contrib/share/common/share';
|
|
7
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
-
|
|
9
|
-
let MainThreadShare = class MainThreadShare {
|
|
10
|
-
constructor(extHostContext, shareService) {
|
|
11
|
-
this.shareService = shareService;
|
|
12
|
-
this.providers = ( new Map());
|
|
13
|
-
this.providerDisposables = ( new Map());
|
|
14
|
-
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostShare));
|
|
15
|
-
}
|
|
16
|
-
$registerShareProvider(handle, selector, id, label, priority) {
|
|
17
|
-
const provider = {
|
|
18
|
-
id,
|
|
19
|
-
label,
|
|
20
|
-
selector,
|
|
21
|
-
priority,
|
|
22
|
-
provideShare: async (item) => {
|
|
23
|
-
const result = await this.proxy.$provideShare(handle, item, CancellationToken.None);
|
|
24
|
-
return typeof result === 'string' ? result : URI.revive(result);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.providers.set(handle, provider);
|
|
28
|
-
const disposable = this.shareService.registerShareProvider(provider);
|
|
29
|
-
this.providerDisposables.set(handle, disposable);
|
|
30
|
-
}
|
|
31
|
-
$unregisterShareProvider(handle) {
|
|
32
|
-
if (( this.providers.has(handle))) {
|
|
33
|
-
this.providers.delete(handle);
|
|
34
|
-
}
|
|
35
|
-
if (( this.providerDisposables.has(handle))) {
|
|
36
|
-
this.providerDisposables.delete(handle);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
dispose() {
|
|
40
|
-
this.providers.clear();
|
|
41
|
-
dispose(( this.providerDisposables.values()));
|
|
42
|
-
this.providerDisposables.clear();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
MainThreadShare = __decorate([
|
|
46
|
-
extHostNamedCustomer(MainContext.MainThreadShare),
|
|
47
|
-
( __param(1, IShareService))
|
|
48
|
-
], MainThreadShare);
|
|
49
|
-
|
|
50
|
-
export { MainThreadShare };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
5
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
|
-
import { ISpeechService } from 'vscode/vscode/vs/workbench/contrib/speech/common/speechService';
|
|
7
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
-
|
|
9
|
-
let MainThreadSpeech = class MainThreadSpeech {
|
|
10
|
-
constructor(extHostContext, speechService, logService) {
|
|
11
|
-
this.speechService = speechService;
|
|
12
|
-
this.logService = logService;
|
|
13
|
-
this.providerRegistrations = ( new Map());
|
|
14
|
-
this.speechToTextSessions = ( new Map());
|
|
15
|
-
this.keywordRecognitionSessions = ( new Map());
|
|
16
|
-
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSpeech));
|
|
17
|
-
}
|
|
18
|
-
$registerProvider(handle, identifier, metadata) {
|
|
19
|
-
this.logService.trace('[Speech] extension registered provider', metadata.extension.value);
|
|
20
|
-
const registration = this.speechService.registerSpeechProvider(identifier, {
|
|
21
|
-
metadata,
|
|
22
|
-
createSpeechToTextSession: (token, options) => {
|
|
23
|
-
if (token.isCancellationRequested) {
|
|
24
|
-
return {
|
|
25
|
-
onDidChange: Event.None
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const disposables = ( new DisposableStore());
|
|
29
|
-
const session = Math.random();
|
|
30
|
-
this.proxy.$createSpeechToTextSession(handle, session, options?.language);
|
|
31
|
-
const onDidChange = disposables.add(( new Emitter()));
|
|
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
|
-
}));
|
|
38
|
-
return {
|
|
39
|
-
onDidChange: onDidChange.event
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
createKeywordRecognitionSession: token => {
|
|
43
|
-
if (token.isCancellationRequested) {
|
|
44
|
-
return {
|
|
45
|
-
onDidChange: Event.None
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const disposables = ( new DisposableStore());
|
|
49
|
-
const session = Math.random();
|
|
50
|
-
this.proxy.$createKeywordRecognitionSession(handle, session);
|
|
51
|
-
const onDidChange = disposables.add(( new Emitter()));
|
|
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
|
-
}));
|
|
58
|
-
return {
|
|
59
|
-
onDidChange: onDidChange.event
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
this.providerRegistrations.set(handle, {
|
|
64
|
-
dispose: () => {
|
|
65
|
-
registration.dispose();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
$unregisterProvider(handle) {
|
|
70
|
-
const registration = this.providerRegistrations.get(handle);
|
|
71
|
-
if (registration) {
|
|
72
|
-
registration.dispose();
|
|
73
|
-
this.providerRegistrations.delete(handle);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
$emitSpeechToTextEvent(session, event) {
|
|
77
|
-
const providerSession = this.speechToTextSessions.get(session);
|
|
78
|
-
providerSession?.onDidChange.fire(event);
|
|
79
|
-
}
|
|
80
|
-
$emitKeywordRecognitionEvent(session, event) {
|
|
81
|
-
const providerSession = this.keywordRecognitionSessions.get(session);
|
|
82
|
-
providerSession?.onDidChange.fire(event);
|
|
83
|
-
}
|
|
84
|
-
dispose() {
|
|
85
|
-
this.providerRegistrations.forEach(disposable => disposable.dispose());
|
|
86
|
-
this.providerRegistrations.clear();
|
|
87
|
-
this.speechToTextSessions.forEach(session => session.onDidChange.dispose());
|
|
88
|
-
this.speechToTextSessions.clear();
|
|
89
|
-
this.keywordRecognitionSessions.forEach(session => session.onDidChange.dispose());
|
|
90
|
-
this.keywordRecognitionSessions.clear();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
MainThreadSpeech = __decorate([
|
|
94
|
-
extHostNamedCustomer(MainContext.MainThreadSpeech),
|
|
95
|
-
( __param(1, ISpeechService)),
|
|
96
|
-
( __param(2, ILogService))
|
|
97
|
-
], MainThreadSpeech);
|
|
98
|
-
|
|
99
|
-
export { MainThreadSpeech };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
3
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
4
|
-
import { DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { IExtensionStatusBarItemService } from 'vscode/vscode/vs/workbench/api/browser/statusBarExtensionPoint';
|
|
6
|
-
|
|
7
|
-
let MainThreadStatusBar = class MainThreadStatusBar {
|
|
8
|
-
constructor(extHostContext, statusbarService) {
|
|
9
|
-
this.statusbarService = statusbarService;
|
|
10
|
-
this._store = ( new DisposableStore());
|
|
11
|
-
const proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostStatusBar));
|
|
12
|
-
const entries = [];
|
|
13
|
-
for (const [entryId, item] of statusbarService.getEntries()) {
|
|
14
|
-
entries.push(asDto(entryId, item));
|
|
15
|
-
}
|
|
16
|
-
proxy.$acceptStaticEntries(entries);
|
|
17
|
-
this._store.add(statusbarService.onDidChange(e => {
|
|
18
|
-
if (e.added) {
|
|
19
|
-
proxy.$acceptStaticEntries([asDto(e.added[0], e.added[1])]);
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
function asDto(entryId, item) {
|
|
23
|
-
return {
|
|
24
|
-
entryId,
|
|
25
|
-
name: item.entry.name,
|
|
26
|
-
text: item.entry.text,
|
|
27
|
-
tooltip: item.entry.tooltip,
|
|
28
|
-
command: typeof item.entry.command === 'string' ? item.entry.command : typeof item.entry.command === 'object' ? item.entry.command.id : undefined,
|
|
29
|
-
priority: item.priority,
|
|
30
|
-
alignLeft: item.alignment === 0 ,
|
|
31
|
-
accessibilityInformation: item.entry.ariaLabel ? { label: item.entry.ariaLabel, role: item.entry.role } : undefined
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
dispose() {
|
|
36
|
-
this._store.dispose();
|
|
37
|
-
}
|
|
38
|
-
$setEntry(entryId, id, extensionId, name, text, tooltip, command, color, backgroundColor, alignLeft, priority, accessibilityInformation) {
|
|
39
|
-
const kind = this.statusbarService.setOrUpdateEntry(entryId, id, extensionId, name, text, tooltip, command, color, backgroundColor, alignLeft, priority, accessibilityInformation);
|
|
40
|
-
if (kind === 0 ) {
|
|
41
|
-
this._store.add(toDisposable(() => this.statusbarService.unsetEntry(entryId)));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
$disposeEntry(entryId) {
|
|
45
|
-
this.statusbarService.unsetEntry(entryId);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
MainThreadStatusBar = __decorate([
|
|
49
|
-
extHostNamedCustomer(MainContext.MainThreadStatusBar),
|
|
50
|
-
( __param(1, IExtensionStatusBarItemService))
|
|
51
|
-
], MainThreadStatusBar);
|
|
52
|
-
|
|
53
|
-
export { MainThreadStatusBar };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
3
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
-
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
7
|
-
import { IExtensionStorageService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionStorage';
|
|
8
|
-
import { migrateExtensionStorage } from '../../services/extensions/common/extensionStorageMigration.js';
|
|
9
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
11
|
-
|
|
12
|
-
let MainThreadStorage = class MainThreadStorage {
|
|
13
|
-
constructor(extHostContext, _extensionStorageService, _storageService, _instantiationService, _logService) {
|
|
14
|
-
this._extensionStorageService = _extensionStorageService;
|
|
15
|
-
this._storageService = _storageService;
|
|
16
|
-
this._instantiationService = _instantiationService;
|
|
17
|
-
this._logService = _logService;
|
|
18
|
-
this._storageListener = ( new DisposableStore());
|
|
19
|
-
this._sharedStorageKeysToWatch = ( new Map());
|
|
20
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostStorage));
|
|
21
|
-
this._storageListener.add(this._storageService.onDidChangeValue(0 , undefined, this._storageListener)(e => {
|
|
22
|
-
if (( this._sharedStorageKeysToWatch.has(e.key))) {
|
|
23
|
-
const rawState = this._extensionStorageService.getExtensionStateRaw(e.key, true);
|
|
24
|
-
if (typeof rawState === 'string') {
|
|
25
|
-
this._proxy.$acceptValue(true, e.key, rawState);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
dispose() {
|
|
31
|
-
this._storageListener.dispose();
|
|
32
|
-
}
|
|
33
|
-
async $initializeExtensionStorage(shared, extensionId) {
|
|
34
|
-
await this.checkAndMigrateExtensionStorage(extensionId, shared);
|
|
35
|
-
if (shared) {
|
|
36
|
-
this._sharedStorageKeysToWatch.set(extensionId, true);
|
|
37
|
-
}
|
|
38
|
-
return this._extensionStorageService.getExtensionStateRaw(extensionId, shared);
|
|
39
|
-
}
|
|
40
|
-
async $setValue(shared, key, value) {
|
|
41
|
-
this._extensionStorageService.setExtensionState(key, value, shared);
|
|
42
|
-
}
|
|
43
|
-
$registerExtensionStorageKeysToSync(extension, keys) {
|
|
44
|
-
this._extensionStorageService.setKeysForSync(extension, keys);
|
|
45
|
-
}
|
|
46
|
-
async checkAndMigrateExtensionStorage(extensionId, shared) {
|
|
47
|
-
try {
|
|
48
|
-
let sourceExtensionId = this._extensionStorageService.getSourceExtensionToMigrate(extensionId);
|
|
49
|
-
if (!sourceExtensionId && isWeb && extensionId !== extensionId.toLowerCase()) {
|
|
50
|
-
sourceExtensionId = extensionId.toLowerCase();
|
|
51
|
-
}
|
|
52
|
-
if (sourceExtensionId) {
|
|
53
|
-
if (isWeb && sourceExtensionId !== sourceExtensionId.toLowerCase() && this._extensionStorageService.getExtensionState(sourceExtensionId.toLowerCase(), shared) && !this._extensionStorageService.getExtensionState(sourceExtensionId, shared)) {
|
|
54
|
-
sourceExtensionId = sourceExtensionId.toLowerCase();
|
|
55
|
-
}
|
|
56
|
-
await migrateExtensionStorage(sourceExtensionId, extensionId, shared, this._instantiationService);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
this._logService.error(error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
MainThreadStorage = __decorate([
|
|
65
|
-
extHostNamedCustomer(MainContext.MainThreadStorage),
|
|
66
|
-
( __param(1, IExtensionStorageService)),
|
|
67
|
-
( __param(2, IStorageService)),
|
|
68
|
-
( __param(3, IInstantiationService)),
|
|
69
|
-
( __param(4, ILogService))
|
|
70
|
-
], MainThreadStorage);
|
|
71
|
-
|
|
72
|
-
export { MainThreadStorage };
|