@codingame/monaco-vscode-extensions-service-override 9.0.3 → 10.0.1
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/_virtual/semver.js +5 -0
- package/assets/webWorkerExtensionHostIframe.esm.html +8 -4
- package/extensions.js +14 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +0 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +35 -35
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +54 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +9 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +16 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +2 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +6 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +16 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +38 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +17 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +39 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +23 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +8 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +2 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +14 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +77 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +23 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +17 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +11 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +22 -10
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +30 -33
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +19 -24
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +11 -15
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +32 -32
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +7 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +2 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +7 -9
|
@@ -3,7 +3,7 @@ import { localize } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { ExtHostContext, CandidatePortSource, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
4
|
import { TunnelDtoConverter } from 'vscode/vscode/vs/workbench/api/common/extHostTunnelService';
|
|
5
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
-
import { PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_OUTPUT, PORT_AUTO_SOURCE_SETTING_HYBRID } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService';
|
|
6
|
+
import { PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_OUTPUT, PortsEnablement, PORT_AUTO_SOURCE_SETTING_HYBRID } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService';
|
|
7
7
|
import { IRemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService.service';
|
|
8
8
|
import { TunnelProtocol } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
|
|
9
9
|
import { ITunnelService } from 'vscode/vscode/vs/platform/tunnel/common/tunnel.service';
|
|
@@ -16,7 +16,7 @@ import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/
|
|
|
16
16
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
17
17
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
18
18
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
|
-
import { TunnelSource, TunnelCloseReason, makeAddress,
|
|
19
|
+
import { TunnelSource, TunnelCloseReason, makeAddress, forwardedPortsFeaturesEnabled } from 'vscode/vscode/vs/workbench/services/remote/common/tunnelModel';
|
|
20
20
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
21
21
|
|
|
22
22
|
let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
@@ -42,19 +42,21 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
42
42
|
}
|
|
43
43
|
async $setRemoteTunnelService(processId) {
|
|
44
44
|
this.remoteExplorerService.namedProcesses.set(processId, 'Code Extension Host');
|
|
45
|
-
if (this.remoteExplorerService.portsFeaturesEnabled) {
|
|
45
|
+
if (this.remoteExplorerService.portsFeaturesEnabled === PortsEnablement.AdditionalFeatures) {
|
|
46
46
|
this._proxy.$registerCandidateFinder(this.processFindingEnabled());
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
this._register(this.remoteExplorerService.onEnabledPortsFeatures(() => this._proxy.$registerCandidateFinder(this.processFindingEnabled())));
|
|
50
50
|
}
|
|
51
51
|
this._register(this.configurationService.onDidChangeConfiguration(async (e) => {
|
|
52
|
-
if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING) || e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING)) {
|
|
52
|
+
if ((this.remoteExplorerService.portsFeaturesEnabled === PortsEnablement.AdditionalFeatures) && (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING) || e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING))) {
|
|
53
53
|
return this._proxy.$registerCandidateFinder(this.processFindingEnabled());
|
|
54
54
|
}
|
|
55
55
|
}));
|
|
56
|
-
this._register(this.tunnelService.onAddedTunnelProvider(() => {
|
|
57
|
-
|
|
56
|
+
this._register(this.tunnelService.onAddedTunnelProvider(async () => {
|
|
57
|
+
if (this.remoteExplorerService.portsFeaturesEnabled === PortsEnablement.AdditionalFeatures) {
|
|
58
|
+
return this._proxy.$registerCandidateFinder(this.processFindingEnabled());
|
|
59
|
+
}
|
|
58
60
|
}));
|
|
59
61
|
}
|
|
60
62
|
async $registerPortsAttributesProvider(selector, providerHandle) {
|
|
@@ -109,13 +111,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
109
111
|
}
|
|
110
112
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
111
113
|
return this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
112
|
-
|
|
114
|
+
4881,
|
|
113
115
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
114
116
|
source,
|
|
115
117
|
tunnelOptions.remoteAddress.port,
|
|
116
118
|
tunnelOptions.localAddressPort
|
|
117
119
|
)), [{
|
|
118
|
-
label: ( localize(
|
|
120
|
+
label: ( localize(4882, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
119
121
|
run: async () => {
|
|
120
122
|
this.elevateionRetry = true;
|
|
121
123
|
await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
|
|
@@ -151,7 +153,7 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
151
153
|
async $onFoundNewCandidates(candidates) {
|
|
152
154
|
this.remoteExplorerService.onFoundNewCandidates(candidates);
|
|
153
155
|
}
|
|
154
|
-
async $setTunnelProvider(features) {
|
|
156
|
+
async $setTunnelProvider(features, isResolver) {
|
|
155
157
|
const tunnelProvider = {
|
|
156
158
|
forwardPort: (tunnelOptions, tunnelCreationOptions) => {
|
|
157
159
|
const forward = this._proxy.$forwardPort(tunnelOptions, tunnelCreationOptions);
|
|
@@ -184,7 +186,9 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
184
186
|
this.tunnelService.setTunnelFeatures(features);
|
|
185
187
|
}
|
|
186
188
|
this.tunnelService.setTunnelProvider(tunnelProvider);
|
|
187
|
-
|
|
189
|
+
if (isResolver) {
|
|
190
|
+
this.contextKeyService.createKey(forwardedPortsFeaturesEnabled.key, true);
|
|
191
|
+
}
|
|
188
192
|
}
|
|
189
193
|
async $setCandidateFilter() {
|
|
190
194
|
this.remoteExplorerService.setCandidateFilter((candidates) => {
|
|
@@ -51,7 +51,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
51
51
|
}
|
|
52
52
|
catch (e) {
|
|
53
53
|
if (!isCancellationError(e)) {
|
|
54
|
-
const openDefaultAction = ( (new Action('default', ( localize(
|
|
54
|
+
const openDefaultAction = ( (new Action('default', ( localize(4871, "Open using default opener")), undefined, undefined, async () => {
|
|
55
55
|
await this.openerService.open(uri, {
|
|
56
56
|
allowTunneling: false,
|
|
57
57
|
allowContributedOpeners: defaultExternalUriOpenerId,
|
|
@@ -61,7 +61,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
61
61
|
this.notificationService.notify({
|
|
62
62
|
severity: Severity$1.Error,
|
|
63
63
|
message: ( localize(
|
|
64
|
-
|
|
64
|
+
4872,
|
|
65
65
|
'Could not open uri with \'{0}\': {1}',
|
|
66
66
|
id,
|
|
67
67
|
(e.toString())
|
|
@@ -14,7 +14,7 @@ import { ExtensionKeyedWebviewOriginStore } from 'vscode/vscode/vs/workbench/con
|
|
|
14
14
|
import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
15
15
|
import { IWebviewWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service';
|
|
16
16
|
import { editorGroupToColumn } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
17
|
-
import {
|
|
17
|
+
import { preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
18
18
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
19
19
|
import { ACTIVE_GROUP, SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
20
20
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -160,11 +160,11 @@ let MainThreadWebviewPanels = class MainThreadWebviewPanels extends Disposable {
|
|
|
160
160
|
return SIDE_GROUP;
|
|
161
161
|
}
|
|
162
162
|
if (showOptions.viewColumn >= 0) {
|
|
163
|
-
const groupInColumn = this._editorGroupService.getGroups(
|
|
163
|
+
const groupInColumn = this._editorGroupService.getGroups(2 )[showOptions.viewColumn];
|
|
164
164
|
if (groupInColumn) {
|
|
165
165
|
return groupInColumn.id;
|
|
166
166
|
}
|
|
167
|
-
const newGroup = this._editorGroupService.findGroup({ location:
|
|
167
|
+
const newGroup = this._editorGroupService.findGroup({ location: 1 });
|
|
168
168
|
if (newGroup) {
|
|
169
169
|
const direction = preferredSideBySideGroupDirection(this._configurationService);
|
|
170
170
|
return this._editorGroupService.addGroup(newGroup, direction);
|
|
@@ -103,7 +103,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
103
103
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
104
104
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
105
105
|
</head>
|
|
106
|
-
<body>${( localize(
|
|
106
|
+
<body>${( localize(9903, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
107
107
|
</html>`;
|
|
108
108
|
}
|
|
109
109
|
};
|
|
@@ -11,7 +11,7 @@ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.serv
|
|
|
11
11
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
12
|
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request.service';
|
|
13
13
|
import { IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust.service';
|
|
14
|
-
import {
|
|
14
|
+
import { isUntitledWorkspace } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
15
15
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
16
16
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
17
17
|
import { checkGlobFileExists } from 'vscode/vscode/vs/workbench/services/extensions/common/workspaceContains';
|
|
@@ -21,8 +21,8 @@ import { ISearchService } from 'vscode/vscode/vs/workbench/services/search/commo
|
|
|
21
21
|
import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
|
|
22
22
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
23
23
|
import { IEditSessionIdentityService } from 'vscode/vscode/vs/platform/workspace/common/editSessions.service';
|
|
24
|
-
import { SideBySideEditor,
|
|
25
|
-
import {
|
|
24
|
+
import { SideBySideEditor, EditorResourceAccessor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
25
|
+
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
26
26
|
import { ICanonicalUriService } from 'vscode/vscode/vs/platform/workspace/common/canonicalUri.service';
|
|
27
27
|
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
28
28
|
|
|
@@ -76,11 +76,11 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
76
76
|
const wantsToDelete = removeCount > 0;
|
|
77
77
|
if (wantsToAdd && !wantsToDelete) {
|
|
78
78
|
if (addCount === 1) {
|
|
79
|
-
message = ( localize(
|
|
79
|
+
message = ( localize(4873, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
82
|
message = ( localize(
|
|
83
|
-
|
|
83
|
+
4874,
|
|
84
84
|
"Extension '{0}' added {1} folders to the workspace",
|
|
85
85
|
extensionName,
|
|
86
86
|
addCount
|
|
@@ -89,11 +89,11 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
89
89
|
}
|
|
90
90
|
else if (wantsToDelete && !wantsToAdd) {
|
|
91
91
|
if (removeCount === 1) {
|
|
92
|
-
message = ( localize(
|
|
92
|
+
message = ( localize(4875, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
95
|
message = ( localize(
|
|
96
|
-
|
|
96
|
+
4876,
|
|
97
97
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
98
98
|
extensionName,
|
|
99
99
|
removeCount
|
|
@@ -101,7 +101,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
message = ( localize(
|
|
104
|
+
message = ( localize(4877, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
105
105
|
}
|
|
106
106
|
return message;
|
|
107
107
|
}
|
|
@@ -109,7 +109,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
109
109
|
this._proxy.$acceptWorkspaceData(this.getWorkspaceData(this._contextService.getWorkspace()));
|
|
110
110
|
}
|
|
111
111
|
getWorkspaceData(workspace) {
|
|
112
|
-
if (this._contextService.getWorkbenchState() ===
|
|
112
|
+
if (this._contextService.getWorkbenchState() === 1 ) {
|
|
113
113
|
return null;
|
|
114
114
|
}
|
|
115
115
|
return {
|
|
@@ -164,11 +164,11 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
164
164
|
const uri = URI.revive(uriComponents);
|
|
165
165
|
const editors = [...this._editorService.findEditors(uri, { supportSideBySide: SideBySideEditor.PRIMARY })];
|
|
166
166
|
const result = await this._editorService.save(editors, {
|
|
167
|
-
reason:
|
|
167
|
+
reason: 1 ,
|
|
168
168
|
saveAs: options.saveAs,
|
|
169
169
|
force: !options.saveAs
|
|
170
170
|
});
|
|
171
|
-
return
|
|
171
|
+
return this._saveResultToUris(result).at(0);
|
|
172
172
|
}
|
|
173
173
|
_saveResultToUris(result) {
|
|
174
174
|
if (!result.success) {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { basename } from 'vscode/vscode/vs/base/common/path';
|
|
4
5
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
5
6
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
6
|
-
import {
|
|
7
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
8
|
+
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
9
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
7
10
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
8
11
|
|
|
9
12
|
var CustomTextEditorModel_1;
|
|
@@ -15,19 +18,20 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
15
18
|
return instantiationService.createInstance(CustomTextEditorModel_1, viewType, resource, model);
|
|
16
19
|
});
|
|
17
20
|
}
|
|
18
|
-
constructor(viewType, _resource, _model, textFileService) {
|
|
21
|
+
constructor(viewType, _resource, _model, textFileService, _labelService, extensionService) {
|
|
19
22
|
super();
|
|
20
23
|
this.viewType = viewType;
|
|
21
24
|
this._resource = _resource;
|
|
22
25
|
this._model = _model;
|
|
23
26
|
this.textFileService = textFileService;
|
|
24
|
-
this.
|
|
27
|
+
this._labelService = _labelService;
|
|
28
|
+
this._onDidChangeOrphaned = this._register(( (new Emitter())));
|
|
25
29
|
this.onDidChangeOrphaned = this._onDidChangeOrphaned.event;
|
|
26
|
-
this._onDidChangeReadonly = this._register(( new Emitter()));
|
|
30
|
+
this._onDidChangeReadonly = this._register(( (new Emitter())));
|
|
27
31
|
this.onDidChangeReadonly = this._onDidChangeReadonly.event;
|
|
28
|
-
this._onDidChangeDirty = this._register(( new Emitter()));
|
|
32
|
+
this._onDidChangeDirty = this._register(( (new Emitter())));
|
|
29
33
|
this.onDidChangeDirty = this._onDidChangeDirty.event;
|
|
30
|
-
this._onDidChangeContent = this._register(( new Emitter()));
|
|
34
|
+
this._onDidChangeContent = this._register(( (new Emitter())));
|
|
31
35
|
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
32
36
|
this._register(_model);
|
|
33
37
|
this._textFileModel = this.textFileService.files.get(_resource);
|
|
@@ -41,10 +45,16 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
41
45
|
this._onDidChangeContent.fire();
|
|
42
46
|
}
|
|
43
47
|
}));
|
|
48
|
+
this._register(extensionService.onWillStop(e => {
|
|
49
|
+
e.veto(true, ( localize(11400, "A custom text editor for '{0}' is open.", this.resource.path)));
|
|
50
|
+
}));
|
|
44
51
|
}
|
|
45
52
|
get resource() {
|
|
46
53
|
return this._resource;
|
|
47
54
|
}
|
|
55
|
+
get name() {
|
|
56
|
+
return basename(this._labelService.getUriLabel(this._resource));
|
|
57
|
+
}
|
|
48
58
|
isReadonly() {
|
|
49
59
|
return this._model.object.isReadonly();
|
|
50
60
|
}
|
|
@@ -58,7 +68,7 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
58
68
|
return this.textFileService.isDirty(this.resource);
|
|
59
69
|
}
|
|
60
70
|
isOrphaned() {
|
|
61
|
-
return !!this._textFileModel?.hasState(
|
|
71
|
+
return !!this._textFileModel?.hasState(4 );
|
|
62
72
|
}
|
|
63
73
|
async revert(options) {
|
|
64
74
|
return this.textFileService.revert(this.resource, options);
|
|
@@ -70,8 +80,10 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
70
80
|
return !!(await this.textFileService.saveAs(resource, targetResource, options));
|
|
71
81
|
}
|
|
72
82
|
};
|
|
73
|
-
CustomTextEditorModel = CustomTextEditorModel_1 = ( __decorate([
|
|
74
|
-
( __param(3, ITextFileService))
|
|
75
|
-
|
|
83
|
+
CustomTextEditorModel = CustomTextEditorModel_1 = ( (__decorate([
|
|
84
|
+
( (__param(3, ITextFileService))),
|
|
85
|
+
( (__param(4, ILabelService))),
|
|
86
|
+
( (__param(5, IExtensionService)))
|
|
87
|
+
], CustomTextEditorModel)));
|
|
76
88
|
|
|
77
89
|
export { CustomTextEditorModel };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
3
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
5
4
|
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
6
5
|
import { updateContributedOpeners } from 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/configuration';
|
|
@@ -15,7 +14,7 @@ let ContributedExternalUriOpenersStore = class ContributedExternalUriOpenersStor
|
|
|
15
14
|
this._extensionService = _extensionService;
|
|
16
15
|
this._openers = ( new Map());
|
|
17
16
|
this._memento = ( new Memento(ContributedExternalUriOpenersStore_1.STORAGE_ID, storageService));
|
|
18
|
-
this._mementoObject = this._memento.getMemento(
|
|
17
|
+
this._mementoObject = this._memento.getMemento(0 , 1 );
|
|
19
18
|
for (const [id, value] of Object.entries(this._mementoObject || {})) {
|
|
20
19
|
this.add(id, value.extensionId, { isCurrentlyRegistered: false });
|
|
21
20
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { IExtensionManagementService, IGlobalExtensionEnablementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
4
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
5
4
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
6
|
-
import { isResolverExtension
|
|
7
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
|
+
import { isResolverExtension } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
8
6
|
import { NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
9
7
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
10
8
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
@@ -12,7 +10,6 @@ import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/acti
|
|
|
12
10
|
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
13
11
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
14
12
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
15
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
16
13
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
17
14
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
18
15
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -55,7 +52,7 @@ let ExtensionBisectService = class ExtensionBisectService {
|
|
|
55
52
|
this._storageService = _storageService;
|
|
56
53
|
this._envService = _envService;
|
|
57
54
|
this._disabled = ( (new Map()));
|
|
58
|
-
const raw = _storageService.get(ExtensionBisectService_1._storageKey,
|
|
55
|
+
const raw = _storageService.get(ExtensionBisectService_1._storageKey, -1 );
|
|
59
56
|
this._state = BisectState.fromJSON(raw);
|
|
60
57
|
if (this._state) {
|
|
61
58
|
const { mid, high } = this._state;
|
|
@@ -94,7 +91,7 @@ let ExtensionBisectService = class ExtensionBisectService {
|
|
|
94
91
|
}
|
|
95
92
|
const extensionIds = ( (extensions.map(ext => ext.identifier.id)));
|
|
96
93
|
const newState = ( (new BisectState(extensionIds, 0, extensionIds.length, 0)));
|
|
97
|
-
this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(newState),
|
|
94
|
+
this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(newState), -1 , 1 );
|
|
98
95
|
await this._storageService.flush();
|
|
99
96
|
}
|
|
100
97
|
async next(seeingBad) {
|
|
@@ -113,12 +110,12 @@ let ExtensionBisectService = class ExtensionBisectService {
|
|
|
113
110
|
seeingBad ? this._state.low : this._state.mid,
|
|
114
111
|
seeingBad ? this._state.mid : this._state.high
|
|
115
112
|
)));
|
|
116
|
-
this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(nextState),
|
|
113
|
+
this._storageService.store(ExtensionBisectService_1._storageKey, JSON.stringify(nextState), -1 , 1 );
|
|
117
114
|
await this._storageService.flush();
|
|
118
115
|
return undefined;
|
|
119
116
|
}
|
|
120
117
|
async reset() {
|
|
121
|
-
this._storageService.remove(ExtensionBisectService_1._storageKey,
|
|
118
|
+
this._storageService.remove(ExtensionBisectService_1._storageKey, -1 );
|
|
122
119
|
await this._storageService.flush();
|
|
123
120
|
}
|
|
124
121
|
};
|
|
@@ -141,11 +138,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
141
138
|
}
|
|
142
139
|
_showBisectPrompt() {
|
|
143
140
|
const goodPrompt = {
|
|
144
|
-
label: ( localize(
|
|
141
|
+
label: ( localize(1154, "I can't reproduce")),
|
|
145
142
|
run: () => this._commandService.executeCommand('extension.bisect.next', false)
|
|
146
143
|
};
|
|
147
144
|
const badPrompt = {
|
|
148
|
-
label: ( localize(
|
|
145
|
+
label: ( localize(1155, "I can reproduce")),
|
|
149
146
|
run: () => this._commandService.executeCommand('extension.bisect.next', true)
|
|
150
147
|
};
|
|
151
148
|
const stop = {
|
|
@@ -154,11 +151,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
154
151
|
};
|
|
155
152
|
const message = this._extensionBisectService.disabledCount === 1
|
|
156
153
|
? ( localize(
|
|
157
|
-
|
|
154
|
+
1156,
|
|
158
155
|
"Extension Bisect is active and has disabled 1 extension. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
159
156
|
))
|
|
160
157
|
: ( localize(
|
|
161
|
-
|
|
158
|
+
1157,
|
|
162
159
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
163
160
|
this._extensionBisectService.disabledCount
|
|
164
161
|
));
|
|
@@ -171,12 +168,12 @@ ExtensionBisectUi = ExtensionBisectUi_1 = ( (__decorate([
|
|
|
171
168
|
( (__param(2, INotificationService))),
|
|
172
169
|
( (__param(3, ICommandService)))
|
|
173
170
|
], ExtensionBisectUi)));
|
|
174
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(ExtensionBisectUi,
|
|
171
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(ExtensionBisectUi, 3 );
|
|
175
172
|
registerAction2(class extends Action2 {
|
|
176
173
|
constructor() {
|
|
177
174
|
super({
|
|
178
175
|
id: 'extension.bisect.start',
|
|
179
|
-
title: ( localize2(
|
|
176
|
+
title: ( localize2(1158, 'Start Extension Bisect')),
|
|
180
177
|
category: Categories.Help,
|
|
181
178
|
f1: true,
|
|
182
179
|
precondition: ( (ExtensionBisectUi.ctxIsBisectActive.negate())),
|
|
@@ -194,15 +191,15 @@ registerAction2(class extends Action2 {
|
|
|
194
191
|
const extensionManagement = accessor.get(IExtensionManagementService);
|
|
195
192
|
const extensionEnablementService = accessor.get(IWorkbenchExtensionEnablementService);
|
|
196
193
|
const extensionsBisect = accessor.get(IExtensionBisectService);
|
|
197
|
-
const extensions = (await extensionManagement.getInstalled(
|
|
194
|
+
const extensions = (await extensionManagement.getInstalled(1 )).filter(ext => extensionEnablementService.isEnabled(ext));
|
|
198
195
|
const res = await dialogService.confirm({
|
|
199
|
-
message: ( localize(
|
|
196
|
+
message: ( localize(1159, "Extension Bisect")),
|
|
200
197
|
detail: ( localize(
|
|
201
|
-
|
|
198
|
+
1160,
|
|
202
199
|
"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.",
|
|
203
200
|
2 + Math.log2(extensions.length) | 0
|
|
204
201
|
)),
|
|
205
|
-
primaryButton: ( localize(
|
|
202
|
+
primaryButton: ( localize(1161, "&&Start Extension Bisect"))
|
|
206
203
|
});
|
|
207
204
|
if (res.confirmed) {
|
|
208
205
|
await extensionsBisect.start(extensions);
|
|
@@ -214,7 +211,7 @@ registerAction2(class extends Action2 {
|
|
|
214
211
|
constructor() {
|
|
215
212
|
super({
|
|
216
213
|
id: 'extension.bisect.next',
|
|
217
|
-
title: ( localize2(
|
|
214
|
+
title: ( localize2(1162, 'Continue Extension Bisect')),
|
|
218
215
|
category: Categories.Help,
|
|
219
216
|
f1: true,
|
|
220
217
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
|
@@ -248,8 +245,8 @@ registerAction2(class extends Action2 {
|
|
|
248
245
|
return;
|
|
249
246
|
}
|
|
250
247
|
if (done.bad) {
|
|
251
|
-
await dialogService.info(( localize(
|
|
252
|
-
|
|
248
|
+
await dialogService.info(( localize(1163, "Extension Bisect")), ( localize(
|
|
249
|
+
1164,
|
|
253
250
|
"Extension Bisect is done but no extension has been identified. This might be a problem with {0}.",
|
|
254
251
|
productService.nameShort
|
|
255
252
|
)));
|
|
@@ -257,15 +254,15 @@ registerAction2(class extends Action2 {
|
|
|
257
254
|
else {
|
|
258
255
|
const res = await dialogService.confirm({
|
|
259
256
|
type: Severity$1.Info,
|
|
260
|
-
message: ( localize(
|
|
261
|
-
primaryButton: ( localize(
|
|
262
|
-
cancelButton: ( localize(
|
|
257
|
+
message: ( localize(1163, "Extension Bisect")),
|
|
258
|
+
primaryButton: ( localize(1165, "&&Report Issue & Continue")),
|
|
259
|
+
cancelButton: ( localize(1166, "Continue")),
|
|
263
260
|
detail: ( localize(
|
|
264
|
-
|
|
261
|
+
1167,
|
|
265
262
|
"Extension Bisect is done and has identified {0} as the extension causing the problem.",
|
|
266
263
|
done.id
|
|
267
264
|
)),
|
|
268
|
-
checkbox: { label: ( localize(
|
|
265
|
+
checkbox: { label: ( localize(1168, "Keep this extension disabled")), checked: true }
|
|
269
266
|
});
|
|
270
267
|
if (res.checkboxChecked) {
|
|
271
268
|
await extensionEnablementService.disableExtension({ id: done.id }, undefined);
|
|
@@ -280,28 +277,28 @@ registerAction2(class extends Action2 {
|
|
|
280
277
|
async _checkForBad(dialogService, bisectService) {
|
|
281
278
|
const { result } = await dialogService.prompt({
|
|
282
279
|
type: Severity$1.Info,
|
|
283
|
-
message: ( localize(
|
|
280
|
+
message: ( localize(1169, "Extension Bisect")),
|
|
284
281
|
detail: ( localize(
|
|
285
|
-
|
|
282
|
+
1170,
|
|
286
283
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
287
284
|
bisectService.disabledCount
|
|
288
285
|
)),
|
|
289
286
|
buttons: [
|
|
290
287
|
{
|
|
291
|
-
label: ( localize(
|
|
288
|
+
label: ( localize(1171, "I ca&&n't reproduce")),
|
|
292
289
|
run: () => false
|
|
293
290
|
},
|
|
294
291
|
{
|
|
295
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(1172, "I can &&reproduce")),
|
|
296
293
|
run: () => true
|
|
297
294
|
},
|
|
298
295
|
{
|
|
299
|
-
label: ( localize(
|
|
296
|
+
label: ( localize(1173, "&&Stop Bisect")),
|
|
300
297
|
run: () => undefined
|
|
301
298
|
}
|
|
302
299
|
],
|
|
303
300
|
cancelButton: {
|
|
304
|
-
label: ( localize(
|
|
301
|
+
label: ( localize(1174, "&&Cancel Bisect")),
|
|
305
302
|
run: () => null
|
|
306
303
|
}
|
|
307
304
|
});
|
|
@@ -312,7 +309,7 @@ registerAction2(class extends Action2 {
|
|
|
312
309
|
constructor() {
|
|
313
310
|
super({
|
|
314
311
|
id: 'extension.bisect.stop',
|
|
315
|
-
title: ( localize2(
|
|
312
|
+
title: ( localize2(1175, 'Stop Extension Bisect')),
|
|
316
313
|
category: Categories.Help,
|
|
317
314
|
f1: true,
|
|
318
315
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|