@codingame/monaco-vscode-extensions-service-override 4.1.0 → 4.1.1
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/_virtual/semver.js +3 -0
- package/extensions.js +6 -6
- package/external/vscode-semver/semver.js +985 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/package.json +9 -9
- package/vscode/src/vs/base/common/console.js +62 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +497 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +44 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -0
- package/vscode/src/vs/workbench/api/browser/extensionHost.contribution.js +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +254 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +103 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +207 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +98 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +560 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +579 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +435 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +102 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +69 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +79 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +253 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +414 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +501 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +227 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +317 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +208 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +369 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1016 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +137 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +194 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +123 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +188 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +129 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +131 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +374 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +48 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +76 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +493 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +168 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +99 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +731 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +409 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +51 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +219 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +55 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +312 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +223 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +110 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +100 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +135 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +268 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +76 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +285 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +276 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1149 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +41 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +25 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +512 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +274 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +58 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +80 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +64 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +161 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +222 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
4
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
+
import { IUserDataProfileImportExportService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
7
|
+
|
|
8
|
+
let MainThreadProfileContentHandlers = class MainThreadProfileContentHandlers extends Disposable {
|
|
9
|
+
constructor(context, userDataProfileImportExportService) {
|
|
10
|
+
super();
|
|
11
|
+
this.userDataProfileImportExportService = userDataProfileImportExportService;
|
|
12
|
+
this.registeredHandlers = this._register(( new DisposableMap()));
|
|
13
|
+
this.proxy = ( context.getProxy(ExtHostContext.ExtHostProfileContentHandlers));
|
|
14
|
+
}
|
|
15
|
+
async $registerProfileContentHandler(id, name, description, extensionId) {
|
|
16
|
+
this.registeredHandlers.set(id, this.userDataProfileImportExportService.registerProfileContentHandler(id, {
|
|
17
|
+
name,
|
|
18
|
+
description,
|
|
19
|
+
extensionId,
|
|
20
|
+
saveProfile: async (name, content, token) => {
|
|
21
|
+
const result = await this.proxy.$saveProfile(id, name, content, token);
|
|
22
|
+
return result ? revive(result) : null;
|
|
23
|
+
},
|
|
24
|
+
readProfile: async (uri, token) => {
|
|
25
|
+
return this.proxy.$readProfile(id, uri, token);
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
async $unregisterProfileContentHandler(id) {
|
|
30
|
+
this.registeredHandlers.deleteAndDispose(id);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
MainThreadProfileContentHandlers = __decorate([
|
|
34
|
+
extHostNamedCustomer(MainContext.MainThreadProfileContentHandlers),
|
|
35
|
+
( __param(1, IUserDataProfileImportExportService))
|
|
36
|
+
], MainThreadProfileContentHandlers);
|
|
37
|
+
|
|
38
|
+
export { MainThreadProfileContentHandlers };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
3
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
+
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
6
|
+
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
7
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
8
|
+
|
|
9
|
+
class ManageExtensionAction extends Action {
|
|
10
|
+
constructor(extensionId, label, commandService) {
|
|
11
|
+
super(extensionId, label, undefined, true, () => {
|
|
12
|
+
return commandService.executeCommand('_extensions.manage', extensionId);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
let MainThreadProgress = class MainThreadProgress {
|
|
17
|
+
constructor(extHostContext, progressService, _commandService) {
|
|
18
|
+
this._commandService = _commandService;
|
|
19
|
+
this._progress = ( new Map());
|
|
20
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostProgress));
|
|
21
|
+
this._progressService = progressService;
|
|
22
|
+
}
|
|
23
|
+
dispose() {
|
|
24
|
+
this._progress.forEach(handle => handle.resolve());
|
|
25
|
+
this._progress.clear();
|
|
26
|
+
}
|
|
27
|
+
async $startProgress(handle, options, extensionId) {
|
|
28
|
+
const task = this._createTask(handle);
|
|
29
|
+
if (options.location === 15 && extensionId) {
|
|
30
|
+
const notificationOptions = {
|
|
31
|
+
...options,
|
|
32
|
+
location: 15 ,
|
|
33
|
+
secondaryActions: [( new ManageExtensionAction(extensionId, ( localizeWithPath(
|
|
34
|
+
'vs/workbench/api/browser/mainThreadProgress',
|
|
35
|
+
'manageExtension',
|
|
36
|
+
"Manage Extension"
|
|
37
|
+
)), this._commandService))]
|
|
38
|
+
};
|
|
39
|
+
options = notificationOptions;
|
|
40
|
+
}
|
|
41
|
+
this._progressService.withProgress(options, task, () => this._proxy.$acceptProgressCanceled(handle));
|
|
42
|
+
}
|
|
43
|
+
$progressReport(handle, message) {
|
|
44
|
+
const entry = this._progress.get(handle);
|
|
45
|
+
entry?.progress.report(message);
|
|
46
|
+
}
|
|
47
|
+
$progressEnd(handle) {
|
|
48
|
+
const entry = this._progress.get(handle);
|
|
49
|
+
if (entry) {
|
|
50
|
+
entry.resolve();
|
|
51
|
+
this._progress.delete(handle);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_createTask(handle) {
|
|
55
|
+
return (progress) => {
|
|
56
|
+
return ( new Promise(resolve => {
|
|
57
|
+
this._progress.set(handle, { resolve, progress });
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
MainThreadProgress = __decorate([
|
|
63
|
+
extHostNamedCustomer(MainContext.MainThreadProgress),
|
|
64
|
+
( __param(1, IProgressService)),
|
|
65
|
+
( __param(2, ICommandService))
|
|
66
|
+
], MainThreadProgress);
|
|
67
|
+
|
|
68
|
+
export { MainThreadProgress };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
3
|
+
import { DisposableMap } 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 { IQuickDiffService } from 'vscode/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
7
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
+
|
|
9
|
+
let MainThreadQuickDiff = class MainThreadQuickDiff {
|
|
10
|
+
constructor(extHostContext, quickDiffService) {
|
|
11
|
+
this.quickDiffService = quickDiffService;
|
|
12
|
+
this.providerDisposables = ( new DisposableMap());
|
|
13
|
+
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostQuickDiff));
|
|
14
|
+
}
|
|
15
|
+
async $registerQuickDiffProvider(handle, selector, label, rootUri) {
|
|
16
|
+
const provider = {
|
|
17
|
+
label,
|
|
18
|
+
rootUri: URI.revive(rootUri),
|
|
19
|
+
selector,
|
|
20
|
+
isSCM: false,
|
|
21
|
+
getOriginalResource: async (uri) => {
|
|
22
|
+
return URI.revive(await this.proxy.$provideOriginalResource(handle, uri, CancellationToken.None));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const disposable = this.quickDiffService.addQuickDiffProvider(provider);
|
|
26
|
+
this.providerDisposables.set(handle, disposable);
|
|
27
|
+
}
|
|
28
|
+
async $unregisterQuickDiffProvider(handle) {
|
|
29
|
+
if (( this.providerDisposables.has(handle))) {
|
|
30
|
+
this.providerDisposables.deleteAndDispose(handle);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
dispose() {
|
|
34
|
+
this.providerDisposables.dispose();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
MainThreadQuickDiff = __decorate([
|
|
38
|
+
extHostNamedCustomer(MainContext.MainThreadQuickDiff),
|
|
39
|
+
( __param(1, IQuickDiffService))
|
|
40
|
+
], MainThreadQuickDiff);
|
|
41
|
+
|
|
42
|
+
export { MainThreadQuickDiff };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
|
|
3
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
|
+
|
|
7
|
+
function reviveIconPathUris(iconPath) {
|
|
8
|
+
iconPath.dark = URI.revive(iconPath.dark);
|
|
9
|
+
if (iconPath.light) {
|
|
10
|
+
iconPath.light = URI.revive(iconPath.light);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
let MainThreadQuickOpen = class MainThreadQuickOpen {
|
|
14
|
+
constructor(extHostContext, quickInputService) {
|
|
15
|
+
this._items = {};
|
|
16
|
+
this.sessions = ( new Map());
|
|
17
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostQuickOpen));
|
|
18
|
+
this._quickInputService = quickInputService;
|
|
19
|
+
}
|
|
20
|
+
dispose() {
|
|
21
|
+
}
|
|
22
|
+
$show(instance, options, token) {
|
|
23
|
+
const contents = ( new Promise((resolve, reject) => {
|
|
24
|
+
this._items[instance] = { resolve, reject };
|
|
25
|
+
}));
|
|
26
|
+
options = {
|
|
27
|
+
...options,
|
|
28
|
+
onDidFocus: el => {
|
|
29
|
+
if (el) {
|
|
30
|
+
this._proxy.$onItemSelected(el.handle);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
if (options.canPickMany) {
|
|
35
|
+
return this._quickInputService.pick(contents, options, token).then(items => {
|
|
36
|
+
if (items) {
|
|
37
|
+
return ( items.map(item => item.handle));
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return this._quickInputService.pick(contents, options, token).then(item => {
|
|
44
|
+
if (item) {
|
|
45
|
+
return item.handle;
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
$setItems(instance, items) {
|
|
52
|
+
if (this._items[instance]) {
|
|
53
|
+
this._items[instance].resolve(items);
|
|
54
|
+
delete this._items[instance];
|
|
55
|
+
}
|
|
56
|
+
return Promise.resolve();
|
|
57
|
+
}
|
|
58
|
+
$setError(instance, error) {
|
|
59
|
+
if (this._items[instance]) {
|
|
60
|
+
this._items[instance].reject(error);
|
|
61
|
+
delete this._items[instance];
|
|
62
|
+
}
|
|
63
|
+
return Promise.resolve();
|
|
64
|
+
}
|
|
65
|
+
$input(options, validateInput, token) {
|
|
66
|
+
const inputOptions = Object.create(null);
|
|
67
|
+
if (options) {
|
|
68
|
+
inputOptions.title = options.title;
|
|
69
|
+
inputOptions.password = options.password;
|
|
70
|
+
inputOptions.placeHolder = options.placeHolder;
|
|
71
|
+
inputOptions.valueSelection = options.valueSelection;
|
|
72
|
+
inputOptions.prompt = options.prompt;
|
|
73
|
+
inputOptions.value = options.value;
|
|
74
|
+
inputOptions.ignoreFocusLost = options.ignoreFocusOut;
|
|
75
|
+
}
|
|
76
|
+
if (validateInput) {
|
|
77
|
+
inputOptions.validateInput = (value) => {
|
|
78
|
+
return this._proxy.$validateInput(value);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return this._quickInputService.input(inputOptions, token);
|
|
82
|
+
}
|
|
83
|
+
$createOrUpdate(params) {
|
|
84
|
+
const sessionId = params.id;
|
|
85
|
+
let session = this.sessions.get(sessionId);
|
|
86
|
+
if (!session) {
|
|
87
|
+
const input = params.type === 'quickPick' ? this._quickInputService.createQuickPick() : this._quickInputService.createInputBox();
|
|
88
|
+
input.onDidAccept(() => {
|
|
89
|
+
this._proxy.$onDidAccept(sessionId);
|
|
90
|
+
});
|
|
91
|
+
input.onDidTriggerButton(button => {
|
|
92
|
+
this._proxy.$onDidTriggerButton(sessionId, button.handle);
|
|
93
|
+
});
|
|
94
|
+
input.onDidChangeValue(value => {
|
|
95
|
+
this._proxy.$onDidChangeValue(sessionId, value);
|
|
96
|
+
});
|
|
97
|
+
input.onDidHide(() => {
|
|
98
|
+
this._proxy.$onDidHide(sessionId);
|
|
99
|
+
});
|
|
100
|
+
if (params.type === 'quickPick') {
|
|
101
|
+
const quickpick = input;
|
|
102
|
+
quickpick.onDidChangeActive(items => {
|
|
103
|
+
this._proxy.$onDidChangeActive(sessionId, ( items.map(item => item.handle)));
|
|
104
|
+
});
|
|
105
|
+
quickpick.onDidChangeSelection(items => {
|
|
106
|
+
this._proxy.$onDidChangeSelection(sessionId, ( items.map(item => item.handle)));
|
|
107
|
+
});
|
|
108
|
+
quickpick.onDidTriggerItemButton((e) => {
|
|
109
|
+
this._proxy.$onDidTriggerItemButton(sessionId, e.item.handle, e.button.handle);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
session = {
|
|
113
|
+
input,
|
|
114
|
+
handlesToItems: ( new Map())
|
|
115
|
+
};
|
|
116
|
+
this.sessions.set(sessionId, session);
|
|
117
|
+
}
|
|
118
|
+
const { input, handlesToItems } = session;
|
|
119
|
+
for (const param in params) {
|
|
120
|
+
if (param === 'id' || param === 'type') {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (param === 'visible') {
|
|
124
|
+
if (params.visible) {
|
|
125
|
+
input.show();
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
input.hide();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if (param === 'items') {
|
|
132
|
+
handlesToItems.clear();
|
|
133
|
+
params[param].forEach((item) => {
|
|
134
|
+
if (item.type === 'separator') {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (item.buttons) {
|
|
138
|
+
item.buttons = ( item.buttons.map((button) => {
|
|
139
|
+
if (button.iconPath) {
|
|
140
|
+
reviveIconPathUris(button.iconPath);
|
|
141
|
+
}
|
|
142
|
+
return button;
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
handlesToItems.set(item.handle, item);
|
|
146
|
+
});
|
|
147
|
+
input[param] = params[param];
|
|
148
|
+
}
|
|
149
|
+
else if (param === 'activeItems' || param === 'selectedItems') {
|
|
150
|
+
input[param] = ( params[param]
|
|
151
|
+
.filter((handle) => ( handlesToItems.has(handle)))
|
|
152
|
+
.map((handle) => handlesToItems.get(handle)));
|
|
153
|
+
}
|
|
154
|
+
else if (param === 'buttons') {
|
|
155
|
+
input[param] = ( params.buttons.map(button => {
|
|
156
|
+
if (button.handle === -1) {
|
|
157
|
+
return this._quickInputService.backButton;
|
|
158
|
+
}
|
|
159
|
+
if (button.iconPath) {
|
|
160
|
+
reviveIconPathUris(button.iconPath);
|
|
161
|
+
}
|
|
162
|
+
return button;
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
input[param] = params[param];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return Promise.resolve(undefined);
|
|
170
|
+
}
|
|
171
|
+
$dispose(sessionId) {
|
|
172
|
+
const session = this.sessions.get(sessionId);
|
|
173
|
+
if (session) {
|
|
174
|
+
session.input.dispose();
|
|
175
|
+
this.sessions.delete(sessionId);
|
|
176
|
+
}
|
|
177
|
+
return Promise.resolve(undefined);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
MainThreadQuickOpen = __decorate([
|
|
181
|
+
extHostNamedCustomer(MainContext.MainThreadQuickOpen),
|
|
182
|
+
( __param(1, IQuickInputService))
|
|
183
|
+
], MainThreadQuickOpen);
|
|
184
|
+
|
|
185
|
+
export { MainThreadQuickOpen };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { extHostCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
3
|
+
import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
+
import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
5
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
7
|
+
|
|
8
|
+
let MainThreadRemoteConnectionData = class MainThreadRemoteConnectionData extends Disposable {
|
|
9
|
+
constructor(extHostContext, _environmentService, remoteAuthorityResolverService) {
|
|
10
|
+
super();
|
|
11
|
+
this._environmentService = _environmentService;
|
|
12
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostExtensionService));
|
|
13
|
+
const remoteAuthority = this._environmentService.remoteAuthority;
|
|
14
|
+
if (remoteAuthority) {
|
|
15
|
+
this._register(remoteAuthorityResolverService.onDidChangeConnectionData(() => {
|
|
16
|
+
const connectionData = remoteAuthorityResolverService.getConnectionData(remoteAuthority);
|
|
17
|
+
if (connectionData) {
|
|
18
|
+
this._proxy.$updateRemoteConnectionData(connectionData);
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
MainThreadRemoteConnectionData = __decorate([
|
|
25
|
+
extHostCustomer,
|
|
26
|
+
( __param(1, IWorkbenchEnvironmentService)),
|
|
27
|
+
( __param(2, IRemoteAuthorityResolverService))
|
|
28
|
+
], MainThreadRemoteConnectionData);
|
|
29
|
+
|
|
30
|
+
export { MainThreadRemoteConnectionData };
|