@codingame/monaco-vscode-extensions-service-override 4.5.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions.js +0 -2
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +69 -136
- 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 +20 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +34 -10
- 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 +3 -3
- 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 +45 -21
- 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 +30 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +32 -41
- 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 +185 -165
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +38 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +1 -0
- 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 +133 -144
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +34 -33
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +9 -8
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
|
@@ -36,6 +36,7 @@ import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/wor
|
|
|
36
36
|
import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
37
37
|
|
|
38
38
|
var MainThreadCustomEditorModel_1;
|
|
39
|
+
const _moduleId = "vs/workbench/api/browser/mainThreadCustomEditors";
|
|
39
40
|
let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
40
41
|
constructor(context, mainThreadWebview, mainThreadWebviewPanels, extensionService, storageService, workingCopyService, workingCopyFileService, _customEditorService, _editorGroupService, _editorService, _instantiationService, _webviewWorkbenchService) {
|
|
41
42
|
super();
|
|
@@ -46,10 +47,10 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
46
47
|
this._editorService = _editorService;
|
|
47
48
|
this._instantiationService = _instantiationService;
|
|
48
49
|
this._webviewWorkbenchService = _webviewWorkbenchService;
|
|
49
|
-
this._editorProviders = this._register(( new DisposableMap()));
|
|
50
|
-
this._editorRenameBackups = ( new Map());
|
|
51
|
-
this._webviewOriginStore = ( new ExtensionKeyedWebviewOriginStore('mainThreadCustomEditors.origins', storageService));
|
|
52
|
-
this._proxyCustomEditors = ( context.getProxy(ExtHostContext.ExtHostCustomEditors));
|
|
50
|
+
this._editorProviders = this._register(( (new DisposableMap())));
|
|
51
|
+
this._editorRenameBackups = ( (new Map()));
|
|
52
|
+
this._webviewOriginStore = ( (new ExtensionKeyedWebviewOriginStore('mainThreadCustomEditors.origins', storageService)));
|
|
53
|
+
this._proxyCustomEditors = ( (context.getProxy(ExtHostContext.ExtHostCustomEditors)));
|
|
53
54
|
this._register(workingCopyFileService.registerWorkingCopyProvider((editorResource) => {
|
|
54
55
|
const matchedWorkingCopies = [];
|
|
55
56
|
for (const workingCopy of workingCopyService.workingCopies) {
|
|
@@ -68,7 +69,7 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
68
69
|
}
|
|
69
70
|
return false;
|
|
70
71
|
},
|
|
71
|
-
resolveWebview: () => { throw new Error('not implemented'); }
|
|
72
|
+
resolveWebview: () => { throw ( (new Error('not implemented'))); }
|
|
72
73
|
}));
|
|
73
74
|
this._register(workingCopyFileService.onWillRunWorkingCopyFileOperation(async (e) => this.onWillRunWorkingCopyFileOperation(e)));
|
|
74
75
|
}
|
|
@@ -79,10 +80,10 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
79
80
|
this.registerEditorProvider(0 , reviveWebviewExtension(extensionData), viewType, options, {}, supportsMultipleEditorsPerDocument, serializeBuffersForPostMessage);
|
|
80
81
|
}
|
|
81
82
|
registerEditorProvider(modelType, extension, viewType, options, capabilities, supportsMultipleEditorsPerDocument, serializeBuffersForPostMessage) {
|
|
82
|
-
if (( this._editorProviders.has(viewType))) {
|
|
83
|
-
throw new Error(`Provider for ${viewType} already registered`);
|
|
83
|
+
if (( (this._editorProviders.has(viewType)))) {
|
|
84
|
+
throw ( (new Error(`Provider for ${viewType} already registered`)));
|
|
84
85
|
}
|
|
85
|
-
const disposables = ( new DisposableStore());
|
|
86
|
+
const disposables = ( (new DisposableStore()));
|
|
86
87
|
disposables.add(this._customEditorService.registerCustomEditorCapabilities(viewType, {
|
|
87
88
|
supportsMultipleEditorsPerDocument
|
|
88
89
|
}));
|
|
@@ -99,9 +100,9 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
99
100
|
webviewInput.webview.extension = extension;
|
|
100
101
|
let backupId = webviewInput.backupId;
|
|
101
102
|
if (webviewInput.oldResource && !webviewInput.backupId) {
|
|
102
|
-
const backup = this._editorRenameBackups.get(( webviewInput.oldResource.toString()));
|
|
103
|
+
const backup = this._editorRenameBackups.get(( (webviewInput.oldResource.toString())));
|
|
103
104
|
backupId = backup?.backupId;
|
|
104
|
-
this._editorRenameBackups.delete(( webviewInput.oldResource.toString()));
|
|
105
|
+
this._editorRenameBackups.delete(( (webviewInput.oldResource.toString())));
|
|
105
106
|
}
|
|
106
107
|
let modelRef;
|
|
107
108
|
try {
|
|
@@ -155,8 +156,8 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
155
156
|
this._editorProviders.set(viewType, disposables);
|
|
156
157
|
}
|
|
157
158
|
$unregisterEditorProvider(viewType) {
|
|
158
|
-
if (!( this._editorProviders.has(viewType))) {
|
|
159
|
-
throw new Error(`No provider for ${viewType} registered`);
|
|
159
|
+
if (!( (this._editorProviders.has(viewType)))) {
|
|
160
|
+
throw ( (new Error(`No provider for ${viewType} registered`)));
|
|
160
161
|
}
|
|
161
162
|
this._editorProviders.deleteAndDispose(viewType);
|
|
162
163
|
this._customEditorService.models.disposeAllModelsForView(viewType);
|
|
@@ -194,7 +195,7 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
194
195
|
const resource = URI.revive(resourceComponents);
|
|
195
196
|
const model = await this._customEditorService.models.get(resource, viewType);
|
|
196
197
|
if (!model || !(model instanceof MainThreadCustomEditorModel)) {
|
|
197
|
-
throw new Error('Could not find model for webview editor');
|
|
198
|
+
throw ( (new Error('Could not find model for webview editor')));
|
|
198
199
|
}
|
|
199
200
|
return model;
|
|
200
201
|
}
|
|
@@ -213,33 +214,33 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
213
214
|
if (model instanceof MainThreadCustomEditorModel && model.isDirty()) {
|
|
214
215
|
const workingCopy = await model.backup(CancellationToken.None);
|
|
215
216
|
if (workingCopy.meta) {
|
|
216
|
-
this._editorRenameBackups.set(( model.editorResource.toString()), workingCopy.meta);
|
|
217
|
+
this._editorRenameBackups.set(( (model.editorResource.toString())), workingCopy.meta);
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
221
|
})());
|
|
221
222
|
}
|
|
222
223
|
};
|
|
223
|
-
MainThreadCustomEditors = ( __decorate([
|
|
224
|
-
( __param(3, IExtensionService)),
|
|
225
|
-
( __param(4, IStorageService)),
|
|
226
|
-
( __param(5, IWorkingCopyService)),
|
|
227
|
-
( __param(6, IWorkingCopyFileService)),
|
|
228
|
-
( __param(7, ICustomEditorService)),
|
|
229
|
-
( __param(8, IEditorGroupsService)),
|
|
230
|
-
( __param(9, IEditorService)),
|
|
231
|
-
( __param(10, IInstantiationService)),
|
|
232
|
-
( __param(11, IWebviewWorkbenchService))
|
|
233
|
-
], MainThreadCustomEditors));
|
|
224
|
+
MainThreadCustomEditors = ( (__decorate([
|
|
225
|
+
( (__param(3, IExtensionService))),
|
|
226
|
+
( (__param(4, IStorageService))),
|
|
227
|
+
( (__param(5, IWorkingCopyService))),
|
|
228
|
+
( (__param(6, IWorkingCopyFileService))),
|
|
229
|
+
( (__param(7, ICustomEditorService))),
|
|
230
|
+
( (__param(8, IEditorGroupsService))),
|
|
231
|
+
( (__param(9, IEditorService))),
|
|
232
|
+
( (__param(10, IInstantiationService))),
|
|
233
|
+
( (__param(11, IWebviewWorkbenchService)))
|
|
234
|
+
], MainThreadCustomEditors)));
|
|
234
235
|
var HotExitState;
|
|
235
|
-
( (function(HotExitState) {
|
|
236
|
-
( (function(Type) {
|
|
236
|
+
( ((function(HotExitState) {
|
|
237
|
+
( ((function(Type) {
|
|
237
238
|
Type[Type["Allowed"] = 0] = "Allowed";
|
|
238
239
|
Type[Type["NotAllowed"] = 1] = "NotAllowed";
|
|
239
240
|
Type[Type["Pending"] = 2] = "Pending";
|
|
240
|
-
})(HotExitState.Type || (HotExitState.Type = {})));
|
|
241
|
-
HotExitState.Allowed = ( Object.freeze({ type: 0 }));
|
|
242
|
-
HotExitState.NotAllowed = ( Object.freeze({ type: 1 }));
|
|
241
|
+
})(HotExitState.Type || (HotExitState.Type = {}))));
|
|
242
|
+
HotExitState.Allowed = ( (Object.freeze({ type: 0 })));
|
|
243
|
+
HotExitState.NotAllowed = ( (Object.freeze({ type: 1 })));
|
|
243
244
|
class Pending {
|
|
244
245
|
constructor(operation) {
|
|
245
246
|
this.operation = operation;
|
|
@@ -247,7 +248,7 @@ var HotExitState;
|
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
HotExitState.Pending = Pending;
|
|
250
|
-
})(HotExitState || (HotExitState = {})));
|
|
251
|
+
})(HotExitState || (HotExitState = {}))));
|
|
251
252
|
let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThreadCustomEditorModel extends ResourceWorkingCopy {
|
|
252
253
|
static async create(instantiationService, proxy, viewType, resource, options, getEditors, cancellation) {
|
|
253
254
|
const editors = getEditors();
|
|
@@ -277,11 +278,11 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
277
278
|
this._edits = [];
|
|
278
279
|
this._isDirtyFromContentChange = false;
|
|
279
280
|
this.typeId = NO_TYPE_ID;
|
|
280
|
-
this._onDidChangeDirty = this._register(( new Emitter()));
|
|
281
|
+
this._onDidChangeDirty = this._register(( (new Emitter())));
|
|
281
282
|
this.onDidChangeDirty = this._onDidChangeDirty.event;
|
|
282
|
-
this._onDidChangeContent = this._register(( new Emitter()));
|
|
283
|
+
this._onDidChangeContent = this._register(( (new Emitter())));
|
|
283
284
|
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
284
|
-
this._onDidSave = this._register(( new Emitter()));
|
|
285
|
+
this._onDidSave = this._register(( (new Emitter())));
|
|
285
286
|
this.onDidSave = this._onDidSave.event;
|
|
286
287
|
this.onDidChangeReadonly = Event.None;
|
|
287
288
|
this._fromBackup = fromBackup;
|
|
@@ -297,12 +298,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
297
298
|
return true;
|
|
298
299
|
}
|
|
299
300
|
return false;
|
|
300
|
-
})(), ( localizeWithPath(
|
|
301
|
-
'vs/workbench/api/browser/mainThreadCustomEditors',
|
|
302
|
-
'vetoExtHostRestart',
|
|
303
|
-
"Custom editor '{0}' could not be saved.",
|
|
304
|
-
this.name
|
|
305
|
-
)));
|
|
301
|
+
})(), ( localizeWithPath(_moduleId, 0, "Custom editor '{0}' could not be saved.", this.name)));
|
|
306
302
|
}));
|
|
307
303
|
}
|
|
308
304
|
if (startDirty) {
|
|
@@ -321,13 +317,15 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
321
317
|
}
|
|
322
318
|
static toWorkingCopyResource(viewType, resource) {
|
|
323
319
|
const authority = viewType.replace(/[^a-z0-9\-_]/gi, '-');
|
|
324
|
-
const path = `/${multibyteAwareBtoa(( resource.with({ query: null, fragment: null }).toString(true)))}`;
|
|
325
|
-
return (
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
320
|
+
const path = `/${multibyteAwareBtoa(( (resource.with({ query: null, fragment: null }).toString(true))))}`;
|
|
321
|
+
return (
|
|
322
|
+
(URI.from({
|
|
323
|
+
scheme: Schemas.vscodeCustomEditor,
|
|
324
|
+
authority: authority,
|
|
325
|
+
path: path,
|
|
326
|
+
query: JSON.stringify(resource.toJSON()),
|
|
327
|
+
}))
|
|
328
|
+
);
|
|
331
329
|
}
|
|
332
330
|
get name() {
|
|
333
331
|
return basename(this._labelService.getUriLabel(this._editorResource));
|
|
@@ -358,7 +356,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
358
356
|
}
|
|
359
357
|
pushEdit(editId, label) {
|
|
360
358
|
if (!this._editable) {
|
|
361
|
-
throw new Error('Document is not editable');
|
|
359
|
+
throw ( (new Error('Document is not editable')));
|
|
362
360
|
}
|
|
363
361
|
this.change(() => {
|
|
364
362
|
this.spliceEdits(editId);
|
|
@@ -367,11 +365,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
367
365
|
this._undoService.pushElement({
|
|
368
366
|
type: 0 ,
|
|
369
367
|
resource: this._editorResource,
|
|
370
|
-
label: label ?? ( localizeWithPath(
|
|
371
|
-
'vs/workbench/api/browser/mainThreadCustomEditors',
|
|
372
|
-
'defaultEditLabel',
|
|
373
|
-
"Edit"
|
|
374
|
-
)),
|
|
368
|
+
label: label ?? ( localizeWithPath(_moduleId, 1, "Edit")),
|
|
375
369
|
code: 'undoredo.customEditorEdit',
|
|
376
370
|
undo: () => this.undo(),
|
|
377
371
|
redo: () => this.redo(),
|
|
@@ -484,7 +478,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
484
478
|
}
|
|
485
479
|
suggestUntitledSavePath(options) {
|
|
486
480
|
if (!this.isUntitled()) {
|
|
487
|
-
throw new Error('Resource is not untitled');
|
|
481
|
+
throw ( (new Error('Resource is not untitled')));
|
|
488
482
|
}
|
|
489
483
|
const remoteAuthority = this._environmentService.remoteAuthority;
|
|
490
484
|
const localResource = toLocalResource(this._editorResource, remoteAuthority, this._pathService.defaultUriScheme);
|
|
@@ -507,7 +501,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
507
501
|
async backup(token) {
|
|
508
502
|
const editors = this._getEditors();
|
|
509
503
|
if (!editors.length) {
|
|
510
|
-
throw new Error('No editors found for resource, cannot back up');
|
|
504
|
+
throw ( (new Error('No editors found for resource, cannot back up')));
|
|
511
505
|
}
|
|
512
506
|
const primaryEditor = editors[0];
|
|
513
507
|
const backupMeta = {
|
|
@@ -561,18 +555,18 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
561
555
|
if (this._hotExitState === HotExitState.Allowed) {
|
|
562
556
|
return backupData;
|
|
563
557
|
}
|
|
564
|
-
throw new Error(`Cannot backup in this state: ${errorMessage}`);
|
|
558
|
+
throw ( (new Error(`Cannot backup in this state: ${errorMessage}`)));
|
|
565
559
|
}
|
|
566
560
|
};
|
|
567
|
-
MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = ( __decorate([
|
|
568
|
-
( __param(7, IFileDialogService)),
|
|
569
|
-
( __param(8, IFileService)),
|
|
570
|
-
( __param(9, ILabelService)),
|
|
571
|
-
( __param(10, IUndoRedoService)),
|
|
572
|
-
( __param(11, IWorkbenchEnvironmentService)),
|
|
573
|
-
( __param(12, IWorkingCopyService)),
|
|
574
|
-
( __param(13, IPathService)),
|
|
575
|
-
( __param(14, IExtensionService))
|
|
576
|
-
], MainThreadCustomEditorModel));
|
|
561
|
+
MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = ( (__decorate([
|
|
562
|
+
( (__param(7, IFileDialogService))),
|
|
563
|
+
( (__param(8, IFileService))),
|
|
564
|
+
( (__param(9, ILabelService))),
|
|
565
|
+
( (__param(10, IUndoRedoService))),
|
|
566
|
+
( (__param(11, IWorkbenchEnvironmentService))),
|
|
567
|
+
( (__param(12, IWorkingCopyService))),
|
|
568
|
+
( (__param(13, IPathService))),
|
|
569
|
+
( (__param(14, IExtensionService)))
|
|
570
|
+
], MainThreadCustomEditorModel)));
|
|
577
571
|
|
|
578
572
|
export { MainThreadCustomEditors };
|
|
@@ -274,7 +274,7 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
274
274
|
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, saveBeforeStart);
|
|
275
275
|
}
|
|
276
276
|
catch (err) {
|
|
277
|
-
throw new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging');
|
|
277
|
+
throw ( new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging'));
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
$setDebugSessionName(sessionId, name) {
|
|
@@ -322,7 +322,7 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
322
322
|
this.getDebugAdapter(handle).acceptMessage(convertToVSCPaths(message, false));
|
|
323
323
|
}
|
|
324
324
|
$acceptDAError(handle, name, message, stack) {
|
|
325
|
-
this.
|
|
325
|
+
this._debugAdapters.get(handle)?.fireError(handle, ( new Error(`${name}: ${message}\n${stack}`)));
|
|
326
326
|
}
|
|
327
327
|
$acceptDAExit(handle, code, signal) {
|
|
328
328
|
this.getDebugAdapter(handle).fireExit(handle, code, signal);
|
|
@@ -330,7 +330,7 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
330
330
|
getDebugAdapter(handle) {
|
|
331
331
|
const adapter = this._debugAdapters.get(handle);
|
|
332
332
|
if (!adapter) {
|
|
333
|
-
throw new Error('Invalid debug adapter');
|
|
333
|
+
throw ( new Error('Invalid debug adapter'));
|
|
334
334
|
}
|
|
335
335
|
return adapter;
|
|
336
336
|
}
|
|
@@ -172,7 +172,7 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
|
|
|
172
172
|
async $tryOpenDocument(uriData) {
|
|
173
173
|
const inputUri = URI.revive(uriData);
|
|
174
174
|
if (!inputUri.scheme || !(inputUri.fsPath || inputUri.authority)) {
|
|
175
|
-
throw new ErrorNoTelemetry(`Invalid uri. Scheme and authority or path must be set.`);
|
|
175
|
+
throw ( new ErrorNoTelemetry(`Invalid uri. Scheme and authority or path must be set.`));
|
|
176
176
|
}
|
|
177
177
|
const canonicalUri = this._uriIdentityService.asCanonicalUri(inputUri);
|
|
178
178
|
let promise;
|
|
@@ -190,16 +190,16 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
|
|
|
190
190
|
documentUri = await promise;
|
|
191
191
|
}
|
|
192
192
|
catch (err) {
|
|
193
|
-
throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: ${toErrorMessage(err)}`);
|
|
193
|
+
throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: ${toErrorMessage(err)}`));
|
|
194
194
|
}
|
|
195
195
|
if (!documentUri) {
|
|
196
|
-
throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}`);
|
|
196
|
+
throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}`));
|
|
197
197
|
}
|
|
198
198
|
else if (!extUri.isEqual(documentUri, canonicalUri)) {
|
|
199
|
-
throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: Actual document opened as ${documentUri.toString()}`);
|
|
199
|
+
throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: Actual document opened as ${( documentUri.toString())}`));
|
|
200
200
|
}
|
|
201
201
|
else if (!( this._modelTrackers.has(canonicalUri))) {
|
|
202
|
-
throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: Files above 50MB cannot be synchronized with extensions.`);
|
|
202
|
+
throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: Files above 50MB cannot be synchronized with extensions.`));
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
205
|
return canonicalUri;
|
|
@@ -231,7 +231,7 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
|
|
|
231
231
|
const ref = await this._textModelResolverService.createModelReference(resource);
|
|
232
232
|
if (!( this._modelTrackers.has(resource))) {
|
|
233
233
|
ref.dispose();
|
|
234
|
-
throw new Error(`expected URI ${resource.toString()} to have come to LIFE`);
|
|
234
|
+
throw ( new Error(`expected URI ${( resource.toString())} to have come to LIFE`));
|
|
235
235
|
}
|
|
236
236
|
this._modelReferenceCollection.add(resource, ref, ref.object.textEditorModel.getValueLength());
|
|
237
237
|
Event.once(model.onDidRevert)(() => this._modelReferenceCollection.remove(resource));
|
|
@@ -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 };
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
+
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
5
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
3
8
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
9
|
import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
6
10
|
import { DiffEditorInput } from 'vscode/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
10
|
-
import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
11
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
|
+
import { isGroupEditorMoveEvent } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
|
|
12
|
+
import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
12
13
|
import { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
|
|
13
|
-
import {
|
|
14
|
+
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
14
15
|
import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
15
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
16
|
-
import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
17
|
-
import { TerminalEditorInput } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
|
|
18
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
19
|
-
import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
20
|
-
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
21
|
-
import { isGroupEditorMoveEvent } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
|
|
22
16
|
import { InteractiveEditorInput } from 'vscode/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
|
|
23
17
|
import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
24
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
25
|
-
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
26
18
|
import { MultiDiffEditorInput } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
19
|
+
import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
20
|
+
import { TerminalEditorInput } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
|
|
21
|
+
import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
22
|
+
import { editorGroupToColumn, columnToEditorGroup } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
23
|
+
import { preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
24
|
+
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
25
|
+
import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
26
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
27
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
27
28
|
|
|
28
29
|
let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
29
30
|
constructor(extHostContext, _editorGroupsService, _configurationService, _logService, editorService) {
|
|
@@ -34,6 +35,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
34
35
|
this._tabGroupModel = [];
|
|
35
36
|
this._groupLookup = ( new Map());
|
|
36
37
|
this._tabInfoLookup = ( new Map());
|
|
38
|
+
this._multiDiffEditorInputListeners = ( new DisposableMap());
|
|
37
39
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostEditorTabs));
|
|
38
40
|
this._dispoables.add(editorService.onDidEditorsChange((event) => {
|
|
39
41
|
try {
|
|
@@ -44,6 +46,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
44
46
|
this._createTabsModel();
|
|
45
47
|
}
|
|
46
48
|
}));
|
|
49
|
+
this._dispoables.add(this._multiDiffEditorInputListeners);
|
|
47
50
|
this._dispoables.add(this._editorGroupsService.onDidAddGroup(() => this._createTabsModel()));
|
|
48
51
|
this._dispoables.add(this._editorGroupsService.onDidRemoveGroup(() => this._createTabsModel()));
|
|
49
52
|
this._editorGroupsService.whenReady.then(() => this._createTabsModel());
|
|
@@ -150,12 +153,11 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
150
153
|
if (editor instanceof ChatEditorInput) {
|
|
151
154
|
return {
|
|
152
155
|
kind: 10 ,
|
|
153
|
-
providerId: editor.providerId ?? 'unknown',
|
|
154
156
|
};
|
|
155
157
|
}
|
|
156
158
|
if (editor instanceof MultiDiffEditorInput) {
|
|
157
159
|
const diffEditors = [];
|
|
158
|
-
for (const resource of (editor?.
|
|
160
|
+
for (const resource of (editor?.resources.get() ?? [])) {
|
|
159
161
|
if (resource.original && resource.modified) {
|
|
160
162
|
diffEditors.push({
|
|
161
163
|
kind: 2 ,
|
|
@@ -220,7 +222,23 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
220
222
|
}
|
|
221
223
|
const tabObject = this._buildTabObject(group, editorInput, editorIndex);
|
|
222
224
|
tabs.splice(editorIndex, 0, tabObject);
|
|
223
|
-
this.
|
|
225
|
+
const tabId = this._generateTabId(editorInput, groupId);
|
|
226
|
+
this._tabInfoLookup.set(tabId, { group, editorInput, tab: tabObject });
|
|
227
|
+
if (editorInput instanceof MultiDiffEditorInput) {
|
|
228
|
+
this._multiDiffEditorInputListeners.set(editorInput, Event.fromObservableLight(editorInput.resources)(() => {
|
|
229
|
+
const tabInfo = this._tabInfoLookup.get(tabId);
|
|
230
|
+
if (!tabInfo) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
tabInfo.tab = this._buildTabObject(group, editorInput, editorIndex);
|
|
234
|
+
this._proxy.$acceptTabOperation({
|
|
235
|
+
groupId,
|
|
236
|
+
index: editorIndex,
|
|
237
|
+
tabDto: tabInfo.tab,
|
|
238
|
+
kind: 2
|
|
239
|
+
});
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
224
242
|
this._proxy.$acceptTabOperation({
|
|
225
243
|
groupId,
|
|
226
244
|
index: editorIndex,
|
|
@@ -240,6 +258,9 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
240
258
|
return;
|
|
241
259
|
}
|
|
242
260
|
this._tabInfoLookup.delete(removedTab[0]?.id ?? '');
|
|
261
|
+
if (removedTab[0]?.input instanceof MultiDiffEditorInput) {
|
|
262
|
+
this._multiDiffEditorInputListeners.deleteAndDispose(removedTab[0]?.input);
|
|
263
|
+
}
|
|
243
264
|
this._proxy.$acceptTabOperation({
|
|
244
265
|
groupId,
|
|
245
266
|
index: editorIndex,
|
|
@@ -334,6 +355,9 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
334
355
|
});
|
|
335
356
|
}
|
|
336
357
|
_createTabsModel() {
|
|
358
|
+
if (this._editorGroupsService.groups.length === 0) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
337
361
|
this._tabGroupModel = [];
|
|
338
362
|
this._groupLookup.clear();
|
|
339
363
|
this._tabInfoLookup.clear();
|
|
@@ -424,7 +448,7 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
424
448
|
const tabInfo = this._tabInfoLookup.get(tabId);
|
|
425
449
|
const tab = tabInfo?.tab;
|
|
426
450
|
if (!tab) {
|
|
427
|
-
throw new Error(`Attempted to close tab with id ${tabId} which does not exist`);
|
|
451
|
+
throw ( new Error(`Attempted to close tab with id ${tabId} which does not exist`));
|
|
428
452
|
}
|
|
429
453
|
let targetGroup;
|
|
430
454
|
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) {
|