@codingame/monaco-vscode-edit-sessions-service-override 36.2.7 → 37.0.0
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 +57 -53
- 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": "37.0.0",
|
|
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": "37.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"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(11876, "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(11877, "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(11878, "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(11879, "Install additional development environment options"))
|
|
101
101
|
};
|
|
102
102
|
registerAction2(class extends Action2 {
|
|
103
103
|
constructor() {
|
|
@@ -110,7 +110,7 @@ registerAction2(class extends Action2 {
|
|
|
110
110
|
return accessor.get(IExtensionsWorkbenchService).openSearch("@tag:continueOn");
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
-
const resumeProgressOptionsTitle = `[${( localize(
|
|
113
|
+
const resumeProgressOptionsTitle = `[${( localize(11880, "Resuming working changes..."))}](command:${showOutputChannelCommand.id})`;
|
|
114
114
|
const resumeProgressOptions = {
|
|
115
115
|
location: ProgressLocation.Window,
|
|
116
116
|
type: "syncing"
|
|
@@ -221,7 +221,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
221
221
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue("workbench.experimental.cloudChanges.autoStore") === "onShutdown" && !isWeb) {
|
|
222
222
|
e.join(this.autoStoreEditSession(), {
|
|
223
223
|
id: "autoStoreWorkingChanges",
|
|
224
|
-
label: ( localize(
|
|
224
|
+
label: ( localize(11881, "Storing current working changes..."))
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
}));
|
|
@@ -311,7 +311,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
311
311
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
312
312
|
return this.accountsMenuBadgeDisposable.clear();
|
|
313
313
|
}
|
|
314
|
-
const badge = ( new NumberBadge(1, () => ( localize(
|
|
314
|
+
const badge = ( new NumberBadge(1, () => ( localize(11882, "Check for pending cloud changes"))));
|
|
315
315
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({
|
|
316
316
|
badge
|
|
317
317
|
});
|
|
@@ -321,7 +321,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
321
321
|
await this.progressService.withProgress({
|
|
322
322
|
location: ProgressLocation.Window,
|
|
323
323
|
type: "syncing",
|
|
324
|
-
title: ( localize(
|
|
324
|
+
title: ( localize(11883, "Storing working changes..."))
|
|
325
325
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
326
326
|
cancellationTokenSource.cancel();
|
|
327
327
|
cancellationTokenSource.dispose();
|
|
@@ -366,7 +366,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
366
366
|
constructor() {
|
|
367
367
|
super({
|
|
368
368
|
id: "workbench.editSessions.actions.showEditSessions",
|
|
369
|
-
title: ( localize2(
|
|
369
|
+
title: ( localize2(11884, "Show Cloud Changes")),
|
|
370
370
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
371
371
|
f1: true
|
|
372
372
|
});
|
|
@@ -405,7 +405,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
405
405
|
location: ProgressLocation.Notification,
|
|
406
406
|
cancellable: true,
|
|
407
407
|
type: "syncing",
|
|
408
|
-
title: ( localize(
|
|
408
|
+
title: ( localize(11885, "Storing your working changes..."))
|
|
409
409
|
}, async () => {
|
|
410
410
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
411
411
|
if (ref !== undefined) {
|
|
@@ -465,7 +465,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
465
465
|
constructor() {
|
|
466
466
|
super({
|
|
467
467
|
id: "workbench.editSessions.actions.resumeLatest",
|
|
468
|
-
title: ( localize2(
|
|
468
|
+
title: ( localize2(11886, "Resume Latest Changes from Cloud")),
|
|
469
469
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
470
470
|
f1: true
|
|
471
471
|
});
|
|
@@ -481,7 +481,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
481
481
|
constructor() {
|
|
482
482
|
super({
|
|
483
483
|
id: "workbench.editSessions.actions.resumeFromSerializedPayload",
|
|
484
|
-
title: ( localize2(
|
|
484
|
+
title: ( localize2(11887, "Resume Changes from Serialized Data")),
|
|
485
485
|
category: "Developer",
|
|
486
486
|
f1: true
|
|
487
487
|
});
|
|
@@ -509,7 +509,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
509
509
|
constructor() {
|
|
510
510
|
super({
|
|
511
511
|
id: "workbench.editSessions.actions.storeCurrent",
|
|
512
|
-
title: ( localize2(
|
|
512
|
+
title: ( localize2(11888, "Store Working Changes in Cloud")),
|
|
513
513
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
514
514
|
f1: true
|
|
515
515
|
});
|
|
@@ -518,7 +518,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
518
518
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
519
519
|
await that.progressService.withProgress({
|
|
520
520
|
location: ProgressLocation.Notification,
|
|
521
|
-
title: ( localize(
|
|
521
|
+
title: ( localize(11889, "Storing working changes..."))
|
|
522
522
|
}, async () => {
|
|
523
523
|
that.telemetryService.publicLog2("editSessions.store");
|
|
524
524
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -550,7 +550,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
550
550
|
this.telemetryService.publicLog2("editSessions.resume");
|
|
551
551
|
performance.mark("code/willResumeEditSessionFromIdentifier");
|
|
552
552
|
progress?.report({
|
|
553
|
-
message: ( localize(
|
|
553
|
+
message: ( localize(11890, "Checking for pending cloud changes..."))
|
|
554
554
|
});
|
|
555
555
|
const data = serializedData ? {
|
|
556
556
|
content: serializedData,
|
|
@@ -558,9 +558,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
558
558
|
} : await this.editSessionsStorageService.read("editSessions", ref);
|
|
559
559
|
if (!data) {
|
|
560
560
|
if (ref === undefined && !silent) {
|
|
561
|
-
this.notificationService.info(( localize(
|
|
561
|
+
this.notificationService.info(( localize(11891, "There are no changes to resume from the cloud.")));
|
|
562
562
|
} else if (ref !== undefined) {
|
|
563
|
-
this.notificationService.warn(( localize(
|
|
563
|
+
this.notificationService.warn(( localize(11892, "Could not resume changes from the cloud for ID {0}.", ref)));
|
|
564
564
|
}
|
|
565
565
|
this.logService.info(
|
|
566
566
|
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 +574,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
574
574
|
ref = data.ref;
|
|
575
575
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
576
576
|
this.notificationService.error(( localize(
|
|
577
|
-
|
|
577
|
+
11893,
|
|
578
578
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
579
579
|
this.productService.nameLong
|
|
580
580
|
)));
|
|
@@ -598,11 +598,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
598
598
|
} = await this.dialogService.confirm({
|
|
599
599
|
type: Severity.Warning,
|
|
600
600
|
message: conflictingChanges.length > 1 ? ( localize(
|
|
601
|
-
|
|
601
|
+
11894,
|
|
602
602
|
"Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?",
|
|
603
603
|
conflictingChanges.length
|
|
604
604
|
)) : ( localize(
|
|
605
|
-
|
|
605
|
+
11895,
|
|
606
606
|
"Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?",
|
|
607
607
|
basename(conflictingChanges[0].uri)
|
|
608
608
|
)),
|
|
@@ -635,7 +635,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
635
635
|
});
|
|
636
636
|
} catch (ex) {
|
|
637
637
|
this.logService.error("Failed to resume edit session, reason: ", ( ex.toString()));
|
|
638
|
-
this.notificationService.error(( localize(
|
|
638
|
+
this.notificationService.error(( localize(11896, "Failed to resume your working changes from the cloud.")));
|
|
639
639
|
}
|
|
640
640
|
performance.mark("code/didResumeEditSessionFromIdentifier");
|
|
641
641
|
}
|
|
@@ -669,10 +669,10 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
669
669
|
} else if (match === EditSessionIdentityMatch.Partial && this.configurationService.getValue("workbench.experimental.cloudChanges.partialMatches.enabled") === true) {
|
|
670
670
|
if (!applyPartialMatch) {
|
|
671
671
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
672
|
-
|
|
672
|
+
11897,
|
|
673
673
|
"You have pending working changes in the cloud for this workspace. Would you like to resume them?"
|
|
674
674
|
)), [{
|
|
675
|
-
label: ( localize(
|
|
675
|
+
label: ( localize(11898, "Resume")),
|
|
676
676
|
run: () => this.resumeEditSession(ref, false, undefined, true)
|
|
677
677
|
}]);
|
|
678
678
|
} else {
|
|
@@ -704,6 +704,10 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
704
704
|
}
|
|
705
705
|
for (const change of folder.workingChanges) {
|
|
706
706
|
const uri = joinPath(folderRoot.uri, change.relativeFilePath);
|
|
707
|
+
if (!this.uriIdentityService.extUri.isEqualOrParent(uri, folderRoot.uri) || this.uriIdentityService.extUri.isEqual(uri, folderRoot.uri)) {
|
|
708
|
+
this.logService.warn(`Skipping change outside workspace folder: ${change.relativeFilePath}`);
|
|
709
|
+
continue;
|
|
710
|
+
}
|
|
707
711
|
changes.push({
|
|
708
712
|
uri,
|
|
709
713
|
type: change.type,
|
|
@@ -793,7 +797,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
793
797
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
794
798
|
editSessionSize += contents.length;
|
|
795
799
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
796
|
-
this.notificationService.error(( localize(
|
|
800
|
+
this.notificationService.error(( localize(11899, "Your working changes exceed the size limit and cannot be stored.")));
|
|
797
801
|
return undefined;
|
|
798
802
|
}
|
|
799
803
|
workingChanges.push({
|
|
@@ -829,7 +833,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
829
833
|
);
|
|
830
834
|
if (fromStoreCommand) {
|
|
831
835
|
this.notificationService.info(( localize(
|
|
832
|
-
|
|
836
|
+
11900,
|
|
833
837
|
"Skipped storing working changes in the cloud as there are no edits to store."
|
|
834
838
|
)));
|
|
835
839
|
}
|
|
@@ -853,13 +857,13 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
853
857
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
854
858
|
reason: "TooLarge"
|
|
855
859
|
});
|
|
856
|
-
this.notificationService.error(( localize(
|
|
860
|
+
this.notificationService.error(( localize(11899, "Your working changes exceed the size limit and cannot be stored.")));
|
|
857
861
|
break;
|
|
858
862
|
default:
|
|
859
863
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
860
864
|
reason: "unknown"
|
|
861
865
|
});
|
|
862
|
-
this.notificationService.error(( localize(
|
|
866
|
+
this.notificationService.error(( localize(11901, "Your working changes cannot be stored.")));
|
|
863
867
|
break;
|
|
864
868
|
}
|
|
865
869
|
}
|
|
@@ -893,14 +897,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
893
897
|
if (this.hasEditSession()) {
|
|
894
898
|
const disposables = ( new DisposableStore());
|
|
895
899
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
896
|
-
quickpick.placeholder = ( localize(
|
|
900
|
+
quickpick.placeholder = ( localize(11902, "Select whether to bring your working changes with you"));
|
|
897
901
|
quickpick.ok = false;
|
|
898
902
|
quickpick.ignoreFocusOut = true;
|
|
899
903
|
const withCloudChanges = {
|
|
900
|
-
label: ( localize(
|
|
904
|
+
label: ( localize(11903, "Yes, continue with my working changes"))
|
|
901
905
|
};
|
|
902
906
|
const withoutCloudChanges = {
|
|
903
|
-
label: ( localize(
|
|
907
|
+
label: ( localize(11904, "No, continue without my working changes"))
|
|
904
908
|
};
|
|
905
909
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
906
910
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
@@ -934,7 +938,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
934
938
|
continueEditSessionExtPoint.setHandler(extensions => {
|
|
935
939
|
const continueEditSessionOptions = [];
|
|
936
940
|
for (const extension of extensions) {
|
|
937
|
-
if (!isProposedApiEnabled(extension.description)) {
|
|
941
|
+
if (!isProposedApiEnabled(extension.description, "contribEditSessions")) {
|
|
938
942
|
continue;
|
|
939
943
|
}
|
|
940
944
|
if (!Array.isArray(extension.value)) {
|
|
@@ -1010,7 +1014,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1010
1014
|
}
|
|
1011
1015
|
async run(accessor) {
|
|
1012
1016
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
1013
|
-
title: ( localize(
|
|
1017
|
+
title: ( localize(11905, "Select a local folder to continue working in")),
|
|
1014
1018
|
canSelectFolders: true,
|
|
1015
1019
|
canSelectMany: false,
|
|
1016
1020
|
canSelectFiles: false,
|
|
@@ -1024,7 +1028,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1024
1028
|
}
|
|
1025
1029
|
}));
|
|
1026
1030
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1027
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
1031
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(11906, "Continue Working in Existing Local Folder")), undefined, openLocalFolderCommand.precondition, undefined);
|
|
1028
1032
|
}
|
|
1029
1033
|
}
|
|
1030
1034
|
async pickContinueEditSessionDestination() {
|
|
@@ -1034,7 +1038,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1034
1038
|
}));
|
|
1035
1039
|
const workspaceContext = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0].name : ( this.contextService.getWorkspace().folders.map(folder => folder.name)).join(", ");
|
|
1036
1040
|
quickPick.placeholder = ( localize(
|
|
1037
|
-
|
|
1041
|
+
11907,
|
|
1038
1042
|
"Select a development environment to continue working on {0} in",
|
|
1039
1043
|
`'${workspaceContext}'`
|
|
1040
1044
|
));
|
|
@@ -1113,7 +1117,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1113
1117
|
option => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when)
|
|
1114
1118
|
);
|
|
1115
1119
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1116
|
-
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(
|
|
1120
|
+
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(11908, "Open in Local Folder")), openLocalFolderCommand.id, ( localize(11909, "Built-in")))));
|
|
1117
1121
|
}
|
|
1118
1122
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
1119
1123
|
return sortedItems.concat({
|
|
@@ -1136,7 +1140,7 @@ class ContinueEditSessionItem {
|
|
|
1136
1140
|
if (documentation !== undefined) {
|
|
1137
1141
|
this.buttons = [{
|
|
1138
1142
|
iconClass: infoButtonClass,
|
|
1139
|
-
tooltip: ( localize(
|
|
1143
|
+
tooltip: ( localize(11910, "Learn More"))
|
|
1140
1144
|
}];
|
|
1141
1145
|
}
|
|
1142
1146
|
}
|
|
@@ -1145,7 +1149,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1145
1149
|
extensionPoint: "continueEditSession",
|
|
1146
1150
|
jsonSchema: {
|
|
1147
1151
|
description: ( localize(
|
|
1148
|
-
|
|
1152
|
+
11911,
|
|
1149
1153
|
"Contributes options for continuing the current edit session in a different environment"
|
|
1150
1154
|
)),
|
|
1151
1155
|
type: "array",
|
|
@@ -1154,35 +1158,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1154
1158
|
properties: {
|
|
1155
1159
|
command: {
|
|
1156
1160
|
description: ( localize(
|
|
1157
|
-
|
|
1161
|
+
11912,
|
|
1158
1162
|
"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."
|
|
1159
1163
|
)),
|
|
1160
1164
|
type: "string"
|
|
1161
1165
|
},
|
|
1162
1166
|
group: {
|
|
1163
|
-
description: ( localize(
|
|
1167
|
+
description: ( localize(11913, "Group into which this item belongs.")),
|
|
1164
1168
|
type: "string"
|
|
1165
1169
|
},
|
|
1166
1170
|
qualifiedName: {
|
|
1167
1171
|
description: ( localize(
|
|
1168
|
-
|
|
1172
|
+
11914,
|
|
1169
1173
|
"A fully qualified name for this item which is used for display in menus."
|
|
1170
1174
|
)),
|
|
1171
1175
|
type: "string"
|
|
1172
1176
|
},
|
|
1173
1177
|
description: {
|
|
1174
1178
|
description: ( localize(
|
|
1175
|
-
|
|
1179
|
+
11915,
|
|
1176
1180
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
1177
1181
|
)),
|
|
1178
1182
|
type: "string"
|
|
1179
1183
|
},
|
|
1180
1184
|
remoteGroup: {
|
|
1181
|
-
description: ( localize(
|
|
1185
|
+
description: ( localize(11916, "Group into which this item belongs in the remote indicator.")),
|
|
1182
1186
|
type: "string"
|
|
1183
1187
|
},
|
|
1184
1188
|
when: {
|
|
1185
|
-
description: ( localize(
|
|
1189
|
+
description: ( localize(11917, "Condition which must be true to show this item.")),
|
|
1186
1190
|
type: "string"
|
|
1187
1191
|
}
|
|
1188
1192
|
},
|
|
@@ -1198,48 +1202,48 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1198
1202
|
"workbench.experimental.cloudChanges.autoStore": {
|
|
1199
1203
|
enum: ["onShutdown", "off"],
|
|
1200
1204
|
enumDescriptions: [( localize(
|
|
1201
|
-
|
|
1205
|
+
11918,
|
|
1202
1206
|
"Automatically store current working changes in the cloud on window close."
|
|
1203
1207
|
)), ( localize(
|
|
1204
|
-
|
|
1208
|
+
11919,
|
|
1205
1209
|
"Never attempt to automatically store working changes in the cloud."
|
|
1206
1210
|
))],
|
|
1207
1211
|
"type": "string",
|
|
1208
1212
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1209
1213
|
"default": "off",
|
|
1210
1214
|
"markdownDescription": ( localize(
|
|
1211
|
-
|
|
1215
|
+
11920,
|
|
1212
1216
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1213
1217
|
))
|
|
1214
1218
|
},
|
|
1215
1219
|
"workbench.cloudChanges.autoResume": {
|
|
1216
1220
|
enum: ["onReload", "off"],
|
|
1217
1221
|
enumDescriptions: [( localize(
|
|
1218
|
-
|
|
1222
|
+
11921,
|
|
1219
1223
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1220
|
-
)), ( localize(
|
|
1224
|
+
)), ( localize(11922, "Never attempt to resume working changes from the cloud."))],
|
|
1221
1225
|
"type": "string",
|
|
1222
1226
|
"tags": ["usesOnlineServices"],
|
|
1223
1227
|
"default": "onReload",
|
|
1224
1228
|
"markdownDescription": ( localize(
|
|
1225
|
-
|
|
1229
|
+
11923,
|
|
1226
1230
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1227
1231
|
))
|
|
1228
1232
|
},
|
|
1229
1233
|
"workbench.cloudChanges.continueOn": {
|
|
1230
1234
|
enum: ["prompt", "off"],
|
|
1231
1235
|
enumDescriptions: [( localize(
|
|
1232
|
-
|
|
1236
|
+
11924,
|
|
1233
1237
|
"Prompt the user to sign in to store working changes in the cloud with Continue Working On."
|
|
1234
1238
|
)), ( localize(
|
|
1235
|
-
|
|
1239
|
+
11925,
|
|
1236
1240
|
"Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes."
|
|
1237
1241
|
))],
|
|
1238
1242
|
type: "string",
|
|
1239
1243
|
tags: ["usesOnlineServices"],
|
|
1240
1244
|
default: "prompt",
|
|
1241
1245
|
markdownDescription: ( localize(
|
|
1242
|
-
|
|
1246
|
+
11926,
|
|
1243
1247
|
"Controls whether to prompt the user to store working changes in the cloud when using Continue Working On."
|
|
1244
1248
|
))
|
|
1245
1249
|
},
|
|
@@ -1248,7 +1252,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1248
1252
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1249
1253
|
"default": false,
|
|
1250
1254
|
"markdownDescription": ( localize(
|
|
1251
|
-
|
|
1255
|
+
11927,
|
|
1252
1256
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1253
1257
|
))
|
|
1254
1258
|
}
|
|
@@ -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(11928, "Select an account to restore your working changes from the cloud")) : ( localize(11929, "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(11930, "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(11931, "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(11932, "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(11933, "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(11934, "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(11935, "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(11936, "Do you want to disable storing working changes in the cloud?")),
|
|
484
484
|
checkbox: {
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(11937, "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
|
+
11938,
|
|
57
57
|
"You have no stored changes in the cloud to display.\n{0}",
|
|
58
|
-
`[${( localize(
|
|
58
|
+
`[${( localize(11939, "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(11940, "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(11941, "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(11942, "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
|
+
11943,
|
|
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(11944, " 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(11945, "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
|
+
11946,
|
|
148
148
|
"Are you sure you want to permanently delete all stored changes from the cloud?"
|
|
149
149
|
)),
|
|
150
|
-
detail: ( localize(
|
|
150
|
+
detail: ( localize(11947, " 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(11948, "Compare Changes")),
|
|
277
277
|
arguments: [
|
|
278
278
|
localCopy,
|
|
279
279
|
cloudChangeUri,
|
|
280
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
280
|
+
`${basename(change.relativeFilePath)} (${( localize(11949, "Local Copy"))} \u2194 ${( localize(11950, "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(11951, "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(11952, "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(11952, "Cloud Changes"));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon("edit-sessions-view-icon", Codicon.cloudDownload, ( localize(11953, "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(11954, "Cloud Changes")),
|
|
18
18
|
group: windowLogGroup
|
|
19
19
|
})
|
|
20
20
|
);
|