@codingame/monaco-vscode-extensions-service-override 11.1.2 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,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 { localize } from 'vscode/vscode/vs/nls';
|
|
4
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -6,17 +7,19 @@ import { INTERNAL_AUTH_PROVIDER_PREFIX } from 'vscode/vscode/vs/workbench/servic
|
|
|
6
7
|
import { IAuthenticationService, IAuthenticationExtensionsService } from 'vscode/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
7
8
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
9
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
9
|
-
import Severity
|
|
10
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
10
11
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
|
+
import { ActivationKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
11
13
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
12
14
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
13
15
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
14
16
|
import { IAuthenticationAccessService } from 'vscode/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
|
|
15
17
|
import { IAuthenticationUsageService } from 'vscode/vscode/vs/workbench/services/authentication/browser/authenticationUsageService.service';
|
|
16
|
-
import { getAuthenticationProviderActivationEvent } from 'vscode/vscode/vs/workbench/services/authentication/browser/authenticationService';
|
|
18
|
+
import { getAuthenticationProviderActivationEvent } from '@codingame/monaco-vscode-3607c442-ae7a-594b-b840-038378c24fef-common/vscode/vs/workbench/services/authentication/browser/authenticationService';
|
|
17
19
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
18
20
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
19
21
|
import { CancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
22
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
20
23
|
|
|
21
24
|
class MainThreadAuthenticationProvider extends Disposable {
|
|
22
25
|
constructor(_proxy, id, label, supportsMultipleAccounts, notificationService, onDidChangeSessionsEmitter) {
|
|
@@ -36,11 +39,11 @@ class MainThreadAuthenticationProvider extends Disposable {
|
|
|
36
39
|
}
|
|
37
40
|
async removeSession(sessionId) {
|
|
38
41
|
await this._proxy.$removeSession(this.id, sessionId);
|
|
39
|
-
this.notificationService.info(( localize(
|
|
42
|
+
this.notificationService.info(( localize(2244, "Successfully signed out.")));
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
let MainThreadAuthentication = class MainThreadAuthentication extends Disposable {
|
|
43
|
-
constructor(extHostContext, authenticationService, authenticationExtensionsService, authenticationAccessService, authenticationUsageService, dialogService, notificationService, extensionService, telemetryService, openerService) {
|
|
46
|
+
constructor(extHostContext, authenticationService, authenticationExtensionsService, authenticationAccessService, authenticationUsageService, dialogService, notificationService, extensionService, telemetryService, openerService, logService) {
|
|
44
47
|
super();
|
|
45
48
|
this.authenticationService = authenticationService;
|
|
46
49
|
this.authenticationExtensionsService = authenticationExtensionsService;
|
|
@@ -51,8 +54,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
51
54
|
this.extensionService = extensionService;
|
|
52
55
|
this.telemetryService = telemetryService;
|
|
53
56
|
this.openerService = openerService;
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
57
|
+
this.logService = logService;
|
|
58
|
+
this._registrations = this._register(( new DisposableMap()));
|
|
59
|
+
this._sentProviderUsageEvents = ( new Set());
|
|
60
|
+
this._sentClientIdUsageEvents = ( new Set());
|
|
61
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostAuthentication));
|
|
56
62
|
this._register(this.authenticationService.onDidChangeSessions(e => {
|
|
57
63
|
this._proxy.$onDidChangeAuthenticationSessions(e.providerId, e.label);
|
|
58
64
|
}));
|
|
@@ -62,16 +68,20 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
62
68
|
}));
|
|
63
69
|
}
|
|
64
70
|
async $registerAuthenticationProvider(id, label, supportsMultipleAccounts) {
|
|
65
|
-
|
|
71
|
+
if (!this.authenticationService.declaredProviders.find(p => p.id === id)) {
|
|
72
|
+
this.logService.warn(`Authentication provider ${id} was not declared in the Extension Manifest.`);
|
|
73
|
+
this.telemetryService.publicLog2('authentication.providerNotDeclared', { id });
|
|
74
|
+
}
|
|
75
|
+
const emitter = ( new Emitter());
|
|
66
76
|
this._registrations.set(id, emitter);
|
|
67
|
-
const provider = (
|
|
77
|
+
const provider = ( new MainThreadAuthenticationProvider(
|
|
68
78
|
this._proxy,
|
|
69
79
|
id,
|
|
70
80
|
label,
|
|
71
81
|
supportsMultipleAccounts,
|
|
72
82
|
this.notificationService,
|
|
73
83
|
emitter
|
|
74
|
-
))
|
|
84
|
+
));
|
|
75
85
|
this.authenticationService.registerAuthenticationProvider(id, provider);
|
|
76
86
|
}
|
|
77
87
|
$unregisterAuthenticationProvider(id) {
|
|
@@ -80,7 +90,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
80
90
|
}
|
|
81
91
|
async $ensureProvider(id) {
|
|
82
92
|
if (!this.authenticationService.isAuthenticationProviderRegistered(id)) {
|
|
83
|
-
return await this.extensionService.activateByEvent(getAuthenticationProviderActivationEvent(id),
|
|
93
|
+
return await this.extensionService.activateByEvent(getAuthenticationProviderActivationEvent(id), ActivationKind.Immediate);
|
|
84
94
|
}
|
|
85
95
|
}
|
|
86
96
|
$sendDidChangeSessions(providerId, event) {
|
|
@@ -96,7 +106,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
96
106
|
let message;
|
|
97
107
|
if (provider.id.startsWith(INTERNAL_AUTH_PROVIDER_PREFIX)) {
|
|
98
108
|
message = ( localize(
|
|
99
|
-
|
|
109
|
+
2245,
|
|
100
110
|
"The extension '{0}' wants to access the language models provided by {1}.",
|
|
101
111
|
extensionName,
|
|
102
112
|
provider.label
|
|
@@ -105,13 +115,13 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
105
115
|
else {
|
|
106
116
|
message = recreatingSession
|
|
107
117
|
? ( localize(
|
|
108
|
-
|
|
118
|
+
2246,
|
|
109
119
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
110
120
|
extensionName,
|
|
111
121
|
provider.label
|
|
112
122
|
))
|
|
113
123
|
: ( localize(
|
|
114
|
-
|
|
124
|
+
2247,
|
|
115
125
|
"The extension '{0}' wants to sign in using {1}.",
|
|
116
126
|
extensionName,
|
|
117
127
|
provider.label
|
|
@@ -119,7 +129,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
119
129
|
}
|
|
120
130
|
const buttons = [
|
|
121
131
|
{
|
|
122
|
-
label: ( localize(
|
|
132
|
+
label: ( localize(2248, "&&Allow")),
|
|
123
133
|
run() {
|
|
124
134
|
return true;
|
|
125
135
|
},
|
|
@@ -127,7 +137,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
127
137
|
];
|
|
128
138
|
if (options?.learnMore) {
|
|
129
139
|
buttons.push({
|
|
130
|
-
label: ( localize(
|
|
140
|
+
label: ( localize(2249, "Learn more")),
|
|
131
141
|
run: async () => {
|
|
132
142
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
133
143
|
await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
|
|
@@ -136,7 +146,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
136
146
|
});
|
|
137
147
|
}
|
|
138
148
|
const { result } = await this.dialogService.prompt({
|
|
139
|
-
type: Severity
|
|
149
|
+
type: Severity.Info,
|
|
140
150
|
message,
|
|
141
151
|
buttons,
|
|
142
152
|
detail: options?.detail,
|
|
@@ -146,28 +156,28 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
146
156
|
}
|
|
147
157
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
148
158
|
const result = await this.dialogService.prompt({
|
|
149
|
-
message: ( localize(
|
|
159
|
+
message: ( localize(2250, "Incorrect account detected")),
|
|
150
160
|
detail: ( localize(
|
|
151
|
-
|
|
161
|
+
2251,
|
|
152
162
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
153
163
|
chosenAccountLabel,
|
|
154
164
|
requestedAccountLabel
|
|
155
165
|
)),
|
|
156
|
-
type: Severity
|
|
166
|
+
type: Severity.Warning,
|
|
157
167
|
cancelButton: true,
|
|
158
168
|
buttons: [
|
|
159
169
|
{
|
|
160
|
-
label: ( localize(
|
|
170
|
+
label: ( localize(2252, 'Keep {0}', chosenAccountLabel)),
|
|
161
171
|
run: () => chosenAccountLabel
|
|
162
172
|
},
|
|
163
173
|
{
|
|
164
|
-
label: ( localize(
|
|
174
|
+
label: ( localize(2253, 'Login with {0}', requestedAccountLabel)),
|
|
165
175
|
run: () => requestedAccountLabel
|
|
166
176
|
}
|
|
167
177
|
],
|
|
168
178
|
});
|
|
169
179
|
if (!result.result) {
|
|
170
|
-
throw (
|
|
180
|
+
throw ( new CancellationError());
|
|
171
181
|
}
|
|
172
182
|
return result.result === chosenAccountLabel;
|
|
173
183
|
}
|
|
@@ -175,19 +185,19 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
175
185
|
const sessions = await this.authenticationService.getSessions(providerId, scopes, options.account, true);
|
|
176
186
|
const provider = this.authenticationService.getProvider(providerId);
|
|
177
187
|
if (options.forceNewSession && options.createIfNone) {
|
|
178
|
-
throw (
|
|
188
|
+
throw ( new Error(
|
|
179
189
|
'Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone'
|
|
180
|
-
))
|
|
190
|
+
));
|
|
181
191
|
}
|
|
182
192
|
if (options.forceNewSession && options.silent) {
|
|
183
|
-
throw (
|
|
193
|
+
throw ( new Error(
|
|
184
194
|
'Invalid combination of options. Please remove one of the following: forceNewSession, silent'
|
|
185
|
-
))
|
|
195
|
+
));
|
|
186
196
|
}
|
|
187
197
|
if (options.createIfNone && options.silent) {
|
|
188
|
-
throw (
|
|
198
|
+
throw ( new Error(
|
|
189
199
|
'Invalid combination of options. Please remove one of the following: createIfNone, silent'
|
|
190
|
-
))
|
|
200
|
+
));
|
|
191
201
|
}
|
|
192
202
|
if (options.clearSessionPreference) {
|
|
193
203
|
this._removeAccountPreference(extensionId, providerId, scopes);
|
|
@@ -212,7 +222,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
212
222
|
const recreatingSession = !!(options.forceNewSession && sessions.length);
|
|
213
223
|
const isAllowed = await this.loginPrompt(provider, extensionName, recreatingSession, uiOptions);
|
|
214
224
|
if (!isAllowed) {
|
|
215
|
-
throw (
|
|
225
|
+
throw ( new Error('User did not consent to login.'));
|
|
216
226
|
}
|
|
217
227
|
let session;
|
|
218
228
|
if (sessions?.length && !options.forceNewSession) {
|
|
@@ -246,6 +256,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
246
256
|
return undefined;
|
|
247
257
|
}
|
|
248
258
|
async $getSession(providerId, scopes, extensionId, extensionName, options) {
|
|
259
|
+
this.sendClientIdUsageTelemetry(extensionId, providerId, scopes);
|
|
249
260
|
const session = await this.doGetSession(providerId, scopes, extensionId, extensionName, options);
|
|
250
261
|
if (session) {
|
|
251
262
|
this.sendProviderUsageTelemetry(extensionId, providerId);
|
|
@@ -257,7 +268,23 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
257
268
|
const accounts = await this.authenticationService.getAccounts(providerId);
|
|
258
269
|
return accounts;
|
|
259
270
|
}
|
|
271
|
+
sendClientIdUsageTelemetry(extensionId, providerId, scopes) {
|
|
272
|
+
const containsVSCodeClientIdScope = ( scopes.some(scope => scope.startsWith('VSCODE_CLIENT_ID:')));
|
|
273
|
+
const key = `${extensionId}|${providerId}|${containsVSCodeClientIdScope}`;
|
|
274
|
+
if (( this._sentClientIdUsageEvents.has(key))) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
this._sentClientIdUsageEvents.add(key);
|
|
278
|
+
if (containsVSCodeClientIdScope) {
|
|
279
|
+
this.telemetryService.publicLog2('authentication.clientIdUsage', { extensionId });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
260
282
|
sendProviderUsageTelemetry(extensionId, providerId) {
|
|
283
|
+
const key = `${extensionId}|${providerId}`;
|
|
284
|
+
if (( this._sentProviderUsageEvents.has(key))) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
this._sentProviderUsageEvents.add(key);
|
|
261
288
|
this.telemetryService.publicLog2('authentication.providerUsage', { providerId, extensionId });
|
|
262
289
|
}
|
|
263
290
|
_getAccountPreference(extensionId, providerId, scopes, sessions) {
|
|
@@ -290,15 +317,16 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
290
317
|
};
|
|
291
318
|
MainThreadAuthentication = __decorate([
|
|
292
319
|
extHostNamedCustomer(MainContext.MainThreadAuthentication),
|
|
293
|
-
(
|
|
294
|
-
(
|
|
295
|
-
(
|
|
296
|
-
(
|
|
297
|
-
(
|
|
298
|
-
(
|
|
299
|
-
(
|
|
300
|
-
(
|
|
301
|
-
(
|
|
320
|
+
( __param(1, IAuthenticationService)),
|
|
321
|
+
( __param(2, IAuthenticationExtensionsService)),
|
|
322
|
+
( __param(3, IAuthenticationAccessService)),
|
|
323
|
+
( __param(4, IAuthenticationUsageService)),
|
|
324
|
+
( __param(5, IDialogService)),
|
|
325
|
+
( __param(6, INotificationService)),
|
|
326
|
+
( __param(7, IExtensionService)),
|
|
327
|
+
( __param(8, ITelemetryService)),
|
|
328
|
+
( __param(9, IOpenerService)),
|
|
329
|
+
( __param(10, ILogService))
|
|
302
330
|
], MainThreadAuthentication);
|
|
303
331
|
|
|
304
332
|
export { MainThreadAuthentication, MainThreadAuthenticationProvider };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VSBuffer } from "vscode/vscode/vs/base/common/buffer";
|
|
2
|
+
import { IBulkEditService } from "vscode/vscode/vs/editor/browser/services/bulkEditService";
|
|
3
|
+
import { WorkspaceEdit } from "vscode/vscode/vs/editor/common/languages";
|
|
4
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
5
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
6
|
+
import { IWorkspaceEditDto, MainThreadBulkEditsShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
7
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
8
|
+
import { SerializableObjectWithBuffers } from "vscode/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
9
|
+
export declare class MainThreadBulkEdits implements MainThreadBulkEditsShape {
|
|
10
|
+
private readonly _bulkEditService;
|
|
11
|
+
private readonly _logService;
|
|
12
|
+
private readonly _uriIdentService;
|
|
13
|
+
constructor(_extHostContext: IExtHostContext, _bulkEditService: IBulkEditService, _logService: ILogService, _uriIdentService: IUriIdentityService);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
$tryApplyWorkspaceEdit(dto: SerializableObjectWithBuffers<IWorkspaceEditDto>, undoRedoGroupId?: number, isRefactoring?: boolean): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
export declare function reviveWorkspaceEditDto(data: IWorkspaceEditDto, uriIdentityService: IUriIdentityService, resolveDataTransferFile?: (id: string) => Promise<VSBuffer>): WorkspaceEdit;
|
|
18
|
+
export declare function reviveWorkspaceEditDto(data: IWorkspaceEditDto | undefined, uriIdentityService: IUriIdentityService, resolveDataTransferFile?: (id: string) => Promise<VSBuffer>): WorkspaceEdit | undefined;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { decodeBase64 } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
4
|
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
4
5
|
import { IBulkEditService, ResourceTextEdit, ResourceFileEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
5
6
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
7
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
7
8
|
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
|
-
import { ResourceNotebookCellEdit } from 'vscode/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
9
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
10
|
+
import { CellEditType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
9
11
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
10
12
|
|
|
11
13
|
let MainThreadBulkEdits = class MainThreadBulkEdits {
|
|
@@ -61,7 +63,7 @@ function reviveWorkspaceEditDto(data, uriIdentityService, resolveDataTransferFil
|
|
|
61
63
|
if (ResourceNotebookCellEdit.is(edit)) {
|
|
62
64
|
edit.resource = uriIdentityService.asCanonicalUri(edit.resource);
|
|
63
65
|
const cellEdit = edit.cellEdit;
|
|
64
|
-
if (cellEdit.editType ===
|
|
66
|
+
if (cellEdit.editType === CellEditType.Replace) {
|
|
65
67
|
edit.cellEdit = {
|
|
66
68
|
...cellEdit,
|
|
67
69
|
cells: ( cellEdit.cells.map(cell => ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
3
4
|
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
4
5
|
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
@@ -46,14 +47,14 @@ CommandsRegistry.registerCommand('_remoteCLI.manageExtensions', async function (
|
|
|
46
47
|
lines.push(message);
|
|
47
48
|
}
|
|
48
49
|
})();
|
|
49
|
-
const childInstantiationService = instantiationService.createChild((
|
|
50
|
+
const childInstantiationService = instantiationService.createChild(( new ServiceCollection([IExtensionManagementService, remoteExtensionManagementService])));
|
|
50
51
|
try {
|
|
51
52
|
const cliService = childInstantiationService.createInstance(RemoteExtensionManagementCLI, logger);
|
|
52
53
|
if (args.list) {
|
|
53
54
|
await cliService.listExtensions(!!args.list.showVersions, args.list.category, undefined);
|
|
54
55
|
}
|
|
55
56
|
else {
|
|
56
|
-
const revive = (inputs) => (
|
|
57
|
+
const revive = (inputs) => ( inputs.map(input => isString(input) ? input : URI.revive(input)));
|
|
57
58
|
if (Array.isArray(args.install) && args.install.length) {
|
|
58
59
|
try {
|
|
59
60
|
await cliService.installExtensions(revive(args.install), [], { isMachineScoped: true }, !!args.force);
|
|
@@ -91,7 +92,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
91
92
|
if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
|
|
92
93
|
&& !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
|
|
93
94
|
this.logger.info(( localize(
|
|
94
|
-
|
|
95
|
+
2254,
|
|
95
96
|
"Cannot install the '{0}' extension because it is declared to not run in this setup.",
|
|
96
97
|
getExtensionId(manifest.publisher, manifest.name)
|
|
97
98
|
)));
|
|
@@ -100,10 +101,10 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
100
101
|
return true;
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
RemoteExtensionManagementCLI = (
|
|
104
|
-
(
|
|
105
|
-
(
|
|
106
|
-
(
|
|
107
|
-
(
|
|
108
|
-
(
|
|
109
|
-
], RemoteExtensionManagementCLI))
|
|
104
|
+
RemoteExtensionManagementCLI = ( __decorate([
|
|
105
|
+
( __param(1, IExtensionManagementService)),
|
|
106
|
+
( __param(2, IExtensionGalleryService)),
|
|
107
|
+
( __param(3, ILabelService)),
|
|
108
|
+
( __param(4, IWorkbenchEnvironmentService)),
|
|
109
|
+
( __param(5, IExtensionManifestPropertiesService))
|
|
110
|
+
], RemoteExtensionManagementCLI));
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DeferredPromise } from "vscode/vscode/vs/base/common/async";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { IMarkdownString } from "vscode/vscode/vs/base/common/htmlContent";
|
|
4
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
5
|
+
import { UriComponents } from "vscode/vscode/vs/base/common/uri";
|
|
6
|
+
import { ILanguageFeaturesService } from "vscode/vscode/vs/editor/common/services/languageFeatures";
|
|
7
|
+
import { ExtensionIdentifier } from "vscode/vscode/vs/platform/extensions/common/extensions";
|
|
8
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
10
|
+
import { IChatWidgetService } from "vscode/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
11
|
+
import { IChatAgentService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
12
|
+
import { IChatRelatedFileProviderMetadata } from "vscode/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
13
|
+
import { IChatEditingService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
14
|
+
import { IChatContentInlineReference, IChatContentReference, IChatTask, IChatWarningMessage } from "vscode/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
15
|
+
import { IChatService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
16
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
17
|
+
import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
18
|
+
import { Dto } from "vscode/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
19
|
+
import { IChatProgressDto, IDynamicChatAgentProps, IExtensionChatAgentMetadata, MainThreadChatAgentsShape2 } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
20
|
+
export declare class MainThreadChatTask implements IChatTask {
|
|
21
|
+
content: IMarkdownString;
|
|
22
|
+
readonly kind = "progressTask";
|
|
23
|
+
readonly deferred: DeferredPromise<string | void>;
|
|
24
|
+
private readonly _onDidAddProgress;
|
|
25
|
+
get onDidAddProgress(): Event<IChatWarningMessage | IChatContentReference>;
|
|
26
|
+
readonly progress: (IChatWarningMessage | IChatContentReference)[];
|
|
27
|
+
constructor(content: IMarkdownString);
|
|
28
|
+
task(): Promise<string | void>;
|
|
29
|
+
isSettled(): boolean;
|
|
30
|
+
complete(v: string | void): void;
|
|
31
|
+
add(progress: IChatWarningMessage | IChatContentReference): void;
|
|
32
|
+
}
|
|
33
|
+
export declare class MainThreadChatAgents2 extends Disposable implements MainThreadChatAgentsShape2 {
|
|
34
|
+
private readonly _chatAgentService;
|
|
35
|
+
private readonly _chatService;
|
|
36
|
+
private readonly _chatEditingService;
|
|
37
|
+
private readonly _languageFeaturesService;
|
|
38
|
+
private readonly _chatWidgetService;
|
|
39
|
+
private readonly _instantiationService;
|
|
40
|
+
private readonly _logService;
|
|
41
|
+
private readonly _extensionService;
|
|
42
|
+
private readonly _agents;
|
|
43
|
+
private readonly _agentCompletionProviders;
|
|
44
|
+
private readonly _agentIdsToCompletionProviders;
|
|
45
|
+
private readonly _chatParticipantDetectionProviders;
|
|
46
|
+
private readonly _chatRelatedFilesProviders;
|
|
47
|
+
private readonly _pendingProgress;
|
|
48
|
+
private readonly _proxy;
|
|
49
|
+
private _responsePartHandlePool;
|
|
50
|
+
private readonly _activeTasks;
|
|
51
|
+
private readonly _unresolvedAnchors;
|
|
52
|
+
constructor(extHostContext: IExtHostContext, _chatAgentService: IChatAgentService, _chatService: IChatService, _chatEditingService: IChatEditingService, _languageFeaturesService: ILanguageFeaturesService, _chatWidgetService: IChatWidgetService, _instantiationService: IInstantiationService, _logService: ILogService, _extensionService: IExtensionService);
|
|
53
|
+
$unregisterAgent(handle: number): void;
|
|
54
|
+
$transferActiveChatSession(toWorkspace: UriComponents): void;
|
|
55
|
+
$registerAgent(handle: number, extension: ExtensionIdentifier, id: string, metadata: IExtensionChatAgentMetadata, dynamicProps: IDynamicChatAgentProps | undefined): Promise<void>;
|
|
56
|
+
$updateAgent(handle: number, metadataUpdate: IExtensionChatAgentMetadata): Promise<void>;
|
|
57
|
+
$handleProgressChunk(requestId: string, progress: IChatProgressDto, responsePartHandle?: number): Promise<number | void>;
|
|
58
|
+
$handleAnchorResolve(requestId: string, handle: string, resolveAnchor: Dto<IChatContentInlineReference> | undefined): void;
|
|
59
|
+
$registerAgentCompletionsProvider(handle: number, id: string, triggerCharacters: string[]): void;
|
|
60
|
+
$unregisterAgentCompletionsProvider(handle: number, id: string): void;
|
|
61
|
+
$registerChatParticipantDetectionProvider(handle: number): void;
|
|
62
|
+
$unregisterChatParticipantDetectionProvider(handle: number): void;
|
|
63
|
+
$registerRelatedFilesProvider(handle: number, metadata: IChatRelatedFileProviderMetadata): void;
|
|
64
|
+
$unregisterRelatedFilesProvider(handle: number): void;
|
|
65
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { DeferredPromise } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
5
|
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -8,21 +9,23 @@ import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
|
8
9
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
9
10
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
10
11
|
import { getWordAtText } from 'vscode/vscode/vs/editor/common/core/wordHelper';
|
|
12
|
+
import { CompletionItemKind } from 'vscode/vscode/vs/editor/common/languages';
|
|
11
13
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
12
14
|
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
13
15
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
16
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
15
17
|
import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
16
|
-
import { ChatInputPart } from '@codingame/monaco-vscode-
|
|
18
|
+
import { ChatInputPart } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
|
|
17
19
|
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
18
20
|
import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
+
import { IChatEditingService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
22
|
+
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
23
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
21
24
|
import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
22
25
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
23
26
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
24
27
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
25
|
-
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-
|
|
28
|
+
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
|
|
26
29
|
|
|
27
30
|
class MainThreadChatTask {
|
|
28
31
|
get onDidAddProgress() { return this._onDidAddProgress.event; }
|
|
@@ -48,10 +51,11 @@ class MainThreadChatTask {
|
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
51
|
-
constructor(extHostContext, _chatAgentService, _chatService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService) {
|
|
54
|
+
constructor(extHostContext, _chatAgentService, _chatService, _chatEditingService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService) {
|
|
52
55
|
super();
|
|
53
56
|
this._chatAgentService = _chatAgentService;
|
|
54
57
|
this._chatService = _chatService;
|
|
58
|
+
this._chatEditingService = _chatEditingService;
|
|
55
59
|
this._languageFeaturesService = _languageFeaturesService;
|
|
56
60
|
this._chatWidgetService = _chatWidgetService;
|
|
57
61
|
this._instantiationService = _instantiationService;
|
|
@@ -61,6 +65,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
61
65
|
this._agentCompletionProviders = this._register(( new DisposableMap()));
|
|
62
66
|
this._agentIdsToCompletionProviders = this._register(( new DisposableMap()));
|
|
63
67
|
this._chatParticipantDetectionProviders = this._register(( new DisposableMap()));
|
|
68
|
+
this._chatRelatedFilesProviders = this._register(( new DisposableMap()));
|
|
64
69
|
this._pendingProgress = ( new Map());
|
|
65
70
|
this._responsePartHandlePool = 0;
|
|
66
71
|
this._activeTasks = ( new Map());
|
|
@@ -98,7 +103,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
98
103
|
const inputValue = widget?.inputEditor.getValue() ?? '';
|
|
99
104
|
this._chatService.transferChatSession({ sessionId, inputValue }, URI.revive(toWorkspace));
|
|
100
105
|
}
|
|
101
|
-
$registerAgent(handle, extension, id, metadata, dynamicProps) {
|
|
106
|
+
async $registerAgent(handle, extension, id, metadata, dynamicProps) {
|
|
107
|
+
await this._extensionService.whenInstalledExtensionsRegistered();
|
|
102
108
|
const staticAgentRegistration = this._chatAgentService.getAgent(id, true);
|
|
103
109
|
if (!staticAgentRegistration && !dynamicProps) {
|
|
104
110
|
if (this._chatAgentService.getAgentsByName(id).length) {
|
|
@@ -162,7 +168,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
162
168
|
hasFollowups: metadata.hasFollowups
|
|
163
169
|
});
|
|
164
170
|
}
|
|
165
|
-
$updateAgent(handle, metadataUpdate) {
|
|
171
|
+
async $updateAgent(handle, metadataUpdate) {
|
|
172
|
+
await this._extensionService.whenInstalledExtensionsRegistered();
|
|
166
173
|
const data = this._agents.get(handle);
|
|
167
174
|
if (!data) {
|
|
168
175
|
this._logService.error(`MainThreadChatAgents2#$updateAgent: No agent with handle ${handle} registered`);
|
|
@@ -262,7 +269,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
262
269
|
label: v.label,
|
|
263
270
|
range,
|
|
264
271
|
insertText: insertText + ' ',
|
|
265
|
-
kind:
|
|
272
|
+
kind: CompletionItemKind.Text,
|
|
266
273
|
detail: v.detail,
|
|
267
274
|
documentation: v.documentation,
|
|
268
275
|
command: { id: addDynamicVariableActionId, title: '', arguments: [{ id: v.id, widget, range: rangeAfterInsert, variableData: revive(v.value), command: v.command }] }
|
|
@@ -288,16 +295,28 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
288
295
|
$unregisterChatParticipantDetectionProvider(handle) {
|
|
289
296
|
this._chatParticipantDetectionProviders.deleteAndDispose(handle);
|
|
290
297
|
}
|
|
298
|
+
$registerRelatedFilesProvider(handle, metadata) {
|
|
299
|
+
this._chatRelatedFilesProviders.set(handle, this._chatEditingService.registerRelatedFilesProvider(handle, {
|
|
300
|
+
description: metadata.description,
|
|
301
|
+
provideRelatedFiles: async (request, token) => {
|
|
302
|
+
return (await this._proxy.$provideRelatedFiles(handle, request, token))?.map((v) => ({ uri: ( URI.from(v.uri)), description: v.description })) ?? [];
|
|
303
|
+
}
|
|
304
|
+
}));
|
|
305
|
+
}
|
|
306
|
+
$unregisterRelatedFilesProvider(handle) {
|
|
307
|
+
this._chatRelatedFilesProviders.deleteAndDispose(handle);
|
|
308
|
+
}
|
|
291
309
|
};
|
|
292
310
|
MainThreadChatAgents2 = __decorate([
|
|
293
311
|
extHostNamedCustomer(MainContext.MainThreadChatAgents2),
|
|
294
312
|
( __param(1, IChatAgentService)),
|
|
295
313
|
( __param(2, IChatService)),
|
|
296
|
-
( __param(3,
|
|
297
|
-
( __param(4,
|
|
298
|
-
( __param(5,
|
|
299
|
-
( __param(6,
|
|
300
|
-
( __param(7,
|
|
314
|
+
( __param(3, IChatEditingService)),
|
|
315
|
+
( __param(4, ILanguageFeaturesService)),
|
|
316
|
+
( __param(5, IChatWidgetService)),
|
|
317
|
+
( __param(6, IInstantiationService)),
|
|
318
|
+
( __param(7, ILogService)),
|
|
319
|
+
( __param(8, IExtensionService))
|
|
301
320
|
], MainThreadChatAgents2);
|
|
302
321
|
function computeCompletionRanges(model, position, reg) {
|
|
303
322
|
const varWord = getWordAtText(position.column, reg, model.getLineContent(position.lineNumber), 0);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ICodeMapperService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service";
|
|
3
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
+
import { ICodeMapperProgressDto, MainThreadCodeMapperShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
export declare class MainThreadChatCodemapper extends Disposable implements MainThreadCodeMapperShape {
|
|
6
|
+
private readonly codeMapperService;
|
|
7
|
+
private providers;
|
|
8
|
+
private readonly _proxy;
|
|
9
|
+
private static _requestHandlePool;
|
|
10
|
+
private _responseMap;
|
|
11
|
+
constructor(extHostContext: IExtHostContext, codeMapperService: ICodeMapperService);
|
|
12
|
+
$registerCodeMapperProvider(handle: number): void;
|
|
13
|
+
$unregisterCodeMapperProvider(handle: number): void;
|
|
14
|
+
$handleProgress(requestId: string, data: ICodeMapperProgressDto): Promise<void>;
|
|
15
|
+
}
|
|
@@ -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 { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
5
|
import { ICodeMapperService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IChatVariableResolverProgressDto, MainThreadChatVariablesShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
|
+
import { IChatVariableData } from "vscode/vscode/vs/workbench/contrib/chat/common/chatVariables";
|
|
3
|
+
import { IChatVariablesService } from "vscode/vscode/vs/workbench/contrib/chat/common/chatVariables.service";
|
|
4
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
5
|
+
export declare class MainThreadChatVariables implements MainThreadChatVariablesShape {
|
|
6
|
+
private readonly _chatVariablesService;
|
|
7
|
+
private readonly _proxy;
|
|
8
|
+
private readonly _variables;
|
|
9
|
+
private readonly _pendingProgress;
|
|
10
|
+
constructor(extHostContext: IExtHostContext, _chatVariablesService: IChatVariablesService);
|
|
11
|
+
dispose(): void;
|
|
12
|
+
$registerVariable(handle: number, data: IChatVariableData): void;
|
|
13
|
+
$handleProgressChunk(requestId: string, progress: IChatVariableResolverProgressDto): Promise<number | void>;
|
|
14
|
+
$unregisterVariable(handle: number): void;
|
|
15
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
4
5
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MainThreadClipboardShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
|
+
import { IClipboardService } from "vscode/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
3
|
+
export declare class MainThreadClipboard implements MainThreadClipboardShape {
|
|
4
|
+
private readonly _clipboardService;
|
|
5
|
+
constructor(_context: any, _clipboardService: IClipboardService);
|
|
6
|
+
dispose(): void;
|
|
7
|
+
$readText(): Promise<string>;
|
|
8
|
+
$writeText(value: string): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
3
4
|
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
5
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
|