@codingame/monaco-vscode-edit-sessions-service-override 11.0.2 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
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@11.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.1.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -73,24 +73,24 @@ import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
|
73
73
|
var EditSessionsContribution_1;
|
|
74
74
|
const continueWorkingOnCommand = {
|
|
75
75
|
id: '_workbench.editSessions.actions.continueEditSession',
|
|
76
|
-
title: ( localize2(
|
|
76
|
+
title: ( localize2(1926, 'Continue Working On...')),
|
|
77
77
|
precondition: ( (WorkspaceFolderCountContext.notEqualsTo('0'))),
|
|
78
78
|
f1: true
|
|
79
79
|
};
|
|
80
80
|
const openLocalFolderCommand = {
|
|
81
81
|
id: '_workbench.editSessions.actions.continueEditSession.openLocalFolder',
|
|
82
|
-
title: ( localize2(
|
|
82
|
+
title: ( localize2(1927, 'Open In Local Folder')),
|
|
83
83
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
84
84
|
precondition: ( (ContextKeyExpr.and( (IsWebContext.toNegated()), VirtualWorkspaceContext)))
|
|
85
85
|
};
|
|
86
86
|
const showOutputChannelCommand = {
|
|
87
87
|
id: 'workbench.editSessions.actions.showOutputChannel',
|
|
88
|
-
title: ( localize2(
|
|
88
|
+
title: ( localize2(1928, "Show Log")),
|
|
89
89
|
category: EDIT_SESSION_SYNC_CATEGORY
|
|
90
90
|
};
|
|
91
91
|
const installAdditionalContinueOnOptionsCommand = {
|
|
92
92
|
id: 'workbench.action.continueOn.extensions',
|
|
93
|
-
title: ( localize(
|
|
93
|
+
title: ( localize(1929, 'Install additional development environment options')),
|
|
94
94
|
};
|
|
95
95
|
registerAction2(class extends Action2 {
|
|
96
96
|
constructor() {
|
|
@@ -100,7 +100,7 @@ registerAction2(class extends Action2 {
|
|
|
100
100
|
return accessor.get(IExtensionsWorkbenchService).openSearch('@tag:continueOn');
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
const resumeProgressOptionsTitle = `[${( localize(
|
|
103
|
+
const resumeProgressOptionsTitle = `[${( localize(1930, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
|
|
104
104
|
const resumeProgressOptions = {
|
|
105
105
|
location: 10 ,
|
|
106
106
|
type: 'syncing',
|
|
@@ -181,7 +181,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
181
181
|
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, ( (new EditSessionsFileSystemProvider(this.editSessionsStorageService)))));
|
|
182
182
|
this.lifecycleService.onWillShutdown((e) => {
|
|
183
183
|
if (e.reason !== 3 && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
|
|
184
|
-
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(
|
|
184
|
+
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(1931, 'Storing current working changes...')) });
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
|
|
@@ -239,7 +239,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
239
239
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
240
240
|
return this.accountsMenuBadgeDisposable.clear();
|
|
241
241
|
}
|
|
242
|
-
const badge = ( (new NumberBadge(1, () => ( localize(
|
|
242
|
+
const badge = ( (new NumberBadge(1, () => ( localize(1932, 'Check for pending cloud changes')))));
|
|
243
243
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
244
244
|
}
|
|
245
245
|
async autoStoreEditSession() {
|
|
@@ -247,7 +247,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
247
247
|
await this.progressService.withProgress({
|
|
248
248
|
location: 10 ,
|
|
249
249
|
type: 'syncing',
|
|
250
|
-
title: ( localize(
|
|
250
|
+
title: ( localize(1933, 'Storing working changes...'))
|
|
251
251
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
252
252
|
cancellationTokenSource.cancel();
|
|
253
253
|
cancellationTokenSource.dispose();
|
|
@@ -291,7 +291,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
291
291
|
constructor() {
|
|
292
292
|
super({
|
|
293
293
|
id: 'workbench.editSessions.actions.showEditSessions',
|
|
294
|
-
title: ( localize2(
|
|
294
|
+
title: ( localize2(1934, 'Show Cloud Changes')),
|
|
295
295
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
296
296
|
f1: true
|
|
297
297
|
});
|
|
@@ -328,7 +328,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
328
328
|
location: 15 ,
|
|
329
329
|
cancellable: true,
|
|
330
330
|
type: 'syncing',
|
|
331
|
-
title: ( localize(
|
|
331
|
+
title: ( localize(1935, 'Storing your working changes...'))
|
|
332
332
|
}, async () => {
|
|
333
333
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
334
334
|
if (ref !== undefined) {
|
|
@@ -377,7 +377,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
377
377
|
constructor() {
|
|
378
378
|
super({
|
|
379
379
|
id: 'workbench.editSessions.actions.resumeLatest',
|
|
380
|
-
title: ( localize2(
|
|
380
|
+
title: ( localize2(1936, 'Resume Latest Changes from Cloud')),
|
|
381
381
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
382
382
|
f1: true,
|
|
383
383
|
});
|
|
@@ -390,7 +390,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
390
390
|
constructor() {
|
|
391
391
|
super({
|
|
392
392
|
id: 'workbench.editSessions.actions.resumeFromSerializedPayload',
|
|
393
|
-
title: ( localize2(
|
|
393
|
+
title: ( localize2(1937, 'Resume Changes from Serialized Data')),
|
|
394
394
|
category: 'Developer',
|
|
395
395
|
f1: true,
|
|
396
396
|
});
|
|
@@ -410,7 +410,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
410
410
|
constructor() {
|
|
411
411
|
super({
|
|
412
412
|
id: 'workbench.editSessions.actions.storeCurrent',
|
|
413
|
-
title: ( localize2(
|
|
413
|
+
title: ( localize2(1938, 'Store Working Changes in Cloud')),
|
|
414
414
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
415
415
|
f1: true,
|
|
416
416
|
});
|
|
@@ -419,7 +419,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
419
419
|
const cancellationTokenSource = ( (new CancellationTokenSource()));
|
|
420
420
|
await that.progressService.withProgress({
|
|
421
421
|
location: 15 ,
|
|
422
|
-
title: ( localize(
|
|
422
|
+
title: ( localize(1939, 'Storing working changes...'))
|
|
423
423
|
}, async () => {
|
|
424
424
|
that.telemetryService.publicLog2('editSessions.store');
|
|
425
425
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -441,14 +441,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
441
441
|
}
|
|
442
442
|
this.telemetryService.publicLog2('editSessions.resume');
|
|
443
443
|
performance.mark('code/willResumeEditSessionFromIdentifier');
|
|
444
|
-
progress?.report({ message: ( localize(
|
|
444
|
+
progress?.report({ message: ( localize(1940, 'Checking for pending cloud changes...')) });
|
|
445
445
|
const data = serializedData ? { content: serializedData, ref: '' } : await this.editSessionsStorageService.read('editSessions', ref);
|
|
446
446
|
if (!data) {
|
|
447
447
|
if (ref === undefined && !silent) {
|
|
448
|
-
this.notificationService.info(( localize(
|
|
448
|
+
this.notificationService.info(( localize(1941, 'There are no changes to resume from the cloud.')));
|
|
449
449
|
}
|
|
450
450
|
else if (ref !== undefined) {
|
|
451
|
-
this.notificationService.warn(( localize(
|
|
451
|
+
this.notificationService.warn(( localize(1942, 'Could not resume changes from the cloud for ID {0}.', ref)));
|
|
452
452
|
}
|
|
453
453
|
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`);
|
|
454
454
|
return;
|
|
@@ -458,7 +458,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
458
458
|
ref = data.ref;
|
|
459
459
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
460
460
|
this.notificationService.error(( localize(
|
|
461
|
-
|
|
461
|
+
1943,
|
|
462
462
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
463
463
|
this.productService.nameLong
|
|
464
464
|
)));
|
|
@@ -475,12 +475,12 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
475
475
|
type: Severity$1.Warning,
|
|
476
476
|
message: conflictingChanges.length > 1 ?
|
|
477
477
|
( localize(
|
|
478
|
-
|
|
478
|
+
1944,
|
|
479
479
|
'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?',
|
|
480
480
|
conflictingChanges.length
|
|
481
481
|
)) :
|
|
482
482
|
( localize(
|
|
483
|
-
|
|
483
|
+
1945,
|
|
484
484
|
'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?',
|
|
485
485
|
basename(conflictingChanges[0].uri)
|
|
486
486
|
)),
|
|
@@ -506,7 +506,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
506
506
|
}
|
|
507
507
|
catch (ex) {
|
|
508
508
|
this.logService.error('Failed to resume edit session, reason: ', ( (ex.toString())));
|
|
509
|
-
this.notificationService.error(( localize(
|
|
509
|
+
this.notificationService.error(( localize(1946, "Failed to resume your working changes from the cloud.")));
|
|
510
510
|
}
|
|
511
511
|
performance.mark('code/didResumeEditSessionFromIdentifier');
|
|
512
512
|
}
|
|
@@ -535,9 +535,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
535
535
|
this.configurationService.getValue('workbench.experimental.cloudChanges.partialMatches.enabled') === true) {
|
|
536
536
|
if (!applyPartialMatch) {
|
|
537
537
|
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
538
|
-
|
|
538
|
+
1947,
|
|
539
539
|
'You have pending working changes in the cloud for this workspace. Would you like to resume them?'
|
|
540
|
-
)), [{ label: ( localize(
|
|
540
|
+
)), [{ label: ( localize(1948, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
|
|
541
541
|
}
|
|
542
542
|
else {
|
|
543
543
|
folderRoot = f;
|
|
@@ -623,7 +623,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
623
623
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
624
624
|
editSessionSize += contents.length;
|
|
625
625
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
626
|
-
this.notificationService.error(( localize(
|
|
626
|
+
this.notificationService.error(( localize(1949, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
627
627
|
return undefined;
|
|
628
628
|
}
|
|
629
629
|
workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: contents, relativeFilePath: relativeFilePath });
|
|
@@ -643,7 +643,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
643
643
|
this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
|
|
644
644
|
if (fromStoreCommand) {
|
|
645
645
|
this.notificationService.info(( localize(
|
|
646
|
-
|
|
646
|
+
1950,
|
|
647
647
|
'Skipped storing working changes in the cloud as there are no edits to store.'
|
|
648
648
|
)));
|
|
649
649
|
}
|
|
@@ -662,11 +662,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
662
662
|
switch (ex.code) {
|
|
663
663
|
case "TooLarge" :
|
|
664
664
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'TooLarge' });
|
|
665
|
-
this.notificationService.error(( localize(
|
|
665
|
+
this.notificationService.error(( localize(1949, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
666
666
|
break;
|
|
667
667
|
default:
|
|
668
668
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'unknown' });
|
|
669
|
-
this.notificationService.error(( localize(
|
|
669
|
+
this.notificationService.error(( localize(1951, 'Your working changes cannot be stored.')));
|
|
670
670
|
break;
|
|
671
671
|
}
|
|
672
672
|
}
|
|
@@ -698,11 +698,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
698
698
|
if (this.hasEditSession()) {
|
|
699
699
|
const disposables = ( (new DisposableStore()));
|
|
700
700
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
701
|
-
quickpick.placeholder = ( localize(
|
|
701
|
+
quickpick.placeholder = ( localize(1952, "Select whether to bring your working changes with you"));
|
|
702
702
|
quickpick.ok = false;
|
|
703
703
|
quickpick.ignoreFocusOut = true;
|
|
704
|
-
const withCloudChanges = { label: ( localize(
|
|
705
|
-
const withoutCloudChanges = { label: ( localize(
|
|
704
|
+
const withCloudChanges = { label: ( localize(1953, "Yes, continue with my working changes")) };
|
|
705
|
+
const withoutCloudChanges = { label: ( localize(1954, "No, continue without my working changes")) };
|
|
706
706
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
707
707
|
const continueWithCloudChanges = await ( (new Promise((resolve, reject) => {
|
|
708
708
|
disposables.add(quickpick.onDidAccept(() => {
|
|
@@ -795,7 +795,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
795
795
|
}
|
|
796
796
|
async run(accessor) {
|
|
797
797
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
798
|
-
title: ( localize(
|
|
798
|
+
title: ( localize(1955, 'Select a local folder to continue working in')),
|
|
799
799
|
canSelectFolders: true,
|
|
800
800
|
canSelectMany: false,
|
|
801
801
|
canSelectFiles: false,
|
|
@@ -809,7 +809,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
809
809
|
}
|
|
810
810
|
}));
|
|
811
811
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
812
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
812
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(1956, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
async pickContinueEditSessionDestination() {
|
|
@@ -819,7 +819,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
819
819
|
? this.contextService.getWorkspace().folders[0].name
|
|
820
820
|
: ( (this.contextService.getWorkspace().folders.map((folder) => folder.name))).join(', ');
|
|
821
821
|
quickPick.placeholder = ( localize(
|
|
822
|
-
|
|
822
|
+
1957,
|
|
823
823
|
"Select a development environment to continue working on {0} in",
|
|
824
824
|
`'${workspaceContext}'`
|
|
825
825
|
));
|
|
@@ -880,7 +880,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
880
880
|
createPickItems() {
|
|
881
881
|
const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
|
|
882
882
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
883
|
-
items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(
|
|
883
|
+
items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(1958, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(1959, 'Built-in'))))));
|
|
884
884
|
}
|
|
885
885
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
886
886
|
return sortedItems.concat({ type: 'separator' }, ( (new ContinueEditSessionItem(
|
|
@@ -931,7 +931,7 @@ class ContinueEditSessionItem {
|
|
|
931
931
|
if (documentation !== undefined) {
|
|
932
932
|
this.buttons = [{
|
|
933
933
|
iconClass: infoButtonClass,
|
|
934
|
-
tooltip: ( localize(
|
|
934
|
+
tooltip: ( localize(1960, 'Learn More')),
|
|
935
935
|
}];
|
|
936
936
|
}
|
|
937
937
|
}
|
|
@@ -940,7 +940,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
940
940
|
extensionPoint: 'continueEditSession',
|
|
941
941
|
jsonSchema: {
|
|
942
942
|
description: ( localize(
|
|
943
|
-
|
|
943
|
+
1961,
|
|
944
944
|
'Contributes options for continuing the current edit session in a different environment'
|
|
945
945
|
)),
|
|
946
946
|
type: 'array',
|
|
@@ -949,35 +949,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
949
949
|
properties: {
|
|
950
950
|
command: {
|
|
951
951
|
description: ( localize(
|
|
952
|
-
|
|
952
|
+
1962,
|
|
953
953
|
'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.'
|
|
954
954
|
)),
|
|
955
955
|
type: 'string'
|
|
956
956
|
},
|
|
957
957
|
group: {
|
|
958
|
-
description: ( localize(
|
|
958
|
+
description: ( localize(1963, 'Group into which this item belongs.')),
|
|
959
959
|
type: 'string'
|
|
960
960
|
},
|
|
961
961
|
qualifiedName: {
|
|
962
962
|
description: ( localize(
|
|
963
|
-
|
|
963
|
+
1964,
|
|
964
964
|
'A fully qualified name for this item which is used for display in menus.'
|
|
965
965
|
)),
|
|
966
966
|
type: 'string'
|
|
967
967
|
},
|
|
968
968
|
description: {
|
|
969
969
|
description: ( localize(
|
|
970
|
-
|
|
970
|
+
1965,
|
|
971
971
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
972
972
|
)),
|
|
973
973
|
type: 'string'
|
|
974
974
|
},
|
|
975
975
|
remoteGroup: {
|
|
976
|
-
description: ( localize(
|
|
976
|
+
description: ( localize(1966, 'Group into which this item belongs in the remote indicator.')),
|
|
977
977
|
type: 'string'
|
|
978
978
|
},
|
|
979
979
|
when: {
|
|
980
|
-
description: ( localize(
|
|
980
|
+
description: ( localize(1967, 'Condition which must be true to show this item.')),
|
|
981
981
|
type: 'string'
|
|
982
982
|
}
|
|
983
983
|
},
|
|
@@ -994,16 +994,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
|
|
|
994
994
|
enum: ['onShutdown', 'off'],
|
|
995
995
|
enumDescriptions: [
|
|
996
996
|
( localize(
|
|
997
|
-
|
|
997
|
+
1968,
|
|
998
998
|
"Automatically store current working changes in the cloud on window close."
|
|
999
999
|
)),
|
|
1000
|
-
( localize(
|
|
1000
|
+
( localize(1969, "Never attempt to automatically store working changes in the cloud."))
|
|
1001
1001
|
],
|
|
1002
1002
|
'type': 'string',
|
|
1003
1003
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1004
1004
|
'default': 'off',
|
|
1005
1005
|
'markdownDescription': ( localize(
|
|
1006
|
-
|
|
1006
|
+
1970,
|
|
1007
1007
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1008
1008
|
)),
|
|
1009
1009
|
},
|
|
@@ -1011,16 +1011,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
|
|
|
1011
1011
|
enum: ['onReload', 'off'],
|
|
1012
1012
|
enumDescriptions: [
|
|
1013
1013
|
( localize(
|
|
1014
|
-
|
|
1014
|
+
1971,
|
|
1015
1015
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1016
1016
|
)),
|
|
1017
|
-
( localize(
|
|
1017
|
+
( localize(1972, "Never attempt to resume working changes from the cloud."))
|
|
1018
1018
|
],
|
|
1019
1019
|
'type': 'string',
|
|
1020
1020
|
'tags': ['usesOnlineServices'],
|
|
1021
1021
|
'default': 'onReload',
|
|
1022
1022
|
'markdownDescription': ( localize(
|
|
1023
|
-
|
|
1023
|
+
1973,
|
|
1024
1024
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1025
1025
|
)),
|
|
1026
1026
|
},
|
|
@@ -1028,11 +1028,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
|
|
|
1028
1028
|
enum: ['prompt', 'off'],
|
|
1029
1029
|
enumDescriptions: [
|
|
1030
1030
|
( localize(
|
|
1031
|
-
|
|
1031
|
+
1974,
|
|
1032
1032
|
'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
|
|
1033
1033
|
)),
|
|
1034
1034
|
( localize(
|
|
1035
|
-
|
|
1035
|
+
1975,
|
|
1036
1036
|
'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
|
|
1037
1037
|
))
|
|
1038
1038
|
],
|
|
@@ -1040,7 +1040,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
|
|
|
1040
1040
|
tags: ['usesOnlineServices'],
|
|
1041
1041
|
default: 'prompt',
|
|
1042
1042
|
markdownDescription: ( localize(
|
|
1043
|
-
|
|
1043
|
+
1976,
|
|
1044
1044
|
'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
|
|
1045
1045
|
))
|
|
1046
1046
|
},
|
|
@@ -1049,7 +1049,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
|
|
|
1049
1049
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1050
1050
|
'default': false,
|
|
1051
1051
|
'markdownDescription': ( localize(
|
|
1052
|
-
|
|
1052
|
+
1977,
|
|
1053
1053
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1054
1054
|
))
|
|
1055
1055
|
}
|
|
@@ -232,7 +232,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
232
232
|
const disposables = ( (new DisposableStore()));
|
|
233
233
|
const quickpick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
234
234
|
quickpick.ok = false;
|
|
235
|
-
quickpick.placeholder = reason === 'read' ? ( localize(
|
|
235
|
+
quickpick.placeholder = reason === 'read' ? ( localize(1916, "Select an account to restore your working changes from the cloud")) : ( localize(1917, "Select an account to store your working changes in the cloud"));
|
|
236
236
|
quickpick.ignoreFocusOut = true;
|
|
237
237
|
quickpick.items = await this.createQuickpickItems();
|
|
238
238
|
return (
|
|
@@ -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(1918, "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(1919, "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(1920, "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(1921, '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(1922, 'Turn on Cloud Changes... (1)')),
|
|
375
375
|
},
|
|
376
376
|
when: ( (ContextKeyExpr.and(
|
|
377
377
|
(ContextKeyExpr.equals(EDIT_SESSIONS_PENDING_KEY, true)),
|
|
@@ -385,7 +385,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
385
385
|
constructor() {
|
|
386
386
|
super({
|
|
387
387
|
id: 'workbench.editSessions.actions.resetAuth',
|
|
388
|
-
title: ( localize(
|
|
388
|
+
title: ( localize(1923, 'Turn off Cloud Changes...')),
|
|
389
389
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
390
390
|
precondition: ( (ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true))),
|
|
391
391
|
menu: [{
|
|
@@ -400,8 +400,8 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
400
400
|
}
|
|
401
401
|
async run() {
|
|
402
402
|
const result = await that.dialogService.confirm({
|
|
403
|
-
message: ( localize(
|
|
404
|
-
checkbox: { label: ( localize(
|
|
403
|
+
message: ( localize(1924, 'Do you want to disable storing working changes in the cloud?')),
|
|
404
|
+
checkbox: { label: ( localize(1925, 'Delete all stored data from the cloud.')) }
|
|
405
405
|
});
|
|
406
406
|
if (result.confirmed) {
|
|
407
407
|
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
|
+
5667,
|
|
55
55
|
'You have no stored changes in the cloud to display.\n{0}',
|
|
56
|
-
`[${( localize(
|
|
56
|
+
`[${( localize(5668, '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(5669, "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(5670, "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(5671, "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
|
+
5672,
|
|
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(5673, ' 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(5674, "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
|
+
5675,
|
|
155
155
|
'Are you sure you want to permanently delete all stored changes from the cloud?'
|
|
156
156
|
)),
|
|
157
|
-
detail: ( localize(
|
|
157
|
+
detail: ( localize(5676, ' 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(5677, 'Compare Changes')),
|
|
272
272
|
arguments: [
|
|
273
273
|
localCopy,
|
|
274
274
|
cloudChangeUri,
|
|
275
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
275
|
+
`${basename(change.relativeFilePath)} (${( localize(5678, 'Local Copy'))} \u2194 ${( localize(5679, '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(5680, '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(5655, '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(5655, 'Cloud Changes'));
|
|
26
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(5656, '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(1915, "Cloud Changes")) }));
|
|
13
13
|
}
|
|
14
14
|
trace(message, ...args) {
|
|
15
15
|
this.logger.trace(message, ...args);
|