@codingame/monaco-vscode-extensions-service-override 4.5.1 → 4.5.2
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/base/common/console.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +67 -134
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +32 -37
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +44 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +60 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +10 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +41 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +53 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +21 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +47 -56
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +7 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +11 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +8 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +179 -162
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +28 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +23 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +36 -33
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +56 -121
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +130 -142
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +33 -32
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +9 -8
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +1 -1
|
@@ -6,20 +6,21 @@ import { raceCancellationError } from 'vscode/vscode/vs/base/common/async';
|
|
|
6
6
|
import { IEditSessionIdentityService } from 'vscode/vscode/vs/platform/workspace/common/editSessions.service';
|
|
7
7
|
import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
8
|
|
|
9
|
+
const _moduleId = "vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant";
|
|
9
10
|
class ExtHostEditSessionIdentityCreateParticipant {
|
|
10
11
|
constructor(extHostContext) {
|
|
11
12
|
this.timeout = 10000;
|
|
12
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostWorkspace));
|
|
13
|
+
this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostWorkspace)));
|
|
13
14
|
}
|
|
14
15
|
async participate(workspaceFolder, token) {
|
|
15
|
-
const p = ( new Promise((resolve, reject) => {
|
|
16
|
-
setTimeout(() => reject(( new Error(( localizeWithPath(
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const p = ( (new Promise((resolve, reject) => {
|
|
17
|
+
setTimeout(() => reject(( (new Error(( localizeWithPath(
|
|
18
|
+
_moduleId,
|
|
19
|
+
0,
|
|
19
20
|
"Aborted onWillCreateEditSessionIdentity-event after 10000ms"
|
|
20
|
-
))))), this.timeout);
|
|
21
|
+
)))))), this.timeout);
|
|
21
22
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
22
|
-
}));
|
|
23
|
+
})));
|
|
23
24
|
return raceCancellationError(p, token);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -34,8 +35,8 @@ let EditSessionIdentityCreateParticipant = class EditSessionIdentityCreatePartic
|
|
|
34
35
|
};
|
|
35
36
|
EditSessionIdentityCreateParticipant = __decorate([
|
|
36
37
|
extHostCustomer,
|
|
37
|
-
( __param(1, IInstantiationService)),
|
|
38
|
-
( __param(2, IEditSessionIdentityService))
|
|
38
|
+
( (__param(1, IInstantiationService))),
|
|
39
|
+
( (__param(2, IEditSessionIdentityService)))
|
|
39
40
|
], EditSessionIdentityCreateParticipant);
|
|
40
41
|
|
|
41
42
|
export { EditSessionIdentityCreateParticipant };
|
|
@@ -424,7 +424,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
424
424
|
const tabInfo = this._tabInfoLookup.get(tabId);
|
|
425
425
|
const tab = tabInfo?.tab;
|
|
426
426
|
if (!tab) {
|
|
427
|
-
throw new Error(`Attempted to close tab with id ${tabId} which does not exist`);
|
|
427
|
+
throw ( new Error(`Attempted to close tab with id ${tabId} which does not exist`));
|
|
428
428
|
}
|
|
429
429
|
let targetGroup;
|
|
430
430
|
const sourceGroup = this._editorGroupsService.getGroup(tabInfo.group.id);
|
|
@@ -216,7 +216,7 @@ MainThreadTextEditors = MainThreadTextEditors_1 = ( __decorate([
|
|
|
216
216
|
CommandsRegistry.registerCommand('_workbench.revertAllDirty', async function (accessor) {
|
|
217
217
|
const environmentService = accessor.get(IEnvironmentService);
|
|
218
218
|
if (!environmentService.extensionTestsLocationURI) {
|
|
219
|
-
throw new Error('Command is only available when running extension tests.');
|
|
219
|
+
throw ( new Error('Command is only available when running extension tests.'));
|
|
220
220
|
}
|
|
221
221
|
const workingCopyService = accessor.get(IWorkingCopyService);
|
|
222
222
|
for (const workingCopy of workingCopyService.dirtyWorkingCopies) {
|
|
@@ -18,6 +18,7 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
|
|
|
18
18
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
19
19
|
import { ITimerService } from 'vscode/vscode/vs/workbench/services/timer/browser/timerService.service';
|
|
20
20
|
|
|
21
|
+
const _moduleId = "vs/workbench/api/browser/mainThreadExtensionService";
|
|
21
22
|
let MainThreadExtensionService = class MainThreadExtensionService {
|
|
22
23
|
constructor(extHostContext, _extensionService, _notificationService, _extensionsWorkbenchService, _hostService, _extensionEnablementService, _timerService, _commandService, _environmentService) {
|
|
23
24
|
this._extensionService = _extensionService;
|
|
@@ -31,8 +32,10 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
31
32
|
this._extensionHostKind = extHostContext.extensionHostKind;
|
|
32
33
|
const internalExtHostContext = extHostContext;
|
|
33
34
|
this._internalExtensionService = internalExtHostContext.internalExtensionService;
|
|
34
|
-
internalExtHostContext._setExtensionHostProxy(( new ExtensionHostProxy(
|
|
35
|
-
|
|
35
|
+
internalExtHostContext._setExtensionHostProxy(( (new ExtensionHostProxy(
|
|
36
|
+
(extHostContext.getProxy(ExtHostContext.ExtHostExtensionService))
|
|
37
|
+
))));
|
|
38
|
+
internalExtHostContext._setAllMainProxyIdentifiers(( (( (Object.keys(MainContext))).map((key) => MainContext[key]))));
|
|
36
39
|
}
|
|
37
40
|
dispose() {
|
|
38
41
|
}
|
|
@@ -49,7 +52,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
49
52
|
this._internalExtensionService._onDidActivateExtension(extensionId, codeLoadingTime, activateCallTime, activateResolvedTime, activationReason);
|
|
50
53
|
}
|
|
51
54
|
$onExtensionRuntimeError(extensionId, data) {
|
|
52
|
-
const error = ( new Error());
|
|
55
|
+
const error = ( (new Error()));
|
|
53
56
|
error.name = data.name;
|
|
54
57
|
error.message = data.message;
|
|
55
58
|
error.stack = data.stack;
|
|
@@ -58,7 +61,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
58
61
|
console.error(error.stack);
|
|
59
62
|
}
|
|
60
63
|
async $onExtensionActivationError(extensionId, data, missingExtensionDependency) {
|
|
61
|
-
const error = ( new Error());
|
|
64
|
+
const error = ( (new Error()));
|
|
62
65
|
error.name = data.name;
|
|
63
66
|
error.message = data.message;
|
|
64
67
|
error.stack = data.stack;
|
|
@@ -91,18 +94,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
91
94
|
this._notificationService.notify({
|
|
92
95
|
severity: Severity$1.Error,
|
|
93
96
|
message: ( localizeWithPath(
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
_moduleId,
|
|
98
|
+
0,
|
|
96
99
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?",
|
|
97
100
|
extName,
|
|
98
101
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
99
102
|
)),
|
|
100
103
|
actions: {
|
|
101
|
-
primary: [( new Action('reload', ( localizeWithPath(
|
|
102
|
-
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
103
|
-
'reload',
|
|
104
|
-
"Reload Window"
|
|
105
|
-
)), '', true, () => this._hostService.reload()))]
|
|
104
|
+
primary: [( (new Action('reload', ( localizeWithPath(_moduleId, 1, "Reload Window")), '', true, () => this._hostService.reload())))]
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
}
|
|
@@ -112,8 +111,8 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
112
111
|
this._notificationService.notify({
|
|
113
112
|
severity: Severity$1.Error,
|
|
114
113
|
message: ( localizeWithPath(
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
_moduleId,
|
|
115
|
+
2,
|
|
117
116
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
118
117
|
extName,
|
|
119
118
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -124,18 +123,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
124
123
|
this._notificationService.notify({
|
|
125
124
|
severity: Severity$1.Error,
|
|
126
125
|
message: ( localizeWithPath(
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
_moduleId,
|
|
127
|
+
3,
|
|
129
128
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
130
129
|
extName,
|
|
131
130
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
132
131
|
)),
|
|
133
132
|
actions: {
|
|
134
|
-
primary: [( new Action('manageWorkspaceTrust', ( localizeWithPath(
|
|
135
|
-
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
136
|
-
'manageWorkspaceTrust',
|
|
137
|
-
"Manage Workspace Trust"
|
|
138
|
-
)), '', true, () => this._commandService.executeCommand('workbench.trust.manage')))]
|
|
133
|
+
primary: [( (new Action('manageWorkspaceTrust', ( localizeWithPath(_moduleId, 4, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage'))))]
|
|
139
134
|
}
|
|
140
135
|
});
|
|
141
136
|
}
|
|
@@ -143,19 +138,15 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
143
138
|
this._notificationService.notify({
|
|
144
139
|
severity: Severity$1.Error,
|
|
145
140
|
message: ( localizeWithPath(
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
_moduleId,
|
|
142
|
+
5,
|
|
148
143
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled. Would you like to enable the extension and reload the window?",
|
|
149
144
|
extName,
|
|
150
145
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
151
146
|
)),
|
|
152
147
|
actions: {
|
|
153
|
-
primary: [( new Action('enable', ( localizeWithPath(
|
|
154
|
-
|
|
155
|
-
'enable dep',
|
|
156
|
-
"Enable and Reload"
|
|
157
|
-
)), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === 6 ? 8 : 9 )
|
|
158
|
-
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
148
|
+
primary: [( (new Action('enable', ( localizeWithPath(_moduleId, 6, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === 6 ? 8 : 9 )
|
|
149
|
+
.then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
|
|
159
150
|
}
|
|
160
151
|
});
|
|
161
152
|
}
|
|
@@ -163,8 +154,8 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
163
154
|
this._notificationService.notify({
|
|
164
155
|
severity: Severity$1.Error,
|
|
165
156
|
message: ( localizeWithPath(
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
_moduleId,
|
|
158
|
+
7,
|
|
168
159
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
169
160
|
extName,
|
|
170
161
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -185,27 +176,23 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
185
176
|
this._notificationService.notify({
|
|
186
177
|
severity: Severity$1.Error,
|
|
187
178
|
message: ( localizeWithPath(
|
|
188
|
-
|
|
189
|
-
|
|
179
|
+
_moduleId,
|
|
180
|
+
8,
|
|
190
181
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension from '{2}', which is not installed. Would you like to install the extension and reload the window?",
|
|
191
182
|
extName,
|
|
192
183
|
dependencyExtension.displayName,
|
|
193
184
|
dependencyExtension.publisherDisplayName
|
|
194
185
|
)),
|
|
195
186
|
actions: {
|
|
196
|
-
primary: [( new Action('install', ( localizeWithPath(
|
|
197
|
-
|
|
198
|
-
'install missing dep',
|
|
199
|
-
"Install and Reload"
|
|
200
|
-
)), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
|
|
201
|
-
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
187
|
+
primary: [( (new Action('install', ( localizeWithPath(_moduleId, 9, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
|
|
188
|
+
.then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
|
|
202
189
|
}
|
|
203
190
|
});
|
|
204
191
|
}
|
|
205
192
|
else {
|
|
206
193
|
this._notificationService.error(( localizeWithPath(
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
_moduleId,
|
|
195
|
+
10,
|
|
209
196
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
210
197
|
extName,
|
|
211
198
|
missingDependency
|
|
@@ -235,14 +222,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
235
222
|
};
|
|
236
223
|
MainThreadExtensionService = __decorate([
|
|
237
224
|
extHostNamedCustomer(MainContext.MainThreadExtensionService),
|
|
238
|
-
( __param(1, IExtensionService)),
|
|
239
|
-
( __param(2, INotificationService)),
|
|
240
|
-
( __param(3, IExtensionsWorkbenchService)),
|
|
241
|
-
( __param(4, IHostService)),
|
|
242
|
-
( __param(5, IWorkbenchExtensionEnablementService)),
|
|
243
|
-
( __param(6, ITimerService)),
|
|
244
|
-
( __param(7, ICommandService)),
|
|
245
|
-
( __param(8, IWorkbenchEnvironmentService))
|
|
225
|
+
( (__param(1, IExtensionService))),
|
|
226
|
+
( (__param(2, INotificationService))),
|
|
227
|
+
( (__param(3, IExtensionsWorkbenchService))),
|
|
228
|
+
( (__param(4, IHostService))),
|
|
229
|
+
( (__param(5, IWorkbenchExtensionEnablementService))),
|
|
230
|
+
( (__param(6, ITimerService))),
|
|
231
|
+
( (__param(7, ICommandService))),
|
|
232
|
+
( (__param(8, IWorkbenchEnvironmentService)))
|
|
246
233
|
], MainThreadExtensionService);
|
|
247
234
|
class ExtensionHostProxy {
|
|
248
235
|
constructor(_actual) {
|
|
@@ -309,9 +296,13 @@ function reviveResolvedAuthority(resolvedAuthority) {
|
|
|
309
296
|
}
|
|
310
297
|
function reviveConnection(connection) {
|
|
311
298
|
if (connection.type === 0 ) {
|
|
312
|
-
return (
|
|
299
|
+
return (
|
|
300
|
+
(new WebSocketRemoteConnection(connection.host, connection.port))
|
|
301
|
+
);
|
|
313
302
|
}
|
|
314
|
-
return (
|
|
303
|
+
return (
|
|
304
|
+
(new ManagedRemoteConnection(connection.id))
|
|
305
|
+
);
|
|
315
306
|
}
|
|
316
307
|
|
|
317
308
|
export { MainThreadExtensionService };
|
|
@@ -42,7 +42,7 @@ let MainThreadFileSystem = MainThreadFileSystem_1 = class MainThreadFileSystem {
|
|
|
42
42
|
$onFileSystemChange(handle, changes) {
|
|
43
43
|
const fileProvider = this._fileProvider.get(handle);
|
|
44
44
|
if (!fileProvider) {
|
|
45
|
-
throw new Error('Unknown file provider');
|
|
45
|
+
throw ( new Error('Unknown file provider'));
|
|
46
46
|
}
|
|
47
47
|
fileProvider.$onFileSystemChange(changes);
|
|
48
48
|
}
|
|
@@ -25,6 +25,7 @@ import { normalizeWatcherPattern } from 'vscode/vscode/vs/platform/files/common/
|
|
|
25
25
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
26
26
|
|
|
27
27
|
var MainThreadFileSystemEventService_1;
|
|
28
|
+
const _moduleId = "vs/workbench/api/browser/mainThreadFileSystemEventService";
|
|
28
29
|
let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
29
30
|
static { MainThreadFileSystemEventService_1 = this; }
|
|
30
31
|
static { this.MementoKeyAdditionalEdits = `file.particpants.additionalEdits`; }
|
|
@@ -33,9 +34,9 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
33
34
|
this._contextService = _contextService;
|
|
34
35
|
this._logService = _logService;
|
|
35
36
|
this._configurationService = _configurationService;
|
|
36
|
-
this._listener = ( new DisposableStore());
|
|
37
|
-
this._watches = ( new DisposableMap());
|
|
38
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService));
|
|
37
|
+
this._listener = ( (new DisposableStore()));
|
|
38
|
+
this._watches = ( (new DisposableMap()));
|
|
39
|
+
this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService)));
|
|
39
40
|
this._listener.add(_fileService.onDidFilesChange(event => {
|
|
40
41
|
this._proxy.$onFileEvent({
|
|
41
42
|
created: event.rawAdded,
|
|
@@ -49,7 +50,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
49
50
|
if (undoInfo?.isUndoing) {
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
52
|
-
const cts = ( new CancellationTokenSource(token));
|
|
53
|
+
const cts = ( (new CancellationTokenSource(token)));
|
|
53
54
|
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
54
55
|
const data = await progressService.withProgress({
|
|
55
56
|
location: 15 ,
|
|
@@ -68,7 +69,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
68
69
|
if (!data || data.edit.edits.length === 0) {
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
|
-
const needsConfirmation = ( data.edit.edits.some(edit => edit.metadata?.needsConfirmation));
|
|
72
|
+
const needsConfirmation = ( (data.edit.edits.some(edit => edit.metadata?.needsConfirmation)));
|
|
72
73
|
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, 0 );
|
|
73
74
|
if (envService.extensionTestsLocationURI) {
|
|
74
75
|
showPreview = false;
|
|
@@ -78,32 +79,32 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
78
79
|
if (data.extensionNames.length === 1) {
|
|
79
80
|
if (operation === 0 ) {
|
|
80
81
|
message = ( localizeWithPath(
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
_moduleId,
|
|
83
|
+
0,
|
|
83
84
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
84
85
|
data.extensionNames[0]
|
|
85
86
|
));
|
|
86
87
|
}
|
|
87
88
|
else if (operation === 3 ) {
|
|
88
89
|
message = ( localizeWithPath(
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
_moduleId,
|
|
91
|
+
1,
|
|
91
92
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
92
93
|
data.extensionNames[0]
|
|
93
94
|
));
|
|
94
95
|
}
|
|
95
96
|
else if (operation === 2 ) {
|
|
96
97
|
message = ( localizeWithPath(
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
_moduleId,
|
|
99
|
+
2,
|
|
99
100
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
100
101
|
data.extensionNames[0]
|
|
101
102
|
));
|
|
102
103
|
}
|
|
103
104
|
else {
|
|
104
105
|
message = ( localizeWithPath(
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
_moduleId,
|
|
107
|
+
3,
|
|
107
108
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
108
109
|
data.extensionNames[0]
|
|
109
110
|
));
|
|
@@ -112,32 +113,32 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
112
113
|
else {
|
|
113
114
|
if (operation === 0 ) {
|
|
114
115
|
message = ( localizeWithPath(
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
_moduleId,
|
|
117
|
+
4,
|
|
117
118
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
118
119
|
data.extensionNames.length
|
|
119
120
|
));
|
|
120
121
|
}
|
|
121
122
|
else if (operation === 3 ) {
|
|
122
123
|
message = ( localizeWithPath(
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
_moduleId,
|
|
125
|
+
5,
|
|
125
126
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
126
127
|
data.extensionNames.length
|
|
127
128
|
));
|
|
128
129
|
}
|
|
129
130
|
else if (operation === 2 ) {
|
|
130
131
|
message = ( localizeWithPath(
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
_moduleId,
|
|
133
|
+
6,
|
|
133
134
|
"{0} extensions want to make refactoring changes with this file move",
|
|
134
135
|
data.extensionNames.length
|
|
135
136
|
));
|
|
136
137
|
}
|
|
137
138
|
else {
|
|
138
139
|
message = ( localizeWithPath(
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
_moduleId,
|
|
141
|
+
7,
|
|
141
142
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
142
143
|
data.extensionNames.length
|
|
143
144
|
));
|
|
@@ -147,16 +148,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
147
148
|
const { confirmed } = await dialogService.confirm({
|
|
148
149
|
type: Severity$1.Info,
|
|
149
150
|
message,
|
|
150
|
-
primaryButton: ( localizeWithPath(
|
|
151
|
-
|
|
152
|
-
'preview',
|
|
153
|
-
"Show &&Preview"
|
|
154
|
-
)),
|
|
155
|
-
cancelButton: ( localizeWithPath(
|
|
156
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
157
|
-
'cancel',
|
|
158
|
-
"Skip Changes"
|
|
159
|
-
))
|
|
151
|
+
primaryButton: ( localizeWithPath(_moduleId, 8, "Show &&Preview")),
|
|
152
|
+
cancelButton: ( localizeWithPath(_moduleId, 9, "Skip Changes"))
|
|
160
153
|
});
|
|
161
154
|
showPreview = true;
|
|
162
155
|
if (!confirmed) {
|
|
@@ -165,45 +158,29 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
165
158
|
}
|
|
166
159
|
else {
|
|
167
160
|
let Choice;
|
|
168
|
-
( (function(Choice) {
|
|
161
|
+
( ((function(Choice) {
|
|
169
162
|
Choice[Choice["OK"] = 0] = "OK";
|
|
170
163
|
Choice[Choice["Preview"] = 1] = "Preview";
|
|
171
164
|
Choice[Choice["Cancel"] = 2] = "Cancel";
|
|
172
|
-
})(Choice || (Choice = {})));
|
|
165
|
+
})(Choice || (Choice = {}))));
|
|
173
166
|
const { result, checkboxChecked } = await dialogService.prompt({
|
|
174
167
|
type: Severity$1.Info,
|
|
175
168
|
message,
|
|
176
169
|
buttons: [
|
|
177
170
|
{
|
|
178
|
-
label: ( localizeWithPath(
|
|
179
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
180
|
-
{ key: 'ok', comment: ['&& denotes a mnemonic'] },
|
|
181
|
-
"&&OK"
|
|
182
|
-
)),
|
|
171
|
+
label: ( localizeWithPath(_moduleId, 10, "&&OK")),
|
|
183
172
|
run: () => Choice.OK
|
|
184
173
|
},
|
|
185
174
|
{
|
|
186
|
-
label: ( localizeWithPath(
|
|
187
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
188
|
-
{ key: 'preview', comment: ['&& denotes a mnemonic'] },
|
|
189
|
-
"Show &&Preview"
|
|
190
|
-
)),
|
|
175
|
+
label: ( localizeWithPath(_moduleId, 8, "Show &&Preview")),
|
|
191
176
|
run: () => Choice.Preview
|
|
192
177
|
}
|
|
193
178
|
],
|
|
194
179
|
cancelButton: {
|
|
195
|
-
label: ( localizeWithPath(
|
|
196
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
197
|
-
'cancel',
|
|
198
|
-
"Skip Changes"
|
|
199
|
-
)),
|
|
180
|
+
label: ( localizeWithPath(_moduleId, 9, "Skip Changes")),
|
|
200
181
|
run: () => Choice.Cancel
|
|
201
182
|
},
|
|
202
|
-
checkbox: { label: ( localizeWithPath(
|
|
203
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
204
|
-
'again',
|
|
205
|
-
"Do not ask me again"
|
|
206
|
-
)) }
|
|
183
|
+
checkbox: { label: ( localizeWithPath(_moduleId, 11, "Do not ask me again")) }
|
|
207
184
|
});
|
|
208
185
|
if (result === Choice.Cancel) {
|
|
209
186
|
return;
|
|
@@ -220,35 +197,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
220
197
|
_progressLabel(operation) {
|
|
221
198
|
switch (operation) {
|
|
222
199
|
case 0 :
|
|
223
|
-
return ( localizeWithPath(
|
|
224
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
225
|
-
'msg-create',
|
|
226
|
-
"Running 'File Create' participants..."
|
|
227
|
-
));
|
|
200
|
+
return ( localizeWithPath(_moduleId, 12, "Running 'File Create' participants..."));
|
|
228
201
|
case 2 :
|
|
229
|
-
return ( localizeWithPath(
|
|
230
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
231
|
-
'msg-rename',
|
|
232
|
-
"Running 'File Rename' participants..."
|
|
233
|
-
));
|
|
202
|
+
return ( localizeWithPath(_moduleId, 13, "Running 'File Rename' participants..."));
|
|
234
203
|
case 3 :
|
|
235
|
-
return ( localizeWithPath(
|
|
236
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
237
|
-
'msg-copy',
|
|
238
|
-
"Running 'File Copy' participants..."
|
|
239
|
-
));
|
|
204
|
+
return ( localizeWithPath(_moduleId, 14, "Running 'File Copy' participants..."));
|
|
240
205
|
case 1 :
|
|
241
|
-
return ( localizeWithPath(
|
|
242
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
243
|
-
'msg-delete',
|
|
244
|
-
"Running 'File Delete' participants..."
|
|
245
|
-
));
|
|
206
|
+
return ( localizeWithPath(_moduleId, 15, "Running 'File Delete' participants..."));
|
|
246
207
|
case 4 :
|
|
247
|
-
return ( localizeWithPath(
|
|
248
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
249
|
-
'msg-write',
|
|
250
|
-
"Running 'File Write' participants..."
|
|
251
|
-
));
|
|
208
|
+
return ( localizeWithPath(_moduleId, 16, "Running 'File Write' participants..."));
|
|
252
209
|
}
|
|
253
210
|
}
|
|
254
211
|
});
|
|
@@ -271,8 +228,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
271
228
|
}
|
|
272
229
|
}
|
|
273
230
|
if (correlate) {
|
|
274
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
275
|
-
const watcherDisposables = ( new DisposableStore());
|
|
231
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
232
|
+
const watcherDisposables = ( (new DisposableStore()));
|
|
276
233
|
const subscription = watcherDisposables.add(this._fileService.createWatcher(uri, opts));
|
|
277
234
|
watcherDisposables.add(subscription.onDidChange(event => {
|
|
278
235
|
this._proxy.$onFileEvent({
|
|
@@ -285,7 +242,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
285
242
|
this._watches.set(session, watcherDisposables);
|
|
286
243
|
}
|
|
287
244
|
else {
|
|
288
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
245
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
289
246
|
const workspaceFolder = this._contextService.getWorkspaceFolder(uri);
|
|
290
247
|
if (opts.recursive && opts.excludes.length === 0) {
|
|
291
248
|
const config = this._configurationService.getValue();
|
|
@@ -311,7 +268,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
311
268
|
}
|
|
312
269
|
}
|
|
313
270
|
if (!opts.includes || opts.includes.length === 0) {
|
|
314
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): ignoring request to start watching because path is inside workspace and no excludes are configured (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
271
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): ignoring request to start watching because path is inside workspace and no excludes are configured (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
315
272
|
return;
|
|
316
273
|
}
|
|
317
274
|
}
|
|
@@ -320,7 +277,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
320
277
|
}
|
|
321
278
|
}
|
|
322
279
|
$unwatch(session) {
|
|
323
|
-
if (( this._watches.has(session))) {
|
|
280
|
+
if (( (this._watches.has(session)))) {
|
|
324
281
|
this._logService.trace(`MainThreadFileSystemEventService#$unwatch(): request to stop watching (session: ${session})`);
|
|
325
282
|
this._watches.deleteAndDispose(session);
|
|
326
283
|
}
|
|
@@ -332,29 +289,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
332
289
|
};
|
|
333
290
|
MainThreadFileSystemEventService = MainThreadFileSystemEventService_1 = __decorate([
|
|
334
291
|
extHostNamedCustomer(MainContext.MainThreadFileSystemEventService),
|
|
335
|
-
( __param(1, IFileService)),
|
|
336
|
-
( __param(2, IWorkingCopyFileService)),
|
|
337
|
-
( __param(3, IBulkEditService)),
|
|
338
|
-
( __param(4, IProgressService)),
|
|
339
|
-
( __param(5, IDialogService)),
|
|
340
|
-
( __param(6, IStorageService)),
|
|
341
|
-
( __param(7, ILogService)),
|
|
342
|
-
( __param(8, IEnvironmentService)),
|
|
343
|
-
( __param(9, IUriIdentityService)),
|
|
344
|
-
( __param(10, IWorkspaceContextService)),
|
|
345
|
-
( __param(11, ILogService)),
|
|
346
|
-
( __param(12, IConfigurationService))
|
|
292
|
+
( (__param(1, IFileService))),
|
|
293
|
+
( (__param(2, IWorkingCopyFileService))),
|
|
294
|
+
( (__param(3, IBulkEditService))),
|
|
295
|
+
( (__param(4, IProgressService))),
|
|
296
|
+
( (__param(5, IDialogService))),
|
|
297
|
+
( (__param(6, IStorageService))),
|
|
298
|
+
( (__param(7, ILogService))),
|
|
299
|
+
( (__param(8, IEnvironmentService))),
|
|
300
|
+
( (__param(9, IUriIdentityService))),
|
|
301
|
+
( (__param(10, IWorkspaceContextService))),
|
|
302
|
+
( (__param(11, ILogService))),
|
|
303
|
+
( (__param(12, IConfigurationService)))
|
|
347
304
|
], MainThreadFileSystemEventService);
|
|
348
305
|
registerAction2(class ResetMemento extends Action2 {
|
|
349
306
|
constructor() {
|
|
350
307
|
super({
|
|
351
308
|
id: 'files.participants.resetChoice',
|
|
352
309
|
title: {
|
|
353
|
-
value: ( localizeWithPath(
|
|
354
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
355
|
-
'label',
|
|
356
|
-
"Reset choice for 'File operation needs preview'"
|
|
357
|
-
)),
|
|
310
|
+
value: ( localizeWithPath(_moduleId, 17, "Reset choice for 'File operation needs preview'")),
|
|
358
311
|
original: `Reset choice for 'File operation needs preview'`
|
|
359
312
|
},
|
|
360
313
|
f1: true
|
|
@@ -326,7 +326,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
326
326
|
$resolvePasteFileData(handle, requestId, dataId) {
|
|
327
327
|
const provider = this._pasteEditProviders.get(handle);
|
|
328
328
|
if (!provider) {
|
|
329
|
-
throw new Error('Could not find provider');
|
|
329
|
+
throw ( new Error('Could not find provider'));
|
|
330
330
|
}
|
|
331
331
|
return provider.resolveFileData(requestId, dataId);
|
|
332
332
|
}
|
|
@@ -563,7 +563,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
563
563
|
}
|
|
564
564
|
const result = await this._proxy.$resolveInlayHint(handle, dto.cacheId, token);
|
|
565
565
|
if (token.isCancellationRequested) {
|
|
566
|
-
throw new CancellationError();
|
|
566
|
+
throw ( new CancellationError());
|
|
567
567
|
}
|
|
568
568
|
if (!result) {
|
|
569
569
|
return hint;
|
|
@@ -805,7 +805,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
805
805
|
async $resolveDocumentOnDropFileData(handle, requestId, dataId) {
|
|
806
806
|
const provider = this._documentOnDropEditProviders.get(handle);
|
|
807
807
|
if (!provider) {
|
|
808
|
-
throw new Error('Could not find provider');
|
|
808
|
+
throw ( new Error('Could not find provider'));
|
|
809
809
|
}
|
|
810
810
|
return provider.resolveDocumentOnDropFileData(requestId, dataId);
|
|
811
811
|
}
|
|
@@ -998,7 +998,7 @@ class MainThreadDocumentRangeSemanticTokensProvider {
|
|
|
998
998
|
data: dto.data
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
throw new Error(`Unexpected`);
|
|
1001
|
+
throw ( new Error(`Unexpected`));
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
class MainThreadMappedEditsProvider {
|