@codingame/monaco-vscode-edit-sessions-service-override 37.6.1 → 38.0.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 +53 -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": "
|
|
3
|
+
"version": "38.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - edit-sessions service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "38.0.1"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { NotificationText } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationMessage';
|
|
4
5
|
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
5
6
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
6
7
|
import { ShutdownReason, LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
@@ -80,24 +81,24 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
|
|
|
80
81
|
var EditSessionsContribution_1;
|
|
81
82
|
const continueWorkingOnCommand = {
|
|
82
83
|
id: "_workbench.editSessions.actions.continueEditSession",
|
|
83
|
-
title: ( localize2(
|
|
84
|
+
title: ( localize2(16699, "Continue Working On...")),
|
|
84
85
|
precondition: ( WorkspaceFolderCountContext.notEqualsTo("0")),
|
|
85
86
|
f1: true
|
|
86
87
|
};
|
|
87
88
|
const openLocalFolderCommand = {
|
|
88
89
|
id: "_workbench.editSessions.actions.continueEditSession.openLocalFolder",
|
|
89
|
-
title: ( localize2(
|
|
90
|
+
title: ( localize2(16700, "Open In Local Folder")),
|
|
90
91
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
91
92
|
precondition: ( ContextKeyExpr.and(( IsWebContext.toNegated()), VirtualWorkspaceContext))
|
|
92
93
|
};
|
|
93
94
|
const showOutputChannelCommand = {
|
|
94
95
|
id: "workbench.editSessions.actions.showOutputChannel",
|
|
95
|
-
title: ( localize2(
|
|
96
|
+
title: ( localize2(16701, "Show Log")),
|
|
96
97
|
category: EDIT_SESSION_SYNC_CATEGORY
|
|
97
98
|
};
|
|
98
99
|
const installAdditionalContinueOnOptionsCommand = {
|
|
99
100
|
id: "workbench.action.continueOn.extensions",
|
|
100
|
-
title: ( localize(
|
|
101
|
+
title: ( localize(16702, "Install additional development environment options"))
|
|
101
102
|
};
|
|
102
103
|
registerAction2(class extends Action2 {
|
|
103
104
|
constructor() {
|
|
@@ -110,7 +111,7 @@ registerAction2(class extends Action2 {
|
|
|
110
111
|
return accessor.get(IExtensionsWorkbenchService).openSearch("@tag:continueOn");
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
|
-
const resumeProgressOptionsTitle =
|
|
114
|
+
const resumeProgressOptionsTitle = NotificationText.link(( localize(16703, "Resuming working changes...")), `command:${showOutputChannelCommand.id}`);
|
|
114
115
|
const resumeProgressOptions = {
|
|
115
116
|
location: ProgressLocation.Window,
|
|
116
117
|
type: "syncing"
|
|
@@ -221,7 +222,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
221
222
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue("workbench.experimental.cloudChanges.autoStore") === "onShutdown" && !isWeb) {
|
|
222
223
|
e.join(this.autoStoreEditSession(), {
|
|
223
224
|
id: "autoStoreWorkingChanges",
|
|
224
|
-
label: ( localize(
|
|
225
|
+
label: ( localize(16704, "Storing current working changes..."))
|
|
225
226
|
});
|
|
226
227
|
}
|
|
227
228
|
}));
|
|
@@ -311,7 +312,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
311
312
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
312
313
|
return this.accountsMenuBadgeDisposable.clear();
|
|
313
314
|
}
|
|
314
|
-
const badge = ( new NumberBadge(1, () => ( localize(
|
|
315
|
+
const badge = ( new NumberBadge(1, () => ( localize(16705, "Check for pending cloud changes"))));
|
|
315
316
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({
|
|
316
317
|
badge
|
|
317
318
|
});
|
|
@@ -321,7 +322,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
321
322
|
await this.progressService.withProgress({
|
|
322
323
|
location: ProgressLocation.Window,
|
|
323
324
|
type: "syncing",
|
|
324
|
-
title: ( localize(
|
|
325
|
+
title: ( localize(16706, "Storing working changes..."))
|
|
325
326
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
326
327
|
cancellationTokenSource.cancel();
|
|
327
328
|
cancellationTokenSource.dispose();
|
|
@@ -366,7 +367,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
366
367
|
constructor() {
|
|
367
368
|
super({
|
|
368
369
|
id: "workbench.editSessions.actions.showEditSessions",
|
|
369
|
-
title: ( localize2(
|
|
370
|
+
title: ( localize2(16707, "Show Cloud Changes")),
|
|
370
371
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
371
372
|
f1: true
|
|
372
373
|
});
|
|
@@ -405,7 +406,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
405
406
|
location: ProgressLocation.Notification,
|
|
406
407
|
cancellable: true,
|
|
407
408
|
type: "syncing",
|
|
408
|
-
title: ( localize(
|
|
409
|
+
title: ( localize(16708, "Storing your working changes..."))
|
|
409
410
|
}, async () => {
|
|
410
411
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
411
412
|
if (ref !== undefined) {
|
|
@@ -465,7 +466,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
465
466
|
constructor() {
|
|
466
467
|
super({
|
|
467
468
|
id: "workbench.editSessions.actions.resumeLatest",
|
|
468
|
-
title: ( localize2(
|
|
469
|
+
title: ( localize2(16709, "Resume Latest Changes from Cloud")),
|
|
469
470
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
470
471
|
f1: true
|
|
471
472
|
});
|
|
@@ -481,7 +482,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
481
482
|
constructor() {
|
|
482
483
|
super({
|
|
483
484
|
id: "workbench.editSessions.actions.resumeFromSerializedPayload",
|
|
484
|
-
title: ( localize2(
|
|
485
|
+
title: ( localize2(16710, "Resume Changes from Serialized Data")),
|
|
485
486
|
category: "Developer",
|
|
486
487
|
f1: true
|
|
487
488
|
});
|
|
@@ -509,7 +510,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
509
510
|
constructor() {
|
|
510
511
|
super({
|
|
511
512
|
id: "workbench.editSessions.actions.storeCurrent",
|
|
512
|
-
title: ( localize2(
|
|
513
|
+
title: ( localize2(16711, "Store Working Changes in Cloud")),
|
|
513
514
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
514
515
|
f1: true
|
|
515
516
|
});
|
|
@@ -518,7 +519,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
518
519
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
519
520
|
await that.progressService.withProgress({
|
|
520
521
|
location: ProgressLocation.Notification,
|
|
521
|
-
title: ( localize(
|
|
522
|
+
title: ( localize(16712, "Storing working changes..."))
|
|
522
523
|
}, async () => {
|
|
523
524
|
that.telemetryService.publicLog2("editSessions.store");
|
|
524
525
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -550,7 +551,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
550
551
|
this.telemetryService.publicLog2("editSessions.resume");
|
|
551
552
|
performance.mark("code/willResumeEditSessionFromIdentifier");
|
|
552
553
|
progress?.report({
|
|
553
|
-
message: ( localize(
|
|
554
|
+
message: ( localize(16713, "Checking for pending cloud changes..."))
|
|
554
555
|
});
|
|
555
556
|
const data = serializedData ? {
|
|
556
557
|
content: serializedData,
|
|
@@ -558,9 +559,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
558
559
|
} : await this.editSessionsStorageService.read("editSessions", ref);
|
|
559
560
|
if (!data) {
|
|
560
561
|
if (ref === undefined && !silent) {
|
|
561
|
-
this.notificationService.info(( localize(
|
|
562
|
+
this.notificationService.info(( localize(16714, "There are no changes to resume from the cloud.")));
|
|
562
563
|
} else if (ref !== undefined) {
|
|
563
|
-
this.notificationService.warn(( localize(
|
|
564
|
+
this.notificationService.warn(( localize(16715, "Could not resume changes from the cloud for ID {0}.", ref)));
|
|
564
565
|
}
|
|
565
566
|
this.logService.info(
|
|
566
567
|
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`
|
|
@@ -574,7 +575,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
574
575
|
ref = data.ref;
|
|
575
576
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
576
577
|
this.notificationService.error(( localize(
|
|
577
|
-
|
|
578
|
+
16716,
|
|
578
579
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
579
580
|
this.productService.nameLong
|
|
580
581
|
)));
|
|
@@ -598,11 +599,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
598
599
|
} = await this.dialogService.confirm({
|
|
599
600
|
type: Severity.Warning,
|
|
600
601
|
message: conflictingChanges.length > 1 ? ( localize(
|
|
601
|
-
|
|
602
|
+
16717,
|
|
602
603
|
"Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?",
|
|
603
604
|
conflictingChanges.length
|
|
604
605
|
)) : ( localize(
|
|
605
|
-
|
|
606
|
+
16718,
|
|
606
607
|
"Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?",
|
|
607
608
|
basename(conflictingChanges[0].uri)
|
|
608
609
|
)),
|
|
@@ -635,7 +636,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
635
636
|
});
|
|
636
637
|
} catch (ex) {
|
|
637
638
|
this.logService.error("Failed to resume edit session, reason: ", ( ex.toString()));
|
|
638
|
-
this.notificationService.error(( localize(
|
|
639
|
+
this.notificationService.error(( localize(16719, "Failed to resume your working changes from the cloud.")));
|
|
639
640
|
}
|
|
640
641
|
performance.mark("code/didResumeEditSessionFromIdentifier");
|
|
641
642
|
}
|
|
@@ -669,10 +670,10 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
669
670
|
} else if (match === EditSessionIdentityMatch.Partial && this.configurationService.getValue("workbench.experimental.cloudChanges.partialMatches.enabled") === true) {
|
|
670
671
|
if (!applyPartialMatch) {
|
|
671
672
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
672
|
-
|
|
673
|
+
16720,
|
|
673
674
|
"You have pending working changes in the cloud for this workspace. Would you like to resume them?"
|
|
674
675
|
)), [{
|
|
675
|
-
label: ( localize(
|
|
676
|
+
label: ( localize(16721, "Resume")),
|
|
676
677
|
run: () => this.resumeEditSession(ref, false, undefined, true)
|
|
677
678
|
}]);
|
|
678
679
|
} else {
|
|
@@ -797,7 +798,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
797
798
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
798
799
|
editSessionSize += contents.length;
|
|
799
800
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
800
|
-
this.notificationService.error(( localize(
|
|
801
|
+
this.notificationService.error(( localize(16722, "Your working changes exceed the size limit and cannot be stored.")));
|
|
801
802
|
return undefined;
|
|
802
803
|
}
|
|
803
804
|
workingChanges.push({
|
|
@@ -833,7 +834,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
833
834
|
);
|
|
834
835
|
if (fromStoreCommand) {
|
|
835
836
|
this.notificationService.info(( localize(
|
|
836
|
-
|
|
837
|
+
16723,
|
|
837
838
|
"Skipped storing working changes in the cloud as there are no edits to store."
|
|
838
839
|
)));
|
|
839
840
|
}
|
|
@@ -857,13 +858,13 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
857
858
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
858
859
|
reason: "TooLarge"
|
|
859
860
|
});
|
|
860
|
-
this.notificationService.error(( localize(
|
|
861
|
+
this.notificationService.error(( localize(16722, "Your working changes exceed the size limit and cannot be stored.")));
|
|
861
862
|
break;
|
|
862
863
|
default:
|
|
863
864
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
864
865
|
reason: "unknown"
|
|
865
866
|
});
|
|
866
|
-
this.notificationService.error(( localize(
|
|
867
|
+
this.notificationService.error(( localize(16724, "Your working changes cannot be stored.")));
|
|
867
868
|
break;
|
|
868
869
|
}
|
|
869
870
|
}
|
|
@@ -897,14 +898,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
897
898
|
if (this.hasEditSession()) {
|
|
898
899
|
const disposables = ( new DisposableStore());
|
|
899
900
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
900
|
-
quickpick.placeholder = ( localize(
|
|
901
|
+
quickpick.placeholder = ( localize(16725, "Select whether to bring your working changes with you"));
|
|
901
902
|
quickpick.ok = false;
|
|
902
903
|
quickpick.ignoreFocusOut = true;
|
|
903
904
|
const withCloudChanges = {
|
|
904
|
-
label: ( localize(
|
|
905
|
+
label: ( localize(16726, "Yes, continue with my working changes"))
|
|
905
906
|
};
|
|
906
907
|
const withoutCloudChanges = {
|
|
907
|
-
label: ( localize(
|
|
908
|
+
label: ( localize(16727, "No, continue without my working changes"))
|
|
908
909
|
};
|
|
909
910
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
910
911
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
@@ -1014,7 +1015,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1014
1015
|
}
|
|
1015
1016
|
async run(accessor) {
|
|
1016
1017
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
1017
|
-
title: ( localize(
|
|
1018
|
+
title: ( localize(16728, "Select a local folder to continue working in")),
|
|
1018
1019
|
canSelectFolders: true,
|
|
1019
1020
|
canSelectMany: false,
|
|
1020
1021
|
canSelectFiles: false,
|
|
@@ -1028,7 +1029,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1028
1029
|
}
|
|
1029
1030
|
}));
|
|
1030
1031
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1031
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
1032
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(16729, "Continue Working in Existing Local Folder")), undefined, openLocalFolderCommand.precondition, undefined);
|
|
1032
1033
|
}
|
|
1033
1034
|
}
|
|
1034
1035
|
async pickContinueEditSessionDestination() {
|
|
@@ -1038,7 +1039,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1038
1039
|
}));
|
|
1039
1040
|
const workspaceContext = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0].name : this.contextService.getWorkspace().folders.map(folder => folder.name).join(", ");
|
|
1040
1041
|
quickPick.placeholder = ( localize(
|
|
1041
|
-
|
|
1042
|
+
16730,
|
|
1042
1043
|
"Select a development environment to continue working on {0} in",
|
|
1043
1044
|
`'${workspaceContext}'`
|
|
1044
1045
|
));
|
|
@@ -1117,7 +1118,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1117
1118
|
option => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when)
|
|
1118
1119
|
);
|
|
1119
1120
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1120
|
-
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(
|
|
1121
|
+
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(16731, "Open in Local Folder")), openLocalFolderCommand.id, ( localize(16732, "Built-in")))));
|
|
1121
1122
|
}
|
|
1122
1123
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
1123
1124
|
return sortedItems.concat({
|
|
@@ -1140,7 +1141,7 @@ class ContinueEditSessionItem {
|
|
|
1140
1141
|
if (documentation !== undefined) {
|
|
1141
1142
|
this.buttons = [{
|
|
1142
1143
|
iconClass: infoButtonClass,
|
|
1143
|
-
tooltip: ( localize(
|
|
1144
|
+
tooltip: ( localize(16733, "Learn More"))
|
|
1144
1145
|
}];
|
|
1145
1146
|
}
|
|
1146
1147
|
}
|
|
@@ -1149,7 +1150,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1149
1150
|
extensionPoint: "continueEditSession",
|
|
1150
1151
|
jsonSchema: {
|
|
1151
1152
|
description: ( localize(
|
|
1152
|
-
|
|
1153
|
+
16734,
|
|
1153
1154
|
"Contributes options for continuing the current edit session in a different environment"
|
|
1154
1155
|
)),
|
|
1155
1156
|
type: "array",
|
|
@@ -1158,35 +1159,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1158
1159
|
properties: {
|
|
1159
1160
|
command: {
|
|
1160
1161
|
description: ( localize(
|
|
1161
|
-
|
|
1162
|
+
16735,
|
|
1162
1163
|
"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."
|
|
1163
1164
|
)),
|
|
1164
1165
|
type: "string"
|
|
1165
1166
|
},
|
|
1166
1167
|
group: {
|
|
1167
|
-
description: ( localize(
|
|
1168
|
+
description: ( localize(16736, "Group into which this item belongs.")),
|
|
1168
1169
|
type: "string"
|
|
1169
1170
|
},
|
|
1170
1171
|
qualifiedName: {
|
|
1171
1172
|
description: ( localize(
|
|
1172
|
-
|
|
1173
|
+
16737,
|
|
1173
1174
|
"A fully qualified name for this item which is used for display in menus."
|
|
1174
1175
|
)),
|
|
1175
1176
|
type: "string"
|
|
1176
1177
|
},
|
|
1177
1178
|
description: {
|
|
1178
1179
|
description: ( localize(
|
|
1179
|
-
|
|
1180
|
+
16738,
|
|
1180
1181
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
1181
1182
|
)),
|
|
1182
1183
|
type: "string"
|
|
1183
1184
|
},
|
|
1184
1185
|
remoteGroup: {
|
|
1185
|
-
description: ( localize(
|
|
1186
|
+
description: ( localize(16739, "Group into which this item belongs in the remote indicator.")),
|
|
1186
1187
|
type: "string"
|
|
1187
1188
|
},
|
|
1188
1189
|
when: {
|
|
1189
|
-
description: ( localize(
|
|
1190
|
+
description: ( localize(16740, "Condition which must be true to show this item.")),
|
|
1190
1191
|
type: "string"
|
|
1191
1192
|
}
|
|
1192
1193
|
},
|
|
@@ -1202,48 +1203,48 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1202
1203
|
"workbench.experimental.cloudChanges.autoStore": {
|
|
1203
1204
|
enum: ["onShutdown", "off"],
|
|
1204
1205
|
enumDescriptions: [( localize(
|
|
1205
|
-
|
|
1206
|
+
16741,
|
|
1206
1207
|
"Automatically store current working changes in the cloud on window close."
|
|
1207
1208
|
)), ( localize(
|
|
1208
|
-
|
|
1209
|
+
16742,
|
|
1209
1210
|
"Never attempt to automatically store working changes in the cloud."
|
|
1210
1211
|
))],
|
|
1211
1212
|
"type": "string",
|
|
1212
1213
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1213
1214
|
"default": "off",
|
|
1214
1215
|
"markdownDescription": ( localize(
|
|
1215
|
-
|
|
1216
|
+
16743,
|
|
1216
1217
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1217
1218
|
))
|
|
1218
1219
|
},
|
|
1219
1220
|
"workbench.cloudChanges.autoResume": {
|
|
1220
1221
|
enum: ["onReload", "off"],
|
|
1221
1222
|
enumDescriptions: [( localize(
|
|
1222
|
-
|
|
1223
|
+
16744,
|
|
1223
1224
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1224
|
-
)), ( localize(
|
|
1225
|
+
)), ( localize(16745, "Never attempt to resume working changes from the cloud."))],
|
|
1225
1226
|
"type": "string",
|
|
1226
1227
|
"tags": ["usesOnlineServices"],
|
|
1227
1228
|
"default": "onReload",
|
|
1228
1229
|
"markdownDescription": ( localize(
|
|
1229
|
-
|
|
1230
|
+
16746,
|
|
1230
1231
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1231
1232
|
))
|
|
1232
1233
|
},
|
|
1233
1234
|
"workbench.cloudChanges.continueOn": {
|
|
1234
1235
|
enum: ["prompt", "off"],
|
|
1235
1236
|
enumDescriptions: [( localize(
|
|
1236
|
-
|
|
1237
|
+
16747,
|
|
1237
1238
|
"Prompt the user to sign in to store working changes in the cloud with Continue Working On."
|
|
1238
1239
|
)), ( localize(
|
|
1239
|
-
|
|
1240
|
+
16748,
|
|
1240
1241
|
"Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes."
|
|
1241
1242
|
))],
|
|
1242
1243
|
type: "string",
|
|
1243
1244
|
tags: ["usesOnlineServices"],
|
|
1244
1245
|
default: "prompt",
|
|
1245
1246
|
markdownDescription: ( localize(
|
|
1246
|
-
|
|
1247
|
+
16749,
|
|
1247
1248
|
"Controls whether to prompt the user to store working changes in the cloud when using Continue Working On."
|
|
1248
1249
|
))
|
|
1249
1250
|
},
|
|
@@ -1252,7 +1253,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1252
1253
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1253
1254
|
"default": false,
|
|
1254
1255
|
"markdownDescription": ( localize(
|
|
1255
|
-
|
|
1256
|
+
16750,
|
|
1256
1257
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1257
1258
|
))
|
|
1258
1259
|
}
|
|
@@ -282,7 +282,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
282
282
|
useSeparators: true
|
|
283
283
|
}));
|
|
284
284
|
quickpick.ok = false;
|
|
285
|
-
quickpick.placeholder = reason === "read" ? ( localize(
|
|
285
|
+
quickpick.placeholder = reason === "read" ? ( localize(16751, "Select an account to restore your working changes from the cloud")) : ( localize(16752, "Select an account to store your working changes in the cloud"));
|
|
286
286
|
quickpick.ignoreFocusOut = true;
|
|
287
287
|
quickpick.items = await this.createQuickpickItems();
|
|
288
288
|
return ( new Promise((resolve, reject) => {
|
|
@@ -306,20 +306,20 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
306
306
|
const options = [];
|
|
307
307
|
options.push({
|
|
308
308
|
type: "separator",
|
|
309
|
-
label: ( localize(
|
|
309
|
+
label: ( localize(16753, "Signed In"))
|
|
310
310
|
});
|
|
311
311
|
const sessions = await this.getAllSessions();
|
|
312
312
|
options.push(...sessions);
|
|
313
313
|
options.push({
|
|
314
314
|
type: "separator",
|
|
315
|
-
label: ( localize(
|
|
315
|
+
label: ( localize(16754, "Others"))
|
|
316
316
|
});
|
|
317
317
|
for (const authenticationProvider of (await this.getAuthenticationProviders())) {
|
|
318
318
|
const signedInForProvider = ( sessions.some(account => account.session.providerId === authenticationProvider.id));
|
|
319
319
|
if (!signedInForProvider || this.authenticationService.getProvider(authenticationProvider.id).supportsMultipleAccounts) {
|
|
320
320
|
const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
|
|
321
321
|
options.push({
|
|
322
|
-
label: ( localize(
|
|
322
|
+
label: ( localize(16755, "Sign in with {0}", providerName)),
|
|
323
323
|
provider: authenticationProvider
|
|
324
324
|
});
|
|
325
325
|
}
|
|
@@ -433,7 +433,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
433
433
|
constructor() {
|
|
434
434
|
super({
|
|
435
435
|
id,
|
|
436
|
-
title: ( localize(
|
|
436
|
+
title: ( localize(16756, "Turn on Cloud Changes...")),
|
|
437
437
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
438
438
|
precondition: when,
|
|
439
439
|
menu: [{
|
|
@@ -454,7 +454,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
454
454
|
group: "2_editSessions",
|
|
455
455
|
command: {
|
|
456
456
|
id,
|
|
457
|
-
title: ( localize(
|
|
457
|
+
title: ( localize(16757, "Turn on Cloud Changes... (1)"))
|
|
458
458
|
},
|
|
459
459
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals(EDIT_SESSIONS_PENDING_KEY, true)), ( ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, false))))
|
|
460
460
|
})));
|
|
@@ -466,7 +466,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
466
466
|
constructor() {
|
|
467
467
|
super({
|
|
468
468
|
id: "workbench.editSessions.actions.resetAuth",
|
|
469
|
-
title: ( localize(
|
|
469
|
+
title: ( localize(16758, "Turn off Cloud Changes...")),
|
|
470
470
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
471
471
|
precondition: ( ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true)),
|
|
472
472
|
menu: [{
|
|
@@ -480,9 +480,9 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
|
|
|
480
480
|
}
|
|
481
481
|
async run() {
|
|
482
482
|
const result = await that.dialogService.confirm({
|
|
483
|
-
message: ( localize(
|
|
483
|
+
message: ( localize(16759, "Do you want to disable storing working changes in the cloud?")),
|
|
484
484
|
checkbox: {
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(16760, "Delete all stored data from the cloud."))
|
|
486
486
|
}
|
|
487
487
|
});
|
|
488
488
|
if (result.confirmed) {
|
|
@@ -53,9 +53,9 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
|
|
|
53
53
|
}], container);
|
|
54
54
|
viewsRegistry.registerViewWelcomeContent(viewId, {
|
|
55
55
|
content: ( localize(
|
|
56
|
-
|
|
56
|
+
16761,
|
|
57
57
|
"You have no stored changes in the cloud to display.\n{0}",
|
|
58
|
-
`[${( localize(
|
|
58
|
+
`[${( localize(16762, "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(16763, "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(16764, "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(16765, "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
|
+
16766,
|
|
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(16767, " 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(16768, "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
|
+
16769,
|
|
148
148
|
"Are you sure you want to permanently delete all stored changes from the cloud?"
|
|
149
149
|
)),
|
|
150
|
-
detail: ( localize(
|
|
150
|
+
detail: ( localize(16770, " You cannot undo this action.")),
|
|
151
151
|
type: "warning",
|
|
152
152
|
title: EDIT_SESSIONS_TITLE.value
|
|
153
153
|
});
|
|
@@ -273,11 +273,11 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
273
273
|
themeIcon: Codicon.file,
|
|
274
274
|
command: {
|
|
275
275
|
id: "vscode.diff",
|
|
276
|
-
title: ( localize(
|
|
276
|
+
title: ( localize(16771, "Compare Changes")),
|
|
277
277
|
arguments: [
|
|
278
278
|
localCopy,
|
|
279
279
|
cloudChangeUri,
|
|
280
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
280
|
+
`${basename(change.relativeFilePath)} (${( localize(16772, "Local Copy"))} \u2194 ${( localize(16773, "Cloud Changes"))})`,
|
|
281
281
|
undefined
|
|
282
282
|
]
|
|
283
283
|
}
|
|
@@ -294,7 +294,7 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
|
|
|
294
294
|
themeIcon: Codicon.file,
|
|
295
295
|
command: {
|
|
296
296
|
id: API_OPEN_EDITOR_COMMAND_ID,
|
|
297
|
-
title: ( localize(
|
|
297
|
+
title: ( localize(16774, "Open File")),
|
|
298
298
|
arguments: [cloudChangeUri, undefined, undefined]
|
|
299
299
|
}
|
|
300
300
|
};
|
|
@@ -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(16775, "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(16775, "Cloud Changes"));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon("edit-sessions-view-icon", Codicon.cloudDownload, ( localize(16776, "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) {
|
|
@@ -14,7 +14,7 @@ let EditSessionsLogService = class EditSessionsLogService extends AbstractLogger
|
|
|
14
14
|
this.logger = this._register(
|
|
15
15
|
loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), {
|
|
16
16
|
id: editSessionsLogId,
|
|
17
|
-
name: ( localize(
|
|
17
|
+
name: ( localize(16777, "Cloud Changes")),
|
|
18
18
|
group: windowLogGroup
|
|
19
19
|
})
|
|
20
20
|
);
|