@codingame/monaco-vscode-edit-sessions-service-override 37.0.0 → 37.1.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 +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": "37.
|
|
3
|
+
"version": "37.1.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": "37.
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.1.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(12071, "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(12072, "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(12073, "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(12074, "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(12075, "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(12076, "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(12077, "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(12078, "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(12079, "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(12080, "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(12081, "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(12082, "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(12083, "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(12084, "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(12085, "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(12086, "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(12087, "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
|
+
12088,
|
|
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
|
+
12089,
|
|
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
|
+
12090,
|
|
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(12091, "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
|
+
12092,
|
|
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(12093, "Resume")),
|
|
676
676
|
run: () => this.resumeEditSession(ref, false, undefined, true)
|
|
677
677
|
}]);
|
|
678
678
|
} else {
|
|
@@ -797,7 +797,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
797
797
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
798
798
|
editSessionSize += contents.length;
|
|
799
799
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
800
|
-
this.notificationService.error(( localize(
|
|
800
|
+
this.notificationService.error(( localize(12094, "Your working changes exceed the size limit and cannot be stored.")));
|
|
801
801
|
return undefined;
|
|
802
802
|
}
|
|
803
803
|
workingChanges.push({
|
|
@@ -833,7 +833,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
833
833
|
);
|
|
834
834
|
if (fromStoreCommand) {
|
|
835
835
|
this.notificationService.info(( localize(
|
|
836
|
-
|
|
836
|
+
12095,
|
|
837
837
|
"Skipped storing working changes in the cloud as there are no edits to store."
|
|
838
838
|
)));
|
|
839
839
|
}
|
|
@@ -857,13 +857,13 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
857
857
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
858
858
|
reason: "TooLarge"
|
|
859
859
|
});
|
|
860
|
-
this.notificationService.error(( localize(
|
|
860
|
+
this.notificationService.error(( localize(12094, "Your working changes exceed the size limit and cannot be stored.")));
|
|
861
861
|
break;
|
|
862
862
|
default:
|
|
863
863
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
864
864
|
reason: "unknown"
|
|
865
865
|
});
|
|
866
|
-
this.notificationService.error(( localize(
|
|
866
|
+
this.notificationService.error(( localize(12096, "Your working changes cannot be stored.")));
|
|
867
867
|
break;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
@@ -897,14 +897,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
897
897
|
if (this.hasEditSession()) {
|
|
898
898
|
const disposables = ( new DisposableStore());
|
|
899
899
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
900
|
-
quickpick.placeholder = ( localize(
|
|
900
|
+
quickpick.placeholder = ( localize(12097, "Select whether to bring your working changes with you"));
|
|
901
901
|
quickpick.ok = false;
|
|
902
902
|
quickpick.ignoreFocusOut = true;
|
|
903
903
|
const withCloudChanges = {
|
|
904
|
-
label: ( localize(
|
|
904
|
+
label: ( localize(12098, "Yes, continue with my working changes"))
|
|
905
905
|
};
|
|
906
906
|
const withoutCloudChanges = {
|
|
907
|
-
label: ( localize(
|
|
907
|
+
label: ( localize(12099, "No, continue without my working changes"))
|
|
908
908
|
};
|
|
909
909
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
910
910
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
@@ -1014,7 +1014,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1014
1014
|
}
|
|
1015
1015
|
async run(accessor) {
|
|
1016
1016
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
1017
|
-
title: ( localize(
|
|
1017
|
+
title: ( localize(12100, "Select a local folder to continue working in")),
|
|
1018
1018
|
canSelectFolders: true,
|
|
1019
1019
|
canSelectMany: false,
|
|
1020
1020
|
canSelectFiles: false,
|
|
@@ -1028,7 +1028,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}));
|
|
1030
1030
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1031
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
1031
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(12101, "Continue Working in Existing Local Folder")), undefined, openLocalFolderCommand.precondition, undefined);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
async pickContinueEditSessionDestination() {
|
|
@@ -1038,7 +1038,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1038
1038
|
}));
|
|
1039
1039
|
const workspaceContext = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0].name : ( this.contextService.getWorkspace().folders.map(folder => folder.name)).join(", ");
|
|
1040
1040
|
quickPick.placeholder = ( localize(
|
|
1041
|
-
|
|
1041
|
+
12102,
|
|
1042
1042
|
"Select a development environment to continue working on {0} in",
|
|
1043
1043
|
`'${workspaceContext}'`
|
|
1044
1044
|
));
|
|
@@ -1117,7 +1117,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1117
1117
|
option => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when)
|
|
1118
1118
|
);
|
|
1119
1119
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1120
|
-
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(
|
|
1120
|
+
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(12103, "Open in Local Folder")), openLocalFolderCommand.id, ( localize(12104, "Built-in")))));
|
|
1121
1121
|
}
|
|
1122
1122
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
1123
1123
|
return sortedItems.concat({
|
|
@@ -1140,7 +1140,7 @@ class ContinueEditSessionItem {
|
|
|
1140
1140
|
if (documentation !== undefined) {
|
|
1141
1141
|
this.buttons = [{
|
|
1142
1142
|
iconClass: infoButtonClass,
|
|
1143
|
-
tooltip: ( localize(
|
|
1143
|
+
tooltip: ( localize(12105, "Learn More"))
|
|
1144
1144
|
}];
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
@@ -1149,7 +1149,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1149
1149
|
extensionPoint: "continueEditSession",
|
|
1150
1150
|
jsonSchema: {
|
|
1151
1151
|
description: ( localize(
|
|
1152
|
-
|
|
1152
|
+
12106,
|
|
1153
1153
|
"Contributes options for continuing the current edit session in a different environment"
|
|
1154
1154
|
)),
|
|
1155
1155
|
type: "array",
|
|
@@ -1158,35 +1158,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1158
1158
|
properties: {
|
|
1159
1159
|
command: {
|
|
1160
1160
|
description: ( localize(
|
|
1161
|
-
|
|
1161
|
+
12107,
|
|
1162
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."
|
|
1163
1163
|
)),
|
|
1164
1164
|
type: "string"
|
|
1165
1165
|
},
|
|
1166
1166
|
group: {
|
|
1167
|
-
description: ( localize(
|
|
1167
|
+
description: ( localize(12108, "Group into which this item belongs.")),
|
|
1168
1168
|
type: "string"
|
|
1169
1169
|
},
|
|
1170
1170
|
qualifiedName: {
|
|
1171
1171
|
description: ( localize(
|
|
1172
|
-
|
|
1172
|
+
12109,
|
|
1173
1173
|
"A fully qualified name for this item which is used for display in menus."
|
|
1174
1174
|
)),
|
|
1175
1175
|
type: "string"
|
|
1176
1176
|
},
|
|
1177
1177
|
description: {
|
|
1178
1178
|
description: ( localize(
|
|
1179
|
-
|
|
1179
|
+
12110,
|
|
1180
1180
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
1181
1181
|
)),
|
|
1182
1182
|
type: "string"
|
|
1183
1183
|
},
|
|
1184
1184
|
remoteGroup: {
|
|
1185
|
-
description: ( localize(
|
|
1185
|
+
description: ( localize(12111, "Group into which this item belongs in the remote indicator.")),
|
|
1186
1186
|
type: "string"
|
|
1187
1187
|
},
|
|
1188
1188
|
when: {
|
|
1189
|
-
description: ( localize(
|
|
1189
|
+
description: ( localize(12112, "Condition which must be true to show this item.")),
|
|
1190
1190
|
type: "string"
|
|
1191
1191
|
}
|
|
1192
1192
|
},
|
|
@@ -1202,48 +1202,48 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1202
1202
|
"workbench.experimental.cloudChanges.autoStore": {
|
|
1203
1203
|
enum: ["onShutdown", "off"],
|
|
1204
1204
|
enumDescriptions: [( localize(
|
|
1205
|
-
|
|
1205
|
+
12113,
|
|
1206
1206
|
"Automatically store current working changes in the cloud on window close."
|
|
1207
1207
|
)), ( localize(
|
|
1208
|
-
|
|
1208
|
+
12114,
|
|
1209
1209
|
"Never attempt to automatically store working changes in the cloud."
|
|
1210
1210
|
))],
|
|
1211
1211
|
"type": "string",
|
|
1212
1212
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1213
1213
|
"default": "off",
|
|
1214
1214
|
"markdownDescription": ( localize(
|
|
1215
|
-
|
|
1215
|
+
12115,
|
|
1216
1216
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1217
1217
|
))
|
|
1218
1218
|
},
|
|
1219
1219
|
"workbench.cloudChanges.autoResume": {
|
|
1220
1220
|
enum: ["onReload", "off"],
|
|
1221
1221
|
enumDescriptions: [( localize(
|
|
1222
|
-
|
|
1222
|
+
12116,
|
|
1223
1223
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1224
|
-
)), ( localize(
|
|
1224
|
+
)), ( localize(12117, "Never attempt to resume working changes from the cloud."))],
|
|
1225
1225
|
"type": "string",
|
|
1226
1226
|
"tags": ["usesOnlineServices"],
|
|
1227
1227
|
"default": "onReload",
|
|
1228
1228
|
"markdownDescription": ( localize(
|
|
1229
|
-
|
|
1229
|
+
12118,
|
|
1230
1230
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1231
1231
|
))
|
|
1232
1232
|
},
|
|
1233
1233
|
"workbench.cloudChanges.continueOn": {
|
|
1234
1234
|
enum: ["prompt", "off"],
|
|
1235
1235
|
enumDescriptions: [( localize(
|
|
1236
|
-
|
|
1236
|
+
12119,
|
|
1237
1237
|
"Prompt the user to sign in to store working changes in the cloud with Continue Working On."
|
|
1238
1238
|
)), ( localize(
|
|
1239
|
-
|
|
1239
|
+
12120,
|
|
1240
1240
|
"Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes."
|
|
1241
1241
|
))],
|
|
1242
1242
|
type: "string",
|
|
1243
1243
|
tags: ["usesOnlineServices"],
|
|
1244
1244
|
default: "prompt",
|
|
1245
1245
|
markdownDescription: ( localize(
|
|
1246
|
-
|
|
1246
|
+
12121,
|
|
1247
1247
|
"Controls whether to prompt the user to store working changes in the cloud when using Continue Working On."
|
|
1248
1248
|
))
|
|
1249
1249
|
},
|
|
@@ -1252,7 +1252,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1252
1252
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1253
1253
|
"default": false,
|
|
1254
1254
|
"markdownDescription": ( localize(
|
|
1255
|
-
|
|
1255
|
+
12122,
|
|
1256
1256
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1257
1257
|
))
|
|
1258
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(12123, "Select an account to restore your working changes from the cloud")) : ( localize(12124, "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(12125, "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(12126, "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(12127, "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(12128, "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(12129, "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(12130, "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(12131, "Do you want to disable storing working changes in the cloud?")),
|
|
484
484
|
checkbox: {
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(12132, "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
|
+
12133,
|
|
57
57
|
"You have no stored changes in the cloud to display.\n{0}",
|
|
58
|
-
`[${( localize(
|
|
58
|
+
`[${( localize(12134, "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(12135, "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(12136, "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(12137, "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
|
+
12138,
|
|
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(12139, " 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(12140, "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
|
+
12141,
|
|
148
148
|
"Are you sure you want to permanently delete all stored changes from the cloud?"
|
|
149
149
|
)),
|
|
150
|
-
detail: ( localize(
|
|
150
|
+
detail: ( localize(12142, " 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(12143, "Compare Changes")),
|
|
277
277
|
arguments: [
|
|
278
278
|
localCopy,
|
|
279
279
|
cloudChangeUri,
|
|
280
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
280
|
+
`${basename(change.relativeFilePath)} (${( localize(12144, "Local Copy"))} \u2194 ${( localize(12145, "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(12146, "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(12147, "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(12147, "Cloud Changes"));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon("edit-sessions-view-icon", Codicon.cloudDownload, ( localize(12148, "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(12149, "Cloud Changes")),
|
|
18
18
|
group: windowLogGroup
|
|
19
19
|
})
|
|
20
20
|
);
|