@codingame/monaco-vscode-extensions-service-override 31.0.0 → 32.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/index.js +2 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +25 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +9 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +36 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +33 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +102 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +6 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +37 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +8 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +7 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +163 -36
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentDiff.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentDiff.js +58 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.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.js +25 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +10 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- 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/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/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +14 -13
- 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/themes/browser/cssExtensionPoint.js +5 -5
package/index.js
CHANGED
|
@@ -100,6 +100,7 @@ import './vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js';
|
|
|
100
100
|
import './vscode/src/vs/workbench/api/browser/mainThreadOutputService.js';
|
|
101
101
|
import './vscode/src/vs/workbench/api/browser/mainThreadProgress.js';
|
|
102
102
|
import './vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js';
|
|
103
|
+
import './vscode/src/vs/workbench/api/browser/mainThreadDocumentDiff.js';
|
|
103
104
|
import './vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js';
|
|
104
105
|
import './vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js';
|
|
105
106
|
import './vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js';
|
|
@@ -144,6 +145,7 @@ import './vscode/src/vs/workbench/api/browser/mainThreadMcp.js';
|
|
|
144
145
|
import './vscode/src/vs/workbench/api/browser/mainThreadChatContext.js';
|
|
145
146
|
import './vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js';
|
|
146
147
|
import './vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js';
|
|
148
|
+
import './vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js';
|
|
147
149
|
import './vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js';
|
|
148
150
|
import './vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js';
|
|
149
151
|
import './vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extensions-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - extensions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "32.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "32.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -13,9 +13,9 @@ import { getIdAndVersion, areSameExtensions, getGalleryExtensionId, getExtension
|
|
|
13
13
|
import { ExtensionType, EXTENSION_CATEGORIES } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
14
14
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
15
15
|
|
|
16
|
-
const notFound = id => ( localize(
|
|
16
|
+
const notFound = id => ( localize(1898, "Extension '{0}' not found.", id));
|
|
17
17
|
const useId = ( localize(
|
|
18
|
-
|
|
18
|
+
1899,
|
|
19
19
|
"Make sure you use the full extension ID, including the publisher, e.g.: {0}",
|
|
20
20
|
"ms-dotnettools.csharp"
|
|
21
21
|
));
|
|
@@ -62,7 +62,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (this.location) {
|
|
65
|
-
this.logger.info(( localize(
|
|
65
|
+
this.logger.info(( localize(1900, "Extensions installed on {0}:", this.location)));
|
|
66
66
|
}
|
|
67
67
|
extensions = extensions.sort((e1, e2) => e1.identifier.id.localeCompare(e2.identifier.id));
|
|
68
68
|
let lastId = undefined;
|
|
@@ -77,7 +77,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
77
77
|
const failed = [];
|
|
78
78
|
try {
|
|
79
79
|
if (extensions.length) {
|
|
80
|
-
this.logger.info(this.location ? ( localize(
|
|
80
|
+
this.logger.info(this.location ? ( localize(1901, "Installing extensions on {0}...", this.location)) : ( localize(1902, "Installing extensions...")));
|
|
81
81
|
}
|
|
82
82
|
const installVSIXInfos = [];
|
|
83
83
|
const installExtensionInfos = [];
|
|
@@ -142,11 +142,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
142
142
|
failed.push(...failedGalleryExtensions);
|
|
143
143
|
}
|
|
144
144
|
} catch (error) {
|
|
145
|
-
this.logger.error(( localize(
|
|
145
|
+
this.logger.error(( localize(1903, "Error while installing extensions: {0}", getErrorMessage(error))));
|
|
146
146
|
throw error;
|
|
147
147
|
}
|
|
148
148
|
if (failed.length) {
|
|
149
|
-
throw ( new Error(( localize(
|
|
149
|
+
throw ( new Error(( localize(1904, "Failed Installing Extensions: {0}", failed.join(", ")))));
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
async updateExtensions(profileLocation) {
|
|
@@ -161,7 +161,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
this.logger.trace(( localize(
|
|
164
|
-
|
|
164
|
+
1905,
|
|
165
165
|
"Fetching latest versions for {0} extensions",
|
|
166
166
|
installedExtensionsQuery.length
|
|
167
167
|
)));
|
|
@@ -185,11 +185,11 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
if (!extensionsToUpdate.length) {
|
|
188
|
-
this.logger.info(( localize(
|
|
188
|
+
this.logger.info(( localize(1906, "No extension to update")));
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
191
|
this.logger.info(( localize(
|
|
192
|
-
|
|
192
|
+
1907,
|
|
193
193
|
"Updating extensions: {0}",
|
|
194
194
|
( extensionsToUpdate.map(ext => ext.extension.identifier.id)).join(", ")
|
|
195
195
|
)));
|
|
@@ -197,14 +197,14 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
197
197
|
for (const extensionResult of installationResult) {
|
|
198
198
|
if (extensionResult.error) {
|
|
199
199
|
this.logger.error(( localize(
|
|
200
|
-
|
|
200
|
+
1908,
|
|
201
201
|
"Error while updating extension {0}: {1}",
|
|
202
202
|
extensionResult.identifier.id,
|
|
203
203
|
getErrorMessage(extensionResult.error)
|
|
204
204
|
)));
|
|
205
205
|
} else {
|
|
206
206
|
this.logger.info(( localize(
|
|
207
|
-
|
|
207
|
+
1909,
|
|
208
208
|
"Extension '{0}' v{1} was successfully updated.",
|
|
209
209
|
extensionResult.identifier.id,
|
|
210
210
|
extensionResult.local?.manifest.version
|
|
@@ -230,7 +230,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
230
230
|
}
|
|
231
231
|
if (!force && (!version || (version === "prerelease" && installedExtension.preRelease))) {
|
|
232
232
|
this.logger.info(( localize(
|
|
233
|
-
|
|
233
|
+
1910,
|
|
234
234
|
"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'.",
|
|
235
235
|
id,
|
|
236
236
|
installedExtension.manifest.version,
|
|
@@ -239,7 +239,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
239
239
|
return false;
|
|
240
240
|
}
|
|
241
241
|
if (version && installedExtension.manifest.version === version) {
|
|
242
|
-
this.logger.info(( localize(
|
|
242
|
+
this.logger.info(( localize(1911, "Extension '{0}' is already installed.", `${id}@${version}`)));
|
|
243
243
|
return false;
|
|
244
244
|
}
|
|
245
245
|
if (installedExtension.preRelease && version !== "prerelease") {
|
|
@@ -281,23 +281,23 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
281
281
|
if (installedExtension) {
|
|
282
282
|
if (gallery.version === installedExtension.manifest.version) {
|
|
283
283
|
this.logger.info(( localize(
|
|
284
|
-
|
|
284
|
+
1911,
|
|
285
285
|
"Extension '{0}' is already installed.",
|
|
286
286
|
version ? `${id}@${version}` : id
|
|
287
287
|
)));
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
290
|
this.logger.info(( localize(
|
|
291
|
-
|
|
291
|
+
1912,
|
|
292
292
|
"Updating the extension '{0}' to the version {1}",
|
|
293
293
|
id,
|
|
294
294
|
gallery.version
|
|
295
295
|
)));
|
|
296
296
|
}
|
|
297
297
|
if (installOptions.isBuiltin) {
|
|
298
|
-
this.logger.info(version ? ( localize(
|
|
298
|
+
this.logger.info(version ? ( localize(1913, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1914, "Installing builtin extension '{0}'...", id)));
|
|
299
299
|
} else {
|
|
300
|
-
this.logger.info(version ? ( localize(
|
|
300
|
+
this.logger.info(version ? ( localize(1915, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1916, "Installing extension '{0}'...", id)));
|
|
301
301
|
}
|
|
302
302
|
extensionsToInstall.push({
|
|
303
303
|
extension: gallery,
|
|
@@ -313,7 +313,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
313
313
|
for (const extensionResult of installationResult) {
|
|
314
314
|
if (extensionResult.error) {
|
|
315
315
|
this.logger.error(( localize(
|
|
316
|
-
|
|
316
|
+
1917,
|
|
317
317
|
"Error while installing extension {0}: {1}",
|
|
318
318
|
extensionResult.identifier.id,
|
|
319
319
|
getErrorMessage(extensionResult.error)
|
|
@@ -321,7 +321,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
321
321
|
failed.push(extensionResult.identifier.id);
|
|
322
322
|
} else {
|
|
323
323
|
this.logger.info(( localize(
|
|
324
|
-
|
|
324
|
+
1918,
|
|
325
325
|
"Extension '{0}' v{1} was successfully installed.",
|
|
326
326
|
extensionResult.identifier.id,
|
|
327
327
|
extensionResult.local?.manifest.version
|
|
@@ -343,10 +343,10 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
343
343
|
...installOptions,
|
|
344
344
|
installGivenVersion: true
|
|
345
345
|
});
|
|
346
|
-
this.logger.info(( localize(
|
|
346
|
+
this.logger.info(( localize(1919, "Extension '{0}' was successfully installed.", basename(vsix))));
|
|
347
347
|
} catch (error) {
|
|
348
348
|
if (isCancellationError(error)) {
|
|
349
|
-
this.logger.info(( localize(
|
|
349
|
+
this.logger.info(( localize(1920, "Cancelled installing extension '{0}'.", basename(vsix))));
|
|
350
350
|
} else {
|
|
351
351
|
throw error;
|
|
352
352
|
}
|
|
@@ -393,7 +393,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
393
393
|
if (!force) {
|
|
394
394
|
if (semverExports.gt(existingExtension.manifest.version, manifest.version)) {
|
|
395
395
|
this.logger.info(( localize(
|
|
396
|
-
|
|
396
|
+
1921,
|
|
397
397
|
"A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
|
|
398
398
|
existingExtension.identifier.id,
|
|
399
399
|
existingExtension.manifest.version,
|
|
@@ -424,7 +424,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
424
424
|
}
|
|
425
425
|
if (( extensionsToUninstall.some(e => e.type === ExtensionType.System))) {
|
|
426
426
|
this.logger.info(( localize(
|
|
427
|
-
|
|
427
|
+
1922,
|
|
428
428
|
"Extension '{0}' is a Built-in extension and cannot be uninstalled",
|
|
429
429
|
id
|
|
430
430
|
)));
|
|
@@ -432,13 +432,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
432
432
|
}
|
|
433
433
|
if (!force && ( extensionsToUninstall.some(e => e.isBuiltin))) {
|
|
434
434
|
this.logger.info(( localize(
|
|
435
|
-
|
|
435
|
+
1923,
|
|
436
436
|
"Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
|
|
437
437
|
id
|
|
438
438
|
)));
|
|
439
439
|
return;
|
|
440
440
|
}
|
|
441
|
-
this.logger.info(( localize(
|
|
441
|
+
this.logger.info(( localize(1924, "Uninstalling {0}...", id)));
|
|
442
442
|
for (const extensionToUninstall of extensionsToUninstall) {
|
|
443
443
|
await this.extensionManagementService.uninstall(extensionToUninstall, {
|
|
444
444
|
profileLocation
|
|
@@ -446,13 +446,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
446
446
|
}
|
|
447
447
|
if (this.location) {
|
|
448
448
|
this.logger.info(( localize(
|
|
449
|
-
|
|
449
|
+
1925,
|
|
450
450
|
"Extension '{0}' was successfully uninstalled from {1}!",
|
|
451
451
|
id,
|
|
452
452
|
this.location
|
|
453
453
|
)));
|
|
454
454
|
} else {
|
|
455
|
-
this.logger.info(( localize(
|
|
455
|
+
this.logger.info(( localize(1926, "Extension '{0}' was successfully uninstalled!", id)));
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
}
|
|
@@ -470,12 +470,12 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
472
|
notInstalled(id) {
|
|
473
|
-
return this.location ? ( localize(
|
|
473
|
+
return this.location ? ( localize(1927, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1928, "Extension '{0}' is not installed.", id));
|
|
474
474
|
}
|
|
475
475
|
validateBuiltinExtensionEnabledWithAutoUpdates(extension) {
|
|
476
476
|
if (extension.isBuiltin && ( this.productService.builtInExtensionsEnabledWithAutoUpdates.some(e => e.toLowerCase() === extension.identifier.id.toLowerCase())) && !extension.forceAutoUpdate) {
|
|
477
477
|
return localize(
|
|
478
|
-
|
|
478
|
+
1929,
|
|
479
479
|
"Extension '{0}' is a built-in extension and not allowed to be updated in the current product quality '{1}'.",
|
|
480
480
|
extension.identifier.id,
|
|
481
481
|
this.productService.quality
|
|
@@ -245,8 +245,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
245
245
|
return await deferredPromise.p;
|
|
246
246
|
}
|
|
247
247
|
$showContinueNotification(message) {
|
|
248
|
-
const yes = ( localize(
|
|
249
|
-
const no = ( localize(
|
|
248
|
+
const yes = ( localize(2562, "Yes"));
|
|
249
|
+
const no = ( localize(2563, "No"));
|
|
250
250
|
const deferredPromise = ( new DeferredPromise());
|
|
251
251
|
let result = false;
|
|
252
252
|
const handle = this.notificationService.prompt(Severity.Warning, message, [{
|
|
@@ -302,26 +302,26 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
302
302
|
message = customMessage;
|
|
303
303
|
} else {
|
|
304
304
|
message = recreatingSession ? ( localize(
|
|
305
|
-
|
|
305
|
+
2564,
|
|
306
306
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
307
307
|
extensionName,
|
|
308
308
|
provider.label
|
|
309
309
|
)) : ( localize(
|
|
310
|
-
|
|
310
|
+
2565,
|
|
311
311
|
"The extension '{0}' wants to sign in using {1}.",
|
|
312
312
|
extensionName,
|
|
313
313
|
provider.label
|
|
314
314
|
));
|
|
315
315
|
}
|
|
316
316
|
const buttons = [{
|
|
317
|
-
label: ( localize(
|
|
317
|
+
label: ( localize(2566, "&&Allow")),
|
|
318
318
|
run() {
|
|
319
319
|
return true;
|
|
320
320
|
}
|
|
321
321
|
}];
|
|
322
322
|
if (options?.learnMore) {
|
|
323
323
|
buttons.push({
|
|
324
|
-
label: ( localize(
|
|
324
|
+
label: ( localize(2567, "Learn more")),
|
|
325
325
|
run: async () => {
|
|
326
326
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
327
327
|
await this.openerService.open(URI.revive(options.learnMore), {
|
|
@@ -344,9 +344,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
344
344
|
}
|
|
345
345
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
346
346
|
const result = await this.dialogService.prompt({
|
|
347
|
-
message: ( localize(
|
|
347
|
+
message: ( localize(2568, "Incorrect account detected")),
|
|
348
348
|
detail: ( localize(
|
|
349
|
-
|
|
349
|
+
2569,
|
|
350
350
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
351
351
|
chosenAccountLabel,
|
|
352
352
|
requestedAccountLabel
|
|
@@ -354,10 +354,10 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
354
354
|
type: Severity.Warning,
|
|
355
355
|
cancelButton: true,
|
|
356
356
|
buttons: [{
|
|
357
|
-
label: ( localize(
|
|
357
|
+
label: ( localize(2570, "Keep {0}", chosenAccountLabel)),
|
|
358
358
|
run: () => chosenAccountLabel
|
|
359
359
|
}, {
|
|
360
|
-
label: ( localize(
|
|
360
|
+
label: ( localize(2571, "Login with {0}", requestedAccountLabel)),
|
|
361
361
|
run: () => requestedAccountLabel
|
|
362
362
|
}]
|
|
363
363
|
});
|
|
@@ -510,15 +510,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
510
510
|
result
|
|
511
511
|
} = await this.dialogService.prompt({
|
|
512
512
|
type: Severity.Info,
|
|
513
|
-
message: ( localize(
|
|
513
|
+
message: ( localize(2572, "Device Code Authentication")),
|
|
514
514
|
detail: ( localize(
|
|
515
|
-
|
|
515
|
+
2573,
|
|
516
516
|
"Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
|
|
517
517
|
userCode,
|
|
518
518
|
verificationUri
|
|
519
519
|
)),
|
|
520
520
|
buttons: [{
|
|
521
|
-
label: ( localize(
|
|
521
|
+
label: ( localize(2574, "Copy & Continue")),
|
|
522
522
|
run: () => true
|
|
523
523
|
}],
|
|
524
524
|
cancelButton: true
|
|
@@ -528,7 +528,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
528
528
|
await this.clipboardService.writeText(userCode);
|
|
529
529
|
return await this.openerService.open(( URI.parse(verificationUri)));
|
|
530
530
|
} catch (error) {
|
|
531
|
-
this.notificationService.error(( localize(
|
|
531
|
+
this.notificationService.error(( localize(2575, "Failed to open {0}", verificationUri)));
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
return false;
|
|
@@ -537,44 +537,44 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
537
537
|
const redirectUrls = "http://127.0.0.1:33418\nhttps://vscode.dev/redirect";
|
|
538
538
|
const result = await this.dialogService.prompt({
|
|
539
539
|
type: Severity.Info,
|
|
540
|
-
message: ( localize(
|
|
540
|
+
message: ( localize(2576, "Dynamic Client Registration not supported")),
|
|
541
541
|
detail: ( localize(
|
|
542
|
-
|
|
542
|
+
2577,
|
|
543
543
|
"The authorization server '{0}' does not support automatic client registration. Do you want to proceed by manually providing a client registration (client ID)?\n\nNote: When registering your OAuth application, make sure to include these redirect URIs:\n{1}",
|
|
544
544
|
authorizationServerUrl,
|
|
545
545
|
redirectUrls
|
|
546
546
|
)),
|
|
547
547
|
buttons: [{
|
|
548
|
-
label: ( localize(
|
|
548
|
+
label: ( localize(2578, "Copy URIs & Proceed")),
|
|
549
549
|
run: async () => {
|
|
550
550
|
try {
|
|
551
551
|
await this.clipboardService.writeText(redirectUrls);
|
|
552
552
|
} catch (error) {
|
|
553
|
-
this.notificationService.error(( localize(
|
|
553
|
+
this.notificationService.error(( localize(2579, "Failed to copy redirect URIs to clipboard.")));
|
|
554
554
|
}
|
|
555
555
|
return true;
|
|
556
556
|
}
|
|
557
557
|
}],
|
|
558
558
|
cancelButton: {
|
|
559
|
-
label: ( localize(
|
|
559
|
+
label: ( localize(2580, "Cancel")),
|
|
560
560
|
run: () => false
|
|
561
561
|
}
|
|
562
562
|
});
|
|
563
563
|
if (!result) {
|
|
564
564
|
return undefined;
|
|
565
565
|
}
|
|
566
|
-
const sharedTitle = ( localize(
|
|
566
|
+
const sharedTitle = ( localize(2581, "Add Client Registration Details"));
|
|
567
567
|
const clientId = await this.quickInputService.input({
|
|
568
568
|
title: sharedTitle,
|
|
569
569
|
prompt: ( localize(
|
|
570
|
-
|
|
570
|
+
2582,
|
|
571
571
|
"Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
|
|
572
572
|
)),
|
|
573
|
-
placeHolder: ( localize(
|
|
573
|
+
placeHolder: ( localize(2583, "OAuth client ID (azye39d...)")),
|
|
574
574
|
ignoreFocusLost: true,
|
|
575
575
|
validateInput: async value => {
|
|
576
576
|
if (!value || value.trim().length === 0) {
|
|
577
|
-
return localize(
|
|
577
|
+
return localize(2584, "Client ID is required");
|
|
578
578
|
}
|
|
579
579
|
return undefined;
|
|
580
580
|
}
|
|
@@ -585,11 +585,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
585
585
|
const clientSecret = await this.quickInputService.input({
|
|
586
586
|
title: sharedTitle,
|
|
587
587
|
prompt: ( localize(
|
|
588
|
-
|
|
588
|
+
2585,
|
|
589
589
|
"(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
|
|
590
590
|
clientId
|
|
591
591
|
)),
|
|
592
|
-
placeHolder: ( localize(
|
|
592
|
+
placeHolder: ( localize(2586, "OAuth client secret (wer32o50f...) or leave it blank")),
|
|
593
593
|
password: true,
|
|
594
594
|
ignoreFocusLost: true
|
|
595
595
|
});
|
|
@@ -3,6 +3,7 @@ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
3
3
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
4
|
import { BrowserTabDto, MainThreadBrowsersShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
5
|
import { IBrowserViewCDPService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
6
|
+
import { IBrowserViewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
6
7
|
import { EditorGroupColumn } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupColumn";
|
|
7
8
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
8
9
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
@@ -11,12 +12,13 @@ import { CDPRequest } from "@codingame/monaco-vscode-api/vscode/vs/platform/brow
|
|
|
11
12
|
export declare class MainThreadBrowsers extends Disposable implements MainThreadBrowsersShape {
|
|
12
13
|
private readonly editorService;
|
|
13
14
|
private readonly cdpService;
|
|
15
|
+
private readonly browserViewService;
|
|
14
16
|
private readonly editorGroupsService;
|
|
15
17
|
private readonly configurationService;
|
|
16
18
|
private readonly _proxy;
|
|
17
19
|
private readonly _cdpSessions;
|
|
18
20
|
private readonly _knownBrowsers;
|
|
19
|
-
constructor(extHostContext: IExtHostContext, editorService: IEditorService, cdpService: IBrowserViewCDPService, editorGroupsService: IEditorGroupsService, configurationService: IConfigurationService);
|
|
21
|
+
constructor(extHostContext: IExtHostContext, editorService: IEditorService, cdpService: IBrowserViewCDPService, browserViewService: IBrowserViewWorkbenchService, editorGroupsService: IEditorGroupsService, configurationService: IConfigurationService);
|
|
20
22
|
$openBrowserTab(url: string, viewColumn?: EditorGroupColumn, options?: IEditorOptions): Promise<BrowserTabDto>;
|
|
21
23
|
private _lastActiveBrowserId;
|
|
22
24
|
private _syncActiveBrowserTab;
|
|
@@ -4,7 +4,7 @@ import { Disposable, DisposableMap, DisposableStore, toDisposable } from '@codin
|
|
|
4
4
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
5
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
6
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
-
import { IBrowserViewCDPService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
|
|
7
|
+
import { IBrowserViewCDPService, IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
|
|
8
8
|
import { BrowserViewUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/browserView/common/browserViewUri';
|
|
9
9
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
10
10
|
import { columnToEditorGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
@@ -17,30 +17,30 @@ let MainThreadBrowsers = class MainThreadBrowsers extends Disposable {
|
|
|
17
17
|
extHostContext,
|
|
18
18
|
editorService,
|
|
19
19
|
cdpService,
|
|
20
|
+
browserViewService,
|
|
20
21
|
editorGroupsService,
|
|
21
22
|
configurationService
|
|
22
23
|
) {
|
|
23
24
|
super();
|
|
24
25
|
this.editorService = editorService;
|
|
25
26
|
this.cdpService = cdpService;
|
|
27
|
+
this.browserViewService = browserViewService;
|
|
26
28
|
this.editorGroupsService = editorGroupsService;
|
|
27
29
|
this.configurationService = configurationService;
|
|
28
30
|
this._cdpSessions = this._register(( new DisposableMap()));
|
|
29
31
|
this._knownBrowsers = this._register(( new DisposableMap()));
|
|
30
32
|
this._lastActiveBrowserId = undefined;
|
|
31
33
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostBrowsers));
|
|
32
|
-
this._register(this.
|
|
33
|
-
|
|
34
|
-
this._track(
|
|
34
|
+
this._register(this.browserViewService.onDidChangeBrowserViews(() => {
|
|
35
|
+
for (const editor of ( this.browserViewService.getKnownBrowserViews().values())) {
|
|
36
|
+
this._track(editor);
|
|
35
37
|
}
|
|
36
38
|
}));
|
|
37
39
|
this._register(
|
|
38
40
|
this.editorService.onDidActiveEditorChange(() => this._syncActiveBrowserTab())
|
|
39
41
|
);
|
|
40
|
-
for (const
|
|
41
|
-
|
|
42
|
-
this._track(input);
|
|
43
|
-
}
|
|
42
|
+
for (const editor of ( this.browserViewService.getKnownBrowserViews().values())) {
|
|
43
|
+
this._track(editor);
|
|
44
44
|
}
|
|
45
45
|
this._syncActiveBrowserTab();
|
|
46
46
|
}
|
|
@@ -142,6 +142,6 @@ let MainThreadBrowsers = class MainThreadBrowsers extends Disposable {
|
|
|
142
142
|
known.input.dispose();
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
MainThreadBrowsers = __decorate([extHostNamedCustomer(MainContext.MainThreadBrowsers), ( __param(1, IEditorService)), ( __param(2, IBrowserViewCDPService)), ( __param(3,
|
|
145
|
+
MainThreadBrowsers = __decorate([extHostNamedCustomer(MainContext.MainThreadBrowsers), ( __param(1, IEditorService)), ( __param(2, IBrowserViewCDPService)), ( __param(3, IBrowserViewWorkbenchService)), ( __param(4, IEditorGroupsService)), ( __param(5, IConfigurationService))], MainThreadBrowsers);
|
|
146
146
|
|
|
147
147
|
export { MainThreadBrowsers };
|
|
@@ -108,7 +108,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
108
108
|
if (
|
|
109
109
|
!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest) && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
|
|
110
110
|
this.logger.info(( localize(
|
|
111
|
-
|
|
111
|
+
2587,
|
|
112
112
|
"Cannot install the '{0}' extension because it is declared to not run in this setup.",
|
|
113
113
|
getExtensionId(manifest.publisher, manifest.name)
|
|
114
114
|
)));
|
|
@@ -37,7 +37,7 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
|
|
|
37
37
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
38
38
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
39
39
|
import { NotebookDto } from './mainThreadNotebookDto.js';
|
|
40
|
-
import { isUntitledChatSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
40
|
+
import { isUntitledChatSession, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
41
41
|
import { ICustomizationHarnessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/customizationHarnessService.service';
|
|
42
42
|
import { AICustomizationManagementSection, BUILTIN_STORAGE } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService';
|
|
43
43
|
import { IAgentPluginService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/agentPluginService.service';
|
|
@@ -202,7 +202,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
202
202
|
tools: agent.tools,
|
|
203
203
|
model: agent.model,
|
|
204
204
|
userInvocable: agent.visibility.userInvocable,
|
|
205
|
-
disableModelInvocation: !agent.visibility.agentInvocable
|
|
205
|
+
disableModelInvocation: !agent.visibility.agentInvocable,
|
|
206
|
+
enabled: agent.enabled
|
|
206
207
|
};
|
|
207
208
|
}
|
|
208
209
|
_toInstructionDto(instruction) {
|
|
@@ -226,7 +227,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
226
227
|
extensionId: skill.extension?.identifier.value,
|
|
227
228
|
pluginUri: skill.pluginUri,
|
|
228
229
|
sessionTypes: skill.sessionTypes,
|
|
229
|
-
userInvocable: skill.userInvocable
|
|
230
|
+
userInvocable: skill.userInvocable,
|
|
231
|
+
disableModelInvocation: skill.disableModelInvocation
|
|
230
232
|
};
|
|
231
233
|
}
|
|
232
234
|
_toSlashCommandDto(slashCommand) {
|
|
@@ -245,7 +247,10 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
245
247
|
_toHookDto(hookFile) {
|
|
246
248
|
return {
|
|
247
249
|
uri: hookFile.uri,
|
|
248
|
-
sessionTypes: hookFile.sessionTypes
|
|
250
|
+
sessionTypes: hookFile.sessionTypes,
|
|
251
|
+
source: this._toChatResourceSource(hookFile.storage),
|
|
252
|
+
extensionId: hookFile.extension?.identifier.value,
|
|
253
|
+
pluginUri: hookFile.pluginUri
|
|
249
254
|
};
|
|
250
255
|
}
|
|
251
256
|
_toPluginDto(plugin) {
|
|
@@ -319,7 +324,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
319
324
|
history,
|
|
320
325
|
chatSessionContext
|
|
321
326
|
}, token);
|
|
322
|
-
if (rpcResult?.errorCallstack) {
|
|
327
|
+
if (rpcResult?.errorCallstack && !rpcResult.errorDetails?.isRateLimited && !rpcResult.errorDetails?.isQuotaExceeded && !rpcResult.errorDetails?.isExpectedError) {
|
|
323
328
|
this._telemetryService.publicLogError2("chatAgentError", {
|
|
324
329
|
callstack: rpcResult.errorCallstack,
|
|
325
330
|
msg: rpcResult.errorDetails?.message ?? "",
|
|
@@ -495,25 +500,34 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
495
500
|
}
|
|
496
501
|
continue;
|
|
497
502
|
}
|
|
498
|
-
if (revivedProgress.kind === "inlineReference" && revivedProgress.resolveId) {
|
|
503
|
+
if (revivedProgress.kind === "inlineReference" && revivedProgress.resolveId && response) {
|
|
499
504
|
if (!( this._unresolvedAnchors.has(requestId))) {
|
|
500
505
|
this._unresolvedAnchors.set(requestId, ( new Map()));
|
|
501
506
|
}
|
|
502
|
-
this._unresolvedAnchors.get(requestId)?.set(revivedProgress.resolveId,
|
|
507
|
+
this._unresolvedAnchors.get(requestId)?.set(revivedProgress.resolveId, {
|
|
508
|
+
response
|
|
509
|
+
});
|
|
503
510
|
}
|
|
504
511
|
chatProgressParts.push(revivedProgress);
|
|
505
512
|
}
|
|
506
513
|
progress(chatProgressParts);
|
|
507
514
|
}
|
|
508
515
|
$handleAnchorResolve(requestId, handle, resolveAnchor) {
|
|
509
|
-
const
|
|
510
|
-
if (!
|
|
516
|
+
const unresolvedAnchorsForRequest = this._unresolvedAnchors.get(requestId);
|
|
517
|
+
if (!unresolvedAnchorsForRequest) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
const unresolvedAnchor = unresolvedAnchorsForRequest.get(handle);
|
|
521
|
+
if (!unresolvedAnchor) {
|
|
511
522
|
return;
|
|
512
523
|
}
|
|
513
|
-
|
|
524
|
+
unresolvedAnchorsForRequest.delete(handle);
|
|
525
|
+
if (unresolvedAnchorsForRequest.size === 0) {
|
|
526
|
+
this._unresolvedAnchors.delete(requestId);
|
|
527
|
+
}
|
|
514
528
|
if (resolveAnchor) {
|
|
515
529
|
const revivedAnchor = revive(resolveAnchor);
|
|
516
|
-
|
|
530
|
+
unresolvedAnchor.response.resolveInlineReference(handle, revivedAnchor);
|
|
517
531
|
}
|
|
518
532
|
}
|
|
519
533
|
$registerAgentCompletionsProvider(handle, id, triggerCharacters) {
|
|
@@ -542,10 +556,15 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
542
556
|
if (query && !( triggerCharacters.some(c => query.startsWith(c)))) {
|
|
543
557
|
return;
|
|
544
558
|
}
|
|
559
|
+
const context = {
|
|
560
|
+
sessionType: getChatSessionType(widget.viewModel.model.sessionResource)
|
|
561
|
+
};
|
|
545
562
|
const parsedRequest = this._instantiationService.createInstance(ChatRequestParser).parseChatRequestWithReferences(
|
|
546
563
|
getDynamicVariablesForWidget(widget),
|
|
547
564
|
getSelectedToolAndToolSetsForWidget(widget),
|
|
548
|
-
model.getValue()
|
|
565
|
+
model.getValue(),
|
|
566
|
+
ChatAgentLocation.Chat,
|
|
567
|
+
context
|
|
549
568
|
).parts;
|
|
550
569
|
const agentPart = parsedRequest.find(part => part instanceof ChatRequestAgentPart);
|
|
551
570
|
const thisAgentId = this._agents.get(handle)?.id;
|
|
@@ -654,7 +673,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
654
673
|
}
|
|
655
674
|
}
|
|
656
675
|
async $registerChatSessionCustomizationProvider(handle, chatSessionType, metadata, extensionId) {
|
|
657
|
-
if (this._environmentService.isSessionsWindow && chatSessionType
|
|
676
|
+
if (this._environmentService.isSessionsWindow && !this._chatSessionService.getContentProviderSchemes().includes(chatSessionType)) {
|
|
658
677
|
return;
|
|
659
678
|
}
|
|
660
679
|
const extension = await this._extensionService.getExtension(extensionId.value);
|
|
@@ -680,7 +699,10 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
680
699
|
description: item.description,
|
|
681
700
|
groupKey: item.groupKey,
|
|
682
701
|
badge: item.badge,
|
|
683
|
-
badgeTooltip: item.badgeTooltip
|
|
702
|
+
badgeTooltip: item.badgeTooltip,
|
|
703
|
+
extensionId: item.extensionId,
|
|
704
|
+
pluginUri: item.pluginUri ? URI.revive(item.pluginUri) : undefined,
|
|
705
|
+
userInvocable: item.userInvocable
|
|
684
706
|
})));
|
|
685
707
|
}
|
|
686
708
|
};
|