@codingame/monaco-vscode-extensions-service-override 11.1.1 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/webWorkerExtensionHostIframe.html +2 -2
- package/index.d.ts +40 -2
- package/index.js +266 -1
- package/package.json +81 -11
- package/vscode/src/vs/base/common/console.d.ts +22 -0
- package/vscode/src/vs/base/common/console.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +24 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +54 -53
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +14 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +4 -2
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.d.ts +1 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +1 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +30 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +73 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +67 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +33 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +169 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +50 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +13 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +82 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +14 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +58 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +40 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +23 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +15 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +37 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +53 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +60 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +97 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +34 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +42 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +32 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +64 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +23 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +6 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +46 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +39 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +19 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +11 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +9 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +6 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +174 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +27 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +6 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +45 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +29 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +21 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +10 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +34 -35
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +1 -0
- package/vscode/src/vs/workbench/common/comments.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +14 -12
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +6 -4
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.d.ts +25 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +62 -60
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +74 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +63 -45
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +57 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -12
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +203 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +217 -180
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +37 -39
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +40 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +38 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +15 -14
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.d.ts +14 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +18 -19
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.d.ts +3 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +8 -7
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +54 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -3
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.d.ts +4 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +12 -9
- package/_virtual/semver.js +0 -5
- package/extensions.js +0 -257
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/url.js +0 -10
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
3
4
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
4
5
|
import { transformErrorFromSerialization } from 'vscode/vscode/vs/base/common/errors';
|
|
5
6
|
import { FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
6
|
-
import Severity
|
|
7
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
7
8
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
9
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
9
10
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
10
11
|
import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
11
12
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
|
-
import { WebSocketRemoteConnection, ManagedRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
13
|
+
import { RemoteConnectionType, WebSocketRemoteConnection, ManagedRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
13
14
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
14
15
|
import { IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
15
16
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
17
|
+
import { EnablementState } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
16
18
|
import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
19
|
+
import { ExtensionHostKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
17
20
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
18
21
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
19
22
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
@@ -32,10 +35,8 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
32
35
|
this._extensionHostKind = extHostContext.extensionHostKind;
|
|
33
36
|
const internalExtHostContext = extHostContext;
|
|
34
37
|
this._internalExtensionService = internalExtHostContext.internalExtensionService;
|
|
35
|
-
internalExtHostContext._setExtensionHostProxy((
|
|
36
|
-
|
|
37
|
-
))));
|
|
38
|
-
internalExtHostContext._setAllMainProxyIdentifiers(( (( (Object.keys(MainContext))).map((key) => MainContext[key]))));
|
|
38
|
+
internalExtHostContext._setExtensionHostProxy(( new ExtensionHostProxy(( extHostContext.getProxy(ExtHostContext.ExtHostExtensionService)))));
|
|
39
|
+
internalExtHostContext._setAllMainProxyIdentifiers(( ( Object.keys(MainContext)).map((key) => MainContext[key])));
|
|
39
40
|
}
|
|
40
41
|
dispose() {
|
|
41
42
|
}
|
|
@@ -86,65 +87,65 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
86
87
|
const extName = extension.displayName || extension.name;
|
|
87
88
|
if (this._extensionEnablementService.isEnabled(missingInstalledDependency)) {
|
|
88
89
|
this._notificationService.notify({
|
|
89
|
-
severity: Severity
|
|
90
|
+
severity: Severity.Error,
|
|
90
91
|
message: ( localize(
|
|
91
|
-
|
|
92
|
+
2259,
|
|
92
93
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?",
|
|
93
94
|
extName,
|
|
94
95
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
95
96
|
)),
|
|
96
97
|
actions: {
|
|
97
|
-
primary: [(
|
|
98
|
+
primary: [( new Action('reload', ( localize(2260, "Reload Window")), '', true, () => this._hostService.reload()))]
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
else {
|
|
102
103
|
const enablementState = this._extensionEnablementService.getEnablementState(missingInstalledDependency);
|
|
103
|
-
if (enablementState ===
|
|
104
|
+
if (enablementState === EnablementState.DisabledByVirtualWorkspace) {
|
|
104
105
|
this._notificationService.notify({
|
|
105
|
-
severity: Severity
|
|
106
|
+
severity: Severity.Error,
|
|
106
107
|
message: ( localize(
|
|
107
|
-
|
|
108
|
+
2261,
|
|
108
109
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
109
110
|
extName,
|
|
110
111
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
111
112
|
)),
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
else if (enablementState ===
|
|
115
|
+
else if (enablementState === EnablementState.DisabledByTrustRequirement) {
|
|
115
116
|
this._notificationService.notify({
|
|
116
|
-
severity: Severity
|
|
117
|
+
severity: Severity.Error,
|
|
117
118
|
message: ( localize(
|
|
118
|
-
|
|
119
|
+
2262,
|
|
119
120
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
120
121
|
extName,
|
|
121
122
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
122
123
|
)),
|
|
123
124
|
actions: {
|
|
124
|
-
primary: [(
|
|
125
|
+
primary: [( new Action('manageWorkspaceTrust', ( localize(2263, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage')))]
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
129
|
else if (this._extensionEnablementService.canChangeEnablement(missingInstalledDependency)) {
|
|
129
130
|
this._notificationService.notify({
|
|
130
|
-
severity: Severity
|
|
131
|
+
severity: Severity.Error,
|
|
131
132
|
message: ( localize(
|
|
132
|
-
|
|
133
|
+
2264,
|
|
133
134
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled. Would you like to enable the extension and reload the window?",
|
|
134
135
|
extName,
|
|
135
136
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
136
137
|
)),
|
|
137
138
|
actions: {
|
|
138
|
-
primary: [(
|
|
139
|
-
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))
|
|
139
|
+
primary: [( new Action('enable', ( localize(2265, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
|
|
140
|
+
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
140
141
|
}
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
144
|
else {
|
|
144
145
|
this._notificationService.notify({
|
|
145
|
-
severity: Severity
|
|
146
|
+
severity: Severity.Error,
|
|
146
147
|
message: ( localize(
|
|
147
|
-
|
|
148
|
+
2266,
|
|
148
149
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
149
150
|
extName,
|
|
150
151
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -163,23 +164,23 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
163
164
|
}
|
|
164
165
|
if (dependencyExtension) {
|
|
165
166
|
this._notificationService.notify({
|
|
166
|
-
severity: Severity
|
|
167
|
+
severity: Severity.Error,
|
|
167
168
|
message: ( localize(
|
|
168
|
-
|
|
169
|
+
2267,
|
|
169
170
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension from '{2}', which is not installed. Would you like to install the extension and reload the window?",
|
|
170
171
|
extName,
|
|
171
172
|
dependencyExtension.displayName,
|
|
172
173
|
dependencyExtension.publisherDisplayName
|
|
173
174
|
)),
|
|
174
175
|
actions: {
|
|
175
|
-
primary: [(
|
|
176
|
-
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))
|
|
176
|
+
primary: [( new Action('install', ( localize(2268, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
|
|
177
|
+
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
177
178
|
}
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
181
|
else {
|
|
181
182
|
this._notificationService.error(( localize(
|
|
182
|
-
|
|
183
|
+
2269,
|
|
183
184
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
184
185
|
extName,
|
|
185
186
|
missingDependency
|
|
@@ -187,10 +188,10 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
async $setPerformanceMarks(marks) {
|
|
190
|
-
if (this._extensionHostKind ===
|
|
191
|
+
if (this._extensionHostKind === ExtensionHostKind.LocalProcess) {
|
|
191
192
|
this._timerService.setPerformanceMarks('localExtHost', marks);
|
|
192
193
|
}
|
|
193
|
-
else if (this._extensionHostKind ===
|
|
194
|
+
else if (this._extensionHostKind === ExtensionHostKind.LocalWebWorker) {
|
|
194
195
|
this._timerService.setPerformanceMarks('workerExtHost', marks);
|
|
195
196
|
}
|
|
196
197
|
else {
|
|
@@ -209,14 +210,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
209
210
|
};
|
|
210
211
|
MainThreadExtensionService = __decorate([
|
|
211
212
|
extHostNamedCustomer(MainContext.MainThreadExtensionService),
|
|
212
|
-
(
|
|
213
|
-
(
|
|
214
|
-
(
|
|
215
|
-
(
|
|
216
|
-
(
|
|
217
|
-
(
|
|
218
|
-
(
|
|
219
|
-
(
|
|
213
|
+
( __param(1, IExtensionService)),
|
|
214
|
+
( __param(2, INotificationService)),
|
|
215
|
+
( __param(3, IExtensionsWorkbenchService)),
|
|
216
|
+
( __param(4, IHostService)),
|
|
217
|
+
( __param(5, IWorkbenchExtensionEnablementService)),
|
|
218
|
+
( __param(6, ITimerService)),
|
|
219
|
+
( __param(7, ICommandService)),
|
|
220
|
+
( __param(8, IWorkbenchEnvironmentService))
|
|
220
221
|
], MainThreadExtensionService);
|
|
221
222
|
class ExtensionHostProxy {
|
|
222
223
|
constructor(_actual) {
|
|
@@ -282,14 +283,10 @@ function reviveResolvedAuthority(resolvedAuthority) {
|
|
|
282
283
|
};
|
|
283
284
|
}
|
|
284
285
|
function reviveConnection(connection) {
|
|
285
|
-
if (connection.type ===
|
|
286
|
-
return (
|
|
287
|
-
(new WebSocketRemoteConnection(connection.host, connection.port))
|
|
288
|
-
);
|
|
286
|
+
if (connection.type === RemoteConnectionType.WebSocket) {
|
|
287
|
+
return ( new WebSocketRemoteConnection(connection.host, connection.port));
|
|
289
288
|
}
|
|
290
|
-
return (
|
|
291
|
-
(new ManagedRemoteConnection(connection.id))
|
|
292
|
-
);
|
|
289
|
+
return ( new ManagedRemoteConnection(connection.id));
|
|
293
290
|
}
|
|
294
291
|
|
|
295
292
|
export { MainThreadExtensionService };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UriComponents } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { FileSystemProviderCapabilities, IStat, FileType, IFileOverwriteOptions, IFileDeleteOptions } from "vscode/vscode/vs/platform/files/common/files";
|
|
3
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
4
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
5
|
+
import { IFileChangeDto, MainThreadFileSystemShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
6
|
+
import { VSBuffer } from "vscode/vscode/vs/base/common/buffer";
|
|
7
|
+
import { IMarkdownString } from "vscode/vscode/vs/base/common/htmlContent";
|
|
8
|
+
export declare class MainThreadFileSystem implements MainThreadFileSystemShape {
|
|
9
|
+
private readonly _fileService;
|
|
10
|
+
private readonly _proxy;
|
|
11
|
+
private readonly _fileProvider;
|
|
12
|
+
private readonly _disposables;
|
|
13
|
+
constructor(extHostContext: IExtHostContext, _fileService: IFileService);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
$registerFileSystemProvider(handle: number, scheme: string, capabilities: FileSystemProviderCapabilities, readonlyMessage?: IMarkdownString): Promise<void>;
|
|
16
|
+
$unregisterProvider(handle: number): void;
|
|
17
|
+
$onFileSystemChange(handle: number, changes: IFileChangeDto[]): void;
|
|
18
|
+
$stat(uri: UriComponents): Promise<IStat>;
|
|
19
|
+
$readdir(uri: UriComponents): Promise<[
|
|
20
|
+
string,
|
|
21
|
+
FileType
|
|
22
|
+
][]>;
|
|
23
|
+
private static _asFileType;
|
|
24
|
+
$readFile(uri: UriComponents): Promise<VSBuffer>;
|
|
25
|
+
$writeFile(uri: UriComponents, content: VSBuffer): Promise<void>;
|
|
26
|
+
$rename(source: UriComponents, target: UriComponents, opts: IFileOverwriteOptions): Promise<void>;
|
|
27
|
+
$copy(source: UriComponents, target: UriComponents, opts: IFileOverwriteOptions): Promise<void>;
|
|
28
|
+
$mkdir(uri: UriComponents): Promise<void>;
|
|
29
|
+
$delete(uri: UriComponents, opts: IFileDeleteOptions): Promise<void>;
|
|
30
|
+
private static _handleError;
|
|
31
|
+
$ensureActivation(scheme: string): Promise<void>;
|
|
32
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
-
import { FilePermission, FileSystemProviderErrorCode, FileType, FileOperationError, toFileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
|
+
import { FilePermission, FileSystemProviderErrorCode, FileType, FileOperationError, FileOperationResult, toFileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
7
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
7
8
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
9
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -105,16 +106,16 @@ let MainThreadFileSystem = MainThreadFileSystem_1 = class MainThreadFileSystem {
|
|
|
105
106
|
static _handleError(err) {
|
|
106
107
|
if (err instanceof FileOperationError) {
|
|
107
108
|
switch (err.fileOperationResult) {
|
|
108
|
-
case
|
|
109
|
+
case FileOperationResult.FILE_NOT_FOUND:
|
|
109
110
|
err.name = FileSystemProviderErrorCode.FileNotFound;
|
|
110
111
|
break;
|
|
111
|
-
case
|
|
112
|
+
case FileOperationResult.FILE_IS_DIRECTORY:
|
|
112
113
|
err.name = FileSystemProviderErrorCode.FileIsADirectory;
|
|
113
114
|
break;
|
|
114
|
-
case
|
|
115
|
+
case FileOperationResult.FILE_PERMISSION_DENIED:
|
|
115
116
|
err.name = FileSystemProviderErrorCode.NoPermissions;
|
|
116
117
|
break;
|
|
117
|
-
case
|
|
118
|
+
case FileOperationResult.FILE_MOVE_CONFLICT:
|
|
118
119
|
err.name = FileSystemProviderErrorCode.FileExists;
|
|
119
120
|
break;
|
|
120
121
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IWatchOptions } from "vscode/vscode/vs/platform/files/common/files";
|
|
2
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
3
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
+
import { MainThreadFileSystemEventServiceShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
import { IWorkingCopyFileService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
6
|
+
import { IBulkEditService } from "vscode/vscode/vs/editor/browser/services/bulkEditService";
|
|
7
|
+
import { IProgressService } from "vscode/vscode/vs/platform/progress/common/progress.service";
|
|
8
|
+
import { IDialogService } from "vscode/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
9
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
10
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
11
|
+
import { IEnvironmentService } from "vscode/vscode/vs/platform/environment/common/environment.service";
|
|
12
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
13
|
+
import { UriComponents } from "vscode/vscode/vs/base/common/uri";
|
|
14
|
+
export declare class MainThreadFileSystemEventService implements MainThreadFileSystemEventServiceShape {
|
|
15
|
+
private readonly _fileService;
|
|
16
|
+
private readonly _logService;
|
|
17
|
+
static readonly MementoKeyAdditionalEdits = "file.particpants.additionalEdits";
|
|
18
|
+
private readonly _proxy;
|
|
19
|
+
private readonly _listener;
|
|
20
|
+
private readonly _watches;
|
|
21
|
+
constructor(extHostContext: IExtHostContext, _fileService: IFileService, workingCopyFileService: IWorkingCopyFileService, bulkEditService: IBulkEditService, progressService: IProgressService, dialogService: IDialogService, storageService: IStorageService, logService: ILogService, envService: IEnvironmentService, uriIdentService: IUriIdentityService, _logService: ILogService);
|
|
22
|
+
$watch(extensionId: string, session: number, resource: UriComponents, unvalidatedOpts: IWatchOptions, correlate: boolean): Promise<void>;
|
|
23
|
+
$unwatch(session: number): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
3
5
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
4
6
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
7
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
8
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
7
9
|
import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
8
10
|
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
11
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
9
12
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
10
13
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
11
14
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
12
15
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
|
-
import Severity
|
|
16
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
17
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
14
18
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
15
19
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
16
20
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -26,9 +30,9 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
26
30
|
constructor(extHostContext, _fileService, workingCopyFileService, bulkEditService, progressService, dialogService, storageService, logService, envService, uriIdentService, _logService) {
|
|
27
31
|
this._fileService = _fileService;
|
|
28
32
|
this._logService = _logService;
|
|
29
|
-
this._listener = (
|
|
30
|
-
this._watches = (
|
|
31
|
-
this._proxy = (
|
|
33
|
+
this._listener = ( new DisposableStore());
|
|
34
|
+
this._watches = ( new DisposableMap());
|
|
35
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService));
|
|
32
36
|
this._listener.add(_fileService.onDidFilesChange(event => {
|
|
33
37
|
this._proxy.$onFileEvent({
|
|
34
38
|
created: event.rawAdded,
|
|
@@ -42,10 +46,10 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
42
46
|
if (undoInfo?.isUndoing) {
|
|
43
47
|
return;
|
|
44
48
|
}
|
|
45
|
-
const cts = (
|
|
49
|
+
const cts = ( new CancellationTokenSource(token));
|
|
46
50
|
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
47
51
|
const data = await progressService.withProgress({
|
|
48
|
-
location:
|
|
52
|
+
location: ProgressLocation.Notification,
|
|
49
53
|
title: this._progressLabel(operation),
|
|
50
54
|
cancellable: true,
|
|
51
55
|
delay: Math.min(timeout / 2, 3000)
|
|
@@ -61,68 +65,68 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
61
65
|
if (!data || data.edit.edits.length === 0) {
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
64
|
-
const needsConfirmation = (
|
|
65
|
-
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits,
|
|
68
|
+
const needsConfirmation = ( data.edit.edits.some(edit => edit.metadata?.needsConfirmation));
|
|
69
|
+
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, StorageScope.PROFILE);
|
|
66
70
|
if (envService.extensionTestsLocationURI) {
|
|
67
71
|
showPreview = false;
|
|
68
72
|
}
|
|
69
73
|
if (showPreview === undefined) {
|
|
70
74
|
let message;
|
|
71
75
|
if (data.extensionNames.length === 1) {
|
|
72
|
-
if (operation ===
|
|
76
|
+
if (operation === FileOperation.CREATE) {
|
|
73
77
|
message = ( localize(
|
|
74
|
-
|
|
78
|
+
2270,
|
|
75
79
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
76
80
|
data.extensionNames[0]
|
|
77
81
|
));
|
|
78
82
|
}
|
|
79
|
-
else if (operation ===
|
|
83
|
+
else if (operation === FileOperation.COPY) {
|
|
80
84
|
message = ( localize(
|
|
81
|
-
|
|
85
|
+
2271,
|
|
82
86
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
83
87
|
data.extensionNames[0]
|
|
84
88
|
));
|
|
85
89
|
}
|
|
86
|
-
else if (operation ===
|
|
90
|
+
else if (operation === FileOperation.MOVE) {
|
|
87
91
|
message = ( localize(
|
|
88
|
-
|
|
92
|
+
2272,
|
|
89
93
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
90
94
|
data.extensionNames[0]
|
|
91
95
|
));
|
|
92
96
|
}
|
|
93
97
|
else {
|
|
94
98
|
message = ( localize(
|
|
95
|
-
|
|
99
|
+
2273,
|
|
96
100
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
97
101
|
data.extensionNames[0]
|
|
98
102
|
));
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
else {
|
|
102
|
-
if (operation ===
|
|
106
|
+
if (operation === FileOperation.CREATE) {
|
|
103
107
|
message = ( localize(
|
|
104
|
-
|
|
108
|
+
2274,
|
|
105
109
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
106
110
|
data.extensionNames.length
|
|
107
111
|
));
|
|
108
112
|
}
|
|
109
|
-
else if (operation ===
|
|
113
|
+
else if (operation === FileOperation.COPY) {
|
|
110
114
|
message = ( localize(
|
|
111
|
-
|
|
115
|
+
2275,
|
|
112
116
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
113
117
|
data.extensionNames.length
|
|
114
118
|
));
|
|
115
119
|
}
|
|
116
|
-
else if (operation ===
|
|
120
|
+
else if (operation === FileOperation.MOVE) {
|
|
117
121
|
message = ( localize(
|
|
118
|
-
|
|
122
|
+
2276,
|
|
119
123
|
"{0} extensions want to make refactoring changes with this file move",
|
|
120
124
|
data.extensionNames.length
|
|
121
125
|
));
|
|
122
126
|
}
|
|
123
127
|
else {
|
|
124
128
|
message = ( localize(
|
|
125
|
-
|
|
129
|
+
2277,
|
|
126
130
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
127
131
|
data.extensionNames.length
|
|
128
132
|
));
|
|
@@ -130,10 +134,10 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
130
134
|
}
|
|
131
135
|
if (needsConfirmation) {
|
|
132
136
|
const { confirmed } = await dialogService.confirm({
|
|
133
|
-
type: Severity
|
|
137
|
+
type: Severity.Info,
|
|
134
138
|
message,
|
|
135
|
-
primaryButton: ( localize(
|
|
136
|
-
cancelButton: ( localize(
|
|
139
|
+
primaryButton: ( localize(2278, "Show &&Preview")),
|
|
140
|
+
cancelButton: ( localize(2279, "Skip Changes"))
|
|
137
141
|
});
|
|
138
142
|
showPreview = true;
|
|
139
143
|
if (!confirmed) {
|
|
@@ -142,36 +146,36 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
142
146
|
}
|
|
143
147
|
else {
|
|
144
148
|
let Choice;
|
|
145
|
-
( (
|
|
149
|
+
(function (Choice) {
|
|
146
150
|
Choice[Choice["OK"] = 0] = "OK";
|
|
147
151
|
Choice[Choice["Preview"] = 1] = "Preview";
|
|
148
152
|
Choice[Choice["Cancel"] = 2] = "Cancel";
|
|
149
|
-
})(Choice || (Choice = {}))
|
|
153
|
+
})(Choice || (Choice = {}));
|
|
150
154
|
const { result, checkboxChecked } = await dialogService.prompt({
|
|
151
|
-
type: Severity
|
|
155
|
+
type: Severity.Info,
|
|
152
156
|
message,
|
|
153
157
|
buttons: [
|
|
154
158
|
{
|
|
155
|
-
label: ( localize(
|
|
159
|
+
label: ( localize(2280, "&&OK")),
|
|
156
160
|
run: () => Choice.OK
|
|
157
161
|
},
|
|
158
162
|
{
|
|
159
|
-
label: ( localize(
|
|
163
|
+
label: ( localize(2278, "Show &&Preview")),
|
|
160
164
|
run: () => Choice.Preview
|
|
161
165
|
}
|
|
162
166
|
],
|
|
163
167
|
cancelButton: {
|
|
164
|
-
label: ( localize(
|
|
168
|
+
label: ( localize(2279, "Skip Changes")),
|
|
165
169
|
run: () => Choice.Cancel
|
|
166
170
|
},
|
|
167
|
-
checkbox: { label: ( localize(
|
|
171
|
+
checkbox: { label: ( localize(2281, "Do not ask me again")) }
|
|
168
172
|
});
|
|
169
173
|
if (result === Choice.Cancel) {
|
|
170
174
|
return;
|
|
171
175
|
}
|
|
172
176
|
showPreview = result === Choice.Preview;
|
|
173
177
|
if (checkboxChecked) {
|
|
174
|
-
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview,
|
|
178
|
+
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview, StorageScope.PROFILE, StorageTarget.USER);
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
}
|
|
@@ -180,16 +184,16 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
180
184
|
}
|
|
181
185
|
_progressLabel(operation) {
|
|
182
186
|
switch (operation) {
|
|
183
|
-
case
|
|
184
|
-
return
|
|
185
|
-
case
|
|
186
|
-
return
|
|
187
|
-
case
|
|
188
|
-
return
|
|
189
|
-
case
|
|
190
|
-
return
|
|
191
|
-
case
|
|
192
|
-
return
|
|
187
|
+
case FileOperation.CREATE:
|
|
188
|
+
return localize(2282, "Running 'File Create' participants...");
|
|
189
|
+
case FileOperation.MOVE:
|
|
190
|
+
return localize(2283, "Running 'File Rename' participants...");
|
|
191
|
+
case FileOperation.COPY:
|
|
192
|
+
return localize(2284, "Running 'File Copy' participants...");
|
|
193
|
+
case FileOperation.DELETE:
|
|
194
|
+
return localize(2285, "Running 'File Delete' participants...");
|
|
195
|
+
case FileOperation.WRITE:
|
|
196
|
+
return localize(2286, "Running 'File Write' participants...");
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
});
|
|
@@ -212,8 +216,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
212
216
|
}
|
|
213
217
|
}
|
|
214
218
|
if (correlate) {
|
|
215
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${(
|
|
216
|
-
const watcherDisposables = (
|
|
219
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session}, excludes: ${JSON.stringify(opts.excludes)}, includes: ${JSON.stringify(opts.includes)})`);
|
|
220
|
+
const watcherDisposables = ( new DisposableStore());
|
|
217
221
|
const subscription = watcherDisposables.add(this._fileService.createWatcher(uri, opts));
|
|
218
222
|
watcherDisposables.add(subscription.onDidChange(event => {
|
|
219
223
|
this._proxy.$onFileEvent({
|
|
@@ -226,13 +230,13 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
226
230
|
this._watches.set(session, watcherDisposables);
|
|
227
231
|
}
|
|
228
232
|
else {
|
|
229
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${(
|
|
233
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session}, excludes: ${JSON.stringify(opts.excludes)}, includes: ${JSON.stringify(opts.includes)})`);
|
|
230
234
|
const subscription = this._fileService.watch(uri, opts);
|
|
231
235
|
this._watches.set(session, subscription);
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
$unwatch(session) {
|
|
235
|
-
if ((
|
|
239
|
+
if (( this._watches.has(session))) {
|
|
236
240
|
this._logService.trace(`MainThreadFileSystemEventService#$unwatch(): request to stop watching (session: ${session})`);
|
|
237
241
|
this._watches.deleteAndDispose(session);
|
|
238
242
|
}
|
|
@@ -244,30 +248,30 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
244
248
|
};
|
|
245
249
|
MainThreadFileSystemEventService = MainThreadFileSystemEventService_1 = __decorate([
|
|
246
250
|
extHostNamedCustomer(MainContext.MainThreadFileSystemEventService),
|
|
247
|
-
(
|
|
248
|
-
(
|
|
249
|
-
(
|
|
250
|
-
(
|
|
251
|
-
(
|
|
252
|
-
(
|
|
253
|
-
(
|
|
254
|
-
(
|
|
255
|
-
(
|
|
256
|
-
(
|
|
251
|
+
( __param(1, IFileService)),
|
|
252
|
+
( __param(2, IWorkingCopyFileService)),
|
|
253
|
+
( __param(3, IBulkEditService)),
|
|
254
|
+
( __param(4, IProgressService)),
|
|
255
|
+
( __param(5, IDialogService)),
|
|
256
|
+
( __param(6, IStorageService)),
|
|
257
|
+
( __param(7, ILogService)),
|
|
258
|
+
( __param(8, IEnvironmentService)),
|
|
259
|
+
( __param(9, IUriIdentityService)),
|
|
260
|
+
( __param(10, ILogService))
|
|
257
261
|
], MainThreadFileSystemEventService);
|
|
258
262
|
registerAction2(class ResetMemento extends Action2 {
|
|
259
263
|
constructor() {
|
|
260
264
|
super({
|
|
261
265
|
id: 'files.participants.resetChoice',
|
|
262
266
|
title: {
|
|
263
|
-
value: ( localize(
|
|
267
|
+
value: ( localize(2287, "Reset choice for 'File operation needs preview'")),
|
|
264
268
|
original: `Reset choice for 'File operation needs preview'`
|
|
265
269
|
},
|
|
266
270
|
f1: true
|
|
267
271
|
});
|
|
268
272
|
}
|
|
269
273
|
run(accessor) {
|
|
270
|
-
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits,
|
|
274
|
+
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits, StorageScope.PROFILE);
|
|
271
275
|
}
|
|
272
276
|
});
|
|
273
277
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MainThreadInteractiveShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
3
|
+
import { IInteractiveDocumentService } from "vscode/vscode/vs/workbench/contrib/interactive/browser/interactiveDocumentService.service";
|
|
4
|
+
export declare class MainThreadInteractive implements MainThreadInteractiveShape {
|
|
5
|
+
private readonly _proxy;
|
|
6
|
+
private readonly _disposables;
|
|
7
|
+
constructor(extHostContext: IExtHostContext, interactiveDocumentService: IInteractiveDocumentService);
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { PLAINTEXT_LANGUAGE_ID } from 'vscode/vscode/vs/editor/common/languages/modesRegistry';
|
|
4
5
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ResourceLabelFormatter } from "@codingame/monaco-vscode-82e231ca-6ed7-5920-b2b8-1874ccc0be07-common/vscode/vs/platform/label/common/label";
|
|
3
|
+
import { ILabelService } from "vscode/vscode/vs/platform/label/common/label.service";
|
|
4
|
+
import { MainThreadLabelServiceShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
6
|
+
export declare class MainThreadLabelService extends Disposable implements MainThreadLabelServiceShape {
|
|
7
|
+
private readonly _labelService;
|
|
8
|
+
private readonly _resourceLabelFormatters;
|
|
9
|
+
constructor(_: IExtHostContext, _labelService: ILabelService);
|
|
10
|
+
$registerResourceLabelFormatter(handle: number, formatter: ResourceLabelFormatter): void;
|
|
11
|
+
$unregisterResourceLabelFormatter(handle: number): void;
|
|
12
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
4
5
|
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|