@codingame/monaco-vscode-extensions-service-override 34.1.2 → 35.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/mainThreadAgentEditorComments.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.d.ts +23 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js +47 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +30 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +12 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- 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 +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +70 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +61 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +13 -13
- 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/mainThreadQuickDiff.d.ts +7 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +46 -3
- 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.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +4 -7
- 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/themes/browser/cssExtensionPoint.js +5 -5
package/index.js
CHANGED
|
@@ -56,6 +56,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/workbench/services/themes/common/
|
|
|
56
56
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint';
|
|
57
57
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/api/browser/statusBarExtensionPoint';
|
|
58
58
|
import './vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js';
|
|
59
|
+
import './vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js';
|
|
59
60
|
import './vscode/src/vs/workbench/api/browser/mainThreadLocalization.js';
|
|
60
61
|
import './vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js';
|
|
61
62
|
import './vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js';
|
|
@@ -97,6 +98,7 @@ import './vscode/src/vs/workbench/api/browser/mainThreadLanguages.js';
|
|
|
97
98
|
import './vscode/src/vs/workbench/api/browser/mainThreadLogService.js';
|
|
98
99
|
import './vscode/src/vs/workbench/api/browser/mainThreadMessageService.js';
|
|
99
100
|
import './vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js';
|
|
101
|
+
import './vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js';
|
|
100
102
|
import './vscode/src/vs/workbench/api/browser/mainThreadOutputService.js';
|
|
101
103
|
import './vscode/src/vs/workbench/api/browser/mainThreadProgress.js';
|
|
102
104
|
import './vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extensions-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.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": "35.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "35.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(2026, "Extension '{0}' not found.", id));
|
|
17
17
|
const useId = ( localize(
|
|
18
|
-
|
|
18
|
+
2027,
|
|
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(2028, "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(2029, "Installing extensions on {0}...", this.location)) : ( localize(2030, "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(2031, "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(2032, "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
|
+
2033,
|
|
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(2034, "No extension to update")));
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
191
|
this.logger.info(( localize(
|
|
192
|
-
|
|
192
|
+
2035,
|
|
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
|
+
2036,
|
|
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
|
+
2037,
|
|
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
|
+
2038,
|
|
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(2039, "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
|
+
2039,
|
|
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
|
+
2040,
|
|
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(2041, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(2042, "Installing builtin extension '{0}'...", id)));
|
|
299
299
|
} else {
|
|
300
|
-
this.logger.info(version ? ( localize(
|
|
300
|
+
this.logger.info(version ? ( localize(2043, "Installing extension '{0}' v{1}...", id, version)) : ( localize(2044, "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
|
+
2045,
|
|
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
|
+
2046,
|
|
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(2047, "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(2048, "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
|
+
2049,
|
|
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
|
+
2050,
|
|
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
|
+
2051,
|
|
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(2052, "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
|
+
2053,
|
|
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(2054, "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(2055, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(2056, "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
|
+
2057,
|
|
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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
3
|
+
import { IAgentEditorCommentsBridge } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/agentEditorComments/common/agentEditorComments.service";
|
|
4
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
5
|
+
import { MainThreadAgentEditorCommentsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
6
|
+
/**
|
|
7
|
+
* Bridges the {@link IAgentEditorCommentsBridge} (backed, in the Agents window,
|
|
8
|
+
* by the same store the code editor renders its session comments from) to the
|
|
9
|
+
* extension host, so custom editors (e.g. the Markdown editor) can render and
|
|
10
|
+
* contribute the same comments. Registered in every extension host; when no
|
|
11
|
+
* provider is installed (e.g. the regular workbench window) the bridge is a
|
|
12
|
+
* no-op and this customer simply reports no comments.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MainThreadAgentEditorComments implements MainThreadAgentEditorCommentsShape {
|
|
15
|
+
private readonly _bridge;
|
|
16
|
+
private readonly _proxy;
|
|
17
|
+
private readonly _resources;
|
|
18
|
+
private readonly _disposables;
|
|
19
|
+
constructor(extHostContext: IExtHostContext, _bridge: IAgentEditorCommentsBridge);
|
|
20
|
+
$createAgentEditorComments(handle: number, uri: UriComponents): Promise<void>;
|
|
21
|
+
$addComment(handle: number, range: IRange, body: string): Promise<void>;
|
|
22
|
+
$disposeAgentEditorComments(handle: number): Promise<void>;
|
|
23
|
+
private _sendComments;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { DisposableMap, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
5
|
+
import { IAgentEditorCommentsBridge } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/agentEditorComments/common/agentEditorComments.service';
|
|
6
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
|
+
|
|
9
|
+
let MainThreadAgentEditorComments = class MainThreadAgentEditorComments {
|
|
10
|
+
constructor(extHostContext, _bridge) {
|
|
11
|
+
this._bridge = _bridge;
|
|
12
|
+
this._resources = ( new Map());
|
|
13
|
+
this._disposables = ( new DisposableMap());
|
|
14
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostAgentEditorComments));
|
|
15
|
+
}
|
|
16
|
+
async $createAgentEditorComments(handle, uri) {
|
|
17
|
+
const resource = URI.revive(uri);
|
|
18
|
+
this._resources.set(handle, resource);
|
|
19
|
+
const store = ( new DisposableStore());
|
|
20
|
+
store.add(this._bridge.onDidChangeComments(() => this._sendComments(handle)));
|
|
21
|
+
this._disposables.set(handle, store);
|
|
22
|
+
this._sendComments(handle);
|
|
23
|
+
}
|
|
24
|
+
async $addComment(handle, range, body) {
|
|
25
|
+
const resource = this._resources.get(handle);
|
|
26
|
+
if (!resource) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this._bridge.addComment(resource, range, body);
|
|
30
|
+
}
|
|
31
|
+
async $disposeAgentEditorComments(handle) {
|
|
32
|
+
this._resources.delete(handle);
|
|
33
|
+
this._disposables.deleteAndDispose(handle);
|
|
34
|
+
}
|
|
35
|
+
_sendComments(handle) {
|
|
36
|
+
const resource = this._resources.get(handle);
|
|
37
|
+
if (!resource) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const comments = ( this._bridge.getComments(resource).map(comment => ({
|
|
41
|
+
id: comment.id,
|
|
42
|
+
range: comment.range,
|
|
43
|
+
body: comment.body
|
|
44
|
+
})));
|
|
45
|
+
this._proxy.$acceptAgentEditorComments(handle, comments);
|
|
46
|
+
}
|
|
47
|
+
dispose() {
|
|
48
|
+
this._disposables.dispose();
|
|
49
|
+
this._resources.clear();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
MainThreadAgentEditorComments = __decorate([
|
|
53
|
+
extHostNamedCustomer(MainContext.MainThreadAgentEditorComments),
|
|
54
|
+
( __param(1, IAgentEditorCommentsBridge))
|
|
55
|
+
], MainThreadAgentEditorComments);
|
|
56
|
+
|
|
57
|
+
export { MainThreadAgentEditorComments };
|
|
@@ -277,8 +277,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
277
277
|
return await deferredPromise.p;
|
|
278
278
|
}
|
|
279
279
|
$showContinueNotification(message) {
|
|
280
|
-
const yes = ( localize(
|
|
281
|
-
const no = ( localize(
|
|
280
|
+
const yes = ( localize(2709, "Yes"));
|
|
281
|
+
const no = ( localize(2710, "No"));
|
|
282
282
|
const deferredPromise = ( new DeferredPromise());
|
|
283
283
|
let result = false;
|
|
284
284
|
const handle = this.notificationService.prompt(Severity.Warning, message, [{
|
|
@@ -334,26 +334,26 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
334
334
|
message = customMessage;
|
|
335
335
|
} else {
|
|
336
336
|
message = recreatingSession ? ( localize(
|
|
337
|
-
|
|
337
|
+
2711,
|
|
338
338
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
339
339
|
extensionName,
|
|
340
340
|
provider.label
|
|
341
341
|
)) : ( localize(
|
|
342
|
-
|
|
342
|
+
2712,
|
|
343
343
|
"The extension '{0}' wants to sign in using {1}.",
|
|
344
344
|
extensionName,
|
|
345
345
|
provider.label
|
|
346
346
|
));
|
|
347
347
|
}
|
|
348
348
|
const buttons = [{
|
|
349
|
-
label: ( localize(
|
|
349
|
+
label: ( localize(2713, "&&Allow")),
|
|
350
350
|
run() {
|
|
351
351
|
return true;
|
|
352
352
|
}
|
|
353
353
|
}];
|
|
354
354
|
if (options?.learnMore) {
|
|
355
355
|
buttons.push({
|
|
356
|
-
label: ( localize(
|
|
356
|
+
label: ( localize(2714, "Learn more")),
|
|
357
357
|
run: async () => {
|
|
358
358
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
359
359
|
await this.openerService.open(URI.revive(options.learnMore), {
|
|
@@ -376,9 +376,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
376
376
|
}
|
|
377
377
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
378
378
|
const result = await this.dialogService.prompt({
|
|
379
|
-
message: ( localize(
|
|
379
|
+
message: ( localize(2715, "Incorrect account detected")),
|
|
380
380
|
detail: ( localize(
|
|
381
|
-
|
|
381
|
+
2716,
|
|
382
382
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
383
383
|
chosenAccountLabel,
|
|
384
384
|
requestedAccountLabel
|
|
@@ -386,10 +386,10 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
386
386
|
type: Severity.Warning,
|
|
387
387
|
cancelButton: true,
|
|
388
388
|
buttons: [{
|
|
389
|
-
label: ( localize(
|
|
389
|
+
label: ( localize(2717, "Keep {0}", chosenAccountLabel)),
|
|
390
390
|
run: () => chosenAccountLabel
|
|
391
391
|
}, {
|
|
392
|
-
label: ( localize(
|
|
392
|
+
label: ( localize(2718, "Login with {0}", requestedAccountLabel)),
|
|
393
393
|
run: () => requestedAccountLabel
|
|
394
394
|
}]
|
|
395
395
|
});
|
|
@@ -542,15 +542,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
542
542
|
result
|
|
543
543
|
} = await this.dialogService.prompt({
|
|
544
544
|
type: Severity.Info,
|
|
545
|
-
message: ( localize(
|
|
545
|
+
message: ( localize(2719, "Device Code Authentication")),
|
|
546
546
|
detail: ( localize(
|
|
547
|
-
|
|
547
|
+
2720,
|
|
548
548
|
"Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
|
|
549
549
|
userCode,
|
|
550
550
|
verificationUri
|
|
551
551
|
)),
|
|
552
552
|
buttons: [{
|
|
553
|
-
label: ( localize(
|
|
553
|
+
label: ( localize(2721, "Copy & Continue")),
|
|
554
554
|
run: () => true
|
|
555
555
|
}],
|
|
556
556
|
cancelButton: true
|
|
@@ -560,7 +560,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
560
560
|
await this.clipboardService.writeText(userCode);
|
|
561
561
|
return await this.openerService.open(( URI.parse(verificationUri)));
|
|
562
562
|
} catch (error) {
|
|
563
|
-
this.notificationService.error(( localize(
|
|
563
|
+
this.notificationService.error(( localize(2722, "Failed to open {0}", verificationUri)));
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return false;
|
|
@@ -569,44 +569,44 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
569
569
|
const redirectUrls = "http://127.0.0.1:33418\nhttps://vscode.dev/redirect";
|
|
570
570
|
const result = await this.dialogService.prompt({
|
|
571
571
|
type: Severity.Info,
|
|
572
|
-
message: ( localize(
|
|
572
|
+
message: ( localize(2723, "Dynamic Client Registration not supported")),
|
|
573
573
|
detail: ( localize(
|
|
574
|
-
|
|
574
|
+
2724,
|
|
575
575
|
"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}",
|
|
576
576
|
authorizationServerUrl,
|
|
577
577
|
redirectUrls
|
|
578
578
|
)),
|
|
579
579
|
buttons: [{
|
|
580
|
-
label: ( localize(
|
|
580
|
+
label: ( localize(2725, "Copy URIs & Proceed")),
|
|
581
581
|
run: async () => {
|
|
582
582
|
try {
|
|
583
583
|
await this.clipboardService.writeText(redirectUrls);
|
|
584
584
|
} catch (error) {
|
|
585
|
-
this.notificationService.error(( localize(
|
|
585
|
+
this.notificationService.error(( localize(2726, "Failed to copy redirect URIs to clipboard.")));
|
|
586
586
|
}
|
|
587
587
|
return true;
|
|
588
588
|
}
|
|
589
589
|
}],
|
|
590
590
|
cancelButton: {
|
|
591
|
-
label: ( localize(
|
|
591
|
+
label: ( localize(2727, "Cancel")),
|
|
592
592
|
run: () => false
|
|
593
593
|
}
|
|
594
594
|
});
|
|
595
595
|
if (!result) {
|
|
596
596
|
return undefined;
|
|
597
597
|
}
|
|
598
|
-
const sharedTitle = ( localize(
|
|
598
|
+
const sharedTitle = ( localize(2728, "Add Client Registration Details"));
|
|
599
599
|
const clientId = await this.quickInputService.input({
|
|
600
600
|
title: sharedTitle,
|
|
601
601
|
prompt: ( localize(
|
|
602
|
-
|
|
602
|
+
2729,
|
|
603
603
|
"Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
|
|
604
604
|
)),
|
|
605
|
-
placeHolder: ( localize(
|
|
605
|
+
placeHolder: ( localize(2730, "OAuth client ID (azye39d...)")),
|
|
606
606
|
ignoreFocusLost: true,
|
|
607
607
|
validateInput: async value => {
|
|
608
608
|
if (!value || value.trim().length === 0) {
|
|
609
|
-
return localize(
|
|
609
|
+
return localize(2731, "Client ID is required");
|
|
610
610
|
}
|
|
611
611
|
return undefined;
|
|
612
612
|
}
|
|
@@ -617,11 +617,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
617
617
|
const clientSecret = await this.quickInputService.input({
|
|
618
618
|
title: sharedTitle,
|
|
619
619
|
prompt: ( localize(
|
|
620
|
-
|
|
620
|
+
2732,
|
|
621
621
|
"(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
|
|
622
622
|
clientId
|
|
623
623
|
)),
|
|
624
|
-
placeHolder: ( localize(
|
|
624
|
+
placeHolder: ( localize(2733, "OAuth client secret (wer32o50f...) or leave it blank")),
|
|
625
625
|
password: true,
|
|
626
626
|
ignoreFocusLost: true
|
|
627
627
|
});
|
|
@@ -632,14 +632,14 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
632
632
|
}
|
|
633
633
|
async $promptForResourceClientSecret(resourceClientId, resource) {
|
|
634
634
|
const value = await this.quickInputService.input({
|
|
635
|
-
title: ( localize(
|
|
635
|
+
title: ( localize(2734, "Resource Client Secret Required")),
|
|
636
636
|
prompt: ( localize(
|
|
637
|
-
|
|
637
|
+
2735,
|
|
638
638
|
"The resource at '{0}' uses a per-resource client identifier '{1}'. Enter the matching client secret (leave blank if none). The value is saved in OS secret storage; manage it later via the 'Set Client Secret' code lens in mcp.json.",
|
|
639
639
|
resource,
|
|
640
640
|
resourceClientId
|
|
641
641
|
)),
|
|
642
|
-
placeHolder: ( localize(
|
|
642
|
+
placeHolder: ( localize(2736, "Resource client secret")),
|
|
643
643
|
password: true,
|
|
644
644
|
ignoreFocusLost: true
|
|
645
645
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { ITunnelProxyInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnelProxy";
|
|
4
|
+
import { IBrowserViewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
5
|
+
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
6
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
7
|
+
import { MainThreadBrowserTunnelProxyShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
8
|
+
/**
|
|
9
|
+
* Renderer-side bridge for the local extension host tunnel proxy. Gates the
|
|
10
|
+
* ext host proxy by the remote-proxy setting (and the presence of a remote
|
|
11
|
+
* authority) and forwards the resolved proxy info to the main process so it
|
|
12
|
+
* can be applied to the window's remote browser view Electron sessions.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MainThreadBrowserTunnelProxy extends Disposable implements MainThreadBrowserTunnelProxyShape {
|
|
15
|
+
private readonly _configurationService;
|
|
16
|
+
private readonly _environmentService;
|
|
17
|
+
private readonly _browserViewWorkbenchService;
|
|
18
|
+
private readonly _proxy;
|
|
19
|
+
constructor(extHostContext: IExtHostContext, _configurationService: IConfigurationService, _environmentService: IWorkbenchEnvironmentService, _browserViewWorkbenchService: IBrowserViewWorkbenchService);
|
|
20
|
+
private _isEnabled;
|
|
21
|
+
private _updateEnabled;
|
|
22
|
+
$updateProxyInfo(info: ITunnelProxyInfo | undefined): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
5
|
+
import { IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
|
|
6
|
+
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
7
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
+
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
9
|
+
|
|
10
|
+
const browserRemoteProxyEnabledSettingId = "workbench.browser.enableRemoteProxy";
|
|
11
|
+
let MainThreadBrowserTunnelProxy = class MainThreadBrowserTunnelProxy extends Disposable {
|
|
12
|
+
constructor(
|
|
13
|
+
extHostContext,
|
|
14
|
+
_configurationService,
|
|
15
|
+
_environmentService,
|
|
16
|
+
_browserViewWorkbenchService
|
|
17
|
+
) {
|
|
18
|
+
super();
|
|
19
|
+
this._configurationService = _configurationService;
|
|
20
|
+
this._environmentService = _environmentService;
|
|
21
|
+
this._browserViewWorkbenchService = _browserViewWorkbenchService;
|
|
22
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostBrowserTunnelProxy));
|
|
23
|
+
this._updateEnabled();
|
|
24
|
+
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
|
25
|
+
if (e.affectsConfiguration(browserRemoteProxyEnabledSettingId)) {
|
|
26
|
+
this._updateEnabled();
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
_isEnabled() {
|
|
31
|
+
return !!this._environmentService.remoteAuthority && this._configurationService.getValue(browserRemoteProxyEnabledSettingId) === true;
|
|
32
|
+
}
|
|
33
|
+
_updateEnabled() {
|
|
34
|
+
this._proxy.$setEnabled(this._isEnabled());
|
|
35
|
+
}
|
|
36
|
+
$updateProxyInfo(info) {
|
|
37
|
+
this._browserViewWorkbenchService.setRemoteProxyInfo(info);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
MainThreadBrowserTunnelProxy = __decorate([
|
|
41
|
+
extHostNamedCustomer(MainContext.MainThreadBrowserTunnelProxy),
|
|
42
|
+
( __param(1, IConfigurationService)),
|
|
43
|
+
( __param(2, IWorkbenchEnvironmentService)),
|
|
44
|
+
( __param(3, IBrowserViewWorkbenchService))
|
|
45
|
+
], MainThreadBrowserTunnelProxy);
|
|
46
|
+
|
|
47
|
+
export { MainThreadBrowserTunnelProxy };
|
|
@@ -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
|
+
2737,
|
|
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
|
)));
|