@codingame/monaco-vscode-extensions-service-override 36.2.7 → 37.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/platform/telemetry/common/assignmentContext.d.ts +4 -0
- package/vscode/src/vs/platform/telemetry/common/assignmentContext.js +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js +14 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +9 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +56 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +6 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatInputNotification.js +7 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +8 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.d.ts +17 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +130 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +2 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +8 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +9 -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 +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +42 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +2 -0
- 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/mainThreadTelemetry.d.ts +19 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +14 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +12 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +39 -4
- 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 +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
|
@@ -19,3 +19,22 @@ export declare class MainThreadTelemetry extends Disposable implements MainThrea
|
|
|
19
19
|
$publicLog(eventName: string, data?: ITelemetryData): void;
|
|
20
20
|
$publicLog2<E extends ClassifiedEvent<OmitMetadata<T>> = never, T extends IGDPRProperty = never>(eventName: string, data?: StrictPropertyCheck<T, E>): void;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* The core telemetry property under which the Copilot CAPI flight assignment
|
|
24
|
+
* context is surfaced. It mirrors the scope of `abexp.assignmentcontext`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CAPI_ASSIGNMENT_CONTEXT_PROPERTY = "capi.assignmentcontext";
|
|
27
|
+
/**
|
|
28
|
+
* The private command Copilot invokes to forward its CAPI flight assignments
|
|
29
|
+
* into core telemetry. Not part of the public API.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SET_CAPI_ASSIGNMENT_CONTEXT_COMMAND = "_telemetry.setCapiAssignmentContext";
|
|
32
|
+
/**
|
|
33
|
+
* Validates a CAPI assignment-context string before it is trusted onto every
|
|
34
|
+
* core telemetry event. Because {@link ITelemetryService.setExperimentProperty}
|
|
35
|
+
* wraps the value in a `TelemetryTrustedValue` (bypassing PII cleaning), the
|
|
36
|
+
* value must be strictly shaped: a non-empty, size-capped list of `key:value`
|
|
37
|
+
* entries separated by `;`, with no whitespace or control characters. Any
|
|
38
|
+
* malformed input is rejected outright.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isValidCapiAssignmentContext(value: string): boolean;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
5
|
+
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
5
6
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
6
7
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
8
|
+
import { isValidAssignmentContext } from '../../../platform/telemetry/common/assignmentContext.js';
|
|
7
9
|
import { TELEMETRY_SETTING_ID, TELEMETRY_OLD_SETTING_ID, TelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
8
10
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
9
11
|
import { supportsTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
@@ -59,5 +61,16 @@ let MainThreadTelemetry = class MainThreadTelemetry extends Disposable {
|
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
MainThreadTelemetry = MainThreadTelemetry_1 = __decorate([extHostNamedCustomer(MainContext.MainThreadTelemetry), ( __param(1, ITelemetryService)), ( __param(2, IConfigurationService)), ( __param(3, IEnvironmentService)), ( __param(4, IProductService))], MainThreadTelemetry);
|
|
64
|
+
const CAPI_ASSIGNMENT_CONTEXT_PROPERTY = "capi.assignmentcontext";
|
|
65
|
+
const SET_CAPI_ASSIGNMENT_CONTEXT_COMMAND = "_telemetry.setCapiAssignmentContext";
|
|
66
|
+
function isValidCapiAssignmentContext(value) {
|
|
67
|
+
return isValidAssignmentContext(value);
|
|
68
|
+
}
|
|
69
|
+
CommandsRegistry.registerCommand(SET_CAPI_ASSIGNMENT_CONTEXT_COMMAND, function(accessor, value) {
|
|
70
|
+
if (typeof value !== "string" || !isValidCapiAssignmentContext(value)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
accessor.get(ITelemetryService).setExperimentProperty(CAPI_ASSIGNMENT_CONTEXT_PROPERTY, value);
|
|
74
|
+
});
|
|
62
75
|
|
|
63
|
-
export { MainThreadTelemetry };
|
|
76
|
+
export { CAPI_ASSIGNMENT_CONTEXT_PROPERTY, MainThreadTelemetry, SET_CAPI_ASSIGNMENT_CONTEXT_COMMAND, isValidCapiAssignmentContext };
|
|
@@ -6,7 +6,7 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
|
|
|
6
6
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
9
|
-
import { TerminalLocation, TerminalExitReason, ProcessPropertyType } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
9
|
+
import { remoteResolverTerminal, TerminalLocation, TerminalExitReason, ProcessPropertyType } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
10
10
|
import { TerminalDataBufferer } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminalDataBuffering';
|
|
11
11
|
import { ITerminalService, ITerminalGroupService, ITerminalEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
|
|
12
12
|
import { TerminalProcessExtHostProxy } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy';
|
|
@@ -161,6 +161,7 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
161
161
|
extHostTerminalId,
|
|
162
162
|
forceShellIntegration: launchConfig.forceShellIntegration,
|
|
163
163
|
isFeatureTerminal: launchConfig.isFeatureTerminal,
|
|
164
|
+
[remoteResolverTerminal]: launchConfig.isRemoteResolverTerminal || undefined,
|
|
164
165
|
isExtensionOwnedTerminal: launchConfig.isExtensionOwnedTerminal,
|
|
165
166
|
useShellEnvironment: launchConfig.useShellEnvironment,
|
|
166
167
|
isTransient: launchConfig.isTransient,
|
|
@@ -170,6 +171,7 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
170
171
|
const terminal = Promises.withAsyncBody(async r => {
|
|
171
172
|
const terminal = await this._terminalService.createTerminal({
|
|
172
173
|
config: shellLaunchConfig,
|
|
174
|
+
cwd: launchConfig.isRemoteResolverTerminal ? shellLaunchConfig.cwd : undefined,
|
|
173
175
|
location: await this._deserializeParentTerminal(launchConfig.location)
|
|
174
176
|
});
|
|
175
177
|
r(terminal);
|
|
@@ -491,6 +493,7 @@ let TerminalDataEventTracker = class TerminalDataEventTracker extends Disposable
|
|
|
491
493
|
super();
|
|
492
494
|
this._callback = _callback;
|
|
493
495
|
this._terminalService = _terminalService;
|
|
496
|
+
this._instanceListeners = this._register(( new DisposableMap()));
|
|
494
497
|
this._register(this._bufferer = ( new TerminalDataBufferer(this._callback)));
|
|
495
498
|
for (const instance of this._terminalService.instances) {
|
|
496
499
|
this._registerInstance(instance);
|
|
@@ -498,12 +501,16 @@ let TerminalDataEventTracker = class TerminalDataEventTracker extends Disposable
|
|
|
498
501
|
this._register(
|
|
499
502
|
this._terminalService.onDidCreateInstance(instance => this._registerInstance(instance))
|
|
500
503
|
);
|
|
501
|
-
this._register(
|
|
502
|
-
this.
|
|
503
|
-
|
|
504
|
+
this._register(this._terminalService.onDidDisposeInstance(instance => {
|
|
505
|
+
this._bufferer.stopBuffering(instance.instanceId);
|
|
506
|
+
this._instanceListeners.deleteAndDispose(instance.instanceId);
|
|
507
|
+
}));
|
|
504
508
|
}
|
|
505
509
|
_registerInstance(instance) {
|
|
506
|
-
this.
|
|
510
|
+
this._instanceListeners.set(
|
|
511
|
+
instance.instanceId,
|
|
512
|
+
this._bufferer.startBuffering(instance.instanceId, instance.onData)
|
|
513
|
+
);
|
|
507
514
|
}
|
|
508
515
|
};
|
|
509
516
|
TerminalDataEventTracker = ( __decorate([( __param(1, ITerminalService))], TerminalDataEventTracker));
|
|
@@ -116,13 +116,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
118
118
|
return this.notificationService.prompt(Severity.Info, ( localize(
|
|
119
|
-
|
|
119
|
+
3038,
|
|
120
120
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
121
121
|
source,
|
|
122
122
|
tunnelOptions.remoteAddress.port,
|
|
123
123
|
tunnelOptions.localAddressPort
|
|
124
124
|
)), [{
|
|
125
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(3039, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
126
126
|
run: async () => {
|
|
127
127
|
this.elevateionRetry = true;
|
|
128
128
|
await this.remoteExplorerService.close({
|
|
@@ -10,7 +10,9 @@ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/pla
|
|
|
10
10
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
11
11
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
12
12
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
13
|
-
import
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
14
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
|
|
15
|
+
import { defaultExternalUriOpenerId } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener';
|
|
14
16
|
import { ContributedExternalUriOpenersStore } from '../../contrib/externalUriOpener/common/contributedOpeners.js';
|
|
15
17
|
import { IExternalUriOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.service';
|
|
16
18
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
@@ -61,7 +63,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
61
63
|
}, token);
|
|
62
64
|
} catch (e) {
|
|
63
65
|
if (!isCancellationError(e)) {
|
|
64
|
-
const openDefaultAction = ( new Action("default", ( localize(
|
|
66
|
+
const openDefaultAction = ( new Action("default", ( localize(3040, "Open using default opener")), undefined, undefined, async () => {
|
|
65
67
|
await this.openerService.open(uri, {
|
|
66
68
|
allowTunneling: false,
|
|
67
69
|
allowContributedOpeners: defaultExternalUriOpenerId
|
|
@@ -70,7 +72,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
70
72
|
openDefaultAction.tooltip = ( uri.toString());
|
|
71
73
|
this.notificationService.notify({
|
|
72
74
|
severity: Severity.Error,
|
|
73
|
-
message: ( localize(
|
|
75
|
+
message: ( localize(3041, "Could not open uri with '{0}': {1}", id, (e.toString()))),
|
|
74
76
|
actions: {
|
|
75
77
|
primary: [openDefaultAction]
|
|
76
78
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
3
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
+
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
4
5
|
import { WebviewInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput";
|
|
5
6
|
import { IWebviewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service";
|
|
6
7
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
@@ -14,13 +15,15 @@ export declare class MainThreadWebviewPanels extends Disposable implements extHo
|
|
|
14
15
|
private readonly _configurationService;
|
|
15
16
|
private readonly _editorGroupService;
|
|
16
17
|
private readonly _editorService;
|
|
18
|
+
private readonly _extensionService;
|
|
17
19
|
private readonly _webviewWorkbenchService;
|
|
20
|
+
private readonly _uriIdentityService;
|
|
18
21
|
private readonly webviewPanelViewType;
|
|
19
22
|
private readonly _proxy;
|
|
20
23
|
private readonly _webviewInputs;
|
|
21
24
|
private readonly _revivers;
|
|
22
25
|
private readonly webviewOriginStore;
|
|
23
|
-
constructor(context: IExtHostContext, _mainThreadWebviews: MainThreadWebviews, _configurationService: IConfigurationService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService,
|
|
26
|
+
constructor(context: IExtHostContext, _mainThreadWebviews: MainThreadWebviews, _configurationService: IConfigurationService, _editorGroupService: IEditorGroupsService, _editorService: IEditorService, _extensionService: IExtensionService, storageService: IStorageService, _webviewWorkbenchService: IWebviewWorkbenchService, _uriIdentityService: IUriIdentityService);
|
|
24
27
|
get webviewInputs(): Iterable<WebviewInput>;
|
|
25
28
|
addWebviewInput(handle: extHostProtocol.WebviewHandle, input: WebviewInput, options: {
|
|
26
29
|
serializeBuffersForPostMessage: boolean;
|
|
@@ -34,6 +37,7 @@ export declare class MainThreadWebviewPanels extends Disposable implements extHo
|
|
|
34
37
|
$registerSerializer(viewType: string, options: {
|
|
35
38
|
serializeBuffersForPostMessage: boolean;
|
|
36
39
|
}): void;
|
|
40
|
+
private updateExtensionLocation;
|
|
37
41
|
$unregisterSerializer(viewType: string): void;
|
|
38
42
|
private updateWebviewViewStates;
|
|
39
43
|
private tryGetWebviewInput;
|
|
@@ -7,6 +7,7 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
|
7
7
|
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
8
8
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
10
|
+
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
10
11
|
import { DiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
11
12
|
import { ExtensionKeyedWebviewOriginStore } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
12
13
|
import { WebviewInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
@@ -68,16 +69,19 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
68
69
|
_configurationService,
|
|
69
70
|
_editorGroupService,
|
|
70
71
|
_editorService,
|
|
71
|
-
|
|
72
|
+
_extensionService,
|
|
72
73
|
storageService,
|
|
73
|
-
_webviewWorkbenchService
|
|
74
|
+
_webviewWorkbenchService,
|
|
75
|
+
_uriIdentityService
|
|
74
76
|
) {
|
|
75
77
|
super();
|
|
76
78
|
this._mainThreadWebviews = _mainThreadWebviews;
|
|
77
79
|
this._configurationService = _configurationService;
|
|
78
80
|
this._editorGroupService = _editorGroupService;
|
|
79
81
|
this._editorService = _editorService;
|
|
82
|
+
this._extensionService = _extensionService;
|
|
80
83
|
this._webviewWorkbenchService = _webviewWorkbenchService;
|
|
84
|
+
this._uriIdentityService = _uriIdentityService;
|
|
81
85
|
this.webviewPanelViewType = ( new WebviewViewTypeTransformer("mainThreadWebview-"));
|
|
82
86
|
this._webviewInputs = ( new WebviewInputStore());
|
|
83
87
|
this._revivers = this._register(( new DisposableMap()));
|
|
@@ -99,7 +103,7 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
99
103
|
canResolve: webview => {
|
|
100
104
|
const viewType = this.webviewPanelViewType.toExternal(webview.viewType);
|
|
101
105
|
if (typeof viewType === "string") {
|
|
102
|
-
|
|
106
|
+
this._extensionService.activateByEvent(`onWebviewPanel:${viewType}`);
|
|
103
107
|
}
|
|
104
108
|
return false;
|
|
105
109
|
},
|
|
@@ -214,6 +218,7 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
try {
|
|
221
|
+
await this.updateExtensionLocation(webviewInput);
|
|
217
222
|
await this._proxy.$deserializeWebviewPanel(handle, viewType, {
|
|
218
223
|
title: webviewInput.getTitle(),
|
|
219
224
|
state,
|
|
@@ -228,6 +233,36 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
228
233
|
}
|
|
229
234
|
}));
|
|
230
235
|
}
|
|
236
|
+
async updateExtensionLocation(webviewInput) {
|
|
237
|
+
const oldExtension = webviewInput.extension;
|
|
238
|
+
if (!oldExtension?.location) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const extension = await this._extensionService.getExtension(oldExtension.id.value);
|
|
242
|
+
const extUri = this._uriIdentityService.extUri;
|
|
243
|
+
if (!extension || extUri.isEqual(oldExtension.location, extension.extensionLocation)) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const webview = webviewInput.webview;
|
|
247
|
+
const oldLocation = extUri.removeTrailingPathSeparator(extUri.normalizePath(oldExtension.location));
|
|
248
|
+
webview.contentOptions = {
|
|
249
|
+
...webview.contentOptions,
|
|
250
|
+
localResourceRoots: webview.contentOptions.localResourceRoots?.map(root => {
|
|
251
|
+
const normalizedRoot = extUri.normalizePath(root);
|
|
252
|
+
if (!extUri.isEqualOrParent(normalizedRoot, oldLocation)) {
|
|
253
|
+
return root;
|
|
254
|
+
}
|
|
255
|
+
return URI.joinPath(
|
|
256
|
+
extension.extensionLocation,
|
|
257
|
+
normalizedRoot.path.slice(oldLocation.path.length)
|
|
258
|
+
);
|
|
259
|
+
})
|
|
260
|
+
};
|
|
261
|
+
webview.extension = {
|
|
262
|
+
id: extension.identifier,
|
|
263
|
+
location: extension.extensionLocation
|
|
264
|
+
};
|
|
265
|
+
}
|
|
231
266
|
$unregisterSerializer(viewType) {
|
|
232
267
|
if (!( this._revivers.has(viewType))) {
|
|
233
268
|
throw ( new Error(`No reviver for ${viewType} registered`));
|
|
@@ -271,7 +306,7 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
271
306
|
return this._webviewInputs.getInputForHandle(handle);
|
|
272
307
|
}
|
|
273
308
|
};
|
|
274
|
-
MainThreadWebviewPanels = ( __decorate([( __param(2, IConfigurationService)), ( __param(3, IEditorGroupsService)), ( __param(4, IEditorService)), ( __param(5, IExtensionService)), ( __param(6, IStorageService)), ( __param(7, IWebviewWorkbenchService))], MainThreadWebviewPanels));
|
|
309
|
+
MainThreadWebviewPanels = ( __decorate([( __param(2, IConfigurationService)), ( __param(3, IEditorGroupsService)), ( __param(4, IEditorService)), ( __param(5, IExtensionService)), ( __param(6, IStorageService)), ( __param(7, IWebviewWorkbenchService)), ( __param(8, IUriIdentityService))], MainThreadWebviewPanels));
|
|
275
310
|
function reviveWebviewIcon(value) {
|
|
276
311
|
if (!value) {
|
|
277
312
|
return undefined;
|
|
@@ -118,7 +118,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
118
118
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
119
119
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
120
120
|
</head>
|
|
121
|
-
<body>${( localize(
|
|
121
|
+
<body>${( localize(3042, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
122
122
|
</html>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -114,10 +114,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
114
114
|
const wantsToDelete = removeCount > 0;
|
|
115
115
|
if (wantsToAdd && !wantsToDelete) {
|
|
116
116
|
if (addCount === 1) {
|
|
117
|
-
message = ( localize(
|
|
117
|
+
message = ( localize(3043, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
118
118
|
} else {
|
|
119
119
|
message = ( localize(
|
|
120
|
-
|
|
120
|
+
3044,
|
|
121
121
|
"Extension '{0}' added {1} folders to the workspace",
|
|
122
122
|
extensionName,
|
|
123
123
|
addCount
|
|
@@ -126,10 +126,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
126
126
|
}
|
|
127
127
|
else if (wantsToDelete && !wantsToAdd) {
|
|
128
128
|
if (removeCount === 1) {
|
|
129
|
-
message = ( localize(
|
|
129
|
+
message = ( localize(3045, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
130
130
|
} else {
|
|
131
131
|
message = ( localize(
|
|
132
|
-
|
|
132
|
+
3046,
|
|
133
133
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
134
134
|
extensionName,
|
|
135
135
|
removeCount
|
|
@@ -137,7 +137,7 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
message = ( localize(
|
|
140
|
+
message = ( localize(3047, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
141
141
|
}
|
|
142
142
|
return message;
|
|
143
143
|
}
|
|
@@ -60,7 +60,7 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
60
60
|
}));
|
|
61
61
|
this._register(extensionService.onWillStop(e => {
|
|
62
62
|
e.veto(true, ( localize(
|
|
63
|
-
|
|
63
|
+
11284,
|
|
64
64
|
"An extension provided text editor for '{0}' is still open that would close otherwise.",
|
|
65
65
|
this.name
|
|
66
66
|
)));
|
|
@@ -169,11 +169,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
169
169
|
}
|
|
170
170
|
_showBisectPrompt() {
|
|
171
171
|
const goodPrompt = {
|
|
172
|
-
label: ( localize(
|
|
172
|
+
label: ( localize(19615, "I can't reproduce")),
|
|
173
173
|
run: () => this._commandService.executeCommand("extension.bisect.next", false)
|
|
174
174
|
};
|
|
175
175
|
const badPrompt = {
|
|
176
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(19616, "I can reproduce")),
|
|
177
177
|
run: () => this._commandService.executeCommand("extension.bisect.next", true)
|
|
178
178
|
};
|
|
179
179
|
const stop = {
|
|
@@ -181,10 +181,10 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
181
181
|
run: () => this._commandService.executeCommand("extension.bisect.stop")
|
|
182
182
|
};
|
|
183
183
|
const message = this._extensionBisectService.disabledCount === 1 ? ( localize(
|
|
184
|
-
|
|
184
|
+
19617,
|
|
185
185
|
"Extension Bisect is active and has disabled 1 extension. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
186
186
|
)) : ( localize(
|
|
187
|
-
|
|
187
|
+
19618,
|
|
188
188
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
189
189
|
this._extensionBisectService.disabledCount
|
|
190
190
|
));
|
|
@@ -200,7 +200,7 @@ registerAction2(class extends Action2 {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: "extension.bisect.start",
|
|
203
|
-
title: ( localize2(
|
|
203
|
+
title: ( localize2(19619, "Start Extension Bisect")),
|
|
204
204
|
category: Categories.Help,
|
|
205
205
|
f1: true,
|
|
206
206
|
precondition: ( ExtensionBisectUi.ctxIsBisectActive.negate()),
|
|
@@ -220,13 +220,13 @@ registerAction2(class extends Action2 {
|
|
|
220
220
|
const extensionsBisect = accessor.get(IExtensionBisectService);
|
|
221
221
|
const extensions = (await extensionManagement.getInstalled(ExtensionType.User)).filter(ext => extensionEnablementService.isEnabled(ext));
|
|
222
222
|
const res = await dialogService.confirm({
|
|
223
|
-
message: ( localize(
|
|
223
|
+
message: ( localize(19620, "Extension Bisect")),
|
|
224
224
|
detail: ( localize(
|
|
225
|
-
|
|
225
|
+
19621,
|
|
226
226
|
"Extension Bisect will use binary search to find an extension that causes a problem. During the process the window reloads repeatedly (~{0} times). Each time you must confirm if you are still seeing problems.",
|
|
227
227
|
2 + Math.log2(extensions.length) | 0
|
|
228
228
|
)),
|
|
229
|
-
primaryButton: ( localize(
|
|
229
|
+
primaryButton: ( localize(19622, "&&Start Extension Bisect"))
|
|
230
230
|
});
|
|
231
231
|
if (res.confirmed) {
|
|
232
232
|
await extensionsBisect.start(extensions);
|
|
@@ -238,7 +238,7 @@ registerAction2(class extends Action2 {
|
|
|
238
238
|
constructor() {
|
|
239
239
|
super({
|
|
240
240
|
id: "extension.bisect.next",
|
|
241
|
-
title: ( localize2(
|
|
241
|
+
title: ( localize2(19623, "Continue Extension Bisect")),
|
|
242
242
|
category: Categories.Help,
|
|
243
243
|
f1: true,
|
|
244
244
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
|
@@ -272,24 +272,24 @@ registerAction2(class extends Action2 {
|
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
if (done.bad) {
|
|
275
|
-
await dialogService.info(( localize(
|
|
276
|
-
|
|
275
|
+
await dialogService.info(( localize(19624, "Extension Bisect")), ( localize(
|
|
276
|
+
19625,
|
|
277
277
|
"Extension Bisect is done but no extension has been identified. This might be a problem with {0}.",
|
|
278
278
|
productService.nameShort
|
|
279
279
|
)));
|
|
280
280
|
} else {
|
|
281
281
|
const res = await dialogService.confirm({
|
|
282
282
|
type: Severity.Info,
|
|
283
|
-
message: ( localize(
|
|
284
|
-
primaryButton: ( localize(
|
|
285
|
-
cancelButton: ( localize(
|
|
283
|
+
message: ( localize(19624, "Extension Bisect")),
|
|
284
|
+
primaryButton: ( localize(19626, "&&Report Issue & Continue")),
|
|
285
|
+
cancelButton: ( localize(19627, "Continue")),
|
|
286
286
|
detail: ( localize(
|
|
287
|
-
|
|
287
|
+
19628,
|
|
288
288
|
"Extension Bisect is done and has identified {0} as the extension causing the problem.",
|
|
289
289
|
done.id
|
|
290
290
|
)),
|
|
291
291
|
checkbox: {
|
|
292
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(19629, "Keep this extension disabled")),
|
|
293
293
|
checked: true
|
|
294
294
|
}
|
|
295
295
|
});
|
|
@@ -310,24 +310,24 @@ registerAction2(class extends Action2 {
|
|
|
310
310
|
result
|
|
311
311
|
} = await dialogService.prompt({
|
|
312
312
|
type: Severity.Info,
|
|
313
|
-
message: ( localize(
|
|
313
|
+
message: ( localize(19630, "Extension Bisect")),
|
|
314
314
|
detail: ( localize(
|
|
315
|
-
|
|
315
|
+
19631,
|
|
316
316
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
317
317
|
bisectService.disabledCount
|
|
318
318
|
)),
|
|
319
319
|
buttons: [{
|
|
320
|
-
label: ( localize(
|
|
320
|
+
label: ( localize(19632, "I ca&&n't reproduce")),
|
|
321
321
|
run: () => false
|
|
322
322
|
}, {
|
|
323
|
-
label: ( localize(
|
|
323
|
+
label: ( localize(19633, "I can &&reproduce")),
|
|
324
324
|
run: () => true
|
|
325
325
|
}, {
|
|
326
|
-
label: ( localize(
|
|
326
|
+
label: ( localize(19634, "&&Stop Bisect")),
|
|
327
327
|
run: () => undefined
|
|
328
328
|
}],
|
|
329
329
|
cancelButton: {
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(19635, "&&Cancel Bisect")),
|
|
331
331
|
run: () => null
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -338,7 +338,7 @@ registerAction2(class extends Action2 {
|
|
|
338
338
|
constructor() {
|
|
339
339
|
super({
|
|
340
340
|
id: "extension.bisect.stop",
|
|
341
|
-
title: ( localize2(
|
|
341
|
+
title: ( localize2(19636, "Stop Extension Bisect")),
|
|
342
342
|
category: Categories.Help,
|
|
343
343
|
f1: true,
|
|
344
344
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js
CHANGED
|
@@ -767,7 +767,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
767
767
|
}
|
|
768
768
|
if (!this.extensionManifestPropertiesService.canExecuteOnWeb(manifest)) {
|
|
769
769
|
throw ( new Error(( localize(
|
|
770
|
-
|
|
770
|
+
19651,
|
|
771
771
|
"Cannot add '{0}' because this extension is not a web extension.",
|
|
772
772
|
manifest.displayName || manifest.name
|
|
773
773
|
))));
|
|
@@ -1046,7 +1046,7 @@ if (isWeb) {
|
|
|
1046
1046
|
constructor() {
|
|
1047
1047
|
super({
|
|
1048
1048
|
id: "workbench.extensions.action.openInstalledWebExtensionsResource",
|
|
1049
|
-
title: ( localize2(
|
|
1049
|
+
title: ( localize2(19652, "Open Installed Web Extensions Resource")),
|
|
1050
1050
|
category: Categories.Developer,
|
|
1051
1051
|
f1: true,
|
|
1052
1052
|
precondition: IsWebContext
|
|
@@ -222,13 +222,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
222
222
|
}
|
|
223
223
|
}, {
|
|
224
224
|
id: "join.disconnectRemote",
|
|
225
|
-
label: ( localize(
|
|
225
|
+
label: ( localize(19718, "Disconnect Remote Agent")),
|
|
226
226
|
order: WillShutdownJoinerOrder.Last
|
|
227
227
|
});
|
|
228
228
|
} else {
|
|
229
229
|
event.join(this._doStopExtensionHosts(), {
|
|
230
230
|
id: "join.stopExtensionHosts",
|
|
231
|
-
label: ( localize(
|
|
231
|
+
label: ( localize(19719, "Stopping Extension Hosts"))
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}));
|
|
@@ -301,7 +301,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
301
301
|
this._notificationService.notify({
|
|
302
302
|
severity: Severity.Error,
|
|
303
303
|
message: ( localize(
|
|
304
|
-
|
|
304
|
+
19720,
|
|
305
305
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
306
306
|
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(", ")
|
|
307
307
|
))
|
|
@@ -538,7 +538,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
538
538
|
this._notificationService.notify({
|
|
539
539
|
severity: Severity.Error,
|
|
540
540
|
message: ( localize(
|
|
541
|
-
|
|
541
|
+
19720,
|
|
542
542
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
543
543
|
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(", ")
|
|
544
544
|
))
|
|
@@ -553,7 +553,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
553
553
|
const extensionHostManager = this.findTestExtensionHost(this._environmentService.extensionTestsLocationURI);
|
|
554
554
|
if (!extensionHostManager) {
|
|
555
555
|
const msg = ( localize(
|
|
556
|
-
|
|
556
|
+
19721,
|
|
557
557
|
"No extension host found that can launch the test runner at {0}.",
|
|
558
558
|
(this._environmentService.extensionTestsLocationURI.toString())
|
|
559
559
|
));
|
|
@@ -723,7 +723,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
723
723
|
vetoReasons.add(reason);
|
|
724
724
|
}
|
|
725
725
|
}).catch(error => {
|
|
726
|
-
vetoReasons.add(( localize(
|
|
726
|
+
vetoReasons.add(( localize(19722, "{0} (Error: {1})", reason, toErrorMessage(error))));
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
}
|
|
@@ -741,9 +741,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
741
741
|
confirmed
|
|
742
742
|
} = await this._dialogService.confirm({
|
|
743
743
|
type: Severity.Warning,
|
|
744
|
-
message: ( localize(
|
|
744
|
+
message: ( localize(19723, "Please confirm restart of extensions.")),
|
|
745
745
|
detail: vetoReasonsArray.length === 1 ? vetoReasonsArray[0] : vetoReasonsArray.join("\n -"),
|
|
746
|
-
primaryButton: ( localize(
|
|
746
|
+
primaryButton: ( localize(19724, "Restart Anyway"))
|
|
747
747
|
});
|
|
748
748
|
if (confirmed) {
|
|
749
749
|
return true;
|
|
@@ -857,16 +857,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
857
857
|
this._remoteCrashTracker.registerCrash();
|
|
858
858
|
if (this._remoteCrashTracker.shouldAutomaticallyRestart()) {
|
|
859
859
|
this._logService.info(`Automatically restarting the remote extension host.`);
|
|
860
|
-
this._notificationService.status(( localize(
|
|
860
|
+
this._notificationService.status(( localize(19725, "The remote extension host terminated unexpectedly. Restarting...")), {
|
|
861
861
|
hideAfter: 5000
|
|
862
862
|
});
|
|
863
863
|
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
864
864
|
} else {
|
|
865
865
|
this._notificationService.prompt(Severity.Error, ( localize(
|
|
866
|
-
|
|
866
|
+
19726,
|
|
867
867
|
"Remote Extension host terminated unexpectedly 3 times within the last 5 minutes."
|
|
868
868
|
)), [{
|
|
869
|
-
label: ( localize(
|
|
869
|
+
label: ( localize(19727, "Restart Remote Extension Host")),
|
|
870
870
|
run: () => {
|
|
871
871
|
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
872
872
|
}
|
|
@@ -1414,7 +1414,7 @@ class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
1416
1416
|
id: "activationEvents",
|
|
1417
|
-
label: ( localize(
|
|
1417
|
+
label: ( localize(19728, "Activation Events")),
|
|
1418
1418
|
access: {
|
|
1419
1419
|
canToggle: false
|
|
1420
1420
|
},
|
|
@@ -485,7 +485,7 @@ registerAction2(class MeasureExtHostLatencyAction extends Action2 {
|
|
|
485
485
|
constructor() {
|
|
486
486
|
super({
|
|
487
487
|
id: "editor.action.measureExtHostLatency",
|
|
488
|
-
title: ( localize2(
|
|
488
|
+
title: ( localize2(19729, "Measure Extension Host Latency")),
|
|
489
489
|
category: Categories.Developer,
|
|
490
490
|
f1: true
|
|
491
491
|
});
|
package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js
CHANGED
|
@@ -115,7 +115,7 @@ let ExtensionRunningLocationTracker = class ExtensionRunningLocationTracker {
|
|
|
115
115
|
if (!extension.extensionAffinity) {
|
|
116
116
|
continue;
|
|
117
117
|
}
|
|
118
|
-
if (!isProposedApiEnabled(extension)) {
|
|
118
|
+
if (!isProposedApiEnabled(extension, "extensionAffinity")) {
|
|
119
119
|
this._logService.warn(
|
|
120
120
|
`Extension '${extension.identifier.value}' declares 'extensionAffinity' in its package.json but does not enable the 'extensionAffinity' API proposal. Add '"enabledApiProposals": ["extensionAffinity"]' to the extension's package.json to use this feature.`
|
|
121
121
|
);
|
|
@@ -110,7 +110,7 @@ class ApiProposalsMarkdowneRenderer extends Disposable {
|
|
|
110
110
|
}
|
|
111
111
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
112
112
|
id: "enabledApiProposals",
|
|
113
|
-
label: ( localize(
|
|
113
|
+
label: ( localize(19730, "API Proposals")),
|
|
114
114
|
access: {
|
|
115
115
|
canToggle: false
|
|
116
116
|
},
|