@codingame/monaco-vscode-extensions-service-override 28.4.1 → 29.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 +1 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.d.ts +34 -0
- package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.js +7 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.d.ts +21 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.js +34 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +25 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +147 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +6 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +8 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +160 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +19 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +134 -49
- 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/mainThreadDownloadService.js +1 -1
- 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/mainThreadGitExtensionService.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +47 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +9 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +21 -10
- 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.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +25 -23
- package/vscode/src/vs/workbench/api/common/shared/tasks.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.js +222 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/git/common/gitService.d.ts +22 -0
- 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 +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.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 +6 -6
package/index.js
CHANGED
|
@@ -149,6 +149,7 @@ import './vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js';
|
|
|
149
149
|
import './vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js';
|
|
150
150
|
import './vscode/src/vs/workbench/api/browser/mainThreadMeteredConnection.js';
|
|
151
151
|
import './vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js';
|
|
152
|
+
import './vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js';
|
|
152
153
|
|
|
153
154
|
let localExtensionHost;
|
|
154
155
|
function setLocalExtensionHost(_localExtensionHost) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extensions-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "29.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": "29.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "29.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
2
|
+
/** Source of an Integrated Browser open event. */
|
|
3
|
+
export type IntegratedBrowserOpenSource =
|
|
4
|
+
/** Created via CDP, such as by the agent using Playwright tools. */
|
|
5
|
+
"cdpCreated"
|
|
6
|
+
/** Opened via a (non-agentic) chat tool invocation. */
|
|
7
|
+
| "chatTool"
|
|
8
|
+
/** Opened via the "Open Integrated Browser" command without a URL argument.
|
|
9
|
+
* This typically means the user ran the command manually from the Command Palette. */
|
|
10
|
+
| "commandWithoutUrl"
|
|
11
|
+
/** Opened via the "Open Integrated Browser" command with a URL argument.
|
|
12
|
+
* This typically means another extension or component invoked the command programmatically. */
|
|
13
|
+
| "commandWithUrl"
|
|
14
|
+
/** Opened via the quick open feature with no initial URL. */
|
|
15
|
+
| "quickOpenWithoutUrl"
|
|
16
|
+
/** Opened via the quick open feature with an initial URL. */
|
|
17
|
+
| "quickOpenWithUrl"
|
|
18
|
+
/** Opened via the "New Tab" command from an existing tab. */
|
|
19
|
+
| "newTabCommand"
|
|
20
|
+
/** Opened via the localhost link opener when the `workbench.browser.openLocalhostLinks` setting
|
|
21
|
+
* is enabled. This happens when clicking localhost links from the terminal, chat, or other sources. */
|
|
22
|
+
| "localhostLinkOpener"
|
|
23
|
+
/** Opened when clicking a link inside the Integrated Browser that opens in a new focused editor
|
|
24
|
+
* (e.g., links with target="_blank"). */
|
|
25
|
+
| "browserLinkForeground"
|
|
26
|
+
/** Opened when clicking a link inside the Integrated Browser that opens in a new background editor
|
|
27
|
+
* (e.g., Ctrl/Cmd+click). */
|
|
28
|
+
| "browserLinkBackground"
|
|
29
|
+
/** Opened when clicking a link inside the Integrated Browser that opens in a new window
|
|
30
|
+
* (e.g., Shift+click). */
|
|
31
|
+
| "browserLinkNewWindow"
|
|
32
|
+
/** Opened when the user copies a browser editor to a new window via "Copy into New Window". */
|
|
33
|
+
| "copyToNewWindow";
|
|
34
|
+
export declare function logBrowserOpen(telemetryService: ITelemetryService, source: IntegratedBrowserOpenSource): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
/**
|
|
3
|
+
* Helper for creating and parsing browser view URIs.
|
|
4
|
+
*/
|
|
5
|
+
export declare namespace BrowserViewUri {
|
|
6
|
+
const scheme = "vscode-browser";
|
|
7
|
+
/**
|
|
8
|
+
* Creates a resource URI for a browser view with the given ID.
|
|
9
|
+
*/
|
|
10
|
+
function forId(id: string): URI;
|
|
11
|
+
/**
|
|
12
|
+
* Parses a browser view resource URI to extract the ID.
|
|
13
|
+
*/
|
|
14
|
+
function parse(resource: URI): {
|
|
15
|
+
id: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Extracts the ID from a browser view resource URI.
|
|
19
|
+
*/
|
|
20
|
+
function getId(resource: URI): string | undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
3
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
+
|
|
5
|
+
var BrowserViewUri;
|
|
6
|
+
(function(BrowserViewUri) {
|
|
7
|
+
BrowserViewUri.scheme = Schemas.vscodeBrowser;
|
|
8
|
+
function forId(id) {
|
|
9
|
+
return ( URI.from({
|
|
10
|
+
scheme: BrowserViewUri.scheme,
|
|
11
|
+
path: `/${id}`
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
BrowserViewUri.forId = forId;
|
|
15
|
+
function parse(resource) {
|
|
16
|
+
if (resource.scheme !== BrowserViewUri.scheme) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const id = resource.path.startsWith("/") ? resource.path.substring(1) : resource.path;
|
|
20
|
+
if (!id) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
id
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
BrowserViewUri.parse = parse;
|
|
28
|
+
function getId(resource) {
|
|
29
|
+
return parse(resource)?.id;
|
|
30
|
+
}
|
|
31
|
+
BrowserViewUri.getId = getId;
|
|
32
|
+
})(BrowserViewUri || (BrowserViewUri = {}));
|
|
33
|
+
|
|
34
|
+
export { BrowserViewUri };
|
|
@@ -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(1885, "Extension '{0}' not found.", id));
|
|
17
17
|
const useId = ( localize(
|
|
18
|
-
|
|
18
|
+
1886,
|
|
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(1887, "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(1888, "Installing extensions on {0}...", this.location)) : ( localize(1889, "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(1890, "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(1891, "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
|
+
1892,
|
|
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(1893, "No extension to update")));
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
191
|
this.logger.info(( localize(
|
|
192
|
-
|
|
192
|
+
1894,
|
|
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
|
+
1895,
|
|
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
|
+
1896,
|
|
208
208
|
"Extension '{0}' v{1} was successfully updated.",
|
|
209
209
|
extensionResult.identifier.id,
|
|
210
210
|
extensionResult.local?.manifest.version
|
|
@@ -225,7 +225,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
225
225
|
if (installedExtension) {
|
|
226
226
|
if (!force && (!version || (version === "prerelease" && installedExtension.preRelease))) {
|
|
227
227
|
this.logger.info(( localize(
|
|
228
|
-
|
|
228
|
+
1897,
|
|
229
229
|
"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'.",
|
|
230
230
|
id,
|
|
231
231
|
installedExtension.manifest.version,
|
|
@@ -234,7 +234,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
234
234
|
return false;
|
|
235
235
|
}
|
|
236
236
|
if (version && installedExtension.manifest.version === version) {
|
|
237
|
-
this.logger.info(( localize(
|
|
237
|
+
this.logger.info(( localize(1898, "Extension '{0}' is already installed.", `${id}@${version}`)));
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
240
240
|
if (installedExtension.preRelease && version !== "prerelease") {
|
|
@@ -276,23 +276,23 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
276
276
|
if (installedExtension) {
|
|
277
277
|
if (gallery.version === installedExtension.manifest.version) {
|
|
278
278
|
this.logger.info(( localize(
|
|
279
|
-
|
|
279
|
+
1898,
|
|
280
280
|
"Extension '{0}' is already installed.",
|
|
281
281
|
version ? `${id}@${version}` : id
|
|
282
282
|
)));
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
this.logger.info(( localize(
|
|
286
|
-
|
|
286
|
+
1899,
|
|
287
287
|
"Updating the extension '{0}' to the version {1}",
|
|
288
288
|
id,
|
|
289
289
|
gallery.version
|
|
290
290
|
)));
|
|
291
291
|
}
|
|
292
292
|
if (installOptions.isBuiltin) {
|
|
293
|
-
this.logger.info(version ? ( localize(
|
|
293
|
+
this.logger.info(version ? ( localize(1900, "Installing builtin extension '{0}' v{1}...", id, version)) : ( localize(1901, "Installing builtin extension '{0}'...", id)));
|
|
294
294
|
} else {
|
|
295
|
-
this.logger.info(version ? ( localize(
|
|
295
|
+
this.logger.info(version ? ( localize(1902, "Installing extension '{0}' v{1}...", id, version)) : ( localize(1903, "Installing extension '{0}'...", id)));
|
|
296
296
|
}
|
|
297
297
|
extensionsToInstall.push({
|
|
298
298
|
extension: gallery,
|
|
@@ -308,7 +308,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
308
308
|
for (const extensionResult of installationResult) {
|
|
309
309
|
if (extensionResult.error) {
|
|
310
310
|
this.logger.error(( localize(
|
|
311
|
-
|
|
311
|
+
1904,
|
|
312
312
|
"Error while installing extension {0}: {1}",
|
|
313
313
|
extensionResult.identifier.id,
|
|
314
314
|
getErrorMessage(extensionResult.error)
|
|
@@ -316,7 +316,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
316
316
|
failed.push(extensionResult.identifier.id);
|
|
317
317
|
} else {
|
|
318
318
|
this.logger.info(( localize(
|
|
319
|
-
|
|
319
|
+
1905,
|
|
320
320
|
"Extension '{0}' v{1} was successfully installed.",
|
|
321
321
|
extensionResult.identifier.id,
|
|
322
322
|
extensionResult.local?.manifest.version
|
|
@@ -338,10 +338,10 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
338
338
|
...installOptions,
|
|
339
339
|
installGivenVersion: true
|
|
340
340
|
});
|
|
341
|
-
this.logger.info(( localize(
|
|
341
|
+
this.logger.info(( localize(1906, "Extension '{0}' was successfully installed.", basename(vsix))));
|
|
342
342
|
} catch (error) {
|
|
343
343
|
if (isCancellationError(error)) {
|
|
344
|
-
this.logger.info(( localize(
|
|
344
|
+
this.logger.info(( localize(1907, "Cancelled installing extension '{0}'.", basename(vsix))));
|
|
345
345
|
} else {
|
|
346
346
|
throw error;
|
|
347
347
|
}
|
|
@@ -384,7 +384,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
384
384
|
);
|
|
385
385
|
if (newer) {
|
|
386
386
|
this.logger.info(( localize(
|
|
387
|
-
|
|
387
|
+
1908,
|
|
388
388
|
"A newer version of extension '{0}' v{1} is already installed. Use '--force' option to downgrade to older version.",
|
|
389
389
|
newer.identifier.id,
|
|
390
390
|
newer.manifest.version,
|
|
@@ -414,7 +414,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
414
414
|
}
|
|
415
415
|
if (( extensionsToUninstall.some(e => e.type === ExtensionType.System))) {
|
|
416
416
|
this.logger.info(( localize(
|
|
417
|
-
|
|
417
|
+
1909,
|
|
418
418
|
"Extension '{0}' is a Built-in extension and cannot be uninstalled",
|
|
419
419
|
id
|
|
420
420
|
)));
|
|
@@ -422,13 +422,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
422
422
|
}
|
|
423
423
|
if (!force && ( extensionsToUninstall.some(e => e.isBuiltin))) {
|
|
424
424
|
this.logger.info(( localize(
|
|
425
|
-
|
|
425
|
+
1910,
|
|
426
426
|
"Extension '{0}' is marked as a Built-in extension by user. Please use '--force' option to uninstall it.",
|
|
427
427
|
id
|
|
428
428
|
)));
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
|
-
this.logger.info(( localize(
|
|
431
|
+
this.logger.info(( localize(1911, "Uninstalling {0}...", id)));
|
|
432
432
|
for (const extensionToUninstall of extensionsToUninstall) {
|
|
433
433
|
await this.extensionManagementService.uninstall(extensionToUninstall, {
|
|
434
434
|
profileLocation
|
|
@@ -436,13 +436,13 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
436
436
|
}
|
|
437
437
|
if (this.location) {
|
|
438
438
|
this.logger.info(( localize(
|
|
439
|
-
|
|
439
|
+
1912,
|
|
440
440
|
"Extension '{0}' was successfully uninstalled from {1}!",
|
|
441
441
|
id,
|
|
442
442
|
this.location
|
|
443
443
|
)));
|
|
444
444
|
} else {
|
|
445
|
-
this.logger.info(( localize(
|
|
445
|
+
this.logger.info(( localize(1913, "Extension '{0}' was successfully uninstalled!", id)));
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
@@ -460,7 +460,7 @@ let ExtensionManagementCLI = class ExtensionManagementCLI {
|
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
notInstalled(id) {
|
|
463
|
-
return this.location ? ( localize(
|
|
463
|
+
return this.location ? ( localize(1914, "Extension '{0}' is not installed on {1}.", id, this.location)) : ( localize(1915, "Extension '{0}' is not installed.", id));
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
ExtensionManagementCLI = ( __decorate([( __param(2, IExtensionManagementService)), ( __param(3, IExtensionGalleryService)), ( __param(4, IProductService))], ExtensionManagementCLI));
|
|
@@ -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(2528, "Yes"));
|
|
249
|
+
const no = ( localize(2529, "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
|
+
2530,
|
|
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
|
+
2531,
|
|
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(2532, "&&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(2533, "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(2534, "Incorrect account detected")),
|
|
348
348
|
detail: ( localize(
|
|
349
|
-
|
|
349
|
+
2535,
|
|
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(2536, "Keep {0}", chosenAccountLabel)),
|
|
358
358
|
run: () => chosenAccountLabel
|
|
359
359
|
}, {
|
|
360
|
-
label: ( localize(
|
|
360
|
+
label: ( localize(2537, "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(2538, "Device Code Authentication")),
|
|
514
514
|
detail: ( localize(
|
|
515
|
-
|
|
515
|
+
2539,
|
|
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(2540, "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(2541, "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(2542, "Dynamic Client Registration not supported")),
|
|
541
541
|
detail: ( localize(
|
|
542
|
-
|
|
542
|
+
2543,
|
|
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(2544, "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(2545, "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(2546, "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(2547, "Add Client Registration Details"));
|
|
567
567
|
const clientId = await this.quickInputService.input({
|
|
568
568
|
title: sharedTitle,
|
|
569
569
|
prompt: ( localize(
|
|
570
|
-
|
|
570
|
+
2548,
|
|
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(2549, "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(2550, "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
|
+
2551,
|
|
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(2552, "OAuth client secret (wer32o50f...) or leave it blank")),
|
|
593
593
|
password: true,
|
|
594
594
|
ignoreFocusLost: true
|
|
595
595
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
3
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
+
import { BrowserTabDto, MainThreadBrowsersShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
|
+
import { IBrowserViewCDPService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
6
|
+
import { EditorGroupColumn } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupColumn";
|
|
7
|
+
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
8
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
9
|
+
import { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
|
|
10
|
+
import { CDPRequest } from "@codingame/monaco-vscode-api/vscode/vs/platform/browserView/common/cdp/types";
|
|
11
|
+
export declare class MainThreadBrowsers extends Disposable implements MainThreadBrowsersShape {
|
|
12
|
+
private readonly editorService;
|
|
13
|
+
private readonly cdpService;
|
|
14
|
+
private readonly editorGroupsService;
|
|
15
|
+
private readonly configurationService;
|
|
16
|
+
private readonly _proxy;
|
|
17
|
+
private readonly _cdpSessions;
|
|
18
|
+
private readonly _knownBrowsers;
|
|
19
|
+
constructor(extHostContext: IExtHostContext, editorService: IEditorService, cdpService: IBrowserViewCDPService, editorGroupsService: IEditorGroupsService, configurationService: IConfigurationService);
|
|
20
|
+
$openBrowserTab(url: string, viewColumn?: EditorGroupColumn, options?: IEditorOptions): Promise<BrowserTabDto>;
|
|
21
|
+
private _lastActiveBrowserId;
|
|
22
|
+
private _syncActiveBrowserTab;
|
|
23
|
+
private _track;
|
|
24
|
+
private _toDto;
|
|
25
|
+
$startCDPSession(sessionId: string, browserId: string): Promise<void>;
|
|
26
|
+
$closeCDPSession(sessionId: string): Promise<void>;
|
|
27
|
+
$sendCDPMessage(sessionId: string, message: CDPRequest): Promise<void>;
|
|
28
|
+
$closeBrowserTab(browserId: string): Promise<void>;
|
|
29
|
+
}
|