@codingame/monaco-vscode-edit-sessions-service-override 21.3.2 → 21.3.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 +9 -9
- 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": "21.3.
|
|
3
|
+
"version": "21.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - edit-sessions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-23b6fb38-5e58-5886-b34b-27abc4f5df02-common": "21.3.
|
|
19
|
-
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "21.3.
|
|
20
|
-
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "21.3.
|
|
21
|
-
"@codingame/monaco-vscode-71c8dbff-4c98-552f-aef0-e72b00fdcfc0-common": "21.3.
|
|
22
|
-
"@codingame/monaco-vscode-9a5ab9e7-d838-5831-9eb4-e79ea3764dcb-common": "21.3.
|
|
23
|
-
"@codingame/monaco-vscode-api": "21.3.
|
|
24
|
-
"@codingame/monaco-vscode-dbfe5f85-b426-55ed-a79b-5f811b395762-common": "21.3.
|
|
25
|
-
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "21.3.
|
|
18
|
+
"@codingame/monaco-vscode-23b6fb38-5e58-5886-b34b-27abc4f5df02-common": "21.3.4",
|
|
19
|
+
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "21.3.4",
|
|
20
|
+
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "21.3.4",
|
|
21
|
+
"@codingame/monaco-vscode-71c8dbff-4c98-552f-aef0-e72b00fdcfc0-common": "21.3.4",
|
|
22
|
+
"@codingame/monaco-vscode-9a5ab9e7-d838-5831-9eb4-e79ea3764dcb-common": "21.3.4",
|
|
23
|
+
"@codingame/monaco-vscode-api": "21.3.4",
|
|
24
|
+
"@codingame/monaco-vscode-dbfe5f85-b426-55ed-a79b-5f811b395762-common": "21.3.4",
|
|
25
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "21.3.4"
|
|
26
26
|
},
|
|
27
27
|
"main": "index.js",
|
|
28
28
|
"module": "index.js",
|
|
@@ -80,24 +80,24 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
|
|
|
80
80
|
var EditSessionsContribution_1;
|
|
81
81
|
const continueWorkingOnCommand = {
|
|
82
82
|
id: '_workbench.editSessions.actions.continueEditSession',
|
|
83
|
-
title: ( localize2(
|
|
83
|
+
title: ( localize2(6681, 'Continue Working On...')),
|
|
84
84
|
precondition: ( WorkspaceFolderCountContext.notEqualsTo('0')),
|
|
85
85
|
f1: true
|
|
86
86
|
};
|
|
87
87
|
const openLocalFolderCommand = {
|
|
88
88
|
id: '_workbench.editSessions.actions.continueEditSession.openLocalFolder',
|
|
89
|
-
title: ( localize2(
|
|
89
|
+
title: ( localize2(6682, 'Open In Local Folder')),
|
|
90
90
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
91
91
|
precondition: ( ContextKeyExpr.and(( IsWebContext.toNegated()), VirtualWorkspaceContext))
|
|
92
92
|
};
|
|
93
93
|
const showOutputChannelCommand = {
|
|
94
94
|
id: 'workbench.editSessions.actions.showOutputChannel',
|
|
95
|
-
title: ( localize2(
|
|
95
|
+
title: ( localize2(6683, "Show Log")),
|
|
96
96
|
category: EDIT_SESSION_SYNC_CATEGORY
|
|
97
97
|
};
|
|
98
98
|
const installAdditionalContinueOnOptionsCommand = {
|
|
99
99
|
id: 'workbench.action.continueOn.extensions',
|
|
100
|
-
title: ( localize(
|
|
100
|
+
title: ( localize(6684, 'Install additional development environment options')),
|
|
101
101
|
};
|
|
102
102
|
registerAction2(class extends Action2 {
|
|
103
103
|
constructor() {
|
|
@@ -107,7 +107,7 @@ registerAction2(class extends Action2 {
|
|
|
107
107
|
return accessor.get(IExtensionsWorkbenchService).openSearch('@tag:continueOn');
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
const resumeProgressOptionsTitle = `[${( localize(
|
|
110
|
+
const resumeProgressOptionsTitle = `[${( localize(6685, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
|
|
111
111
|
const resumeProgressOptions = {
|
|
112
112
|
location: ProgressLocation.Window,
|
|
113
113
|
type: 'syncing',
|
|
@@ -180,7 +180,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
180
180
|
this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, ( new EditSessionsFileSystemProvider(this.editSessionsStorageService))));
|
|
181
181
|
this.lifecycleService.onWillShutdown((e) => {
|
|
182
182
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
|
|
183
|
-
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(
|
|
183
|
+
e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(6686, 'Storing current working changes...')) });
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
|
|
@@ -238,7 +238,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
238
238
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
239
239
|
return this.accountsMenuBadgeDisposable.clear();
|
|
240
240
|
}
|
|
241
|
-
const badge = ( new NumberBadge(1, () => ( localize(
|
|
241
|
+
const badge = ( new NumberBadge(1, () => ( localize(6687, 'Check for pending cloud changes'))));
|
|
242
242
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
243
243
|
}
|
|
244
244
|
async autoStoreEditSession() {
|
|
@@ -246,7 +246,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
246
246
|
await this.progressService.withProgress({
|
|
247
247
|
location: ProgressLocation.Window,
|
|
248
248
|
type: 'syncing',
|
|
249
|
-
title: ( localize(
|
|
249
|
+
title: ( localize(6688, 'Storing working changes...'))
|
|
250
250
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
251
251
|
cancellationTokenSource.cancel();
|
|
252
252
|
cancellationTokenSource.dispose();
|
|
@@ -290,7 +290,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
290
290
|
constructor() {
|
|
291
291
|
super({
|
|
292
292
|
id: 'workbench.editSessions.actions.showEditSessions',
|
|
293
|
-
title: ( localize2(
|
|
293
|
+
title: ( localize2(6689, 'Show Cloud Changes')),
|
|
294
294
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
295
295
|
f1: true
|
|
296
296
|
});
|
|
@@ -327,7 +327,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
327
327
|
location: ProgressLocation.Notification,
|
|
328
328
|
cancellable: true,
|
|
329
329
|
type: 'syncing',
|
|
330
|
-
title: ( localize(
|
|
330
|
+
title: ( localize(6690, 'Storing your working changes...'))
|
|
331
331
|
}, async () => {
|
|
332
332
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
333
333
|
if (ref !== undefined) {
|
|
@@ -376,7 +376,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
376
376
|
constructor() {
|
|
377
377
|
super({
|
|
378
378
|
id: 'workbench.editSessions.actions.resumeLatest',
|
|
379
|
-
title: ( localize2(
|
|
379
|
+
title: ( localize2(6691, 'Resume Latest Changes from Cloud')),
|
|
380
380
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
381
381
|
f1: true,
|
|
382
382
|
});
|
|
@@ -389,7 +389,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
389
389
|
constructor() {
|
|
390
390
|
super({
|
|
391
391
|
id: 'workbench.editSessions.actions.resumeFromSerializedPayload',
|
|
392
|
-
title: ( localize2(
|
|
392
|
+
title: ( localize2(6692, 'Resume Changes from Serialized Data')),
|
|
393
393
|
category: 'Developer',
|
|
394
394
|
f1: true,
|
|
395
395
|
});
|
|
@@ -409,7 +409,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
409
409
|
constructor() {
|
|
410
410
|
super({
|
|
411
411
|
id: 'workbench.editSessions.actions.storeCurrent',
|
|
412
|
-
title: ( localize2(
|
|
412
|
+
title: ( localize2(6693, 'Store Working Changes in Cloud')),
|
|
413
413
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
414
414
|
f1: true,
|
|
415
415
|
});
|
|
@@ -418,7 +418,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
418
418
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
419
419
|
await that.progressService.withProgress({
|
|
420
420
|
location: ProgressLocation.Notification,
|
|
421
|
-
title: ( localize(
|
|
421
|
+
title: ( localize(6694, 'Storing working changes...'))
|
|
422
422
|
}, async () => {
|
|
423
423
|
that.telemetryService.publicLog2('editSessions.store');
|
|
424
424
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -440,14 +440,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
440
440
|
}
|
|
441
441
|
this.telemetryService.publicLog2('editSessions.resume');
|
|
442
442
|
performance.mark('code/willResumeEditSessionFromIdentifier');
|
|
443
|
-
progress?.report({ message: ( localize(
|
|
443
|
+
progress?.report({ message: ( localize(6695, 'Checking for pending cloud changes...')) });
|
|
444
444
|
const data = serializedData ? { content: serializedData, ref: '' } : await this.editSessionsStorageService.read('editSessions', ref);
|
|
445
445
|
if (!data) {
|
|
446
446
|
if (ref === undefined && !silent) {
|
|
447
|
-
this.notificationService.info(( localize(
|
|
447
|
+
this.notificationService.info(( localize(6696, 'There are no changes to resume from the cloud.')));
|
|
448
448
|
}
|
|
449
449
|
else if (ref !== undefined) {
|
|
450
|
-
this.notificationService.warn(( localize(
|
|
450
|
+
this.notificationService.warn(( localize(6697, 'Could not resume changes from the cloud for ID {0}.', ref)));
|
|
451
451
|
}
|
|
452
452
|
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`);
|
|
453
453
|
return;
|
|
@@ -457,7 +457,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
457
457
|
ref = data.ref;
|
|
458
458
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
459
459
|
this.notificationService.error(( localize(
|
|
460
|
-
|
|
460
|
+
6698,
|
|
461
461
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
462
462
|
this.productService.nameLong
|
|
463
463
|
)));
|
|
@@ -474,12 +474,12 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
474
474
|
type: Severity.Warning,
|
|
475
475
|
message: conflictingChanges.length > 1 ?
|
|
476
476
|
( localize(
|
|
477
|
-
|
|
477
|
+
6699,
|
|
478
478
|
'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?',
|
|
479
479
|
conflictingChanges.length
|
|
480
480
|
)) :
|
|
481
481
|
( localize(
|
|
482
|
-
|
|
482
|
+
6700,
|
|
483
483
|
'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?',
|
|
484
484
|
basename(conflictingChanges[0].uri)
|
|
485
485
|
)),
|
|
@@ -505,7 +505,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
505
505
|
}
|
|
506
506
|
catch (ex) {
|
|
507
507
|
this.logService.error('Failed to resume edit session, reason: ', ( ex.toString()));
|
|
508
|
-
this.notificationService.error(( localize(
|
|
508
|
+
this.notificationService.error(( localize(6701, "Failed to resume your working changes from the cloud.")));
|
|
509
509
|
}
|
|
510
510
|
performance.mark('code/didResumeEditSessionFromIdentifier');
|
|
511
511
|
}
|
|
@@ -534,9 +534,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
534
534
|
this.configurationService.getValue('workbench.experimental.cloudChanges.partialMatches.enabled') === true) {
|
|
535
535
|
if (!applyPartialMatch) {
|
|
536
536
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
537
|
-
|
|
537
|
+
6702,
|
|
538
538
|
'You have pending working changes in the cloud for this workspace. Would you like to resume them?'
|
|
539
|
-
)), [{ label: ( localize(
|
|
539
|
+
)), [{ label: ( localize(6703, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
|
|
540
540
|
}
|
|
541
541
|
else {
|
|
542
542
|
folderRoot = f;
|
|
@@ -636,7 +636,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
636
636
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
637
637
|
editSessionSize += contents.length;
|
|
638
638
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
639
|
-
this.notificationService.error(( localize(
|
|
639
|
+
this.notificationService.error(( localize(6704, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
640
640
|
return undefined;
|
|
641
641
|
}
|
|
642
642
|
workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: contents, relativeFilePath: relativeFilePath });
|
|
@@ -656,7 +656,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
656
656
|
this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
|
|
657
657
|
if (fromStoreCommand) {
|
|
658
658
|
this.notificationService.info(( localize(
|
|
659
|
-
|
|
659
|
+
6705,
|
|
660
660
|
'Skipped storing working changes in the cloud as there are no edits to store.'
|
|
661
661
|
)));
|
|
662
662
|
}
|
|
@@ -675,11 +675,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
675
675
|
switch (ex.code) {
|
|
676
676
|
case UserDataSyncErrorCode.TooLarge:
|
|
677
677
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'TooLarge' });
|
|
678
|
-
this.notificationService.error(( localize(
|
|
678
|
+
this.notificationService.error(( localize(6704, 'Your working changes exceed the size limit and cannot be stored.')));
|
|
679
679
|
break;
|
|
680
680
|
default:
|
|
681
681
|
this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'unknown' });
|
|
682
|
-
this.notificationService.error(( localize(
|
|
682
|
+
this.notificationService.error(( localize(6706, 'Your working changes cannot be stored.')));
|
|
683
683
|
break;
|
|
684
684
|
}
|
|
685
685
|
}
|
|
@@ -711,11 +711,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
711
711
|
if (this.hasEditSession()) {
|
|
712
712
|
const disposables = ( new DisposableStore());
|
|
713
713
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
714
|
-
quickpick.placeholder = ( localize(
|
|
714
|
+
quickpick.placeholder = ( localize(6707, "Select whether to bring your working changes with you"));
|
|
715
715
|
quickpick.ok = false;
|
|
716
716
|
quickpick.ignoreFocusOut = true;
|
|
717
|
-
const withCloudChanges = { label: ( localize(
|
|
718
|
-
const withoutCloudChanges = { label: ( localize(
|
|
717
|
+
const withCloudChanges = { label: ( localize(6708, "Yes, continue with my working changes")) };
|
|
718
|
+
const withoutCloudChanges = { label: ( localize(6709, "No, continue without my working changes")) };
|
|
719
719
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
720
720
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
721
721
|
disposables.add(quickpick.onDidAccept(() => {
|
|
@@ -808,7 +808,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
808
808
|
}
|
|
809
809
|
async run(accessor) {
|
|
810
810
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
811
|
-
title: ( localize(
|
|
811
|
+
title: ( localize(6710, 'Select a local folder to continue working in')),
|
|
812
812
|
canSelectFolders: true,
|
|
813
813
|
canSelectMany: false,
|
|
814
814
|
canSelectFiles: false,
|
|
@@ -822,7 +822,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
822
822
|
}
|
|
823
823
|
}));
|
|
824
824
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
825
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
825
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(6711, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
async pickContinueEditSessionDestination() {
|
|
@@ -832,7 +832,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
832
832
|
? this.contextService.getWorkspace().folders[0].name
|
|
833
833
|
: ( this.contextService.getWorkspace().folders.map((folder) => folder.name)).join(', ');
|
|
834
834
|
quickPick.placeholder = ( localize(
|
|
835
|
-
|
|
835
|
+
6712,
|
|
836
836
|
"Select a development environment to continue working on {0} in",
|
|
837
837
|
`'${workspaceContext}'`
|
|
838
838
|
));
|
|
@@ -893,7 +893,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
893
893
|
createPickItems() {
|
|
894
894
|
const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
|
|
895
895
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
896
|
-
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(
|
|
896
|
+
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(6713, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(6714, 'Built-in')))));
|
|
897
897
|
}
|
|
898
898
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
899
899
|
return sortedItems.concat({ type: 'separator' }, ( new ContinueEditSessionItem(
|
|
@@ -944,7 +944,7 @@ class ContinueEditSessionItem {
|
|
|
944
944
|
if (documentation !== undefined) {
|
|
945
945
|
this.buttons = [{
|
|
946
946
|
iconClass: infoButtonClass,
|
|
947
|
-
tooltip: ( localize(
|
|
947
|
+
tooltip: ( localize(6715, 'Learn More')),
|
|
948
948
|
}];
|
|
949
949
|
}
|
|
950
950
|
}
|
|
@@ -953,7 +953,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
953
953
|
extensionPoint: 'continueEditSession',
|
|
954
954
|
jsonSchema: {
|
|
955
955
|
description: ( localize(
|
|
956
|
-
|
|
956
|
+
6716,
|
|
957
957
|
'Contributes options for continuing the current edit session in a different environment'
|
|
958
958
|
)),
|
|
959
959
|
type: 'array',
|
|
@@ -962,35 +962,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
962
962
|
properties: {
|
|
963
963
|
command: {
|
|
964
964
|
description: ( localize(
|
|
965
|
-
|
|
965
|
+
6717,
|
|
966
966
|
'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.'
|
|
967
967
|
)),
|
|
968
968
|
type: 'string'
|
|
969
969
|
},
|
|
970
970
|
group: {
|
|
971
|
-
description: ( localize(
|
|
971
|
+
description: ( localize(6718, 'Group into which this item belongs.')),
|
|
972
972
|
type: 'string'
|
|
973
973
|
},
|
|
974
974
|
qualifiedName: {
|
|
975
975
|
description: ( localize(
|
|
976
|
-
|
|
976
|
+
6719,
|
|
977
977
|
'A fully qualified name for this item which is used for display in menus.'
|
|
978
978
|
)),
|
|
979
979
|
type: 'string'
|
|
980
980
|
},
|
|
981
981
|
description: {
|
|
982
982
|
description: ( localize(
|
|
983
|
-
|
|
983
|
+
6720,
|
|
984
984
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
985
985
|
)),
|
|
986
986
|
type: 'string'
|
|
987
987
|
},
|
|
988
988
|
remoteGroup: {
|
|
989
|
-
description: ( localize(
|
|
989
|
+
description: ( localize(6721, 'Group into which this item belongs in the remote indicator.')),
|
|
990
990
|
type: 'string'
|
|
991
991
|
},
|
|
992
992
|
when: {
|
|
993
|
-
description: ( localize(
|
|
993
|
+
description: ( localize(6722, 'Condition which must be true to show this item.')),
|
|
994
994
|
type: 'string'
|
|
995
995
|
}
|
|
996
996
|
},
|
|
@@ -1007,16 +1007,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1007
1007
|
enum: ['onShutdown', 'off'],
|
|
1008
1008
|
enumDescriptions: [
|
|
1009
1009
|
( localize(
|
|
1010
|
-
|
|
1010
|
+
6723,
|
|
1011
1011
|
"Automatically store current working changes in the cloud on window close."
|
|
1012
1012
|
)),
|
|
1013
|
-
( localize(
|
|
1013
|
+
( localize(6724, "Never attempt to automatically store working changes in the cloud."))
|
|
1014
1014
|
],
|
|
1015
1015
|
'type': 'string',
|
|
1016
1016
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1017
1017
|
'default': 'off',
|
|
1018
1018
|
'markdownDescription': ( localize(
|
|
1019
|
-
|
|
1019
|
+
6725,
|
|
1020
1020
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1021
1021
|
)),
|
|
1022
1022
|
},
|
|
@@ -1024,16 +1024,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1024
1024
|
enum: ['onReload', 'off'],
|
|
1025
1025
|
enumDescriptions: [
|
|
1026
1026
|
( localize(
|
|
1027
|
-
|
|
1027
|
+
6726,
|
|
1028
1028
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1029
1029
|
)),
|
|
1030
|
-
( localize(
|
|
1030
|
+
( localize(6727, "Never attempt to resume working changes from the cloud."))
|
|
1031
1031
|
],
|
|
1032
1032
|
'type': 'string',
|
|
1033
1033
|
'tags': ['usesOnlineServices'],
|
|
1034
1034
|
'default': 'onReload',
|
|
1035
1035
|
'markdownDescription': ( localize(
|
|
1036
|
-
|
|
1036
|
+
6728,
|
|
1037
1037
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1038
1038
|
)),
|
|
1039
1039
|
},
|
|
@@ -1041,11 +1041,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1041
1041
|
enum: ['prompt', 'off'],
|
|
1042
1042
|
enumDescriptions: [
|
|
1043
1043
|
( localize(
|
|
1044
|
-
|
|
1044
|
+
6729,
|
|
1045
1045
|
'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
|
|
1046
1046
|
)),
|
|
1047
1047
|
( localize(
|
|
1048
|
-
|
|
1048
|
+
6730,
|
|
1049
1049
|
'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
|
|
1050
1050
|
))
|
|
1051
1051
|
],
|
|
@@ -1053,7 +1053,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1053
1053
|
tags: ['usesOnlineServices'],
|
|
1054
1054
|
default: 'prompt',
|
|
1055
1055
|
markdownDescription: ( localize(
|
|
1056
|
-
|
|
1056
|
+
6731,
|
|
1057
1057
|
'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
|
|
1058
1058
|
))
|
|
1059
1059
|
},
|
|
@@ -1062,7 +1062,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1062
1062
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1063
1063
|
'default': false,
|
|
1064
1064
|
'markdownDescription': ( localize(
|
|
1065
|
-
|
|
1065
|
+
6732,
|
|
1066
1066
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1067
1067
|
))
|
|
1068
1068
|
}
|
|
@@ -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(6733, "Select an account to restore your working changes from the cloud")) : ( localize(6734, "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(6735, "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(6736, "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(6737, "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(6738, '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(6739, '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(6740, '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(6741, 'Do you want to disable storing working changes in the cloud?')),
|
|
401
|
+
checkbox: { label: ( localize(6742, '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
|
+
6743,
|
|
56
56
|
'You have no stored changes in the cloud to display.\n{0}',
|
|
57
|
-
`[${( localize(
|
|
57
|
+
`[${( localize(6744, '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(6745, "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(6746, "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(6747, "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
|
+
6748,
|
|
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(6749, ' 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(6750, "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
|
+
6751,
|
|
147
147
|
'Are you sure you want to permanently delete all stored changes from the cloud?'
|
|
148
148
|
)),
|
|
149
|
-
detail: ( localize(
|
|
149
|
+
detail: ( localize(6752, ' 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(6753, 'Compare Changes')),
|
|
262
262
|
arguments: [
|
|
263
263
|
localCopy,
|
|
264
264
|
cloudChangeUri,
|
|
265
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
265
|
+
`${basename(change.relativeFilePath)} (${( localize(6754, 'Local Copy'))} \u2194 ${( localize(6755, '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(6756, '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(6757, '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(6757, 'Cloud Changes'));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(6758, '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(6759, "Cloud Changes")), group: windowLogGroup }));
|
|
15
15
|
}
|
|
16
16
|
trace(message, ...args) {
|
|
17
17
|
this.logger.trace(message, ...args);
|