@codingame/monaco-vscode-edit-sessions-service-override 14.0.3 → 14.0.4
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 +10 -10
- package/vscode/src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.js +52 -52
- package/vscode/src/vs/workbench/contrib/editSessions/browser/editSessionsStorageService.js +9 -9
- package/vscode/src/vs/workbench/contrib/editSessions/browser/editSessionsViews.js +13 -13
- package/vscode/src/vs/workbench/contrib/editSessions/common/editSessions.js +3 -3
- package/vscode/src/vs/workbench/contrib/editSessions/common/editSessionsLogService.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-edit-sessions-service-override",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - edit-sessions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common": "14.0.
|
|
19
|
-
"@codingame/monaco-vscode-3607c442-ae7a-594b-b840-038378c24fef-common": "14.0.
|
|
20
|
-
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "14.0.
|
|
21
|
-
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.
|
|
22
|
-
"@codingame/monaco-vscode-a2719803-af40-5ae9-a29f-8a2231c33056-common": "14.0.
|
|
23
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.
|
|
24
|
-
"@codingame/monaco-vscode-api": "14.0.
|
|
25
|
-
"@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.
|
|
26
|
-
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "14.0.
|
|
18
|
+
"@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common": "14.0.4",
|
|
19
|
+
"@codingame/monaco-vscode-3607c442-ae7a-594b-b840-038378c24fef-common": "14.0.4",
|
|
20
|
+
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "14.0.4",
|
|
21
|
+
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.4",
|
|
22
|
+
"@codingame/monaco-vscode-a2719803-af40-5ae9-a29f-8a2231c33056-common": "14.0.4",
|
|
23
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.4",
|
|
24
|
+
"@codingame/monaco-vscode-api": "14.0.4",
|
|
25
|
+
"@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.4",
|
|
26
|
+
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "14.0.4"
|
|
27
27
|
},
|
|
28
28
|
"main": "index.js",
|
|
29
29
|
"module": "index.js",
|
|
@@ -79,24 +79,24 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
|
|
|
79
79
|
var EditSessionsContribution_1;
|
|
80
80
|
const continueWorkingOnCommand = {
|
|
81
81
|
id: '_workbench.editSessions.actions.continueEditSession',
|
|
82
|
-
title: ( localize2(
|
|
82
|
+
title: ( localize2(5801, 'Continue Working On...')),
|
|
83
83
|
precondition: ( WorkspaceFolderCountContext.notEqualsTo('0')),
|
|
84
84
|
f1: true
|
|
85
85
|
};
|
|
86
86
|
const openLocalFolderCommand = {
|
|
87
87
|
id: '_workbench.editSessions.actions.continueEditSession.openLocalFolder',
|
|
88
|
-
title: ( localize2(
|
|
88
|
+
title: ( localize2(5802, 'Open In Local Folder')),
|
|
89
89
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
90
90
|
precondition: ( ContextKeyExpr.and(( IsWebContext.toNegated()), VirtualWorkspaceContext))
|
|
91
91
|
};
|
|
92
92
|
const showOutputChannelCommand = {
|
|
93
93
|
id: 'workbench.editSessions.actions.showOutputChannel',
|
|
94
|
-
title: ( localize2(
|
|
94
|
+
title: ( localize2(5803, "Show Log")),
|
|
95
95
|
category: EDIT_SESSION_SYNC_CATEGORY
|
|
96
96
|
};
|
|
97
97
|
const installAdditionalContinueOnOptionsCommand = {
|
|
98
98
|
id: 'workbench.action.continueOn.extensions',
|
|
99
|
-
title: ( localize(
|
|
99
|
+
title: ( localize(5804, 'Install additional development environment options')),
|
|
100
100
|
};
|
|
101
101
|
registerAction2(class extends Action2 {
|
|
102
102
|
constructor() {
|
|
@@ -106,7 +106,7 @@ registerAction2(class extends Action2 {
|
|
|
106
106
|
return accessor.get(IExtensionsWorkbenchService).openSearch('@tag:continueOn');
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
const resumeProgressOptionsTitle = `[${( localize(
|
|
109
|
+
const resumeProgressOptionsTitle = `[${( localize(5805, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
|
|
110
110
|
const resumeProgressOptions = {
|
|
111
111
|
location: ProgressLocation.Window,
|
|
112
112
|
type: 'syncing',
|
|
@@ -179,7 +179,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
179
179
|
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, ( new EditSessionsFileSystemProvider(this.editSessionsStorageService))));
|
|
180
180
|
this.lifecycleService.onWillShutdown((e) => {
|
|
181
181
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
|
|
182
|
-
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(
|
|
182
|
+
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(5806, 'Storing current working changes...')) });
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
|
|
@@ -237,7 +237,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
237
237
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
238
238
|
return this.accountsMenuBadgeDisposable.clear();
|
|
239
239
|
}
|
|
240
|
-
const badge = ( new NumberBadge(1, () => ( localize(
|
|
240
|
+
const badge = ( new NumberBadge(1, () => ( localize(5807, 'Check for pending cloud changes'))));
|
|
241
241
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
242
242
|
}
|
|
243
243
|
async autoStoreEditSession() {
|
|
@@ -245,7 +245,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
245
245
|
await this.progressService.withProgress({
|
|
246
246
|
location: ProgressLocation.Window,
|
|
247
247
|
type: 'syncing',
|
|
248
|
-
title: ( localize(
|
|
248
|
+
title: ( localize(5808, 'Storing working changes...'))
|
|
249
249
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
250
250
|
cancellationTokenSource.cancel();
|
|
251
251
|
cancellationTokenSource.dispose();
|
|
@@ -289,7 +289,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
289
289
|
constructor() {
|
|
290
290
|
super({
|
|
291
291
|
id: 'workbench.editSessions.actions.showEditSessions',
|
|
292
|
-
title: ( localize2(
|
|
292
|
+
title: ( localize2(5809, 'Show Cloud Changes')),
|
|
293
293
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
294
294
|
f1: true
|
|
295
295
|
});
|
|
@@ -326,7 +326,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
326
326
|
location: ProgressLocation.Notification,
|
|
327
327
|
cancellable: true,
|
|
328
328
|
type: 'syncing',
|
|
329
|
-
title: ( localize(
|
|
329
|
+
title: ( localize(5810, 'Storing your working changes...'))
|
|
330
330
|
}, async () => {
|
|
331
331
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
332
332
|
if (ref !== undefined) {
|
|
@@ -375,7 +375,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
375
375
|
constructor() {
|
|
376
376
|
super({
|
|
377
377
|
id: 'workbench.editSessions.actions.resumeLatest',
|
|
378
|
-
title: ( localize2(
|
|
378
|
+
title: ( localize2(5811, 'Resume Latest Changes from Cloud')),
|
|
379
379
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
380
380
|
f1: true,
|
|
381
381
|
});
|
|
@@ -388,7 +388,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
388
388
|
constructor() {
|
|
389
389
|
super({
|
|
390
390
|
id: 'workbench.editSessions.actions.resumeFromSerializedPayload',
|
|
391
|
-
title: ( localize2(
|
|
391
|
+
title: ( localize2(5812, 'Resume Changes from Serialized Data')),
|
|
392
392
|
category: 'Developer',
|
|
393
393
|
f1: true,
|
|
394
394
|
});
|
|
@@ -408,7 +408,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
408
408
|
constructor() {
|
|
409
409
|
super({
|
|
410
410
|
id: 'workbench.editSessions.actions.storeCurrent',
|
|
411
|
-
title: ( localize2(
|
|
411
|
+
title: ( localize2(5813, 'Store Working Changes in Cloud')),
|
|
412
412
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
413
413
|
f1: true,
|
|
414
414
|
});
|
|
@@ -417,7 +417,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
417
417
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
418
418
|
await that.progressService.withProgress({
|
|
419
419
|
location: ProgressLocation.Notification,
|
|
420
|
-
title: ( localize(
|
|
420
|
+
title: ( localize(5814, 'Storing working changes...'))
|
|
421
421
|
}, async () => {
|
|
422
422
|
that.telemetryService.publicLog2('editSessions.store');
|
|
423
423
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -439,14 +439,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
439
439
|
}
|
|
440
440
|
this.telemetryService.publicLog2('editSessions.resume');
|
|
441
441
|
performance.mark('code/willResumeEditSessionFromIdentifier');
|
|
442
|
-
progress?.report({ message: ( localize(
|
|
442
|
+
progress?.report({ message: ( localize(5815, 'Checking for pending cloud changes...')) });
|
|
443
443
|
const data = serializedData ? { content: serializedData, ref: '' } : await this.editSessionsStorageService.read('editSessions', ref);
|
|
444
444
|
if (!data) {
|
|
445
445
|
if (ref === undefined && !silent) {
|
|
446
|
-
this.notificationService.info(( localize(
|
|
446
|
+
this.notificationService.info(( localize(5816, 'There are no changes to resume from the cloud.')));
|
|
447
447
|
}
|
|
448
448
|
else if (ref !== undefined) {
|
|
449
|
-
this.notificationService.warn(( localize(
|
|
449
|
+
this.notificationService.warn(( localize(5817, 'Could not resume changes from the cloud for ID {0}.', ref)));
|
|
450
450
|
}
|
|
451
451
|
this.logService.info(ref !== undefined ? `Aborting resuming changes from cloud as no edit session content is available to be applied from ref ${ref}.` : `Aborting resuming edit session as no edit session content is available to be applied`);
|
|
452
452
|
return;
|
|
@@ -456,7 +456,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
456
456
|
ref = data.ref;
|
|
457
457
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
458
458
|
this.notificationService.error(( localize(
|
|
459
|
-
|
|
459
|
+
5818,
|
|
460
460
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
461
461
|
this.productService.nameLong
|
|
462
462
|
)));
|
|
@@ -473,12 +473,12 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
473
473
|
type: Severity.Warning,
|
|
474
474
|
message: conflictingChanges.length > 1 ?
|
|
475
475
|
( localize(
|
|
476
|
-
|
|
476
|
+
5819,
|
|
477
477
|
'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?',
|
|
478
478
|
conflictingChanges.length
|
|
479
479
|
)) :
|
|
480
480
|
( localize(
|
|
481
|
-
|
|
481
|
+
5820,
|
|
482
482
|
'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?',
|
|
483
483
|
basename(conflictingChanges[0].uri)
|
|
484
484
|
)),
|
|
@@ -504,7 +504,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
504
504
|
}
|
|
505
505
|
catch (ex) {
|
|
506
506
|
this.logService.error('Failed to resume edit session, reason: ', ( ex.toString()));
|
|
507
|
-
this.notificationService.error(( localize(
|
|
507
|
+
this.notificationService.error(( localize(5821, "Failed to resume your working changes from the cloud.")));
|
|
508
508
|
}
|
|
509
509
|
performance.mark('code/didResumeEditSessionFromIdentifier');
|
|
510
510
|
}
|
|
@@ -533,9 +533,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
533
533
|
this.configurationService.getValue('workbench.experimental.cloudChanges.partialMatches.enabled') === true) {
|
|
534
534
|
if (!applyPartialMatch) {
|
|
535
535
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
536
|
-
|
|
536
|
+
5822,
|
|
537
537
|
'You have pending working changes in the cloud for this workspace. Would you like to resume them?'
|
|
538
|
-
)), [{ label: ( localize(
|
|
538
|
+
)), [{ label: ( localize(5823, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
|
|
539
539
|
}
|
|
540
540
|
else {
|
|
541
541
|
folderRoot = f;
|
|
@@ -621,7 +621,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
621
621
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
622
622
|
editSessionSize += contents.length;
|
|
623
623
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
624
|
-
this.notificationService.error(( localize(
|
|
624
|
+
this.notificationService.error(( localize(5824, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
625
625
|
return undefined;
|
|
626
626
|
}
|
|
627
627
|
workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: contents, relativeFilePath: relativeFilePath });
|
|
@@ -641,7 +641,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
641
641
|
this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
|
|
642
642
|
if (fromStoreCommand) {
|
|
643
643
|
this.notificationService.info(( localize(
|
|
644
|
-
|
|
644
|
+
5825,
|
|
645
645
|
'Skipped storing working changes in the cloud as there are no edits to store.'
|
|
646
646
|
)));
|
|
647
647
|
}
|
|
@@ -660,11 +660,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
660
660
|
switch (ex.code) {
|
|
661
661
|
case UserDataSyncErrorCode.TooLarge:
|
|
662
662
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'TooLarge' });
|
|
663
|
-
this.notificationService.error(( localize(
|
|
663
|
+
this.notificationService.error(( localize(5824, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
664
664
|
break;
|
|
665
665
|
default:
|
|
666
666
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'unknown' });
|
|
667
|
-
this.notificationService.error(( localize(
|
|
667
|
+
this.notificationService.error(( localize(5826, 'Your working changes cannot be stored.')));
|
|
668
668
|
break;
|
|
669
669
|
}
|
|
670
670
|
}
|
|
@@ -696,11 +696,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
696
696
|
if (this.hasEditSession()) {
|
|
697
697
|
const disposables = ( new DisposableStore());
|
|
698
698
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
699
|
-
quickpick.placeholder = ( localize(
|
|
699
|
+
quickpick.placeholder = ( localize(5827, "Select whether to bring your working changes with you"));
|
|
700
700
|
quickpick.ok = false;
|
|
701
701
|
quickpick.ignoreFocusOut = true;
|
|
702
|
-
const withCloudChanges = { label: ( localize(
|
|
703
|
-
const withoutCloudChanges = { label: ( localize(
|
|
702
|
+
const withCloudChanges = { label: ( localize(5828, "Yes, continue with my working changes")) };
|
|
703
|
+
const withoutCloudChanges = { label: ( localize(5829, "No, continue without my working changes")) };
|
|
704
704
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
705
705
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
706
706
|
disposables.add(quickpick.onDidAccept(() => {
|
|
@@ -793,7 +793,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
793
793
|
}
|
|
794
794
|
async run(accessor) {
|
|
795
795
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
796
|
-
title: ( localize(
|
|
796
|
+
title: ( localize(5830, 'Select a local folder to continue working in')),
|
|
797
797
|
canSelectFolders: true,
|
|
798
798
|
canSelectMany: false,
|
|
799
799
|
canSelectFiles: false,
|
|
@@ -807,7 +807,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
807
807
|
}
|
|
808
808
|
}));
|
|
809
809
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
810
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
810
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(5831, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
async pickContinueEditSessionDestination() {
|
|
@@ -817,7 +817,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
817
817
|
? this.contextService.getWorkspace().folders[0].name
|
|
818
818
|
: ( this.contextService.getWorkspace().folders.map((folder) => folder.name)).join(', ');
|
|
819
819
|
quickPick.placeholder = ( localize(
|
|
820
|
-
|
|
820
|
+
5832,
|
|
821
821
|
"Select a development environment to continue working on {0} in",
|
|
822
822
|
`'${workspaceContext}'`
|
|
823
823
|
));
|
|
@@ -878,7 +878,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
878
878
|
createPickItems() {
|
|
879
879
|
const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
|
|
880
880
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
881
|
-
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(
|
|
881
|
+
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(5833, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(5834, 'Built-in')))));
|
|
882
882
|
}
|
|
883
883
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
884
884
|
return sortedItems.concat({ type: 'separator' }, ( new ContinueEditSessionItem(
|
|
@@ -929,7 +929,7 @@ class ContinueEditSessionItem {
|
|
|
929
929
|
if (documentation !== undefined) {
|
|
930
930
|
this.buttons = [{
|
|
931
931
|
iconClass: infoButtonClass,
|
|
932
|
-
tooltip: ( localize(
|
|
932
|
+
tooltip: ( localize(5835, 'Learn More')),
|
|
933
933
|
}];
|
|
934
934
|
}
|
|
935
935
|
}
|
|
@@ -938,7 +938,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
938
938
|
extensionPoint: 'continueEditSession',
|
|
939
939
|
jsonSchema: {
|
|
940
940
|
description: ( localize(
|
|
941
|
-
|
|
941
|
+
5836,
|
|
942
942
|
'Contributes options for continuing the current edit session in a different environment'
|
|
943
943
|
)),
|
|
944
944
|
type: 'array',
|
|
@@ -947,35 +947,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
947
947
|
properties: {
|
|
948
948
|
command: {
|
|
949
949
|
description: ( localize(
|
|
950
|
-
|
|
950
|
+
5837,
|
|
951
951
|
'Identifier of the command to execute. The command must be declared in the \'commands\'-section and return a URI representing a different environment where the current edit session can be continued.'
|
|
952
952
|
)),
|
|
953
953
|
type: 'string'
|
|
954
954
|
},
|
|
955
955
|
group: {
|
|
956
|
-
description: ( localize(
|
|
956
|
+
description: ( localize(5838, 'Group into which this item belongs.')),
|
|
957
957
|
type: 'string'
|
|
958
958
|
},
|
|
959
959
|
qualifiedName: {
|
|
960
960
|
description: ( localize(
|
|
961
|
-
|
|
961
|
+
5839,
|
|
962
962
|
'A fully qualified name for this item which is used for display in menus.'
|
|
963
963
|
)),
|
|
964
964
|
type: 'string'
|
|
965
965
|
},
|
|
966
966
|
description: {
|
|
967
967
|
description: ( localize(
|
|
968
|
-
|
|
968
|
+
5840,
|
|
969
969
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
970
970
|
)),
|
|
971
971
|
type: 'string'
|
|
972
972
|
},
|
|
973
973
|
remoteGroup: {
|
|
974
|
-
description: ( localize(
|
|
974
|
+
description: ( localize(5841, 'Group into which this item belongs in the remote indicator.')),
|
|
975
975
|
type: 'string'
|
|
976
976
|
},
|
|
977
977
|
when: {
|
|
978
|
-
description: ( localize(
|
|
978
|
+
description: ( localize(5842, 'Condition which must be true to show this item.')),
|
|
979
979
|
type: 'string'
|
|
980
980
|
}
|
|
981
981
|
},
|
|
@@ -992,16 +992,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
992
992
|
enum: ['onShutdown', 'off'],
|
|
993
993
|
enumDescriptions: [
|
|
994
994
|
( localize(
|
|
995
|
-
|
|
995
|
+
5843,
|
|
996
996
|
"Automatically store current working changes in the cloud on window close."
|
|
997
997
|
)),
|
|
998
|
-
( localize(
|
|
998
|
+
( localize(5844, "Never attempt to automatically store working changes in the cloud."))
|
|
999
999
|
],
|
|
1000
1000
|
'type': 'string',
|
|
1001
1001
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1002
1002
|
'default': 'off',
|
|
1003
1003
|
'markdownDescription': ( localize(
|
|
1004
|
-
|
|
1004
|
+
5845,
|
|
1005
1005
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1006
1006
|
)),
|
|
1007
1007
|
},
|
|
@@ -1009,16 +1009,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1009
1009
|
enum: ['onReload', 'off'],
|
|
1010
1010
|
enumDescriptions: [
|
|
1011
1011
|
( localize(
|
|
1012
|
-
|
|
1012
|
+
5846,
|
|
1013
1013
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1014
1014
|
)),
|
|
1015
|
-
( localize(
|
|
1015
|
+
( localize(5847, "Never attempt to resume working changes from the cloud."))
|
|
1016
1016
|
],
|
|
1017
1017
|
'type': 'string',
|
|
1018
1018
|
'tags': ['usesOnlineServices'],
|
|
1019
1019
|
'default': 'onReload',
|
|
1020
1020
|
'markdownDescription': ( localize(
|
|
1021
|
-
|
|
1021
|
+
5848,
|
|
1022
1022
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1023
1023
|
)),
|
|
1024
1024
|
},
|
|
@@ -1026,11 +1026,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1026
1026
|
enum: ['prompt', 'off'],
|
|
1027
1027
|
enumDescriptions: [
|
|
1028
1028
|
( localize(
|
|
1029
|
-
|
|
1029
|
+
5849,
|
|
1030
1030
|
'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
|
|
1031
1031
|
)),
|
|
1032
1032
|
( localize(
|
|
1033
|
-
|
|
1033
|
+
5850,
|
|
1034
1034
|
'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
|
|
1035
1035
|
))
|
|
1036
1036
|
],
|
|
@@ -1038,7 +1038,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1038
1038
|
tags: ['usesOnlineServices'],
|
|
1039
1039
|
default: 'prompt',
|
|
1040
1040
|
markdownDescription: ( localize(
|
|
1041
|
-
|
|
1041
|
+
5851,
|
|
1042
1042
|
'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
|
|
1043
1043
|
))
|
|
1044
1044
|
},
|
|
@@ -1047,7 +1047,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1047
1047
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1048
1048
|
'default': false,
|
|
1049
1049
|
'markdownDescription': ( localize(
|
|
1050
|
-
|
|
1050
|
+
5852,
|
|
1051
1051
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1052
1052
|
))
|
|
1053
1053
|
}
|
|
@@ -234,7 +234,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
234
234
|
const disposables = ( new DisposableStore());
|
|
235
235
|
const quickpick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
236
236
|
quickpick.ok = false;
|
|
237
|
-
quickpick.placeholder = reason === 'read' ? ( localize(
|
|
237
|
+
quickpick.placeholder = reason === 'read' ? ( localize(5853, "Select an account to restore your working changes from the cloud")) : ( localize(5854, "Select an account to store your working changes in the cloud"));
|
|
238
238
|
quickpick.ignoreFocusOut = true;
|
|
239
239
|
quickpick.items = await this.createQuickpickItems();
|
|
240
240
|
return ( new Promise((resolve, reject) => {
|
|
@@ -253,15 +253,15 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
253
253
|
}
|
|
254
254
|
async createQuickpickItems() {
|
|
255
255
|
const options = [];
|
|
256
|
-
options.push({ type: 'separator', label: ( localize(
|
|
256
|
+
options.push({ type: 'separator', label: ( localize(5855, "Signed In")) });
|
|
257
257
|
const sessions = await this.getAllSessions();
|
|
258
258
|
options.push(...sessions);
|
|
259
|
-
options.push({ type: 'separator', label: ( localize(
|
|
259
|
+
options.push({ type: 'separator', label: ( localize(5856, "Others")) });
|
|
260
260
|
for (const authenticationProvider of (await this.getAuthenticationProviders())) {
|
|
261
261
|
const signedInForProvider = ( sessions.some(account => account.session.providerId === authenticationProvider.id));
|
|
262
262
|
if (!signedInForProvider || this.authenticationService.getProvider(authenticationProvider.id).supportsMultipleAccounts) {
|
|
263
263
|
const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
|
|
264
|
-
options.push({ label: ( localize(
|
|
264
|
+
options.push({ label: ( localize(5857, "Sign in with {0}", providerName)), provider: authenticationProvider });
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
return options;
|
|
@@ -350,7 +350,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
350
350
|
constructor() {
|
|
351
351
|
super({
|
|
352
352
|
id,
|
|
353
|
-
title: ( localize(
|
|
353
|
+
title: ( localize(5858, 'Turn on Cloud Changes...')),
|
|
354
354
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
355
355
|
precondition: when,
|
|
356
356
|
menu: [{
|
|
@@ -371,7 +371,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
371
371
|
group: '2_editSessions',
|
|
372
372
|
command: {
|
|
373
373
|
id,
|
|
374
|
-
title: ( localize(
|
|
374
|
+
title: ( localize(5859, 'Turn on Cloud Changes... (1)')),
|
|
375
375
|
},
|
|
376
376
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals(EDIT_SESSIONS_PENDING_KEY, true)), ( ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, false))))
|
|
377
377
|
})));
|
|
@@ -382,7 +382,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
382
382
|
constructor() {
|
|
383
383
|
super({
|
|
384
384
|
id: 'workbench.editSessions.actions.resetAuth',
|
|
385
|
-
title: ( localize(
|
|
385
|
+
title: ( localize(5860, 'Turn off Cloud Changes...')),
|
|
386
386
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
387
387
|
precondition: ( ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true)),
|
|
388
388
|
menu: [{
|
|
@@ -397,8 +397,8 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
397
397
|
}
|
|
398
398
|
async run() {
|
|
399
399
|
const result = await that.dialogService.confirm({
|
|
400
|
-
message: ( localize(
|
|
401
|
-
checkbox: { label: ( localize(
|
|
400
|
+
message: ( localize(5861, 'Do you want to disable storing working changes in the cloud?')),
|
|
401
|
+
checkbox: { label: ( localize(5862, 'Delete all stored data from the cloud.')) }
|
|
402
402
|
});
|
|
403
403
|
if (result.confirmed) {
|
|
404
404
|
if (result.checkboxChecked) {
|
|
@@ -52,9 +52,9 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
52
52
|
}], container);
|
|
53
53
|
viewsRegistry.registerViewWelcomeContent(viewId, {
|
|
54
54
|
content: ( localize(
|
|
55
|
-
|
|
55
|
+
5863,
|
|
56
56
|
'You have no stored changes in the cloud to display.\n{0}',
|
|
57
|
-
`[${( localize(
|
|
57
|
+
`[${( localize(5864, 'Store Working Changes'))}](command:workbench.editSessions.actions.store)`
|
|
58
58
|
)),
|
|
59
59
|
when: ( ContextKeyExpr.equals(EDIT_SESSIONS_COUNT_KEY, 0)),
|
|
60
60
|
order: 1
|
|
@@ -63,7 +63,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
63
63
|
constructor() {
|
|
64
64
|
super({
|
|
65
65
|
id: 'workbench.editSessions.actions.resume',
|
|
66
|
-
title: ( localize(
|
|
66
|
+
title: ( localize(5865, "Resume Working Changes")),
|
|
67
67
|
icon: Codicon.desktopDownload,
|
|
68
68
|
menu: {
|
|
69
69
|
id: MenuId.ViewItemContext,
|
|
@@ -83,7 +83,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
83
83
|
constructor() {
|
|
84
84
|
super({
|
|
85
85
|
id: 'workbench.editSessions.actions.store',
|
|
86
|
-
title: ( localize(
|
|
86
|
+
title: ( localize(5866, "Store Working Changes")),
|
|
87
87
|
icon: Codicon.cloudUpload,
|
|
88
88
|
});
|
|
89
89
|
}
|
|
@@ -97,7 +97,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
97
97
|
constructor() {
|
|
98
98
|
super({
|
|
99
99
|
id: 'workbench.editSessions.actions.delete',
|
|
100
|
-
title: ( localize(
|
|
100
|
+
title: ( localize(5867, "Delete Working Changes")),
|
|
101
101
|
icon: Codicon.trash,
|
|
102
102
|
menu: {
|
|
103
103
|
id: MenuId.ViewItemContext,
|
|
@@ -112,11 +112,11 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
112
112
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
113
113
|
const result = await dialogService.confirm({
|
|
114
114
|
message: ( localize(
|
|
115
|
-
|
|
115
|
+
5868,
|
|
116
116
|
'Are you sure you want to permanently delete your working changes with ref {0}?',
|
|
117
117
|
editSessionId
|
|
118
118
|
)),
|
|
119
|
-
detail: ( localize(
|
|
119
|
+
detail: ( localize(5869, ' You cannot undo this action.')),
|
|
120
120
|
type: 'warning',
|
|
121
121
|
title: EDIT_SESSIONS_TITLE.value
|
|
122
122
|
});
|
|
@@ -130,7 +130,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
130
130
|
constructor() {
|
|
131
131
|
super({
|
|
132
132
|
id: 'workbench.editSessions.actions.deleteAll',
|
|
133
|
-
title: ( localize(
|
|
133
|
+
title: ( localize(5870, "Delete All Working Changes from Cloud")),
|
|
134
134
|
icon: Codicon.trash,
|
|
135
135
|
menu: {
|
|
136
136
|
id: MenuId.ViewTitle,
|
|
@@ -143,10 +143,10 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
143
143
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
144
144
|
const result = await dialogService.confirm({
|
|
145
145
|
message: ( localize(
|
|
146
|
-
|
|
146
|
+
5871,
|
|
147
147
|
'Are you sure you want to permanently delete all stored changes from the cloud?'
|
|
148
148
|
)),
|
|
149
|
-
detail: ( localize(
|
|
149
|
+
detail: ( localize(5872, ' You cannot undo this action.')),
|
|
150
150
|
type: 'warning',
|
|
151
151
|
title: EDIT_SESSIONS_TITLE.value
|
|
152
152
|
});
|
|
@@ -258,11 +258,11 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
258
258
|
themeIcon: Codicon.file,
|
|
259
259
|
command: {
|
|
260
260
|
id: 'vscode.diff',
|
|
261
|
-
title: ( localize(
|
|
261
|
+
title: ( localize(5873, 'Compare Changes')),
|
|
262
262
|
arguments: [
|
|
263
263
|
localCopy,
|
|
264
264
|
cloudChangeUri,
|
|
265
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
265
|
+
`${basename(change.relativeFilePath)} (${( localize(5874, 'Local Copy'))} \u2194 ${( localize(5875, 'Cloud Changes'))})`,
|
|
266
266
|
undefined
|
|
267
267
|
]
|
|
268
268
|
}
|
|
@@ -277,7 +277,7 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
277
277
|
themeIcon: Codicon.file,
|
|
278
278
|
command: {
|
|
279
279
|
id: API_OPEN_EDITOR_COMMAND_ID,
|
|
280
|
-
title: ( localize(
|
|
280
|
+
title: ( localize(5876, 'Open File')),
|
|
281
281
|
arguments: [cloudChangeUri, undefined, undefined]
|
|
282
282
|
}
|
|
283
283
|
};
|
|
@@ -6,7 +6,7 @@ import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/c
|
|
|
6
6
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
7
7
|
import { StringSHA1 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
|
|
8
8
|
|
|
9
|
-
const EDIT_SESSION_SYNC_CATEGORY = ( localize2(
|
|
9
|
+
const EDIT_SESSION_SYNC_CATEGORY = ( localize2(5877, 'Cloud Changes'));
|
|
10
10
|
var ChangeType;
|
|
11
11
|
(function (ChangeType) {
|
|
12
12
|
ChangeType[ChangeType["Addition"] = 1] = "Addition";
|
|
@@ -23,8 +23,8 @@ const EDIT_SESSIONS_PENDING_KEY = 'editSessionsPending';
|
|
|
23
23
|
const EDIT_SESSIONS_PENDING = ( new RawContextKey(EDIT_SESSIONS_PENDING_KEY, false));
|
|
24
24
|
const EDIT_SESSIONS_CONTAINER_ID = 'workbench.view.editSessions';
|
|
25
25
|
const EDIT_SESSIONS_DATA_VIEW_ID = 'workbench.views.editSessions.data';
|
|
26
|
-
const EDIT_SESSIONS_TITLE = ( localize2(
|
|
27
|
-
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(
|
|
26
|
+
const EDIT_SESSIONS_TITLE = ( localize2(5877, 'Cloud Changes'));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(5878, 'View icon of the cloud changes view.')));
|
|
28
28
|
const EDIT_SESSIONS_SHOW_VIEW = ( new RawContextKey('editSessionsShowView', false));
|
|
29
29
|
const EDIT_SESSIONS_SCHEME = 'vscode-edit-sessions';
|
|
30
30
|
function decodeEditSessionFileContent(version, content) {
|
|
@@ -11,7 +11,7 @@ import { editSessionsLogId } from './editSessions.js';
|
|
|
11
11
|
let EditSessionsLogService = class EditSessionsLogService extends AbstractLogger {
|
|
12
12
|
constructor(loggerService, environmentService) {
|
|
13
13
|
super();
|
|
14
|
-
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(
|
|
14
|
+
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(5879, "Cloud Changes")), group: windowLogGroup }));
|
|
15
15
|
}
|
|
16
16
|
trace(message, ...args) {
|
|
17
17
|
this.logger.trace(message, ...args);
|