@codingame/monaco-vscode-extensions-service-override 1.83.7 → 1.83.9
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/assets/webWorkerExtensionHostIframe.html +123 -0
- package/extensions.d.ts +12 -13
- package/extensions.js +456 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +3 -0
- package/package.json +5 -3
- package/tools/url.js +10 -0
- package/tools.js +5 -0
- package/vscode/src/vs/base/common/console.js +59 -0
- package/vscode/src/vs/base/common/prefixTree.js +131 -0
- package/vscode/src/vs/platform/files/common/watcher.js +71 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/log/browser/log.js +26 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -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 +330 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +174 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +107 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +541 -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 +578 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +387 -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 +75 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +249 -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 +411 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +475 -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 +280 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +33 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +947 -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 +118 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +158 -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 +341 -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/mainThreadProfilContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +49 -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 +463 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +148 -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/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 +412 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +182 -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 +313 -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 +273 -0
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.api.impl.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostConfiguration.d.ts +3 -3
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts +3 -4
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostManagedSockets.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTerminalService.d.ts +19 -20
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTunnelService.d.ts +7 -8
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostWorkspace.d.ts +25 -26
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +217 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +92 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +648 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +297 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +62 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +331 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +380 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +5 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +1196 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +19 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +334 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +543 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +178 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +101 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +145 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +3 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +73 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +179 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +144 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +482 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +6 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +85 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +56 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +110 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +260 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +616 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +309 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +38 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +167 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +80 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +70 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +108 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +506 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +132 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +103 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +28 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +25 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +336 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +46 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +283 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +273 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1093 -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 +643 -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/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +220 -0
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +5 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +79 -0
- package/vscode-proposed.d.ts +0 -3872
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTypes.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
4
|
+
import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
5
|
+
import { escape } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
6
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
7
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
8
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
9
|
+
import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
|
|
10
|
+
import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
11
|
+
import { deserializeWebviewMessage, serializeWebviewMessage } from 'vscode/vscode/vs/workbench/api/common/extHostWebviewMessaging';
|
|
12
|
+
import { SerializableObjectWithBuffers } from 'vscode/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
13
|
+
|
|
14
|
+
var MainThreadWebviews_1;
|
|
15
|
+
let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
16
|
+
static { MainThreadWebviews_1 = this; }
|
|
17
|
+
static { this.standardSupportedLinkSchemes = ( new Set([
|
|
18
|
+
Schemas.http,
|
|
19
|
+
Schemas.https,
|
|
20
|
+
Schemas.mailto,
|
|
21
|
+
Schemas.vscode,
|
|
22
|
+
'vscode-insider',
|
|
23
|
+
])); }
|
|
24
|
+
constructor(context, _openerService, _productService) {
|
|
25
|
+
super();
|
|
26
|
+
this._openerService = _openerService;
|
|
27
|
+
this._productService = _productService;
|
|
28
|
+
this._webviews = ( new Map());
|
|
29
|
+
this._proxy = ( context.getProxy(ExtHostContext.ExtHostWebviews));
|
|
30
|
+
}
|
|
31
|
+
addWebview(handle, webview, options) {
|
|
32
|
+
if (( this._webviews.has(handle))) {
|
|
33
|
+
throw new Error('Webview already registered');
|
|
34
|
+
}
|
|
35
|
+
this._webviews.set(handle, webview);
|
|
36
|
+
this.hookupWebviewEventDelegate(handle, webview, options);
|
|
37
|
+
}
|
|
38
|
+
$setHtml(handle, value) {
|
|
39
|
+
this.tryGetWebview(handle)?.setHtml(value);
|
|
40
|
+
}
|
|
41
|
+
$setOptions(handle, options) {
|
|
42
|
+
const webview = this.tryGetWebview(handle);
|
|
43
|
+
if (webview) {
|
|
44
|
+
webview.contentOptions = reviveWebviewContentOptions(options);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async $postMessage(handle, jsonMessage, ...buffers) {
|
|
48
|
+
const webview = this.tryGetWebview(handle);
|
|
49
|
+
if (!webview) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const { message, arrayBuffers } = deserializeWebviewMessage(jsonMessage, buffers);
|
|
53
|
+
return webview.postMessage(message, arrayBuffers);
|
|
54
|
+
}
|
|
55
|
+
hookupWebviewEventDelegate(handle, webview, options) {
|
|
56
|
+
const disposables = ( new DisposableStore());
|
|
57
|
+
disposables.add(webview.onDidClickLink((uri) => this.onDidClickLink(handle, uri)));
|
|
58
|
+
disposables.add(webview.onMessage((message) => {
|
|
59
|
+
const serialized = serializeWebviewMessage(message.message, options);
|
|
60
|
+
this._proxy.$onMessage(handle, serialized.message, ( new SerializableObjectWithBuffers(serialized.buffers)));
|
|
61
|
+
}));
|
|
62
|
+
disposables.add(webview.onMissingCsp((extension) => this._proxy.$onMissingCsp(handle, extension.value)));
|
|
63
|
+
disposables.add(webview.onDidDispose(() => {
|
|
64
|
+
disposables.dispose();
|
|
65
|
+
this._webviews.delete(handle);
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
onDidClickLink(handle, link) {
|
|
69
|
+
const webview = this.getWebview(handle);
|
|
70
|
+
if (this.isSupportedLink(webview, ( URI.parse(link)))) {
|
|
71
|
+
this._openerService.open(link, { fromUserGesture: true, allowContributedOpeners: true, allowCommands: Array.isArray(webview.contentOptions.enableCommandUris) || webview.contentOptions.enableCommandUris === true, fromWorkspace: true });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
isSupportedLink(webview, link) {
|
|
75
|
+
if (( MainThreadWebviews_1.standardSupportedLinkSchemes.has(link.scheme))) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (!isWeb && this._productService.urlProtocol === link.scheme) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (link.scheme === Schemas.command) {
|
|
82
|
+
if (Array.isArray(webview.contentOptions.enableCommandUris)) {
|
|
83
|
+
return webview.contentOptions.enableCommandUris.includes(link.path);
|
|
84
|
+
}
|
|
85
|
+
return webview.contentOptions.enableCommandUris === true;
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
tryGetWebview(handle) {
|
|
90
|
+
return this._webviews.get(handle);
|
|
91
|
+
}
|
|
92
|
+
getWebview(handle) {
|
|
93
|
+
const webview = this.tryGetWebview(handle);
|
|
94
|
+
if (!webview) {
|
|
95
|
+
throw new Error(`Unknown webview handle:${handle}`);
|
|
96
|
+
}
|
|
97
|
+
return webview;
|
|
98
|
+
}
|
|
99
|
+
getWebviewResolvedFailedContent(viewType) {
|
|
100
|
+
return `<!DOCTYPE html>
|
|
101
|
+
<html>
|
|
102
|
+
<head>
|
|
103
|
+
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
104
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
105
|
+
</head>
|
|
106
|
+
<body>${( localizeWithPath(
|
|
107
|
+
'vs/workbench/api/browser/mainThreadWebviews',
|
|
108
|
+
'errorMessage',
|
|
109
|
+
"An error occurred while loading view: {0}",
|
|
110
|
+
escape(viewType)
|
|
111
|
+
))}</body>
|
|
112
|
+
</html>`;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
MainThreadWebviews = MainThreadWebviews_1 = ( __decorate([
|
|
116
|
+
( __param(1, IOpenerService)),
|
|
117
|
+
( __param(2, IProductService))
|
|
118
|
+
], MainThreadWebviews));
|
|
119
|
+
function reviveWebviewExtension(extensionData) {
|
|
120
|
+
return {
|
|
121
|
+
id: extensionData.id,
|
|
122
|
+
location: URI.revive(extensionData.location),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function reviveWebviewContentOptions(webviewOptions) {
|
|
126
|
+
return {
|
|
127
|
+
allowScripts: webviewOptions.enableScripts,
|
|
128
|
+
allowForms: webviewOptions.enableForms,
|
|
129
|
+
enableCommandUris: webviewOptions.enableCommandUris,
|
|
130
|
+
localResourceRoots: Array.isArray(webviewOptions.localResourceRoots) ? ( webviewOptions.localResourceRoots.map(r => URI.revive(r))) : undefined,
|
|
131
|
+
portMapping: webviewOptions.portMapping,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { MainThreadWebviews, reviveWebviewContentOptions, reviveWebviewExtension };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
5
|
+
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
6
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
|
+
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
9
|
+
import { IUserActivityService } from 'vscode/vscode/vs/workbench/services/userActivity/common/userActivityService';
|
|
10
|
+
|
|
11
|
+
let MainThreadWindow = class MainThreadWindow {
|
|
12
|
+
constructor(extHostContext, hostService, openerService, userActivityService) {
|
|
13
|
+
this.hostService = hostService;
|
|
14
|
+
this.openerService = openerService;
|
|
15
|
+
this.userActivityService = userActivityService;
|
|
16
|
+
this.disposables = ( new DisposableStore());
|
|
17
|
+
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostWindow));
|
|
18
|
+
Event.latch(hostService.onDidChangeFocus)(this.proxy.$onDidChangeWindowFocus, this.proxy, this.disposables);
|
|
19
|
+
userActivityService.onDidChangeIsActive(this.proxy.$onDidChangeWindowActive, this.proxy, this.disposables);
|
|
20
|
+
}
|
|
21
|
+
dispose() {
|
|
22
|
+
this.disposables.dispose();
|
|
23
|
+
}
|
|
24
|
+
$getInitialState() {
|
|
25
|
+
return Promise.resolve({
|
|
26
|
+
isFocused: this.hostService.hasFocus,
|
|
27
|
+
isActive: this.userActivityService.isActive,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async $openUri(uriComponents, uriString, options) {
|
|
31
|
+
const uri = ( URI.from(uriComponents));
|
|
32
|
+
let target;
|
|
33
|
+
if (uriString && ( ( URI.parse(uriString)).toString()) === ( uri.toString())) {
|
|
34
|
+
target = uriString;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
target = uri;
|
|
38
|
+
}
|
|
39
|
+
return this.openerService.open(target, {
|
|
40
|
+
openExternal: true,
|
|
41
|
+
allowTunneling: options.allowTunneling,
|
|
42
|
+
allowContributedOpeners: options.allowContributedOpeners,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async $asExternalUri(uriComponents, options) {
|
|
46
|
+
const result = await this.openerService.resolveExternalUri(URI.revive(uriComponents), options);
|
|
47
|
+
return result.resolved;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
MainThreadWindow = __decorate([
|
|
51
|
+
extHostNamedCustomer(MainContext.MainThreadWindow),
|
|
52
|
+
( __param(1, IHostService)),
|
|
53
|
+
( __param(2, IOpenerService)),
|
|
54
|
+
( __param(3, IUserActivityService))
|
|
55
|
+
], MainThreadWindow);
|
|
56
|
+
|
|
57
|
+
export { MainThreadWindow };
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
3
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { isNative } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
5
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
6
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
7
|
+
import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
|
|
8
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
9
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
10
|
+
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
11
|
+
import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
12
|
+
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request';
|
|
13
|
+
import { IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
|
|
14
|
+
import { IWorkspaceContextService, isUntitledWorkspace } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
15
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
16
|
+
import { checkGlobFileExists } from 'vscode/vscode/vs/workbench/services/extensions/common/workspaceContains';
|
|
17
|
+
import { QueryBuilder } from 'vscode/vscode/vs/workbench/services/search/common/queryBuilder';
|
|
18
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
19
|
+
import { ISearchService } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
20
|
+
import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceEditing';
|
|
21
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
22
|
+
import { IEditSessionIdentityService } from 'vscode/vscode/vs/platform/workspace/common/editSessions';
|
|
23
|
+
import { SideBySideEditor, EditorResourceAccessor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
24
|
+
import { firstOrDefault, coalesce } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
25
|
+
import { ICanonicalUriService } from 'vscode/vscode/vs/platform/workspace/common/canonicalUri';
|
|
26
|
+
|
|
27
|
+
let MainThreadWorkspace = class MainThreadWorkspace {
|
|
28
|
+
constructor(extHostContext, _searchService, _contextService, _editSessionIdentityService, _canonicalUriService, _editorService, _workspaceEditingService, _notificationService, _requestService, _instantiationService, _labelService, _environmentService, fileService, _workspaceTrustManagementService, _workspaceTrustRequestService) {
|
|
29
|
+
this._searchService = _searchService;
|
|
30
|
+
this._contextService = _contextService;
|
|
31
|
+
this._editSessionIdentityService = _editSessionIdentityService;
|
|
32
|
+
this._canonicalUriService = _canonicalUriService;
|
|
33
|
+
this._editorService = _editorService;
|
|
34
|
+
this._workspaceEditingService = _workspaceEditingService;
|
|
35
|
+
this._notificationService = _notificationService;
|
|
36
|
+
this._requestService = _requestService;
|
|
37
|
+
this._instantiationService = _instantiationService;
|
|
38
|
+
this._labelService = _labelService;
|
|
39
|
+
this._environmentService = _environmentService;
|
|
40
|
+
this._workspaceTrustManagementService = _workspaceTrustManagementService;
|
|
41
|
+
this._workspaceTrustRequestService = _workspaceTrustRequestService;
|
|
42
|
+
this._toDispose = ( new DisposableStore());
|
|
43
|
+
this._activeCancelTokens = Object.create(null);
|
|
44
|
+
this._queryBuilder = this._instantiationService.createInstance(QueryBuilder);
|
|
45
|
+
this.registeredEditSessionProviders = ( new Map());
|
|
46
|
+
this.registeredCanonicalUriProviders = ( new Map());
|
|
47
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostWorkspace));
|
|
48
|
+
const workspace = this._contextService.getWorkspace();
|
|
49
|
+
if (workspace.configuration && !isNative && !fileService.hasProvider(workspace.configuration)) {
|
|
50
|
+
this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace), this.isWorkspaceTrusted());
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this._contextService.getCompleteWorkspace().then(workspace => this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace), this.isWorkspaceTrusted()));
|
|
54
|
+
}
|
|
55
|
+
this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose);
|
|
56
|
+
this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this, this._toDispose);
|
|
57
|
+
this._workspaceTrustManagementService.onDidChangeTrust(this._onDidGrantWorkspaceTrust, this, this._toDispose);
|
|
58
|
+
}
|
|
59
|
+
dispose() {
|
|
60
|
+
this._toDispose.dispose();
|
|
61
|
+
for (const requestId in this._activeCancelTokens) {
|
|
62
|
+
const tokenSource = this._activeCancelTokens[requestId];
|
|
63
|
+
tokenSource.cancel();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
$updateWorkspaceFolders(extensionName, index, deleteCount, foldersToAdd) {
|
|
67
|
+
const workspaceFoldersToAdd = ( foldersToAdd.map(f => ({ uri: URI.revive(f.uri), name: f.name })));
|
|
68
|
+
this._notificationService.status(this.getStatusMessage(extensionName, workspaceFoldersToAdd.length, deleteCount), { hideAfter: 10 * 1000 });
|
|
69
|
+
return this._workspaceEditingService.updateFolders(index, deleteCount, workspaceFoldersToAdd, true);
|
|
70
|
+
}
|
|
71
|
+
getStatusMessage(extensionName, addCount, removeCount) {
|
|
72
|
+
let message;
|
|
73
|
+
const wantsToAdd = addCount > 0;
|
|
74
|
+
const wantsToDelete = removeCount > 0;
|
|
75
|
+
if (wantsToAdd && !wantsToDelete) {
|
|
76
|
+
if (addCount === 1) {
|
|
77
|
+
message = ( localizeWithPath(
|
|
78
|
+
'vs/workbench/api/browser/mainThreadWorkspace',
|
|
79
|
+
'folderStatusMessageAddSingleFolder',
|
|
80
|
+
"Extension '{0}' added 1 folder to the workspace",
|
|
81
|
+
extensionName
|
|
82
|
+
));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
message = ( localizeWithPath(
|
|
86
|
+
'vs/workbench/api/browser/mainThreadWorkspace',
|
|
87
|
+
'folderStatusMessageAddMultipleFolders',
|
|
88
|
+
"Extension '{0}' added {1} folders to the workspace",
|
|
89
|
+
extensionName,
|
|
90
|
+
addCount
|
|
91
|
+
));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (wantsToDelete && !wantsToAdd) {
|
|
95
|
+
if (removeCount === 1) {
|
|
96
|
+
message = ( localizeWithPath(
|
|
97
|
+
'vs/workbench/api/browser/mainThreadWorkspace',
|
|
98
|
+
'folderStatusMessageRemoveSingleFolder',
|
|
99
|
+
"Extension '{0}' removed 1 folder from the workspace",
|
|
100
|
+
extensionName
|
|
101
|
+
));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
message = ( localizeWithPath(
|
|
105
|
+
'vs/workbench/api/browser/mainThreadWorkspace',
|
|
106
|
+
'folderStatusMessageRemoveMultipleFolders',
|
|
107
|
+
"Extension '{0}' removed {1} folders from the workspace",
|
|
108
|
+
extensionName,
|
|
109
|
+
removeCount
|
|
110
|
+
));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
message = ( localizeWithPath(
|
|
115
|
+
'vs/workbench/api/browser/mainThreadWorkspace',
|
|
116
|
+
'folderStatusChangeFolder',
|
|
117
|
+
"Extension '{0}' changed folders of the workspace",
|
|
118
|
+
extensionName
|
|
119
|
+
));
|
|
120
|
+
}
|
|
121
|
+
return message;
|
|
122
|
+
}
|
|
123
|
+
_onDidChangeWorkspace() {
|
|
124
|
+
this._proxy.$acceptWorkspaceData(this.getWorkspaceData(this._contextService.getWorkspace()));
|
|
125
|
+
}
|
|
126
|
+
getWorkspaceData(workspace) {
|
|
127
|
+
if (this._contextService.getWorkbenchState() === 1 ) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
configuration: workspace.configuration || undefined,
|
|
132
|
+
isUntitled: workspace.configuration ? isUntitledWorkspace(workspace.configuration, this._environmentService) : false,
|
|
133
|
+
folders: workspace.folders,
|
|
134
|
+
id: workspace.id,
|
|
135
|
+
name: this._labelService.getWorkspaceLabel(workspace),
|
|
136
|
+
transient: workspace.transient
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
$startFileSearch(includePattern, _includeFolder, excludePatternOrDisregardExcludes, maxResults, token) {
|
|
140
|
+
const includeFolder = URI.revive(_includeFolder);
|
|
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
|
+
});
|
|
151
|
+
return this._searchService.fileSearch(query, token).then(result => {
|
|
152
|
+
return ( result.results.map(m => m.resource));
|
|
153
|
+
}, err => {
|
|
154
|
+
if (!isCancellationError(err)) {
|
|
155
|
+
return Promise.reject(err);
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
$startTextSearch(pattern, _folder, options, requestId, token) {
|
|
161
|
+
const folder = URI.revive(_folder);
|
|
162
|
+
const workspace = this._contextService.getWorkspace();
|
|
163
|
+
const folders = folder ? [folder] : ( workspace.folders.map(folder => folder.uri));
|
|
164
|
+
const query = this._queryBuilder.text(pattern, folders, options);
|
|
165
|
+
query._reason = 'startTextSearch';
|
|
166
|
+
const onProgress = (p) => {
|
|
167
|
+
if (p.results) {
|
|
168
|
+
this._proxy.$handleTextSearchResult(p, requestId);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const search = this._searchService.textSearch(query, token, onProgress).then(result => {
|
|
172
|
+
return { limitHit: result.limitHit };
|
|
173
|
+
}, err => {
|
|
174
|
+
if (!isCancellationError(err)) {
|
|
175
|
+
return Promise.reject(err);
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
});
|
|
179
|
+
return search;
|
|
180
|
+
}
|
|
181
|
+
$checkExists(folders, includes, token) {
|
|
182
|
+
return this._instantiationService.invokeFunction((accessor) => checkGlobFileExists(accessor, folders, includes, token));
|
|
183
|
+
}
|
|
184
|
+
async $save(uriComponents, options) {
|
|
185
|
+
const uri = URI.revive(uriComponents);
|
|
186
|
+
const editors = [...this._editorService.findEditors(uri, { supportSideBySide: SideBySideEditor.PRIMARY })];
|
|
187
|
+
const result = await this._editorService.save(editors, {
|
|
188
|
+
reason: 1 ,
|
|
189
|
+
saveAs: options.saveAs,
|
|
190
|
+
force: !options.saveAs
|
|
191
|
+
});
|
|
192
|
+
return firstOrDefault(this._saveResultToUris(result));
|
|
193
|
+
}
|
|
194
|
+
_saveResultToUris(result) {
|
|
195
|
+
if (!result.success) {
|
|
196
|
+
return [];
|
|
197
|
+
}
|
|
198
|
+
return coalesce(( result.editors.map(
|
|
199
|
+
editor => EditorResourceAccessor.getCanonicalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY })
|
|
200
|
+
)));
|
|
201
|
+
}
|
|
202
|
+
$saveAll(includeUntitled) {
|
|
203
|
+
return this._editorService.saveAll({ includeUntitled }).then(res => res.success);
|
|
204
|
+
}
|
|
205
|
+
$resolveProxy(url) {
|
|
206
|
+
return this._requestService.resolveProxy(url);
|
|
207
|
+
}
|
|
208
|
+
$requestWorkspaceTrust(options) {
|
|
209
|
+
return this._workspaceTrustRequestService.requestWorkspaceTrust(options);
|
|
210
|
+
}
|
|
211
|
+
isWorkspaceTrusted() {
|
|
212
|
+
return this._workspaceTrustManagementService.isWorkspaceTrusted();
|
|
213
|
+
}
|
|
214
|
+
_onDidGrantWorkspaceTrust() {
|
|
215
|
+
this._proxy.$onDidGrantWorkspaceTrust();
|
|
216
|
+
}
|
|
217
|
+
$registerEditSessionIdentityProvider(handle, scheme) {
|
|
218
|
+
const disposable = this._editSessionIdentityService.registerEditSessionIdentityProvider({
|
|
219
|
+
scheme: scheme,
|
|
220
|
+
getEditSessionIdentifier: async (workspaceFolder, token) => {
|
|
221
|
+
return this._proxy.$getEditSessionIdentifier(workspaceFolder.uri, token);
|
|
222
|
+
},
|
|
223
|
+
provideEditSessionIdentityMatch: async (workspaceFolder, identity1, identity2, token) => {
|
|
224
|
+
return this._proxy.$provideEditSessionIdentityMatch(workspaceFolder.uri, identity1, identity2, token);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
this.registeredEditSessionProviders.set(handle, disposable);
|
|
228
|
+
this._toDispose.add(disposable);
|
|
229
|
+
}
|
|
230
|
+
$unregisterEditSessionIdentityProvider(handle) {
|
|
231
|
+
const disposable = this.registeredEditSessionProviders.get(handle);
|
|
232
|
+
disposable?.dispose();
|
|
233
|
+
this.registeredEditSessionProviders.delete(handle);
|
|
234
|
+
}
|
|
235
|
+
$registerCanonicalUriProvider(handle, scheme) {
|
|
236
|
+
const disposable = this._canonicalUriService.registerCanonicalUriProvider({
|
|
237
|
+
scheme: scheme,
|
|
238
|
+
provideCanonicalUri: async (uri, targetScheme, token) => {
|
|
239
|
+
const result = await this._proxy.$provideCanonicalUri(uri, targetScheme, token);
|
|
240
|
+
if (result) {
|
|
241
|
+
return URI.revive(result);
|
|
242
|
+
}
|
|
243
|
+
return result;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
this.registeredCanonicalUriProviders.set(handle, disposable);
|
|
247
|
+
this._toDispose.add(disposable);
|
|
248
|
+
}
|
|
249
|
+
$unregisterCanonicalUriProvider(handle) {
|
|
250
|
+
const disposable = this.registeredCanonicalUriProviders.get(handle);
|
|
251
|
+
disposable?.dispose();
|
|
252
|
+
this.registeredCanonicalUriProviders.delete(handle);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
MainThreadWorkspace = __decorate([
|
|
256
|
+
extHostNamedCustomer(MainContext.MainThreadWorkspace),
|
|
257
|
+
( __param(1, ISearchService)),
|
|
258
|
+
( __param(2, IWorkspaceContextService)),
|
|
259
|
+
( __param(3, IEditSessionIdentityService)),
|
|
260
|
+
( __param(4, ICanonicalUriService)),
|
|
261
|
+
( __param(5, IEditorService)),
|
|
262
|
+
( __param(6, IWorkspaceEditingService)),
|
|
263
|
+
( __param(7, INotificationService)),
|
|
264
|
+
( __param(8, IRequestService)),
|
|
265
|
+
( __param(9, IInstantiationService)),
|
|
266
|
+
( __param(10, ILabelService)),
|
|
267
|
+
( __param(11, IEnvironmentService)),
|
|
268
|
+
( __param(12, IFileService)),
|
|
269
|
+
( __param(13, IWorkspaceTrustManagementService)),
|
|
270
|
+
( __param(14, IWorkspaceTrustRequestService))
|
|
271
|
+
], MainThreadWorkspace);
|
|
272
|
+
|
|
273
|
+
export { MainThreadWorkspace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtHostConfigProvider } from './extHostConfiguration.js';
|
|
2
2
|
import { ExtensionDescriptionRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
|
3
|
-
import * as
|
|
3
|
+
import * as vscode from 'vscode';
|
|
4
4
|
import { IExtensionDescription } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
5
5
|
|
|
6
6
|
interface IExtensionRegistries {
|
|
@@ -8,7 +8,7 @@ interface IExtensionRegistries {
|
|
|
8
8
|
all: ExtensionDescriptionRegistry;
|
|
9
9
|
}
|
|
10
10
|
interface IExtensionApiFactory {
|
|
11
|
-
(extension: IExtensionDescription, extensionInfo: IExtensionRegistries, configProvider: ExtHostConfigProvider): typeof
|
|
11
|
+
(extension: IExtensionDescription, extensionInfo: IExtensionRegistries, configProvider: ExtHostConfigProvider): typeof vscode;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export type { IExtensionApiFactory, IExtensionRegistries };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServiceIdentifier } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import
|
|
3
|
+
import * as vscode from 'vscode';
|
|
4
4
|
import { IExtHostWorkspace, ExtHostWorkspace } from './extHostWorkspace.js';
|
|
5
5
|
import { ExtHostConfigurationShape, IConfigurationInitData, MainThreadConfigurationShape } from './extHost.protocol.js';
|
|
6
6
|
import { IConfigurationChange } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
@@ -28,9 +28,9 @@ declare class ExtHostConfigProvider {
|
|
|
28
28
|
private _configuration;
|
|
29
29
|
private _logService;
|
|
30
30
|
constructor(proxy: MainThreadConfigurationShape, extHostWorkspace: ExtHostWorkspace, data: IConfigurationInitData, logService: ILogService);
|
|
31
|
-
get onDidChangeConfiguration(): Event<ConfigurationChangeEvent>;
|
|
31
|
+
get onDidChangeConfiguration(): Event<vscode.ConfigurationChangeEvent>;
|
|
32
32
|
$acceptConfigurationChanged(data: IConfigurationInitData, change: IConfigurationChange): void;
|
|
33
|
-
getConfiguration(section?: string, scope?: ConfigurationScope | null, extensionDescription?: IExtensionDescription): WorkspaceConfiguration;
|
|
33
|
+
getConfiguration(section?: string, scope?: vscode.ConfigurationScope | null, extensionDescription?: IExtensionDescription): vscode.WorkspaceConfiguration;
|
|
34
34
|
private _toReadonlyValue;
|
|
35
35
|
private _validateConfigurationAccess;
|
|
36
36
|
private _toConfigurationChangeEvent;
|
package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts
RENAMED
|
@@ -10,7 +10,7 @@ import { IExtensionAPI, ExtensionActivationTimesBuilder } from './extHostExtensi
|
|
|
10
10
|
import { ExtHostWorkspace, IExtHostWorkspace } from './extHostWorkspace.js';
|
|
11
11
|
import { ExtensionActivationReason, ActivationKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
12
12
|
import { ExtensionDescriptionRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
|
13
|
-
import
|
|
13
|
+
import * as vscode from 'vscode';
|
|
14
14
|
import { ExtensionIdentifier, IExtensionDescription } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
15
15
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
16
16
|
import { ExtensionRuntime } from './extHostTypes.js';
|
|
@@ -25,7 +25,6 @@ import { IResolveAuthorityResult } from 'vscode/vscode/vs/workbench/services/ext
|
|
|
25
25
|
import { IExtHostLocalizationService } from './extHostLocalizationService.js';
|
|
26
26
|
import { IExtHostManagedSockets } from './extHostManagedSockets.js';
|
|
27
27
|
import { Dto } from 'vscode/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
28
|
-
import { Disposable as Disposable$1 } from 'vscode';
|
|
29
28
|
|
|
30
29
|
declare const IHostUtils: ServiceIdentifier<IHostUtils>;
|
|
31
30
|
interface IHostUtils {
|
|
@@ -108,8 +107,8 @@ declare abstract class AbstractExtHostExtensionService extends Disposable implem
|
|
|
108
107
|
$extensionTestsExecute(): Promise<number>;
|
|
109
108
|
private _doHandleExtensionTests;
|
|
110
109
|
private _startExtensionHost;
|
|
111
|
-
registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable
|
|
112
|
-
getRemoteExecServer(remoteAuthority: string): Promise<ExecServer | undefined>;
|
|
110
|
+
registerRemoteAuthorityResolver(authorityPrefix: string, resolver: vscode.RemoteAuthorityResolver): vscode.Disposable;
|
|
111
|
+
getRemoteExecServer(remoteAuthority: string): Promise<vscode.ExecServer | undefined>;
|
|
113
112
|
private _activateAndGetResolver;
|
|
114
113
|
$resolveAuthority(remoteAuthorityChain: string, resolveAttempt: number): Promise<Dto<IResolveAuthorityResult>>;
|
|
115
114
|
$getCanonicalURI(remoteAuthority: string, uriComponents: UriComponents): Promise<UriComponents | null>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ServiceIdentifier } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
import { ExtHostManagedSocketsShape } from './extHost.protocol.js';
|
|
3
|
-
import
|
|
3
|
+
import * as vscode from 'vscode';
|
|
4
4
|
|
|
5
5
|
interface IExtHostManagedSockets extends ExtHostManagedSocketsShape {
|
|
6
|
-
setFactory(socketFactoryId: number, makeConnection: () => Thenable<ManagedMessagePassing>): void;
|
|
6
|
+
setFactory(socketFactoryId: number, makeConnection: () => Thenable<vscode.ManagedMessagePassing>): void;
|
|
7
7
|
readonly _serviceBrand: undefined;
|
|
8
8
|
}
|
|
9
9
|
declare const IExtHostManagedSockets: ServiceIdentifier<IExtHostManagedSockets>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ServiceIdentifier } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
|
-
import
|
|
2
|
+
import * as vscode from 'vscode';
|
|
3
3
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { ExtHostTerminalServiceShape, ExtHostTerminalIdentifier } from './extHost.protocol.js';
|
|
5
5
|
import { IDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { IExtensionDescription } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
7
7
|
import { TerminalLocation } from 'vscode/vscode/vs/platform/terminal/common/terminal';
|
|
8
|
-
import { TerminalOptions, ExtensionTerminalOptions, Pseudoterminal, TerminalLinkProvider, Disposable, TerminalProfileProvider, EnvironmentVariableCollection, EnvironmentVariableScope } from 'vscode';
|
|
9
8
|
|
|
10
|
-
interface IEnvironmentVariableCollection extends EnvironmentVariableCollection {
|
|
11
|
-
getScoped(scope: EnvironmentVariableScope): EnvironmentVariableCollection;
|
|
9
|
+
interface IEnvironmentVariableCollection extends vscode.EnvironmentVariableCollection {
|
|
10
|
+
getScoped(scope: vscode.EnvironmentVariableScope): vscode.EnvironmentVariableCollection;
|
|
12
11
|
}
|
|
13
12
|
interface ITerminalInternalOptions {
|
|
14
13
|
isFeatureTerminal?: boolean;
|
|
@@ -28,25 +27,25 @@ interface ITerminalInternalOptions {
|
|
|
28
27
|
|
|
29
28
|
interface IExtHostTerminalService extends ExtHostTerminalServiceShape, IDisposable {
|
|
30
29
|
readonly _serviceBrand: undefined;
|
|
31
|
-
activeTerminal: Terminal | undefined;
|
|
32
|
-
terminals: Terminal[];
|
|
33
|
-
readonly onDidCloseTerminal: Event<Terminal>;
|
|
34
|
-
readonly onDidOpenTerminal: Event<Terminal>;
|
|
35
|
-
readonly onDidChangeActiveTerminal: Event<Terminal | undefined>;
|
|
36
|
-
readonly onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
|
|
37
|
-
readonly onDidChangeTerminalState: Event<Terminal>;
|
|
38
|
-
readonly onDidWriteTerminalData: Event<TerminalDataWriteEvent>;
|
|
39
|
-
readonly onDidExecuteTerminalCommand: Event<TerminalExecutedCommand>;
|
|
30
|
+
activeTerminal: vscode.Terminal | undefined;
|
|
31
|
+
terminals: vscode.Terminal[];
|
|
32
|
+
readonly onDidCloseTerminal: Event<vscode.Terminal>;
|
|
33
|
+
readonly onDidOpenTerminal: Event<vscode.Terminal>;
|
|
34
|
+
readonly onDidChangeActiveTerminal: Event<vscode.Terminal | undefined>;
|
|
35
|
+
readonly onDidChangeTerminalDimensions: Event<vscode.TerminalDimensionsChangeEvent>;
|
|
36
|
+
readonly onDidChangeTerminalState: Event<vscode.Terminal>;
|
|
37
|
+
readonly onDidWriteTerminalData: Event<vscode.TerminalDataWriteEvent>;
|
|
38
|
+
readonly onDidExecuteTerminalCommand: Event<vscode.TerminalExecutedCommand>;
|
|
40
39
|
readonly onDidChangeShell: Event<string>;
|
|
41
|
-
createTerminal(name?: string, shellPath?: string, shellArgs?: readonly string[] | string): Terminal;
|
|
42
|
-
createTerminalFromOptions(options: TerminalOptions, internalOptions?: ITerminalInternalOptions): Terminal;
|
|
43
|
-
createExtensionTerminal(options: ExtensionTerminalOptions): Terminal;
|
|
44
|
-
attachPtyToTerminal(id: number, pty: Pseudoterminal): void;
|
|
40
|
+
createTerminal(name?: string, shellPath?: string, shellArgs?: readonly string[] | string): vscode.Terminal;
|
|
41
|
+
createTerminalFromOptions(options: vscode.TerminalOptions, internalOptions?: ITerminalInternalOptions): vscode.Terminal;
|
|
42
|
+
createExtensionTerminal(options: vscode.ExtensionTerminalOptions): vscode.Terminal;
|
|
43
|
+
attachPtyToTerminal(id: number, pty: vscode.Pseudoterminal): void;
|
|
45
44
|
getDefaultShell(useAutomationShell: boolean): string;
|
|
46
45
|
getDefaultShellArgs(useAutomationShell: boolean): string[] | string;
|
|
47
|
-
registerLinkProvider(provider: TerminalLinkProvider): Disposable;
|
|
48
|
-
registerProfileProvider(extension: IExtensionDescription, id: string, provider: TerminalProfileProvider): Disposable;
|
|
49
|
-
registerTerminalQuickFixProvider(id: string, extensionId: string, provider: TerminalQuickFixProvider): Disposable;
|
|
46
|
+
registerLinkProvider(provider: vscode.TerminalLinkProvider): vscode.Disposable;
|
|
47
|
+
registerProfileProvider(extension: IExtensionDescription, id: string, provider: vscode.TerminalProfileProvider): vscode.Disposable;
|
|
48
|
+
registerTerminalQuickFixProvider(id: string, extensionId: string, provider: vscode.TerminalQuickFixProvider): vscode.Disposable;
|
|
50
49
|
getEnvironmentVariableCollection(extension: IExtensionDescription): IEnvironmentVariableCollection;
|
|
51
50
|
}
|
|
52
51
|
declare const IExtHostTerminalService: ServiceIdentifier<IExtHostTerminalService>;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { ServiceIdentifier } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
import { IDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { IExtensionDescription } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
4
|
-
import
|
|
4
|
+
import * as vscode from 'vscode';
|
|
5
5
|
import { TunnelOptions } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
|
|
6
6
|
import { ExtHostTunnelServiceShape, PortAttributesSelector } from './extHost.protocol.js';
|
|
7
|
-
import { Event } from 'vscode';
|
|
8
7
|
|
|
9
8
|
interface IExtHostTunnelService extends ExtHostTunnelServiceShape {
|
|
10
9
|
readonly _serviceBrand: undefined;
|
|
11
|
-
openTunnel(extension: IExtensionDescription, forward: TunnelOptions): Promise<Tunnel | undefined>;
|
|
12
|
-
getTunnels(): Promise<TunnelDescription[]>;
|
|
13
|
-
onDidChangeTunnels: Event<void>;
|
|
14
|
-
setTunnelFactory(provider: RemoteAuthorityResolver | undefined, managedRemoteAuthority: ManagedResolvedAuthority | undefined): Promise<IDisposable>;
|
|
15
|
-
registerPortsAttributesProvider(portSelector: PortAttributesSelector, provider: PortAttributesProvider): IDisposable;
|
|
16
|
-
registerTunnelProvider(provider: TunnelProvider, information: TunnelInformation): Promise<IDisposable>;
|
|
10
|
+
openTunnel(extension: IExtensionDescription, forward: TunnelOptions): Promise<vscode.Tunnel | undefined>;
|
|
11
|
+
getTunnels(): Promise<vscode.TunnelDescription[]>;
|
|
12
|
+
onDidChangeTunnels: vscode.Event<void>;
|
|
13
|
+
setTunnelFactory(provider: vscode.RemoteAuthorityResolver | undefined, managedRemoteAuthority: vscode.ManagedResolvedAuthority | undefined): Promise<IDisposable>;
|
|
14
|
+
registerPortsAttributesProvider(portSelector: PortAttributesSelector, provider: vscode.PortAttributesProvider): IDisposable;
|
|
15
|
+
registerTunnelProvider(provider: vscode.TunnelProvider, information: vscode.TunnelInformation): Promise<IDisposable>;
|
|
17
16
|
}
|
|
18
17
|
declare const IExtHostTunnelService: ServiceIdentifier<IExtHostTunnelService>;
|
|
19
18
|
|