@codingame/monaco-vscode-extensions-service-override 5.3.0 → 6.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/extensions.js +4 -4
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +6 -6
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +35 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +72 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +3 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +25 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +11 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +22 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +18 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +12 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +14 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +38 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +73 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +9 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +18 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +28 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +8 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +42 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +6 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +34 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +16 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +5 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +8 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +4 -4
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +2 -1
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +2 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +12 -10
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +27 -21
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +15 -11
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +19 -16
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +7 -6
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +15 -2
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +10 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -72
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
+
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { registerSingleton, InstantiationType } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
|
+
import { createDecorator } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
+
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
+
|
|
9
|
+
const IEmbeddingsService = ( createDecorator('embeddingsService'));
|
|
10
|
+
class EmbeddingsService {
|
|
11
|
+
constructor() {
|
|
12
|
+
this._onDidChange = ( new Emitter());
|
|
13
|
+
this.onDidChange = this._onDidChange.event;
|
|
14
|
+
this.providers = ( new Map());
|
|
15
|
+
}
|
|
16
|
+
get allProviders() {
|
|
17
|
+
return ( this.providers.keys());
|
|
18
|
+
}
|
|
19
|
+
registerProvider(id, provider) {
|
|
20
|
+
this.providers.set(id, provider);
|
|
21
|
+
this._onDidChange.fire();
|
|
22
|
+
return {
|
|
23
|
+
dispose: () => {
|
|
24
|
+
this.providers.delete(id);
|
|
25
|
+
this._onDidChange.fire();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
computeEmbeddings(id, input, token) {
|
|
30
|
+
const provider = this.providers.get(id);
|
|
31
|
+
if (provider) {
|
|
32
|
+
return provider.provideEmbeddings(input, token);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return Promise.reject(( new Error(`No embeddings provider registered with id: ${id}`)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
registerSingleton(IEmbeddingsService, EmbeddingsService, InstantiationType.Delayed);
|
|
40
|
+
let MainThreadEmbeddings = class MainThreadEmbeddings {
|
|
41
|
+
constructor(context, embeddingsService) {
|
|
42
|
+
this.embeddingsService = embeddingsService;
|
|
43
|
+
this._store = ( new DisposableStore());
|
|
44
|
+
this._providers = this._store.add(( new DisposableMap()));
|
|
45
|
+
this._proxy = ( context.getProxy(ExtHostContext.ExtHostEmbeddings));
|
|
46
|
+
this._store.add(embeddingsService.onDidChange((() => {
|
|
47
|
+
this._proxy.$acceptEmbeddingModels(Array.from(embeddingsService.allProviders));
|
|
48
|
+
})));
|
|
49
|
+
}
|
|
50
|
+
dispose() {
|
|
51
|
+
this._store.dispose();
|
|
52
|
+
}
|
|
53
|
+
$registerEmbeddingProvider(handle, identifier) {
|
|
54
|
+
const registration = this.embeddingsService.registerProvider(identifier, {
|
|
55
|
+
provideEmbeddings: (input, token) => {
|
|
56
|
+
return this._proxy.$provideEmbeddings(handle, input, token);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
this._providers.set(handle, registration);
|
|
60
|
+
}
|
|
61
|
+
$unregisterEmbeddingProvider(handle) {
|
|
62
|
+
this._providers.deleteAndDispose(handle);
|
|
63
|
+
}
|
|
64
|
+
$computeEmbeddings(embeddingsModel, input, token) {
|
|
65
|
+
return this.embeddingsService.computeEmbeddings(embeddingsModel, input, token);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
MainThreadEmbeddings = __decorate([
|
|
69
|
+
extHostNamedCustomer(MainContext.MainThreadEmbeddings),
|
|
70
|
+
( __param(1, IEmbeddingsService))
|
|
71
|
+
], MainThreadEmbeddings);
|
|
72
|
+
|
|
73
|
+
export { MainThreadEmbeddings };
|
|
@@ -8,11 +8,13 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
8
8
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
9
9
|
import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
10
10
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
11
|
-
import { WebSocketRemoteConnection, ManagedRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
11
|
+
import { RemoteConnectionType, WebSocketRemoteConnection, ManagedRemoteConnection } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
12
12
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
13
13
|
import { IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
14
14
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
15
|
+
import { EnablementState } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement';
|
|
15
16
|
import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
17
|
+
import { ExtensionHostKind } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
16
18
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
17
19
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
18
20
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
@@ -107,7 +109,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
107
109
|
}
|
|
108
110
|
else {
|
|
109
111
|
const enablementState = this._extensionEnablementService.getEnablementState(missingInstalledDependency);
|
|
110
|
-
if (enablementState ===
|
|
112
|
+
if (enablementState === EnablementState.DisabledByVirtualWorkspace) {
|
|
111
113
|
this._notificationService.notify({
|
|
112
114
|
severity: Severity$1.Error,
|
|
113
115
|
message: ( localizeWithPath(
|
|
@@ -119,7 +121,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
119
121
|
)),
|
|
120
122
|
});
|
|
121
123
|
}
|
|
122
|
-
else if (enablementState ===
|
|
124
|
+
else if (enablementState === EnablementState.DisabledByTrustRequirement) {
|
|
123
125
|
this._notificationService.notify({
|
|
124
126
|
severity: Severity$1.Error,
|
|
125
127
|
message: ( localizeWithPath(
|
|
@@ -145,7 +147,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
145
147
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
146
148
|
)),
|
|
147
149
|
actions: {
|
|
148
|
-
primary: [( (new Action('enable', ( localizeWithPath(_moduleId, 6, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState ===
|
|
150
|
+
primary: [( (new Action('enable', ( localizeWithPath(_moduleId, 6, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
|
|
149
151
|
.then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
|
|
150
152
|
}
|
|
151
153
|
});
|
|
@@ -200,10 +202,10 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
async $setPerformanceMarks(marks) {
|
|
203
|
-
if (this._extensionHostKind ===
|
|
205
|
+
if (this._extensionHostKind === ExtensionHostKind.LocalProcess) {
|
|
204
206
|
this._timerService.setPerformanceMarks('localExtHost', marks);
|
|
205
207
|
}
|
|
206
|
-
else if (this._extensionHostKind ===
|
|
208
|
+
else if (this._extensionHostKind === ExtensionHostKind.LocalWebWorker) {
|
|
207
209
|
this._timerService.setPerformanceMarks('workerExtHost', marks);
|
|
208
210
|
}
|
|
209
211
|
else {
|
|
@@ -295,7 +297,7 @@ function reviveResolvedAuthority(resolvedAuthority) {
|
|
|
295
297
|
};
|
|
296
298
|
}
|
|
297
299
|
function reviveConnection(connection) {
|
|
298
|
-
if (connection.type ===
|
|
300
|
+
if (connection.type === RemoteConnectionType.WebSocket) {
|
|
299
301
|
return (
|
|
300
302
|
(new WebSocketRemoteConnection(connection.host, connection.port))
|
|
301
303
|
);
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
-
import { FilePermission, FileSystemProviderErrorCode, FileType, FileOperationError, toFileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
|
+
import { FilePermission, FileSystemProviderErrorCode, FileType, FileOperationError, FileOperationResult, toFileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
6
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
7
7
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
8
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -105,16 +105,16 @@ let MainThreadFileSystem = MainThreadFileSystem_1 = class MainThreadFileSystem {
|
|
|
105
105
|
static _handleError(err) {
|
|
106
106
|
if (err instanceof FileOperationError) {
|
|
107
107
|
switch (err.fileOperationResult) {
|
|
108
|
-
case
|
|
108
|
+
case FileOperationResult.FILE_NOT_FOUND:
|
|
109
109
|
err.name = FileSystemProviderErrorCode.FileNotFound;
|
|
110
110
|
break;
|
|
111
|
-
case
|
|
111
|
+
case FileOperationResult.FILE_IS_DIRECTORY:
|
|
112
112
|
err.name = FileSystemProviderErrorCode.FileIsADirectory;
|
|
113
113
|
break;
|
|
114
|
-
case
|
|
114
|
+
case FileOperationResult.FILE_PERMISSION_DENIED:
|
|
115
115
|
err.name = FileSystemProviderErrorCode.NoPermissions;
|
|
116
116
|
break;
|
|
117
|
-
case
|
|
117
|
+
case FileOperationResult.FILE_MOVE_CONFLICT:
|
|
118
118
|
err.name = FileSystemProviderErrorCode.FileExists;
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
3
4
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
4
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
6
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
7
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
7
8
|
import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
8
9
|
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
10
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
9
11
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
10
12
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
11
13
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
12
14
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
15
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
16
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
14
17
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
15
18
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
16
19
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -53,7 +56,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
53
56
|
const cts = ( (new CancellationTokenSource(token)));
|
|
54
57
|
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
55
58
|
const data = await progressService.withProgress({
|
|
56
|
-
location:
|
|
59
|
+
location: ProgressLocation.Notification,
|
|
57
60
|
title: this._progressLabel(operation),
|
|
58
61
|
cancellable: true,
|
|
59
62
|
delay: Math.min(timeout / 2, 3000)
|
|
@@ -70,14 +73,14 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
70
73
|
return;
|
|
71
74
|
}
|
|
72
75
|
const needsConfirmation = ( (data.edit.edits.some(edit => edit.metadata?.needsConfirmation)));
|
|
73
|
-
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits,
|
|
76
|
+
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, StorageScope.PROFILE);
|
|
74
77
|
if (envService.extensionTestsLocationURI) {
|
|
75
78
|
showPreview = false;
|
|
76
79
|
}
|
|
77
80
|
if (showPreview === undefined) {
|
|
78
81
|
let message;
|
|
79
82
|
if (data.extensionNames.length === 1) {
|
|
80
|
-
if (operation ===
|
|
83
|
+
if (operation === FileOperation.CREATE) {
|
|
81
84
|
message = ( localizeWithPath(
|
|
82
85
|
_moduleId,
|
|
83
86
|
0,
|
|
@@ -85,7 +88,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
85
88
|
data.extensionNames[0]
|
|
86
89
|
));
|
|
87
90
|
}
|
|
88
|
-
else if (operation ===
|
|
91
|
+
else if (operation === FileOperation.COPY) {
|
|
89
92
|
message = ( localizeWithPath(
|
|
90
93
|
_moduleId,
|
|
91
94
|
1,
|
|
@@ -93,7 +96,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
93
96
|
data.extensionNames[0]
|
|
94
97
|
));
|
|
95
98
|
}
|
|
96
|
-
else if (operation ===
|
|
99
|
+
else if (operation === FileOperation.MOVE) {
|
|
97
100
|
message = ( localizeWithPath(
|
|
98
101
|
_moduleId,
|
|
99
102
|
2,
|
|
@@ -111,7 +114,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
else {
|
|
114
|
-
if (operation ===
|
|
117
|
+
if (operation === FileOperation.CREATE) {
|
|
115
118
|
message = ( localizeWithPath(
|
|
116
119
|
_moduleId,
|
|
117
120
|
4,
|
|
@@ -119,7 +122,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
119
122
|
data.extensionNames.length
|
|
120
123
|
));
|
|
121
124
|
}
|
|
122
|
-
else if (operation ===
|
|
125
|
+
else if (operation === FileOperation.COPY) {
|
|
123
126
|
message = ( localizeWithPath(
|
|
124
127
|
_moduleId,
|
|
125
128
|
5,
|
|
@@ -127,7 +130,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
127
130
|
data.extensionNames.length
|
|
128
131
|
));
|
|
129
132
|
}
|
|
130
|
-
else if (operation ===
|
|
133
|
+
else if (operation === FileOperation.MOVE) {
|
|
131
134
|
message = ( localizeWithPath(
|
|
132
135
|
_moduleId,
|
|
133
136
|
6,
|
|
@@ -187,7 +190,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
187
190
|
}
|
|
188
191
|
showPreview = result === Choice.Preview;
|
|
189
192
|
if (checkboxChecked) {
|
|
190
|
-
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview,
|
|
193
|
+
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview, StorageScope.PROFILE, StorageTarget.USER);
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
196
|
}
|
|
@@ -196,15 +199,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
196
199
|
}
|
|
197
200
|
_progressLabel(operation) {
|
|
198
201
|
switch (operation) {
|
|
199
|
-
case
|
|
202
|
+
case FileOperation.CREATE:
|
|
200
203
|
return ( localizeWithPath(_moduleId, 12, "Running 'File Create' participants..."));
|
|
201
|
-
case
|
|
204
|
+
case FileOperation.MOVE:
|
|
202
205
|
return ( localizeWithPath(_moduleId, 13, "Running 'File Rename' participants..."));
|
|
203
|
-
case
|
|
206
|
+
case FileOperation.COPY:
|
|
204
207
|
return ( localizeWithPath(_moduleId, 14, "Running 'File Copy' participants..."));
|
|
205
|
-
case
|
|
208
|
+
case FileOperation.DELETE:
|
|
206
209
|
return ( localizeWithPath(_moduleId, 15, "Running 'File Delete' participants..."));
|
|
207
|
-
case
|
|
210
|
+
case FileOperation.WRITE:
|
|
208
211
|
return ( localizeWithPath(_moduleId, 16, "Running 'File Write' participants..."));
|
|
209
212
|
}
|
|
210
213
|
}
|
|
@@ -314,7 +317,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
314
317
|
});
|
|
315
318
|
}
|
|
316
319
|
run(accessor) {
|
|
317
|
-
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits,
|
|
320
|
+
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits, StorageScope.PROFILE);
|
|
318
321
|
}
|
|
319
322
|
});
|
|
320
323
|
|
|
@@ -9,6 +9,7 @@ import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
|
|
|
9
9
|
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
10
10
|
import { mixin } from 'vscode/vscode/vs/base/common/objects';
|
|
11
11
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
12
|
+
import { CompletionItemKind } from 'vscode/vscode/vs/editor/common/languages';
|
|
12
13
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
13
14
|
import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
|
|
14
15
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
@@ -21,7 +22,7 @@ import { CallHierarchyProviderRegistry } from 'vscode/vscode/vs/workbench/contri
|
|
|
21
22
|
import { WorkspaceSymbolProviderRegistry } from 'vscode/vscode/vs/workbench/contrib/search/common/search';
|
|
22
23
|
import { TypeHierarchyProviderRegistry } from 'vscode/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
|
|
23
24
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
24
|
-
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
25
|
+
import { ExtHostContext, ISuggestDataDtoField, ISuggestResultDtoField, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
25
26
|
|
|
26
27
|
var MainThreadLanguageFeatures_1;
|
|
27
28
|
let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThreadLanguageFeatures extends Disposable {
|
|
@@ -48,7 +49,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
48
49
|
}
|
|
49
50
|
this._proxy.$setWordDefinitions(wordDefinitionDtos);
|
|
50
51
|
};
|
|
51
|
-
this._languageConfigurationService.onDidChange((e) => {
|
|
52
|
+
this._register(this._languageConfigurationService.onDidChange((e) => {
|
|
52
53
|
if (!e.languageId) {
|
|
53
54
|
updateAllWordDefinitions();
|
|
54
55
|
}
|
|
@@ -60,7 +61,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
60
61
|
regexFlags: wordDefinition.flags
|
|
61
62
|
}]);
|
|
62
63
|
}
|
|
63
|
-
});
|
|
64
|
+
}));
|
|
64
65
|
updateAllWordDefinitions();
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -205,7 +206,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
205
206
|
provideHover: async (model, position, token, context) => {
|
|
206
207
|
const serializedContext = {
|
|
207
208
|
verbosityRequest: context?.verbosityRequest ? {
|
|
208
|
-
|
|
209
|
+
verbosityDelta: context.verbosityRequest.verbosityDelta,
|
|
209
210
|
previousHover: { id: context.verbosityRequest.previousHover.id }
|
|
210
211
|
} : undefined,
|
|
211
212
|
};
|
|
@@ -291,7 +292,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
291
292
|
}
|
|
292
293
|
}));
|
|
293
294
|
}
|
|
294
|
-
$
|
|
295
|
+
$registerCodeActionSupport(handle, selector, metadata, displayName, extensionId, supportsResolve) {
|
|
295
296
|
const provider = {
|
|
296
297
|
provideCodeActions: async (model, rangeOrSelection, context, token) => {
|
|
297
298
|
const listDto = await this._proxy.$provideCodeActions(handle, model.uri, rangeOrSelection, context, token);
|
|
@@ -309,7 +310,8 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
309
310
|
},
|
|
310
311
|
providedCodeActionKinds: metadata.providedKinds,
|
|
311
312
|
documentation: metadata.documentation,
|
|
312
|
-
displayName
|
|
313
|
+
displayName,
|
|
314
|
+
extensionId,
|
|
313
315
|
};
|
|
314
316
|
if (supportsResolve) {
|
|
315
317
|
provider.resolveCodeAction = async (codeAction, token) => {
|
|
@@ -426,30 +428,30 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
426
428
|
this._registrations.set(handle, this._languageFeaturesService.documentRangeSemanticTokensProvider.register(selector, ( new MainThreadDocumentRangeSemanticTokensProvider(this._proxy, handle, legend))));
|
|
427
429
|
}
|
|
428
430
|
static _inflateSuggestDto(defaultRange, data, extensionId) {
|
|
429
|
-
const label = data[
|
|
430
|
-
const commandId = data[
|
|
431
|
-
const commandIdent = data[
|
|
432
|
-
const commitChars = data[
|
|
431
|
+
const label = data[ISuggestDataDtoField.label];
|
|
432
|
+
const commandId = data[ISuggestDataDtoField.commandId];
|
|
433
|
+
const commandIdent = data[ISuggestDataDtoField.commandIdent];
|
|
434
|
+
const commitChars = data[ISuggestDataDtoField.commitCharacters];
|
|
433
435
|
return {
|
|
434
436
|
label,
|
|
435
437
|
extensionId,
|
|
436
|
-
kind: data[
|
|
437
|
-
tags: data[
|
|
438
|
-
detail: data[
|
|
439
|
-
documentation: data[
|
|
440
|
-
sortText: data[
|
|
441
|
-
filterText: data[
|
|
442
|
-
preselect: data[
|
|
443
|
-
insertText: data[
|
|
444
|
-
range: data[
|
|
445
|
-
insertTextRules: data[
|
|
438
|
+
kind: data[ISuggestDataDtoField.kind] ?? CompletionItemKind.Property,
|
|
439
|
+
tags: data[ISuggestDataDtoField.kindModifier],
|
|
440
|
+
detail: data[ISuggestDataDtoField.detail],
|
|
441
|
+
documentation: data[ISuggestDataDtoField.documentation],
|
|
442
|
+
sortText: data[ISuggestDataDtoField.sortText],
|
|
443
|
+
filterText: data[ISuggestDataDtoField.filterText],
|
|
444
|
+
preselect: data[ISuggestDataDtoField.preselect],
|
|
445
|
+
insertText: data[ISuggestDataDtoField.insertText] ?? (typeof label === 'string' ? label : label.label),
|
|
446
|
+
range: data[ISuggestDataDtoField.range] ?? defaultRange,
|
|
447
|
+
insertTextRules: data[ISuggestDataDtoField.insertTextRules],
|
|
446
448
|
commitCharacters: commitChars ? Array.from(commitChars) : undefined,
|
|
447
|
-
additionalTextEdits: data[
|
|
449
|
+
additionalTextEdits: data[ISuggestDataDtoField.additionalTextEdits],
|
|
448
450
|
command: commandId ? {
|
|
449
451
|
$ident: commandIdent,
|
|
450
452
|
id: commandId,
|
|
451
453
|
title: '',
|
|
452
|
-
arguments: commandIdent ? [commandIdent] : data[
|
|
454
|
+
arguments: commandIdent ? [commandIdent] : data[ISuggestDataDtoField.commandArguments],
|
|
453
455
|
} : undefined,
|
|
454
456
|
_id: data.x,
|
|
455
457
|
};
|
|
@@ -464,11 +466,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
464
466
|
return result;
|
|
465
467
|
}
|
|
466
468
|
return {
|
|
467
|
-
suggestions: ( result[
|
|
468
|
-
d => MainThreadLanguageFeatures_1._inflateSuggestDto(result[
|
|
469
|
+
suggestions: ( result[ISuggestResultDtoField.completions].map(
|
|
470
|
+
d => MainThreadLanguageFeatures_1._inflateSuggestDto(result[ISuggestResultDtoField.defaultRanges], d, extensionId)
|
|
469
471
|
)),
|
|
470
|
-
incomplete: result[
|
|
471
|
-
duration: result[
|
|
472
|
+
incomplete: result[ISuggestResultDtoField.isIncomplete] || false,
|
|
473
|
+
duration: result[ISuggestResultDtoField.duration],
|
|
472
474
|
dispose: () => {
|
|
473
475
|
if (typeof result.x === 'number') {
|
|
474
476
|
this._proxy.$releaseCompletionItems(handle, result.x);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
3
|
-
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
2
|
+
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
3
|
import { DisposableStore, DisposableMap, Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
4
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
6
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -27,8 +26,10 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
27
26
|
this._providerRegistrations = ( (new DisposableMap()));
|
|
28
27
|
this._pendingProgress = ( (new Map()));
|
|
29
28
|
this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostChatProvider)));
|
|
30
|
-
this._proxy.$
|
|
31
|
-
|
|
29
|
+
this._proxy.$acceptChatModelMetadata({ added: ( (_chatProviderService.getLanguageModelIds().map(
|
|
30
|
+
id => ({ identifier: id, metadata: _chatProviderService.lookupLanguageModel(id) })
|
|
31
|
+
))) });
|
|
32
|
+
this._store.add(_chatProviderService.onDidChangeLanguageModels(this._proxy.$acceptChatModelMetadata, this._proxy));
|
|
32
33
|
}
|
|
33
34
|
dispose() {
|
|
34
35
|
this._providerRegistrations.dispose();
|
|
@@ -63,21 +64,12 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
63
64
|
$unregisterProvider(handle) {
|
|
64
65
|
this._providerRegistrations.deleteAndDispose(handle);
|
|
65
66
|
}
|
|
67
|
+
$selectChatModels(selector) {
|
|
68
|
+
return this._chatProviderService.selectLanguageModels(selector);
|
|
69
|
+
}
|
|
66
70
|
$whenLanguageModelChatRequestMade(identifier, extensionId, participant, tokenCount) {
|
|
67
71
|
this._languageModelStatsService.update(identifier, extensionId, participant, tokenCount);
|
|
68
72
|
}
|
|
69
|
-
async $prepareChatAccess(extension, providerId, justification) {
|
|
70
|
-
const activate = this._extensionService.activateByEvent(`onLanguageModelAccess:${providerId}`);
|
|
71
|
-
const metadata = this._chatProviderService.lookupLanguageModel(providerId);
|
|
72
|
-
if (metadata) {
|
|
73
|
-
return metadata;
|
|
74
|
-
}
|
|
75
|
-
await Promise.race([
|
|
76
|
-
activate,
|
|
77
|
-
Event.toPromise(Event.filter(this._chatProviderService.onDidChangeLanguageModels, e => Boolean(e.added?.some(value => value.identifier === providerId))))
|
|
78
|
-
]);
|
|
79
|
-
return this._chatProviderService.lookupLanguageModel(providerId);
|
|
80
|
-
}
|
|
81
73
|
async $fetchResponse(extension, providerId, requestId, messages, options, token) {
|
|
82
74
|
this._logService.debug('[CHAT] extension request STARTED', extension.value, requestId);
|
|
83
75
|
const task = this._chatProviderService.makeLanguageModelChatRequest(providerId, extension, messages, options, ( (new Progress(value => {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { SocketCloseEventType } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
4
5
|
import { ManagedSocket, connectManagedSocket } from '../../../platform/remote/common/managedSocket.js';
|
|
6
|
+
import { RemoteConnectionType } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
5
7
|
import { IRemoteSocketFactoryService } from 'vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
|
|
6
8
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
9
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -45,7 +47,7 @@ let MainThreadManagedSockets = class MainThreadManagedSockets extends Disposable
|
|
|
45
47
|
}));
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
|
-
this._registrations.set(socketFactoryId, this._remoteSocketFactoryService.register(
|
|
50
|
+
this._registrations.set(socketFactoryId, this._remoteSocketFactoryService.register(RemoteConnectionType.Managed, socketFactory));
|
|
49
51
|
}
|
|
50
52
|
async $unregisterSocketFactory(socketFactoryId) {
|
|
51
53
|
this._registrations.get(socketFactoryId)?.dispose();
|
|
@@ -55,7 +57,7 @@ let MainThreadManagedSockets = class MainThreadManagedSockets extends Disposable
|
|
|
55
57
|
}
|
|
56
58
|
$onDidManagedSocketClose(socketId, error) {
|
|
57
59
|
this._remoteSockets.get(socketId)?.onClose.fire({
|
|
58
|
-
type:
|
|
60
|
+
type: SocketCloseEventType.NodeSocketCloseEvent,
|
|
59
61
|
error: error ? ( new Error(error)) : undefined,
|
|
60
62
|
hadError: !!error
|
|
61
63
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CellEditType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
1
2
|
import { CellExecutionUpdateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
|
|
2
3
|
|
|
3
4
|
var NotebookDto;
|
|
@@ -111,7 +112,7 @@ var NotebookDto;
|
|
|
111
112
|
}
|
|
112
113
|
NotebookDto.fromCellExecuteCompleteDto = fromCellExecuteCompleteDto;
|
|
113
114
|
function fromCellEditOperationDto(edit) {
|
|
114
|
-
if (edit.editType ===
|
|
115
|
+
if (edit.editType === CellEditType.Replace) {
|
|
115
116
|
return {
|
|
116
117
|
editType: edit.editType,
|
|
117
118
|
index: edit.index,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
2
3
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
3
4
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -27,10 +28,10 @@ let MainThreadProgress = class MainThreadProgress {
|
|
|
27
28
|
}
|
|
28
29
|
async $startProgress(handle, options, extensionId) {
|
|
29
30
|
const task = this._createTask(handle);
|
|
30
|
-
if (options.location ===
|
|
31
|
+
if (options.location === ProgressLocation.Notification && extensionId) {
|
|
31
32
|
const notificationOptions = {
|
|
32
33
|
...options,
|
|
33
|
-
location:
|
|
34
|
+
location: ProgressLocation.Notification,
|
|
34
35
|
secondaryActions: [( (new ManageExtensionAction(extensionId, ( localizeWithPath(_moduleId, 0, "Manage Extension")), this._commandService)))]
|
|
35
36
|
};
|
|
36
37
|
options = notificationOptions;
|