@codingame/monaco-vscode-extensions-service-override 18.4.0 → 19.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/package.json +27 -30
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +10 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +43 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +10 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +2 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +28 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +18 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +41 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +10 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +11 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +17 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +11 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +4 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extensions-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - extensions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,35 +15,32 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
32
|
-
"@codingame/monaco-vscode-
|
|
33
|
-
"@codingame/monaco-vscode-
|
|
34
|
-
"@codingame/monaco-vscode-
|
|
35
|
-
"@codingame/monaco-vscode-
|
|
36
|
-
"@codingame/monaco-vscode-
|
|
37
|
-
"@codingame/monaco-vscode-
|
|
38
|
-
"@codingame/monaco-vscode-
|
|
39
|
-
"@codingame/monaco-vscode-
|
|
40
|
-
"@codingame/monaco-vscode-
|
|
41
|
-
"@codingame/monaco-vscode-
|
|
42
|
-
"@codingame/monaco-vscode-
|
|
43
|
-
"@codingame/monaco-vscode-
|
|
44
|
-
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "18.4.0",
|
|
45
|
-
"@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "18.4.0",
|
|
46
|
-
"@codingame/monaco-vscode-files-service-override": "18.4.0"
|
|
18
|
+
"@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common": "19.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-256d5b78-0649-50e9-8354-2807f95f68f4-common": "19.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common": "19.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-2726569c-a06b-5f25-b851-14311bef12fa-common": "19.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-2a94c04a-b85b-5669-b06b-89c1bfa11cb9-common": "19.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "19.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common": "19.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common": "19.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "19.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-6845754f-e617-5ed9-8aaa-6ca3653a9532-common": "19.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common": "19.0.0",
|
|
29
|
+
"@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common": "19.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-86d65fc6-30f9-5dca-9501-e249de688591-common": "19.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common": "19.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common": "19.0.0",
|
|
33
|
+
"@codingame/monaco-vscode-9ebd6daf-8734-5a28-ad24-b238f5e5819d-common": "19.0.0",
|
|
34
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "19.0.0",
|
|
35
|
+
"@codingame/monaco-vscode-a9da9abe-278d-5ce6-9418-99c7c07c5c37-common": "19.0.0",
|
|
36
|
+
"@codingame/monaco-vscode-api": "19.0.0",
|
|
37
|
+
"@codingame/monaco-vscode-bf94ddb5-e436-506a-9763-5ab86b642508-common": "19.0.0",
|
|
38
|
+
"@codingame/monaco-vscode-ca445022-b812-53ca-a041-e46c7e0b13de-common": "19.0.0",
|
|
39
|
+
"@codingame/monaco-vscode-caf773dd-ab1d-5936-941d-a2fe9e896ffc-common": "19.0.0",
|
|
40
|
+
"@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common": "19.0.0",
|
|
41
|
+
"@codingame/monaco-vscode-eba0b9b3-174c-5dae-9867-a37810ca1808-common": "19.0.0",
|
|
42
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "19.0.0",
|
|
43
|
+
"@codingame/monaco-vscode-files-service-override": "19.0.0"
|
|
47
44
|
},
|
|
48
45
|
"main": "index.js",
|
|
49
46
|
"module": "index.js",
|
|
@@ -12,9 +12,9 @@ import { IExtensionManagementService, IExtensionGalleryService } from '@codingam
|
|
|
12
12
|
import { getIdAndVersion, areSameExtensions, getGalleryExtensionId, getExtensionId } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
13
13
|
import { ExtensionType, EXTENSION_CATEGORIES } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
14
14
|
|
|
15
|
-
const notFound = (id) => ( localize(
|
|
15
|
+
const notFound = (id) => ( localize(1804, "Extension '{0}' not found.", id));
|
|
16
16
|
const useId = ( localize(
|
|
17
|
-
|
|
17
|
+
1805,
|
|
18
18
|
"Make sure you use the full extension ID, including the publisher, e.g.: {0}",
|
|
19
19
|
'ms-dotnettools.csharp'
|
|
20
20
|
));
|
|
@@ -51,7 +51,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
if (this.location) {
|
|
54
|
-
this.logger.info(( localize(
|
|
54
|
+
this.logger.info(( localize(1806, "Extensions installed on {0}:", this.location)));
|
|
55
55
|
}
|
|
56
56
|
extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
|
|
57
57
|
let lastId = undefined;
|
|
@@ -66,7 +66,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
66
66
|
const failed = [];
|
|
67
67
|
try {
|
|
68
68
|
if (extensions.length) {
|
|
69
|
-
this.logger.info(this.location ? ( localize(
|
|
69
|
+
this.logger.info(this.location ? ( localize(1807, "Installing extensions on {0}...", this.location)) : ( localize(1808, "Installing extensions...")));
|
|
70
70
|
}
|
|
71
71
|
const installVSIXInfos = [];
|
|
72
72
|
const installExtensionInfos = [];
|
|
@@ -109,11 +109,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
catch (error) {
|
|
112
|
-
this.logger.error(( localize(
|
|
112
|
+
this.logger.error(( localize(1809, "Error while installing extensions: {0}", getErrorMessage(error))));
|
|
113
113
|
throw error;
|
|
114
114
|
}
|
|
115
115
|
if (failed.length) {
|
|
116
|
-
throw ( new Error(( localize(
|
|
116
|
+
throw ( new Error(( localize(1810, "Failed Installing Extensions: {0}", failed.join(', ')))));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
async updateExtensions(profileLocation) {
|
|
@@ -125,7 +125,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
this.logger.trace(( localize(
|
|
128
|
-
|
|
128
|
+
1811,
|
|
129
129
|
"Fetching latest versions for {0} extensions",
|
|
130
130
|
installedExtensionsQuery.length
|
|
131
131
|
)));
|
|
@@ -142,11 +142,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
if (!extensionsToUpdate.length) {
|
|
145
|
-
this.logger.info(( localize(
|
|
145
|
+
this.logger.info(( localize(1812, "No extension to update")));
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
this.logger.info(( localize(
|
|
149
|
-
|
|
149
|
+
1813,
|
|
150
150
|
"Updating extensions: {0}",
|
|
151
151
|
( extensionsToUpdate.map(ext => ext.extension.identifier.id)).join(', ')
|
|
152
152
|
)));
|
|
@@ -154,7 +154,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
154
154
|
for (const extensionResult of installationResult) {
|
|
155
155
|
if (extensionResult.error) {
|
|
156
156
|
this.logger.error(( localize(
|
|
157
|
-
|
|
157
|
+
1814,
|
|
158
158
|
"Error while updating extension {0}: {1}",
|
|
159
159
|
extensionResult.identifier.id,
|
|
160
160
|
getErrorMessage(extensionResult.error)
|
|
@@ -162,7 +162,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
162
162
|
}
|
|
163
163
|
else {
|
|
164
164
|
this.logger.info(( localize(
|
|
165
|
-
|
|
165
|
+
1815,
|
|
166
166
|
"Extension '{0}' v{1} was successfully updated.",
|
|
167
167
|
extensionResult.identifier.id,
|
|
168
168
|
extensionResult.local?.manifest.version
|
|
@@ -177,7 +177,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
177
177
|
if (installedExtension) {
|
|
178
178
|
if (!force && (!version || (version === 'prerelease' && installedExtension.preRelease))) {
|
|
179
179
|
this.logger.info(( localize(
|
|
180
|
-
|
|
180
|
+
1816,
|
|
181
181
|
"Extension '{0}' v{1} is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: '{2}@1.2.3'.",
|
|
182
182
|
id,
|
|
183
183
|
installedExtension.manifest.version,
|
|
@@ -186,7 +186,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
186
186
|
return false;
|
|
187
187
|
}
|
|
188
188
|
if (version && installedExtension.manifest.version === version) {
|
|
189
|
-
this.logger.info(( localize(
|
|
189
|
+
this.logger.info(( localize(1817, "Extension '{0}' is already installed.", `${id}@${version}`)));
|
|
190
190
|
return false;
|
|
191
191
|
}
|
|
192
192
|
if (installedExtension.preRelease && version !== 'prerelease') {
|
|
@@ -223,24 +223,24 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
223
223
|
if (installedExtension) {
|
|
224
224
|
if (gallery.version === installedExtension.manifest.version) {
|
|
225
225
|
this.logger.info(( localize(
|
|
226
|
-
|
|
226
|
+
1817,
|
|
227
227
|
"Extension '{0}' is already installed.",
|
|
228
228
|
version ? `${id}@${version}` : id
|
|
229
229
|
)));
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
this.logger.info(( localize(
|
|
233
|
-
|
|
233
|
+
1818,
|
|
234
234
|
"Updating the extension '{0}' to the version {1}",
|
|
235
235
|
id,
|
|
236
236
|
gallery.version
|
|
237
237
|
)));
|
|
238
238
|
}
|
|
239
239
|
if (installOptions.isBuiltin) {
|
|
240
|
-
this.logger.info(version ? ( localize(
|
|
240
|
+
this.logger.info(version ? ( localize(1819, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1820, "Installing builtin extension '{0}'...", id)));
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
|
-
this.logger.info(version ? ( localize(
|
|
243
|
+
this.logger.info(version ? ( localize(1821, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1822, "Installing extension '{0}'...", id)));
|
|
244
244
|
}
|
|
245
245
|
extensionsToInstall.push({
|
|
246
246
|
extension: gallery,
|
|
@@ -252,7 +252,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
252
252
|
for (const extensionResult of installationResult) {
|
|
253
253
|
if (extensionResult.error) {
|
|
254
254
|
this.logger.error(( localize(
|
|
255
|
-
|
|
255
|
+
1823,
|
|
256
256
|
"Error while installing extension {0}: {1}",
|
|
257
257
|
extensionResult.identifier.id,
|
|
258
258
|
getErrorMessage(extensionResult.error)
|
|
@@ -261,7 +261,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
261
261
|
}
|
|
262
262
|
else {
|
|
263
263
|
this.logger.info(( localize(
|
|
264
|
-
|
|
264
|
+
1824,
|
|
265
265
|
"Extension '{0}' v{1} was successfully installed.",
|
|
266
266
|
extensionResult.identifier.id,
|
|
267
267
|
extensionResult.local?.manifest.version
|
|
@@ -280,11 +280,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
280
280
|
if (valid) {
|
|
281
281
|
try {
|
|
282
282
|
await this.extensionManagementService.install(vsix, { ...installOptions, installGivenVersion: true });
|
|
283
|
-
this.logger.info(( localize(
|
|
283
|
+
this.logger.info(( localize(1825, "Extension '{0}' was successfully installed.", basename(vsix))));
|
|
284
284
|
}
|
|
285
285
|
catch (error) {
|
|
286
286
|
if (isCancellationError(error)) {
|
|
287
|
-
this.logger.info(( localize(
|
|
287
|
+
this.logger.info(( localize(1826, "Cancelled installing extension '{0}'.", basename(vsix))));
|
|
288
288
|
}
|
|
289
289
|
else {
|
|
290
290
|
throw error;
|
|
@@ -319,7 +319,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
319
319
|
const newer = installedExtensions.find(local => areSameExtensions(extensionIdentifier, local.identifier) && semverExports.gt(local.manifest.version, manifest.version));
|
|
320
320
|
if (newer) {
|
|
321
321
|
this.logger.info(( localize(
|
|
322
|
-
|
|
322
|
+
1827,
|
|
323
323
|
"A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
|
|
324
324
|
newer.identifier.id,
|
|
325
325
|
newer.manifest.version,
|
|
@@ -347,7 +347,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
347
347
|
}
|
|
348
348
|
if (( extensionsToUninstall.some(e => e.type === ExtensionType.System))) {
|
|
349
349
|
this.logger.info(( localize(
|
|
350
|
-
|
|
350
|
+
1828,
|
|
351
351
|
"Extension '{0}' is a Built-in extension and cannot be uninstalled",
|
|
352
352
|
id
|
|
353
353
|
)));
|
|
@@ -355,26 +355,26 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
355
355
|
}
|
|
356
356
|
if (!force && ( extensionsToUninstall.some(e => e.isBuiltin))) {
|
|
357
357
|
this.logger.info(( localize(
|
|
358
|
-
|
|
358
|
+
1829,
|
|
359
359
|
"Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
|
|
360
360
|
id
|
|
361
361
|
)));
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
|
-
this.logger.info(( localize(
|
|
364
|
+
this.logger.info(( localize(1830, "Uninstalling {0}...", id)));
|
|
365
365
|
for (const extensionToUninstall of extensionsToUninstall) {
|
|
366
366
|
await this.extensionManagementService.uninstall(extensionToUninstall, { profileLocation });
|
|
367
367
|
}
|
|
368
368
|
if (this.location) {
|
|
369
369
|
this.logger.info(( localize(
|
|
370
|
-
|
|
370
|
+
1831,
|
|
371
371
|
"Extension '{0}' was successfully uninstalled from {1}!",
|
|
372
372
|
id,
|
|
373
373
|
this.location
|
|
374
374
|
)));
|
|
375
375
|
}
|
|
376
376
|
else {
|
|
377
|
-
this.logger.info(( localize(
|
|
377
|
+
this.logger.info(( localize(1832, "Extension '{0}' was successfully uninstalled!", id)));
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
}
|
|
@@ -392,7 +392,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
notInstalled(id) {
|
|
395
|
-
return this.location ? ( localize(
|
|
395
|
+
return this.location ? ( localize(1833, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1834, "Extension '{0}' is not installed.", id));
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
ExtensionManagementCLI = ( __decorate([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AuthenticationSession, AuthenticationSessionsChangeEvent, IAuthenticationProvider, AuthenticationSessionAccount, IAuthenticationProviderSessionOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication";
|
|
4
4
|
import { IAuthenticationExtensionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
5
5
|
import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
6
6
|
import { ExtHostAuthenticationShape, MainThreadAuthenticationShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
@@ -37,11 +37,10 @@ export declare class MainThreadAuthenticationProvider extends Disposable impleme
|
|
|
37
37
|
readonly label: string;
|
|
38
38
|
readonly supportsMultipleAccounts: boolean;
|
|
39
39
|
readonly authorizationServers: ReadonlyArray<URI>;
|
|
40
|
-
private readonly notificationService;
|
|
41
40
|
readonly onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>;
|
|
42
|
-
constructor(_proxy: ExtHostAuthenticationShape, id: string, label: string, supportsMultipleAccounts: boolean, authorizationServers: ReadonlyArray<URI>,
|
|
41
|
+
constructor(_proxy: ExtHostAuthenticationShape, id: string, label: string, supportsMultipleAccounts: boolean, authorizationServers: ReadonlyArray<URI>, onDidChangeSessionsEmitter: Emitter<AuthenticationSessionsChangeEvent>);
|
|
43
42
|
getSessions(scopes: string[] | undefined, options: IAuthenticationProviderSessionOptions): Promise<readonly AuthenticationSession[]>;
|
|
44
|
-
createSession(scopes: string[], options:
|
|
43
|
+
createSession(scopes: string[], options: IAuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
|
|
45
44
|
removeSession(sessionId: string): Promise<void>;
|
|
46
45
|
}
|
|
47
46
|
export declare class MainThreadAuthentication extends Disposable implements MainThreadAuthenticationShape {
|
|
@@ -61,6 +60,7 @@ export declare class MainThreadAuthentication extends Disposable implements Main
|
|
|
61
60
|
private readonly _proxy;
|
|
62
61
|
private readonly _registrations;
|
|
63
62
|
private _sentProviderUsageEvents;
|
|
63
|
+
private _suppressUnregisterEvent;
|
|
64
64
|
constructor(extHostContext: IExtHostContext, authenticationService: IAuthenticationService, authenticationExtensionsService: IAuthenticationExtensionsService, authenticationAccessService: IAuthenticationAccessService, authenticationUsageService: IAuthenticationUsageService, dialogService: IDialogService, notificationService: INotificationService, extensionService: IExtensionService, telemetryService: ITelemetryService, openerService: IOpenerService, logService: ILogService, urlService: IURLService, dynamicAuthProviderStorageService: IDynamicAuthenticationProviderStorageService, clipboardService: IClipboardService);
|
|
65
65
|
$registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean, supportedAuthorizationServer?: UriComponents[]): Promise<void>;
|
|
66
66
|
$unregisterAuthenticationProvider(id: string): Promise<void>;
|
|
@@ -73,6 +73,12 @@ export declare class MainThreadAuthentication extends Disposable implements Main
|
|
|
73
73
|
$setSessionsForDynamicAuthProvider(authProviderId: string, clientId: string, sessions: (IAuthorizationTokenResponse & {
|
|
74
74
|
created_at: number;
|
|
75
75
|
})[]): Promise<void>;
|
|
76
|
+
$sendDidChangeDynamicProviderInfo({ providerId, clientId, authorizationServer, label }: Partial<{
|
|
77
|
+
providerId: string;
|
|
78
|
+
clientId: string;
|
|
79
|
+
authorizationServer: UriComponents;
|
|
80
|
+
label: string;
|
|
81
|
+
}>): Promise<void>;
|
|
76
82
|
private loginPrompt;
|
|
77
83
|
private continueWithIncorrectAccountPrompt;
|
|
78
84
|
private doGetSession;
|
|
@@ -3,7 +3,6 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
-
import { INTERNAL_AUTH_PROVIDER_PREFIX } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication';
|
|
7
6
|
import { IAuthenticationService, IAuthenticationExtensionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
8
7
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
9
8
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
@@ -27,14 +26,13 @@ import { IDynamicAuthenticationProviderStorageService } from '@codingame/monaco-
|
|
|
27
26
|
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
28
27
|
|
|
29
28
|
class MainThreadAuthenticationProvider extends Disposable {
|
|
30
|
-
constructor(_proxy, id, label, supportsMultipleAccounts, authorizationServers,
|
|
29
|
+
constructor(_proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter) {
|
|
31
30
|
super();
|
|
32
31
|
this._proxy = _proxy;
|
|
33
32
|
this.id = id;
|
|
34
33
|
this.label = label;
|
|
35
34
|
this.supportsMultipleAccounts = supportsMultipleAccounts;
|
|
36
35
|
this.authorizationServers = authorizationServers;
|
|
37
|
-
this.notificationService = notificationService;
|
|
38
36
|
this.onDidChangeSessions = onDidChangeSessionsEmitter.event;
|
|
39
37
|
}
|
|
40
38
|
async getSessions(scopes, options) {
|
|
@@ -45,7 +43,6 @@ class MainThreadAuthenticationProvider extends Disposable {
|
|
|
45
43
|
}
|
|
46
44
|
async removeSession(sessionId) {
|
|
47
45
|
await this._proxy.$removeSession(this.id, sessionId);
|
|
48
|
-
this.notificationService.info(( localize(2387, "Successfully signed out.")));
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
let MainThreadAuthentication = class MainThreadAuthentication extends Disposable {
|
|
@@ -66,10 +63,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
66
63
|
this.clipboardService = clipboardService;
|
|
67
64
|
this._registrations = this._register(( new DisposableMap()));
|
|
68
65
|
this._sentProviderUsageEvents = ( new Set());
|
|
66
|
+
this._suppressUnregisterEvent = false;
|
|
69
67
|
this._sentClientIdUsageEvents = ( new Set());
|
|
70
68
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostAuthentication));
|
|
71
69
|
this._register(this.authenticationService.onDidChangeSessions(e => this._proxy.$onDidChangeAuthenticationSessions(e.providerId, e.label)));
|
|
72
|
-
this._register(this.authenticationService.onDidUnregisterAuthenticationProvider(e =>
|
|
70
|
+
this._register(this.authenticationService.onDidUnregisterAuthenticationProvider(e => {
|
|
71
|
+
if (!this._suppressUnregisterEvent) {
|
|
72
|
+
this._proxy.$onDidUnregisterAuthenticationProvider(e.id);
|
|
73
|
+
}
|
|
74
|
+
}));
|
|
73
75
|
this._register(this.authenticationExtensionsService.onDidChangeAccountPreference(e => {
|
|
74
76
|
const providerInfo = this.authenticationService.getProvider(e.providerId);
|
|
75
77
|
this._proxy.$onDidChangeAuthenticationSessions(providerInfo.id, providerInfo.label, e.extensionIds);
|
|
@@ -80,7 +82,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
80
82
|
this._register(authenticationService.registerAuthenticationProviderHostDelegate({
|
|
81
83
|
priority: extHostContext.extensionHostKind === ExtensionHostKind.LocalWebWorker ? 0 : 1,
|
|
82
84
|
create: async (authorizationServer, serverMetadata, resource) => {
|
|
83
|
-
const authProviderId = ( authorizationServer.toString(true));
|
|
85
|
+
const authProviderId = resource ? `${( authorizationServer.toString(true))} ${resource.resource}` : ( authorizationServer.toString(true));
|
|
84
86
|
const clientId = this.dynamicAuthProviderStorageService.getClientId(authProviderId);
|
|
85
87
|
let initialTokens = undefined;
|
|
86
88
|
if (clientId) {
|
|
@@ -104,14 +106,19 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
104
106
|
label,
|
|
105
107
|
supportsMultipleAccounts,
|
|
106
108
|
supportedAuthorizationServerUris,
|
|
107
|
-
this.notificationService,
|
|
108
109
|
emitter
|
|
109
110
|
));
|
|
110
111
|
this.authenticationService.registerAuthenticationProvider(id, provider);
|
|
111
112
|
}
|
|
112
113
|
async $unregisterAuthenticationProvider(id) {
|
|
113
114
|
this._registrations.deleteAndDispose(id);
|
|
114
|
-
this.
|
|
115
|
+
this._suppressUnregisterEvent = true;
|
|
116
|
+
try {
|
|
117
|
+
this.authenticationService.unregisterAuthenticationProvider(id);
|
|
118
|
+
}
|
|
119
|
+
finally {
|
|
120
|
+
this._suppressUnregisterEvent = false;
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
async $ensureProvider(id) {
|
|
117
124
|
if (!this.authenticationService.isAuthenticationProviderRegistered(id)) {
|
|
@@ -146,8 +153,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
146
153
|
return await deferredPromise.p;
|
|
147
154
|
}
|
|
148
155
|
$showContinueNotification(message) {
|
|
149
|
-
const yes = ( localize(
|
|
150
|
-
const no = ( localize(
|
|
156
|
+
const yes = ( localize(2404, "Yes"));
|
|
157
|
+
const no = ( localize(2405, "No"));
|
|
151
158
|
const deferredPromise = ( new DeferredPromise());
|
|
152
159
|
let result = false;
|
|
153
160
|
const handle = this.notificationService.prompt(Severity.Warning, message, [{
|
|
@@ -164,32 +171,38 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
164
171
|
return deferredPromise.p;
|
|
165
172
|
}
|
|
166
173
|
async $registerDynamicAuthenticationProvider(id, label, authorizationServer, clientId) {
|
|
167
|
-
await this.$registerAuthenticationProvider(id, label,
|
|
174
|
+
await this.$registerAuthenticationProvider(id, label, true, [authorizationServer]);
|
|
168
175
|
this.dynamicAuthProviderStorageService.storeClientId(id, ( URI.revive(authorizationServer).toString(true)), clientId, label);
|
|
169
176
|
}
|
|
170
177
|
async $setSessionsForDynamicAuthProvider(authProviderId, clientId, sessions) {
|
|
171
178
|
await this.dynamicAuthProviderStorageService.setSessionsForDynamicAuthProvider(authProviderId, clientId, sessions);
|
|
172
179
|
}
|
|
180
|
+
async $sendDidChangeDynamicProviderInfo({ providerId, clientId, authorizationServer, label }) {
|
|
181
|
+
this.logService.info(`Client ID for authentication provider ${providerId} changed to ${clientId}`);
|
|
182
|
+
const existing = this.dynamicAuthProviderStorageService.getInteractedProviders().find(p => p.providerId === providerId);
|
|
183
|
+
if (!existing) {
|
|
184
|
+
throw ( new Error(
|
|
185
|
+
`Dynamic authentication provider ${providerId} not found. Has it been registered?`
|
|
186
|
+
));
|
|
187
|
+
}
|
|
188
|
+
this.dynamicAuthProviderStorageService.storeClientId(providerId || existing.providerId, authorizationServer ? ( URI.revive(authorizationServer).toString(true)) : existing.authorizationServer, clientId || existing.clientId, label || existing.label);
|
|
189
|
+
}
|
|
173
190
|
async loginPrompt(provider, extensionName, recreatingSession, options) {
|
|
174
191
|
let message;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"The extension '{0}' wants to access the language models provided by {1}.",
|
|
179
|
-
extensionName,
|
|
180
|
-
provider.label
|
|
181
|
-
));
|
|
192
|
+
const customMessage = provider.confirmation?.(extensionName, recreatingSession);
|
|
193
|
+
if (customMessage) {
|
|
194
|
+
message = customMessage;
|
|
182
195
|
}
|
|
183
196
|
else {
|
|
184
197
|
message = recreatingSession
|
|
185
198
|
? ( localize(
|
|
186
|
-
|
|
199
|
+
2406,
|
|
187
200
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
188
201
|
extensionName,
|
|
189
202
|
provider.label
|
|
190
203
|
))
|
|
191
204
|
: ( localize(
|
|
192
|
-
|
|
205
|
+
2407,
|
|
193
206
|
"The extension '{0}' wants to sign in using {1}.",
|
|
194
207
|
extensionName,
|
|
195
208
|
provider.label
|
|
@@ -197,7 +210,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
197
210
|
}
|
|
198
211
|
const buttons = [
|
|
199
212
|
{
|
|
200
|
-
label: ( localize(
|
|
213
|
+
label: ( localize(2408, "&&Allow")),
|
|
201
214
|
run() {
|
|
202
215
|
return true;
|
|
203
216
|
},
|
|
@@ -205,7 +218,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
205
218
|
];
|
|
206
219
|
if (options?.learnMore) {
|
|
207
220
|
buttons.push({
|
|
208
|
-
label: ( localize(
|
|
221
|
+
label: ( localize(2409, "Learn more")),
|
|
209
222
|
run: async () => {
|
|
210
223
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
211
224
|
await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
|
|
@@ -224,9 +237,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
224
237
|
}
|
|
225
238
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
226
239
|
const result = await this.dialogService.prompt({
|
|
227
|
-
message: ( localize(
|
|
240
|
+
message: ( localize(2410, "Incorrect account detected")),
|
|
228
241
|
detail: ( localize(
|
|
229
|
-
|
|
242
|
+
2411,
|
|
230
243
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
231
244
|
chosenAccountLabel,
|
|
232
245
|
requestedAccountLabel
|
|
@@ -235,11 +248,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
235
248
|
cancelButton: true,
|
|
236
249
|
buttons: [
|
|
237
250
|
{
|
|
238
|
-
label: ( localize(
|
|
251
|
+
label: ( localize(2412, 'Keep {0}', chosenAccountLabel)),
|
|
239
252
|
run: () => chosenAccountLabel
|
|
240
253
|
},
|
|
241
254
|
{
|
|
242
|
-
label: ( localize(
|
|
255
|
+
label: ( localize(2413, 'Login with {0}', requestedAccountLabel)),
|
|
243
256
|
run: () => requestedAccountLabel
|
|
244
257
|
}
|
|
245
258
|
],
|
|
@@ -393,16 +406,16 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
393
406
|
async $showDeviceCodeModal(userCode, verificationUri) {
|
|
394
407
|
const { result } = await this.dialogService.prompt({
|
|
395
408
|
type: Severity.Info,
|
|
396
|
-
message: ( localize(
|
|
409
|
+
message: ( localize(2414, "Device Code Authentication")),
|
|
397
410
|
detail: ( localize(
|
|
398
|
-
|
|
411
|
+
2415,
|
|
399
412
|
"Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
|
|
400
413
|
userCode,
|
|
401
414
|
verificationUri
|
|
402
415
|
)),
|
|
403
416
|
buttons: [
|
|
404
417
|
{
|
|
405
|
-
label: ( localize(
|
|
418
|
+
label: ( localize(2416, "Copy & Continue")),
|
|
406
419
|
run: () => true
|
|
407
420
|
}
|
|
408
421
|
],
|
|
@@ -414,7 +427,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
414
427
|
return await this.openerService.open(( URI.parse(verificationUri)));
|
|
415
428
|
}
|
|
416
429
|
catch (error) {
|
|
417
|
-
this.notificationService.error(( localize(
|
|
430
|
+
this.notificationService.error(( localize(2417, "Failed to open {0}", verificationUri)));
|
|
418
431
|
}
|
|
419
432
|
}
|
|
420
433
|
return false;
|
|
@@ -7,7 +7,7 @@ import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/
|
|
|
7
7
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
8
8
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
9
|
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
10
|
-
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-
|
|
10
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
11
11
|
import { CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
13
13
|
|
|
@@ -92,7 +92,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
92
92
|
if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
|
|
93
93
|
&& !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
|
|
94
94
|
this.logger.info(( localize(
|
|
95
|
-
|
|
95
|
+
2418,
|
|
96
96
|
"Cannot install the '{0}' extension because it is declared to not run in this setup.",
|
|
97
97
|
getExtensionId(manifest.publisher, manifest.name)
|
|
98
98
|
)));
|
|
@@ -7,6 +7,7 @@ import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marsh
|
|
|
7
7
|
import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
8
8
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
9
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
10
11
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
11
12
|
import { getWordAtText } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/wordHelper';
|
|
12
13
|
import { CompletionItemKind } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
|
|
@@ -16,13 +17,12 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
16
17
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
18
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
18
19
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
19
|
-
import { ChatInputPart } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
|
|
20
20
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
21
21
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
22
|
-
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-
|
|
23
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-
|
|
22
|
+
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-9ebd6daf-8734-5a28-ad24-b238f5e5819d-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
23
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-9ebd6daf-8734-5a28-ad24-b238f5e5819d-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
24
24
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
25
|
-
import {
|
|
25
|
+
import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
26
26
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
27
27
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
28
28
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -111,7 +111,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
111
111
|
}
|
|
112
112
|
const inputValue = widget?.inputEditor.getValue() ?? '';
|
|
113
113
|
const location = widget.location;
|
|
114
|
-
const mode = widget.input.
|
|
114
|
+
const mode = widget.input.currentModeKind;
|
|
115
115
|
this._chatService.transferChatSession({ sessionId, inputValue, location, mode }, URI.revive(toWorkspace));
|
|
116
116
|
}
|
|
117
117
|
async $registerAgent(handle, extension, id, metadata, dynamicProps) {
|
|
@@ -147,6 +147,9 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
147
147
|
provideChatTitle: (history, token) => {
|
|
148
148
|
return this._proxy.$provideChatTitle(handle, history, token);
|
|
149
149
|
},
|
|
150
|
+
provideChatSummary: (history, token) => {
|
|
151
|
+
return this._proxy.$provideChatSummary(handle, history, token);
|
|
152
|
+
},
|
|
150
153
|
};
|
|
151
154
|
let disposable;
|
|
152
155
|
if (!staticAgentRegistration && dynamicProps) {
|
|
@@ -164,7 +167,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
164
167
|
slashCommands: [],
|
|
165
168
|
disambiguation: [],
|
|
166
169
|
locations: [ChatAgentLocation.Panel],
|
|
167
|
-
modes: [
|
|
170
|
+
modes: [ChatModeKind.Ask]
|
|
168
171
|
}, impl);
|
|
169
172
|
}
|
|
170
173
|
else {
|
|
@@ -255,7 +258,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
255
258
|
return ( completions.map((c) => ({ ...c, icon: c.icon ? ThemeIcon.fromId(c.icon) : undefined })));
|
|
256
259
|
};
|
|
257
260
|
this._agentIdsToCompletionProviders.set(id, this._chatAgentService.registerAgentCompletionProvider(id, provide));
|
|
258
|
-
this._agentCompletionProviders.set(handle, this._languageFeaturesService.completionProvider.register({ scheme:
|
|
261
|
+
this._agentCompletionProviders.set(handle, this._languageFeaturesService.completionProvider.register({ scheme: Schemas.vscodeChatInput, hasAccessToAllModels: true }, {
|
|
259
262
|
_debugDisplayName: 'chatAgentCompletions:' + handle,
|
|
260
263
|
triggerCharacters,
|
|
261
264
|
provideCompletionItems: async (model, position, _context, token) => {
|