@codingame/monaco-vscode-edit-sessions-service-override 23.0.3 → 23.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- 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": "23.0.
|
|
3
|
+
"version": "23.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - edit-sessions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-05c09f77-cd1d-5960-b387-e7023df3160b-common": "23.0.
|
|
19
|
-
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "23.0.
|
|
20
|
-
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.
|
|
21
|
-
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "23.0.
|
|
22
|
-
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.
|
|
23
|
-
"@codingame/monaco-vscode-api": "23.0.
|
|
24
|
-
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.0.
|
|
18
|
+
"@codingame/monaco-vscode-05c09f77-cd1d-5960-b387-e7023df3160b-common": "23.0.4",
|
|
19
|
+
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "23.0.4",
|
|
20
|
+
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.4",
|
|
21
|
+
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "23.0.4",
|
|
22
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.4",
|
|
23
|
+
"@codingame/monaco-vscode-api": "23.0.4",
|
|
24
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.0.4"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"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(6997, '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(6998, '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(6999, "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(7000, '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(7001, '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(7002, '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(7003, '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(7004, '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(7005, '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(7006, '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(7007, '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(7008, '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(7009, '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(7010, '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(7011, '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(7012, '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(7013, '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
|
+
7014,
|
|
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
|
+
7015,
|
|
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
|
+
7016,
|
|
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(7017, "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
|
+
7018,
|
|
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(7019, '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(7020, '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
|
+
7021,
|
|
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(7020, '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(7022, '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(7023, "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(7024, "Yes, continue with my working changes")) };
|
|
718
|
+
const withoutCloudChanges = { label: ( localize(7025, "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(7026, '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(7027, '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
|
+
7028,
|
|
836
836
|
"Select a development environment to continue working on {0} in",
|
|
837
837
|
`'${workspaceContext}'`
|
|
838
838
|
));
|
|
@@ -895,7 +895,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
895
895
|
createPickItems() {
|
|
896
896
|
const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
|
|
897
897
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
898
|
-
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(
|
|
898
|
+
items.push(( new ContinueEditSessionItem('$(folder) ' + ( localize(7029, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(7030, 'Built-in')))));
|
|
899
899
|
}
|
|
900
900
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
901
901
|
return sortedItems.concat({ type: 'separator' }, ( new ContinueEditSessionItem(
|
|
@@ -946,7 +946,7 @@ class ContinueEditSessionItem {
|
|
|
946
946
|
if (documentation !== undefined) {
|
|
947
947
|
this.buttons = [{
|
|
948
948
|
iconClass: infoButtonClass,
|
|
949
|
-
tooltip: ( localize(
|
|
949
|
+
tooltip: ( localize(7031, 'Learn More')),
|
|
950
950
|
}];
|
|
951
951
|
}
|
|
952
952
|
}
|
|
@@ -955,7 +955,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
955
955
|
extensionPoint: 'continueEditSession',
|
|
956
956
|
jsonSchema: {
|
|
957
957
|
description: ( localize(
|
|
958
|
-
|
|
958
|
+
7032,
|
|
959
959
|
'Contributes options for continuing the current edit session in a different environment'
|
|
960
960
|
)),
|
|
961
961
|
type: 'array',
|
|
@@ -964,35 +964,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
964
964
|
properties: {
|
|
965
965
|
command: {
|
|
966
966
|
description: ( localize(
|
|
967
|
-
|
|
967
|
+
7033,
|
|
968
968
|
'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.'
|
|
969
969
|
)),
|
|
970
970
|
type: 'string'
|
|
971
971
|
},
|
|
972
972
|
group: {
|
|
973
|
-
description: ( localize(
|
|
973
|
+
description: ( localize(7034, 'Group into which this item belongs.')),
|
|
974
974
|
type: 'string'
|
|
975
975
|
},
|
|
976
976
|
qualifiedName: {
|
|
977
977
|
description: ( localize(
|
|
978
|
-
|
|
978
|
+
7035,
|
|
979
979
|
'A fully qualified name for this item which is used for display in menus.'
|
|
980
980
|
)),
|
|
981
981
|
type: 'string'
|
|
982
982
|
},
|
|
983
983
|
description: {
|
|
984
984
|
description: ( localize(
|
|
985
|
-
|
|
985
|
+
7036,
|
|
986
986
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
987
987
|
)),
|
|
988
988
|
type: 'string'
|
|
989
989
|
},
|
|
990
990
|
remoteGroup: {
|
|
991
|
-
description: ( localize(
|
|
991
|
+
description: ( localize(7037, 'Group into which this item belongs in the remote indicator.')),
|
|
992
992
|
type: 'string'
|
|
993
993
|
},
|
|
994
994
|
when: {
|
|
995
|
-
description: ( localize(
|
|
995
|
+
description: ( localize(7038, 'Condition which must be true to show this item.')),
|
|
996
996
|
type: 'string'
|
|
997
997
|
}
|
|
998
998
|
},
|
|
@@ -1009,16 +1009,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1009
1009
|
enum: ['onShutdown', 'off'],
|
|
1010
1010
|
enumDescriptions: [
|
|
1011
1011
|
( localize(
|
|
1012
|
-
|
|
1012
|
+
7039,
|
|
1013
1013
|
"Automatically store current working changes in the cloud on window close."
|
|
1014
1014
|
)),
|
|
1015
|
-
( localize(
|
|
1015
|
+
( localize(7040, "Never attempt to automatically store working changes in the cloud."))
|
|
1016
1016
|
],
|
|
1017
1017
|
'type': 'string',
|
|
1018
1018
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1019
1019
|
'default': 'off',
|
|
1020
1020
|
'markdownDescription': ( localize(
|
|
1021
|
-
|
|
1021
|
+
7041,
|
|
1022
1022
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1023
1023
|
)),
|
|
1024
1024
|
},
|
|
@@ -1026,16 +1026,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1026
1026
|
enum: ['onReload', 'off'],
|
|
1027
1027
|
enumDescriptions: [
|
|
1028
1028
|
( localize(
|
|
1029
|
-
|
|
1029
|
+
7042,
|
|
1030
1030
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1031
1031
|
)),
|
|
1032
|
-
( localize(
|
|
1032
|
+
( localize(7043, "Never attempt to resume working changes from the cloud."))
|
|
1033
1033
|
],
|
|
1034
1034
|
'type': 'string',
|
|
1035
1035
|
'tags': ['usesOnlineServices'],
|
|
1036
1036
|
'default': 'onReload',
|
|
1037
1037
|
'markdownDescription': ( localize(
|
|
1038
|
-
|
|
1038
|
+
7044,
|
|
1039
1039
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1040
1040
|
)),
|
|
1041
1041
|
},
|
|
@@ -1043,11 +1043,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1043
1043
|
enum: ['prompt', 'off'],
|
|
1044
1044
|
enumDescriptions: [
|
|
1045
1045
|
( localize(
|
|
1046
|
-
|
|
1046
|
+
7045,
|
|
1047
1047
|
'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
|
|
1048
1048
|
)),
|
|
1049
1049
|
( localize(
|
|
1050
|
-
|
|
1050
|
+
7046,
|
|
1051
1051
|
'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
|
|
1052
1052
|
))
|
|
1053
1053
|
],
|
|
@@ -1055,7 +1055,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1055
1055
|
tags: ['usesOnlineServices'],
|
|
1056
1056
|
default: 'prompt',
|
|
1057
1057
|
markdownDescription: ( localize(
|
|
1058
|
-
|
|
1058
|
+
7047,
|
|
1059
1059
|
'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
|
|
1060
1060
|
))
|
|
1061
1061
|
},
|
|
@@ -1064,7 +1064,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1064
1064
|
'tags': ['experimental', 'usesOnlineServices'],
|
|
1065
1065
|
'default': false,
|
|
1066
1066
|
'markdownDescription': ( localize(
|
|
1067
|
-
|
|
1067
|
+
7048,
|
|
1068
1068
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1069
1069
|
))
|
|
1070
1070
|
}
|
|
@@ -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(7049, "Select an account to restore your working changes from the cloud")) : ( localize(7050, "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(7051, "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(7052, "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(7053, "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(7054, '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(7055, '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(7056, '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(7057, 'Do you want to disable storing working changes in the cloud?')),
|
|
401
|
+
checkbox: { label: ( localize(7058, 'Delete all stored data from the cloud.')) }
|
|
402
402
|
});
|
|
403
403
|
if (result.confirmed) {
|
|
404
404
|
if (result.checkboxChecked) {
|
|
@@ -53,9 +53,9 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
53
53
|
}], container);
|
|
54
54
|
viewsRegistry.registerViewWelcomeContent(viewId, {
|
|
55
55
|
content: ( localize(
|
|
56
|
-
|
|
56
|
+
7059,
|
|
57
57
|
'You have no stored changes in the cloud to display.\n{0}',
|
|
58
|
-
`[${( localize(
|
|
58
|
+
`[${( localize(7060, 'Store Working Changes'))}](${createCommandUri('workbench.editSessions.actions.store')})`
|
|
59
59
|
)),
|
|
60
60
|
when: ( ContextKeyExpr.equals(EDIT_SESSIONS_COUNT_KEY, 0)),
|
|
61
61
|
order: 1
|
|
@@ -64,7 +64,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
64
64
|
constructor() {
|
|
65
65
|
super({
|
|
66
66
|
id: 'workbench.editSessions.actions.resume',
|
|
67
|
-
title: ( localize(
|
|
67
|
+
title: ( localize(7061, "Resume Working Changes")),
|
|
68
68
|
icon: Codicon.desktopDownload,
|
|
69
69
|
menu: {
|
|
70
70
|
id: MenuId.ViewItemContext,
|
|
@@ -84,7 +84,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
84
84
|
constructor() {
|
|
85
85
|
super({
|
|
86
86
|
id: 'workbench.editSessions.actions.store',
|
|
87
|
-
title: ( localize(
|
|
87
|
+
title: ( localize(7062, "Store Working Changes")),
|
|
88
88
|
icon: Codicon.cloudUpload,
|
|
89
89
|
});
|
|
90
90
|
}
|
|
@@ -98,7 +98,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
98
98
|
constructor() {
|
|
99
99
|
super({
|
|
100
100
|
id: 'workbench.editSessions.actions.delete',
|
|
101
|
-
title: ( localize(
|
|
101
|
+
title: ( localize(7063, "Delete Working Changes")),
|
|
102
102
|
icon: Codicon.trash,
|
|
103
103
|
menu: {
|
|
104
104
|
id: MenuId.ViewItemContext,
|
|
@@ -113,11 +113,11 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
113
113
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
114
114
|
const result = await dialogService.confirm({
|
|
115
115
|
message: ( localize(
|
|
116
|
-
|
|
116
|
+
7064,
|
|
117
117
|
'Are you sure you want to permanently delete your working changes with ref {0}?',
|
|
118
118
|
editSessionId
|
|
119
119
|
)),
|
|
120
|
-
detail: ( localize(
|
|
120
|
+
detail: ( localize(7065, ' You cannot undo this action.')),
|
|
121
121
|
type: 'warning',
|
|
122
122
|
title: EDIT_SESSIONS_TITLE.value
|
|
123
123
|
});
|
|
@@ -131,7 +131,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
131
131
|
constructor() {
|
|
132
132
|
super({
|
|
133
133
|
id: 'workbench.editSessions.actions.deleteAll',
|
|
134
|
-
title: ( localize(
|
|
134
|
+
title: ( localize(7066, "Delete All Working Changes from Cloud")),
|
|
135
135
|
icon: Codicon.trash,
|
|
136
136
|
menu: {
|
|
137
137
|
id: MenuId.ViewTitle,
|
|
@@ -144,10 +144,10 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
144
144
|
const editSessionStorageService = accessor.get(IEditSessionsStorageService);
|
|
145
145
|
const result = await dialogService.confirm({
|
|
146
146
|
message: ( localize(
|
|
147
|
-
|
|
147
|
+
7067,
|
|
148
148
|
'Are you sure you want to permanently delete all stored changes from the cloud?'
|
|
149
149
|
)),
|
|
150
|
-
detail: ( localize(
|
|
150
|
+
detail: ( localize(7068, ' You cannot undo this action.')),
|
|
151
151
|
type: 'warning',
|
|
152
152
|
title: EDIT_SESSIONS_TITLE.value
|
|
153
153
|
});
|
|
@@ -259,11 +259,11 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
259
259
|
themeIcon: Codicon.file,
|
|
260
260
|
command: {
|
|
261
261
|
id: 'vscode.diff',
|
|
262
|
-
title: ( localize(
|
|
262
|
+
title: ( localize(7069, 'Compare Changes')),
|
|
263
263
|
arguments: [
|
|
264
264
|
localCopy,
|
|
265
265
|
cloudChangeUri,
|
|
266
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
266
|
+
`${basename(change.relativeFilePath)} (${( localize(7070, 'Local Copy'))} \u2194 ${( localize(7071, 'Cloud Changes'))})`,
|
|
267
267
|
undefined
|
|
268
268
|
]
|
|
269
269
|
}
|
|
@@ -278,7 +278,7 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
278
278
|
themeIcon: Codicon.file,
|
|
279
279
|
command: {
|
|
280
280
|
id: API_OPEN_EDITOR_COMMAND_ID,
|
|
281
|
-
title: ( localize(
|
|
281
|
+
title: ( localize(7072, 'Open File')),
|
|
282
282
|
arguments: [cloudChangeUri, undefined, undefined]
|
|
283
283
|
}
|
|
284
284
|
};
|
|
@@ -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(7073, '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(7073, 'Cloud Changes'));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(7074, '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(7075, "Cloud Changes")), group: windowLogGroup }));
|
|
15
15
|
}
|
|
16
16
|
trace(message, ...args) {
|
|
17
17
|
this.logger.trace(message, ...args);
|