@codingame/monaco-vscode-edit-sessions-service-override 9.0.0 → 9.0.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 +2 -2
- 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": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@9.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -79,24 +79,24 @@ import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
|
79
79
|
var EditSessionsContribution_1;
|
|
80
80
|
const continueWorkingOnCommand = {
|
|
81
81
|
id: '_workbench.editSessions.actions.continueEditSession',
|
|
82
|
-
title: ( localize2(
|
|
82
|
+
title: ( localize2(2398, '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(2399, '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(2400, "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(2401, 'Install additional development environment options')),
|
|
100
100
|
};
|
|
101
101
|
registerAction2(class extends Action2 {
|
|
102
102
|
constructor() {
|
|
@@ -109,7 +109,7 @@ registerAction2(class extends Action2 {
|
|
|
109
109
|
view?.search('@tag:continueOn');
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
const resumeProgressOptionsTitle = `[${( localize(
|
|
112
|
+
const resumeProgressOptionsTitle = `[${( localize(2402, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
|
|
113
113
|
const resumeProgressOptions = {
|
|
114
114
|
location: ProgressLocation.Window,
|
|
115
115
|
type: 'syncing',
|
|
@@ -190,7 +190,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
190
190
|
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, ( (new EditSessionsFileSystemProvider(this.editSessionsStorageService)))));
|
|
191
191
|
this.lifecycleService.onWillShutdown((e) => {
|
|
192
192
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
|
|
193
|
-
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(
|
|
193
|
+
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(2403, 'Storing current working changes...')) });
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
|
|
@@ -248,7 +248,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
248
248
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
249
249
|
return this.accountsMenuBadgeDisposable.clear();
|
|
250
250
|
}
|
|
251
|
-
const badge = ( (new NumberBadge(1, () => ( localize(
|
|
251
|
+
const badge = ( (new NumberBadge(1, () => ( localize(2404, 'Check for pending cloud changes')))));
|
|
252
252
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
253
253
|
}
|
|
254
254
|
async autoStoreEditSession() {
|
|
@@ -256,7 +256,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
256
256
|
await this.progressService.withProgress({
|
|
257
257
|
location: ProgressLocation.Window,
|
|
258
258
|
type: 'syncing',
|
|
259
|
-
title: ( localize(
|
|
259
|
+
title: ( localize(2405, 'Storing working changes...'))
|
|
260
260
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
261
261
|
cancellationTokenSource.cancel();
|
|
262
262
|
cancellationTokenSource.dispose();
|
|
@@ -300,7 +300,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
300
300
|
constructor() {
|
|
301
301
|
super({
|
|
302
302
|
id: 'workbench.editSessions.actions.showEditSessions',
|
|
303
|
-
title: ( localize2(
|
|
303
|
+
title: ( localize2(2406, 'Show Cloud Changes')),
|
|
304
304
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
305
305
|
f1: true
|
|
306
306
|
});
|
|
@@ -337,7 +337,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
337
337
|
location: ProgressLocation.Notification,
|
|
338
338
|
cancellable: true,
|
|
339
339
|
type: 'syncing',
|
|
340
|
-
title: ( localize(
|
|
340
|
+
title: ( localize(2407, 'Storing your working changes...'))
|
|
341
341
|
}, async () => {
|
|
342
342
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
343
343
|
if (ref !== undefined) {
|
|
@@ -386,7 +386,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
386
386
|
constructor() {
|
|
387
387
|
super({
|
|
388
388
|
id: 'workbench.editSessions.actions.resumeLatest',
|
|
389
|
-
title: ( localize2(
|
|
389
|
+
title: ( localize2(2408, 'Resume Latest Changes from Cloud')),
|
|
390
390
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
391
391
|
f1: true,
|
|
392
392
|
});
|
|
@@ -399,7 +399,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
399
399
|
constructor() {
|
|
400
400
|
super({
|
|
401
401
|
id: 'workbench.editSessions.actions.resumeFromSerializedPayload',
|
|
402
|
-
title: ( localize2(
|
|
402
|
+
title: ( localize2(2409, 'Resume Changes from Serialized Data')),
|
|
403
403
|
category: 'Developer',
|
|
404
404
|
f1: true,
|
|
405
405
|
});
|
|
@@ -419,7 +419,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
419
419
|
constructor() {
|
|
420
420
|
super({
|
|
421
421
|
id: 'workbench.editSessions.actions.storeCurrent',
|
|
422
|
-
title: ( localize2(
|
|
422
|
+
title: ( localize2(2410, 'Store Working Changes in Cloud')),
|
|
423
423
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
424
424
|
f1: true,
|
|
425
425
|
});
|
|
@@ -428,7 +428,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
428
428
|
const cancellationTokenSource = ( (new CancellationTokenSource()));
|
|
429
429
|
await that.progressService.withProgress({
|
|
430
430
|
location: ProgressLocation.Notification,
|
|
431
|
-
title: ( localize(
|
|
431
|
+
title: ( localize(2411, 'Storing working changes...'))
|
|
432
432
|
}, async () => {
|
|
433
433
|
that.telemetryService.publicLog2('editSessions.store');
|
|
434
434
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -450,14 +450,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
450
450
|
}
|
|
451
451
|
this.telemetryService.publicLog2('editSessions.resume');
|
|
452
452
|
performance.mark('code/willResumeEditSessionFromIdentifier');
|
|
453
|
-
progress?.report({ message: ( localize(
|
|
453
|
+
progress?.report({ message: ( localize(2412, 'Checking for pending cloud changes...')) });
|
|
454
454
|
const data = serializedData ? { content: serializedData, ref: '' } : await this.editSessionsStorageService.read('editSessions', ref);
|
|
455
455
|
if (!data) {
|
|
456
456
|
if (ref === undefined && !silent) {
|
|
457
|
-
this.notificationService.info(( localize(
|
|
457
|
+
this.notificationService.info(( localize(2413, 'There are no changes to resume from the cloud.')));
|
|
458
458
|
}
|
|
459
459
|
else if (ref !== undefined) {
|
|
460
|
-
this.notificationService.warn(( localize(
|
|
460
|
+
this.notificationService.warn(( localize(2414, 'Could not resume changes from the cloud for ID {0}.', ref)));
|
|
461
461
|
}
|
|
462
462
|
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`);
|
|
463
463
|
return;
|
|
@@ -467,7 +467,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
467
467
|
ref = data.ref;
|
|
468
468
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
469
469
|
this.notificationService.error(( localize(
|
|
470
|
-
|
|
470
|
+
2415,
|
|
471
471
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
472
472
|
this.productService.nameLong
|
|
473
473
|
)));
|
|
@@ -484,12 +484,12 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
484
484
|
type: Severity$1.Warning,
|
|
485
485
|
message: conflictingChanges.length > 1 ?
|
|
486
486
|
( localize(
|
|
487
|
-
|
|
487
|
+
2416,
|
|
488
488
|
'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?',
|
|
489
489
|
conflictingChanges.length
|
|
490
490
|
)) :
|
|
491
491
|
( localize(
|
|
492
|
-
|
|
492
|
+
2417,
|
|
493
493
|
'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?',
|
|
494
494
|
basename(conflictingChanges[0].uri)
|
|
495
495
|
)),
|
|
@@ -515,7 +515,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
515
515
|
}
|
|
516
516
|
catch (ex) {
|
|
517
517
|
this.logService.error('Failed to resume edit session, reason: ', ( (ex.toString())));
|
|
518
|
-
this.notificationService.error(( localize(
|
|
518
|
+
this.notificationService.error(( localize(2418, "Failed to resume your working changes from the cloud.")));
|
|
519
519
|
}
|
|
520
520
|
performance.mark('code/didResumeEditSessionFromIdentifier');
|
|
521
521
|
}
|
|
@@ -544,9 +544,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
544
544
|
this.configurationService.getValue('workbench.experimental.cloudChanges.partialMatches.enabled') === true) {
|
|
545
545
|
if (!applyPartialMatch) {
|
|
546
546
|
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
547
|
-
|
|
547
|
+
2419,
|
|
548
548
|
'You have pending working changes in the cloud for this workspace. Would you like to resume them?'
|
|
549
|
-
)), [{ label: ( localize(
|
|
549
|
+
)), [{ label: ( localize(2420, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
|
|
550
550
|
}
|
|
551
551
|
else {
|
|
552
552
|
folderRoot = f;
|
|
@@ -629,7 +629,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
629
629
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
630
630
|
editSessionSize += contents.length;
|
|
631
631
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
632
|
-
this.notificationService.error(( localize(
|
|
632
|
+
this.notificationService.error(( localize(2421, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
633
633
|
return undefined;
|
|
634
634
|
}
|
|
635
635
|
workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: contents, relativeFilePath: relativeFilePath });
|
|
@@ -649,7 +649,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
649
649
|
this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
|
|
650
650
|
if (fromStoreCommand) {
|
|
651
651
|
this.notificationService.info(( localize(
|
|
652
|
-
|
|
652
|
+
2422,
|
|
653
653
|
'Skipped storing working changes in the cloud as there are no edits to store.'
|
|
654
654
|
)));
|
|
655
655
|
}
|
|
@@ -668,11 +668,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
668
668
|
switch (ex.code) {
|
|
669
669
|
case UserDataSyncErrorCode.TooLarge:
|
|
670
670
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'TooLarge' });
|
|
671
|
-
this.notificationService.error(( localize(
|
|
671
|
+
this.notificationService.error(( localize(2421, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
672
672
|
break;
|
|
673
673
|
default:
|
|
674
674
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'unknown' });
|
|
675
|
-
this.notificationService.error(( localize(
|
|
675
|
+
this.notificationService.error(( localize(2423, 'Your working changes cannot be stored.')));
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
@@ -704,11 +704,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
704
704
|
if (this.hasEditSession()) {
|
|
705
705
|
const disposables = ( (new DisposableStore()));
|
|
706
706
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
707
|
-
quickpick.placeholder = ( localize(
|
|
707
|
+
quickpick.placeholder = ( localize(2424, "Select whether to bring your working changes with you"));
|
|
708
708
|
quickpick.ok = false;
|
|
709
709
|
quickpick.ignoreFocusOut = true;
|
|
710
|
-
const withCloudChanges = { label: ( localize(
|
|
711
|
-
const withoutCloudChanges = { label: ( localize(
|
|
710
|
+
const withCloudChanges = { label: ( localize(2425, "Yes, continue with my working changes")) };
|
|
711
|
+
const withoutCloudChanges = { label: ( localize(2426, "No, continue without my working changes")) };
|
|
712
712
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
713
713
|
const continueWithCloudChanges = await ( (new Promise((resolve, reject) => {
|
|
714
714
|
disposables.add(quickpick.onDidAccept(() => {
|
|
@@ -801,7 +801,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
801
801
|
}
|
|
802
802
|
async run(accessor) {
|
|
803
803
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
804
|
-
title: ( localize(
|
|
804
|
+
title: ( localize(2427, 'Select a local folder to continue working in')),
|
|
805
805
|
canSelectFolders: true,
|
|
806
806
|
canSelectMany: false,
|
|
807
807
|
canSelectFiles: false,
|
|
@@ -815,7 +815,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
815
815
|
}
|
|
816
816
|
}));
|
|
817
817
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
818
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
818
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(2428, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
async pickContinueEditSessionDestination() {
|
|
@@ -825,7 +825,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
825
825
|
? this.contextService.getWorkspace().folders[0].name
|
|
826
826
|
: ( (this.contextService.getWorkspace().folders.map((folder) => folder.name))).join(', ');
|
|
827
827
|
quickPick.placeholder = ( localize(
|
|
828
|
-
|
|
828
|
+
2429,
|
|
829
829
|
"Select a development environment to continue working on {0} in",
|
|
830
830
|
`'${workspaceContext}'`
|
|
831
831
|
));
|
|
@@ -886,7 +886,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
886
886
|
createPickItems() {
|
|
887
887
|
const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
|
|
888
888
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
889
|
-
items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(
|
|
889
|
+
items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(2430, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(2431, 'Built-in'))))));
|
|
890
890
|
}
|
|
891
891
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
892
892
|
return sortedItems.concat({ type: 'separator' }, ( (new ContinueEditSessionItem(
|
|
@@ -937,7 +937,7 @@ class ContinueEditSessionItem {
|
|
|
937
937
|
if (documentation !== undefined) {
|
|
938
938
|
this.buttons = [{
|
|
939
939
|
iconClass: infoButtonClass,
|
|
940
|
-
tooltip: ( localize(
|
|
940
|
+
tooltip: ( localize(2432, 'Learn More')),
|
|
941
941
|
}];
|
|
942
942
|
}
|
|
943
943
|
}
|
|
@@ -946,7 +946,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
946
946
|
extensionPoint: 'continueEditSession',
|
|
947
947
|
jsonSchema: {
|
|
948
948
|
description: ( localize(
|
|
949
|
-
|
|
949
|
+
2433,
|
|
950
950
|
'Contributes options for continuing the current edit session in a different environment'
|
|
951
951
|
)),
|
|
952
952
|
type: 'array',
|
|
@@ -955,35 +955,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
955
955
|
properties: {
|
|
956
956
|
command: {
|
|
957
957
|
description: ( localize(
|
|
958
|
-
|
|
958
|
+
2434,
|
|
959
959
|
'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.'
|
|
960
960
|
)),
|
|
961
961
|
type: 'string'
|
|
962
962
|
},
|
|
963
963
|
group: {
|
|
964
|
-
description: ( localize(
|
|
964
|
+
description: ( localize(2435, 'Group into which this item belongs.')),
|
|
965
965
|
type: 'string'
|
|
966
966
|
},
|
|
967
967
|
qualifiedName: {
|
|
968
968
|
description: ( localize(
|
|
969
|
-
|
|
969
|
+
2436,
|
|
970
970
|
'A fully qualified name for this item which is used for display in menus.'
|
|
971
971
|
)),
|
|
972
972
|
type: 'string'
|
|
973
973
|
},
|
|
974
974
|
description: {
|
|
975
975
|
description: ( localize(
|
|
976
|
-
|
|
976
|
+
2437,
|
|
977
977
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
978
978
|
)),
|
|
979
979
|
type: 'string'
|
|
980
980
|
},
|
|
981
981
|
remoteGroup: {
|
|
982
|
-
description: ( localize(
|
|
982
|
+
description: ( localize(2438, 'Group into which this item belongs in the remote indicator.')),
|
|
983
983
|
type: 'string'
|
|
984
984
|
},
|
|
985
985
|
when: {
|
|
986
|
-
description: ( localize(
|
|
986
|
+
description: ( localize(2439, 'Condition which must be true to show this item.')),
|
|
987
987
|
type: 'string'
|
|
988
988
|
}
|
|
989
989
|
},
|
|
@@ -1000,16 +1000,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1000
1000
|
enum: ['onShutdown', 'off'],
|
|
1001
1001
|
enumDescriptions: [
|
|
1002
1002
|
( localize(
|
|
1003
|
-
|
|
1003
|
+
2440,
|
|
1004
1004
|
"Automatically store current working changes in the cloud on window close."
|
|
1005
1005
|
)),
|
|
1006
|
-
( localize(
|
|
1006
|
+
( localize(2441, "Never attempt to automatically store working changes in the cloud."))
|
|
1007
1007
|
],
|
|
1008
1008
|
'type': 'string',
|
|
1009
1009
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1010
1010
|
'default': 'off',
|
|
1011
1011
|
'markdownDescription': ( localize(
|
|
1012
|
-
|
|
1012
|
+
2442,
|
|
1013
1013
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1014
1014
|
)),
|
|
1015
1015
|
},
|
|
@@ -1017,16 +1017,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1017
1017
|
enum: ['onReload', 'off'],
|
|
1018
1018
|
enumDescriptions: [
|
|
1019
1019
|
( localize(
|
|
1020
|
-
|
|
1020
|
+
2443,
|
|
1021
1021
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1022
1022
|
)),
|
|
1023
|
-
( localize(
|
|
1023
|
+
( localize(2444, "Never attempt to resume working changes from the cloud."))
|
|
1024
1024
|
],
|
|
1025
1025
|
'type': 'string',
|
|
1026
1026
|
'tags': ['usesOnlineServices'],
|
|
1027
1027
|
'default': 'onReload',
|
|
1028
1028
|
'markdownDescription': ( localize(
|
|
1029
|
-
|
|
1029
|
+
2445,
|
|
1030
1030
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1031
1031
|
)),
|
|
1032
1032
|
},
|
|
@@ -1034,11 +1034,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1034
1034
|
enum: ['prompt', 'off'],
|
|
1035
1035
|
enumDescriptions: [
|
|
1036
1036
|
( localize(
|
|
1037
|
-
|
|
1037
|
+
2446,
|
|
1038
1038
|
'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
|
|
1039
1039
|
)),
|
|
1040
1040
|
( localize(
|
|
1041
|
-
|
|
1041
|
+
2447,
|
|
1042
1042
|
'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
|
|
1043
1043
|
))
|
|
1044
1044
|
],
|
|
@@ -1046,7 +1046,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1046
1046
|
tags: ['usesOnlineServices'],
|
|
1047
1047
|
default: 'prompt',
|
|
1048
1048
|
markdownDescription: ( localize(
|
|
1049
|
-
|
|
1049
|
+
2448,
|
|
1050
1050
|
'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
|
|
1051
1051
|
))
|
|
1052
1052
|
},
|
|
@@ -1055,7 +1055,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1055
1055
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1056
1056
|
'default': false,
|
|
1057
1057
|
'markdownDescription': ( localize(
|
|
1058
|
-
|
|
1058
|
+
2449,
|
|
1059
1059
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1060
1060
|
))
|
|
1061
1061
|
}
|
|
@@ -233,7 +233,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
233
233
|
const disposables = ( (new DisposableStore()));
|
|
234
234
|
const quickpick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
235
235
|
quickpick.ok = false;
|
|
236
|
-
quickpick.placeholder = reason === 'read' ? ( localize(
|
|
236
|
+
quickpick.placeholder = reason === 'read' ? ( localize(2388, "Select an account to restore your working changes from the cloud")) : ( localize(2389, "Select an account to store your working changes in the cloud"));
|
|
237
237
|
quickpick.ignoreFocusOut = true;
|
|
238
238
|
quickpick.items = await this.createQuickpickItems();
|
|
239
239
|
return (
|
|
@@ -254,15 +254,15 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
254
254
|
}
|
|
255
255
|
async createQuickpickItems() {
|
|
256
256
|
const options = [];
|
|
257
|
-
options.push({ type: 'separator', label: ( localize(
|
|
257
|
+
options.push({ type: 'separator', label: ( localize(2390, "Signed In")) });
|
|
258
258
|
const sessions = await this.getAllSessions();
|
|
259
259
|
options.push(...sessions);
|
|
260
|
-
options.push({ type: 'separator', label: ( localize(
|
|
260
|
+
options.push({ type: 'separator', label: ( localize(2391, "Others")) });
|
|
261
261
|
for (const authenticationProvider of (await this.getAuthenticationProviders())) {
|
|
262
262
|
const signedInForProvider = ( (sessions.some(account => account.session.providerId === authenticationProvider.id)));
|
|
263
263
|
if (!signedInForProvider || this.authenticationService.getProvider(authenticationProvider.id).supportsMultipleAccounts) {
|
|
264
264
|
const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
|
|
265
|
-
options.push({ label: ( localize(
|
|
265
|
+
options.push({ label: ( localize(2392, "Sign in with {0}", providerName)), provider: authenticationProvider });
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
return options;
|
|
@@ -351,7 +351,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
351
351
|
constructor() {
|
|
352
352
|
super({
|
|
353
353
|
id,
|
|
354
|
-
title: ( localize(
|
|
354
|
+
title: ( localize(2393, 'Turn on Cloud Changes...')),
|
|
355
355
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
356
356
|
precondition: when,
|
|
357
357
|
menu: [{
|
|
@@ -372,7 +372,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
372
372
|
group: '2_editSessions',
|
|
373
373
|
command: {
|
|
374
374
|
id,
|
|
375
|
-
title: ( localize(
|
|
375
|
+
title: ( localize(2394, 'Turn on Cloud Changes... (1)')),
|
|
376
376
|
},
|
|
377
377
|
when: ( (ContextKeyExpr.and(
|
|
378
378
|
(ContextKeyExpr.equals(EDIT_SESSIONS_PENDING_KEY, true)),
|
|
@@ -386,7 +386,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
386
386
|
constructor() {
|
|
387
387
|
super({
|
|
388
388
|
id: 'workbench.editSessions.actions.resetAuth',
|
|
389
|
-
title: ( localize(
|
|
389
|
+
title: ( localize(2395, 'Turn off Cloud Changes...')),
|
|
390
390
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
391
391
|
precondition: ( (ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true))),
|
|
392
392
|
menu: [{
|
|
@@ -401,8 +401,8 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
401
401
|
}
|
|
402
402
|
async run() {
|
|
403
403
|
const result = await that.dialogService.confirm({
|
|
404
|
-
message: ( localize(
|
|
405
|
-
checkbox: { label: ( localize(
|
|
404
|
+
message: ( localize(2396, 'Do you want to disable storing working changes in the cloud?')),
|
|
405
|
+
checkbox: { label: ( localize(2397, 'Delete all stored data from the cloud.')) }
|
|
406
406
|
});
|
|
407
407
|
if (result.confirmed) {
|
|
408
408
|
if (result.checkboxChecked) {
|
|
@@ -51,9 +51,9 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
51
51
|
}], container);
|
|
52
52
|
viewsRegistry.registerViewWelcomeContent(viewId, {
|
|
53
53
|
content: ( localize(
|
|
54
|
-
|
|
54
|
+
5669,
|
|
55
55
|
'You have no stored changes in the cloud to display.\n{0}',
|
|
56
|
-
`[${( localize(
|
|
56
|
+
`[${( localize(5670, 'Store Working Changes'))}](command:workbench.editSessions.actions.store)`
|
|
57
57
|
)),
|
|
58
58
|
when: ( (ContextKeyExpr.equals(EDIT_SESSIONS_COUNT_KEY, 0))),
|
|
59
59
|
order: 1
|
|
@@ -62,7 +62,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
62
62
|
constructor() {
|
|
63
63
|
super({
|
|
64
64
|
id: 'workbench.editSessions.actions.resume',
|
|
65
|
-
title: ( localize(
|
|
65
|
+
title: ( localize(5671, "Resume Working Changes")),
|
|
66
66
|
icon: Codicon.desktopDownload,
|
|
67
67
|
menu: {
|
|
68
68
|
id: MenuId.ViewItemContext,
|
|
@@ -85,7 +85,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
85
85
|
constructor() {
|
|
86
86
|
super({
|
|
87
87
|
id: 'workbench.editSessions.actions.store',
|
|
88
|
-
title: ( localize(
|
|
88
|
+
title: ( localize(5672, "Store Working Changes")),
|
|
89
89
|
icon: Codicon.cloudUpload,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
@@ -99,7 +99,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
99
99
|
constructor() {
|
|
100
100
|
super({
|
|
101
101
|
id: 'workbench.editSessions.actions.delete',
|
|
102
|
-
title: ( localize(
|
|
102
|
+
title: ( localize(5673, "Delete Working Changes")),
|
|
103
103
|
icon: Codicon.trash,
|
|
104
104
|
menu: {
|
|
105
105
|
id: MenuId.ViewItemContext,
|
|
@@ -117,11 +117,11 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
117
117
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
118
118
|
const result = await dialogService.confirm({
|
|
119
119
|
message: ( localize(
|
|
120
|
-
|
|
120
|
+
5674,
|
|
121
121
|
'Are you sure you want to permanently delete your working changes with ref {0}?',
|
|
122
122
|
editSessionId
|
|
123
123
|
)),
|
|
124
|
-
detail: ( localize(
|
|
124
|
+
detail: ( localize(5675, ' You cannot undo this action.')),
|
|
125
125
|
type: 'warning',
|
|
126
126
|
title: EDIT_SESSIONS_TITLE.value
|
|
127
127
|
});
|
|
@@ -135,7 +135,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
135
135
|
constructor() {
|
|
136
136
|
super({
|
|
137
137
|
id: 'workbench.editSessions.actions.deleteAll',
|
|
138
|
-
title: ( localize(
|
|
138
|
+
title: ( localize(5676, "Delete All Working Changes from Cloud")),
|
|
139
139
|
icon: Codicon.trash,
|
|
140
140
|
menu: {
|
|
141
141
|
id: MenuId.ViewTitle,
|
|
@@ -151,10 +151,10 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
151
151
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
152
152
|
const result = await dialogService.confirm({
|
|
153
153
|
message: ( localize(
|
|
154
|
-
|
|
154
|
+
5677,
|
|
155
155
|
'Are you sure you want to permanently delete all stored changes from the cloud?'
|
|
156
156
|
)),
|
|
157
|
-
detail: ( localize(
|
|
157
|
+
detail: ( localize(5678, ' You cannot undo this action.')),
|
|
158
158
|
type: 'warning',
|
|
159
159
|
title: EDIT_SESSIONS_TITLE.value
|
|
160
160
|
});
|
|
@@ -268,11 +268,11 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
268
268
|
themeIcon: Codicon.file,
|
|
269
269
|
command: {
|
|
270
270
|
id: 'vscode.diff',
|
|
271
|
-
title: ( localize(
|
|
271
|
+
title: ( localize(5679, 'Compare Changes')),
|
|
272
272
|
arguments: [
|
|
273
273
|
localCopy,
|
|
274
274
|
cloudChangeUri,
|
|
275
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
275
|
+
`${basename(change.relativeFilePath)} (${( localize(5680, 'Local Copy'))} \u2194 ${( localize(5681, 'Cloud Changes'))})`,
|
|
276
276
|
undefined
|
|
277
277
|
]
|
|
278
278
|
}
|
|
@@ -287,7 +287,7 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
287
287
|
themeIcon: Codicon.file,
|
|
288
288
|
command: {
|
|
289
289
|
id: API_OPEN_EDITOR_COMMAND_ID,
|
|
290
|
-
title: ( localize(
|
|
290
|
+
title: ( localize(5682, 'Open File')),
|
|
291
291
|
arguments: [cloudChangeUri, undefined, undefined]
|
|
292
292
|
}
|
|
293
293
|
};
|
|
@@ -5,7 +5,7 @@ import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/conte
|
|
|
5
5
|
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
6
6
|
import { StringSHA1 } from 'vscode/vscode/vs/base/common/hash';
|
|
7
7
|
|
|
8
|
-
const EDIT_SESSION_SYNC_CATEGORY = ( localize2(
|
|
8
|
+
const EDIT_SESSION_SYNC_CATEGORY = ( localize2(5657, 'Cloud Changes'));
|
|
9
9
|
var ChangeType;
|
|
10
10
|
( ((function(ChangeType) {
|
|
11
11
|
ChangeType[ChangeType["Addition"] = 1] = "Addition";
|
|
@@ -22,8 +22,8 @@ const EDIT_SESSIONS_PENDING_KEY = 'editSessionsPending';
|
|
|
22
22
|
const EDIT_SESSIONS_PENDING = ( (new RawContextKey(EDIT_SESSIONS_PENDING_KEY, false)));
|
|
23
23
|
const EDIT_SESSIONS_CONTAINER_ID = 'workbench.view.editSessions';
|
|
24
24
|
const EDIT_SESSIONS_DATA_VIEW_ID = 'workbench.views.editSessions.data';
|
|
25
|
-
const EDIT_SESSIONS_TITLE = ( localize2(
|
|
26
|
-
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(
|
|
25
|
+
const EDIT_SESSIONS_TITLE = ( localize2(5657, 'Cloud Changes'));
|
|
26
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(5658, 'View icon of the cloud changes view.')));
|
|
27
27
|
const EDIT_SESSIONS_SHOW_VIEW = ( (new RawContextKey('editSessionsShowView', false)));
|
|
28
28
|
const EDIT_SESSIONS_SCHEME = 'vscode-edit-sessions';
|
|
29
29
|
function decodeEditSessionFileContent(version, content) {
|
|
@@ -9,7 +9,7 @@ import { editSessionsLogId } from './editSessions.js';
|
|
|
9
9
|
let EditSessionsLogService = class EditSessionsLogService extends AbstractLogger {
|
|
10
10
|
constructor(loggerService, environmentService) {
|
|
11
11
|
super();
|
|
12
|
-
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(
|
|
12
|
+
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(2387, "Cloud Changes")) }));
|
|
13
13
|
}
|
|
14
14
|
trace(message, ...args) {
|
|
15
15
|
this.logger.trace(message, ...args);
|