@codingame/monaco-vscode-edit-sessions-service-override 38.1.2 → 39.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 +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": "
|
|
3
|
+
"version": "39.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": "39.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -81,24 +81,24 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
|
|
|
81
81
|
var EditSessionsContribution_1;
|
|
82
82
|
const continueWorkingOnCommand = {
|
|
83
83
|
id: "_workbench.editSessions.actions.continueEditSession",
|
|
84
|
-
title: ( localize2(
|
|
84
|
+
title: ( localize2(19504, "Continue Working On...")),
|
|
85
85
|
precondition: ( WorkspaceFolderCountContext.notEqualsTo("0")),
|
|
86
86
|
f1: true
|
|
87
87
|
};
|
|
88
88
|
const openLocalFolderCommand = {
|
|
89
89
|
id: "_workbench.editSessions.actions.continueEditSession.openLocalFolder",
|
|
90
|
-
title: ( localize2(
|
|
90
|
+
title: ( localize2(19505, "Open In Local Folder")),
|
|
91
91
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
92
92
|
precondition: ( ContextKeyExpr.and(( IsWebContext.toNegated()), VirtualWorkspaceContext))
|
|
93
93
|
};
|
|
94
94
|
const showOutputChannelCommand = {
|
|
95
95
|
id: "workbench.editSessions.actions.showOutputChannel",
|
|
96
|
-
title: ( localize2(
|
|
96
|
+
title: ( localize2(19506, "Show Log")),
|
|
97
97
|
category: EDIT_SESSION_SYNC_CATEGORY
|
|
98
98
|
};
|
|
99
99
|
const installAdditionalContinueOnOptionsCommand = {
|
|
100
100
|
id: "workbench.action.continueOn.extensions",
|
|
101
|
-
title: ( localize(
|
|
101
|
+
title: ( localize(19507, "Install additional development environment options"))
|
|
102
102
|
};
|
|
103
103
|
registerAction2(class extends Action2 {
|
|
104
104
|
constructor() {
|
|
@@ -111,7 +111,7 @@ registerAction2(class extends Action2 {
|
|
|
111
111
|
return accessor.get(IExtensionsWorkbenchService).openSearch("@tag:continueOn");
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
const resumeProgressOptionsTitle = NotificationText.link(( localize(
|
|
114
|
+
const resumeProgressOptionsTitle = NotificationText.link(( localize(19508, "Resuming working changes...")), `command:${showOutputChannelCommand.id}`);
|
|
115
115
|
const resumeProgressOptions = {
|
|
116
116
|
location: ProgressLocation.Window,
|
|
117
117
|
type: "syncing"
|
|
@@ -222,7 +222,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
222
222
|
if (e.reason !== ShutdownReason.RELOAD && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue("workbench.experimental.cloudChanges.autoStore") === "onShutdown" && !isWeb) {
|
|
223
223
|
e.join(this.autoStoreEditSession(), {
|
|
224
224
|
id: "autoStoreWorkingChanges",
|
|
225
|
-
label: ( localize(
|
|
225
|
+
label: ( localize(19509, "Storing current working changes..."))
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}));
|
|
@@ -312,7 +312,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
312
312
|
if (this.editSessionsStorageService.isSignedIn) {
|
|
313
313
|
return this.accountsMenuBadgeDisposable.clear();
|
|
314
314
|
}
|
|
315
|
-
const badge = ( new NumberBadge(1, () => ( localize(
|
|
315
|
+
const badge = ( new NumberBadge(1, () => ( localize(19510, "Check for pending cloud changes"))));
|
|
316
316
|
this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({
|
|
317
317
|
badge
|
|
318
318
|
});
|
|
@@ -322,7 +322,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
322
322
|
await this.progressService.withProgress({
|
|
323
323
|
location: ProgressLocation.Window,
|
|
324
324
|
type: "syncing",
|
|
325
|
-
title: ( localize(
|
|
325
|
+
title: ( localize(19511, "Storing working changes..."))
|
|
326
326
|
}, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
|
|
327
327
|
cancellationTokenSource.cancel();
|
|
328
328
|
cancellationTokenSource.dispose();
|
|
@@ -367,7 +367,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
367
367
|
constructor() {
|
|
368
368
|
super({
|
|
369
369
|
id: "workbench.editSessions.actions.showEditSessions",
|
|
370
|
-
title: ( localize2(
|
|
370
|
+
title: ( localize2(19512, "Show Cloud Changes")),
|
|
371
371
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
372
372
|
f1: true
|
|
373
373
|
});
|
|
@@ -406,7 +406,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
406
406
|
location: ProgressLocation.Notification,
|
|
407
407
|
cancellable: true,
|
|
408
408
|
type: "syncing",
|
|
409
|
-
title: ( localize(
|
|
409
|
+
title: ( localize(19513, "Storing your working changes..."))
|
|
410
410
|
}, async () => {
|
|
411
411
|
const ref = await that.storeEditSession(false, cancellationTokenSource.token);
|
|
412
412
|
if (ref !== undefined) {
|
|
@@ -466,7 +466,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
466
466
|
constructor() {
|
|
467
467
|
super({
|
|
468
468
|
id: "workbench.editSessions.actions.resumeLatest",
|
|
469
|
-
title: ( localize2(
|
|
469
|
+
title: ( localize2(19514, "Resume Latest Changes from Cloud")),
|
|
470
470
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
471
471
|
f1: true
|
|
472
472
|
});
|
|
@@ -482,7 +482,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
482
482
|
constructor() {
|
|
483
483
|
super({
|
|
484
484
|
id: "workbench.editSessions.actions.resumeFromSerializedPayload",
|
|
485
|
-
title: ( localize2(
|
|
485
|
+
title: ( localize2(19515, "Resume Changes from Serialized Data")),
|
|
486
486
|
category: "Developer",
|
|
487
487
|
f1: true
|
|
488
488
|
});
|
|
@@ -510,7 +510,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
510
510
|
constructor() {
|
|
511
511
|
super({
|
|
512
512
|
id: "workbench.editSessions.actions.storeCurrent",
|
|
513
|
-
title: ( localize2(
|
|
513
|
+
title: ( localize2(19516, "Store Working Changes in Cloud")),
|
|
514
514
|
category: EDIT_SESSION_SYNC_CATEGORY,
|
|
515
515
|
f1: true
|
|
516
516
|
});
|
|
@@ -519,7 +519,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
519
519
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
520
520
|
await that.progressService.withProgress({
|
|
521
521
|
location: ProgressLocation.Notification,
|
|
522
|
-
title: ( localize(
|
|
522
|
+
title: ( localize(19517, "Storing working changes..."))
|
|
523
523
|
}, async () => {
|
|
524
524
|
that.telemetryService.publicLog2("editSessions.store");
|
|
525
525
|
await that.storeEditSession(true, cancellationTokenSource.token);
|
|
@@ -551,7 +551,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
551
551
|
this.telemetryService.publicLog2("editSessions.resume");
|
|
552
552
|
performance.mark("code/willResumeEditSessionFromIdentifier");
|
|
553
553
|
progress?.report({
|
|
554
|
-
message: ( localize(
|
|
554
|
+
message: ( localize(19518, "Checking for pending cloud changes..."))
|
|
555
555
|
});
|
|
556
556
|
const data = serializedData ? {
|
|
557
557
|
content: serializedData,
|
|
@@ -559,9 +559,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
559
559
|
} : await this.editSessionsStorageService.read("editSessions", ref);
|
|
560
560
|
if (!data) {
|
|
561
561
|
if (ref === undefined && !silent) {
|
|
562
|
-
this.notificationService.info(( localize(
|
|
562
|
+
this.notificationService.info(( localize(19519, "There are no changes to resume from the cloud.")));
|
|
563
563
|
} else if (ref !== undefined) {
|
|
564
|
-
this.notificationService.warn(( localize(
|
|
564
|
+
this.notificationService.warn(( localize(19520, "Could not resume changes from the cloud for ID {0}.", ref)));
|
|
565
565
|
}
|
|
566
566
|
this.logService.info(
|
|
567
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`
|
|
@@ -575,7 +575,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
575
575
|
ref = data.ref;
|
|
576
576
|
if (editSession.version > EditSessionSchemaVersion) {
|
|
577
577
|
this.notificationService.error(( localize(
|
|
578
|
-
|
|
578
|
+
19521,
|
|
579
579
|
"Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
|
|
580
580
|
this.productService.nameLong
|
|
581
581
|
)));
|
|
@@ -599,11 +599,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
599
599
|
} = await this.dialogService.confirm({
|
|
600
600
|
type: Severity.Warning,
|
|
601
601
|
message: conflictingChanges.length > 1 ? ( localize(
|
|
602
|
-
|
|
602
|
+
19522,
|
|
603
603
|
"Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?",
|
|
604
604
|
conflictingChanges.length
|
|
605
605
|
)) : ( localize(
|
|
606
|
-
|
|
606
|
+
19523,
|
|
607
607
|
"Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?",
|
|
608
608
|
basename(conflictingChanges[0].uri)
|
|
609
609
|
)),
|
|
@@ -636,7 +636,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
636
636
|
});
|
|
637
637
|
} catch (ex) {
|
|
638
638
|
this.logService.error("Failed to resume edit session, reason: ", ( ex.toString()));
|
|
639
|
-
this.notificationService.error(( localize(
|
|
639
|
+
this.notificationService.error(( localize(19524, "Failed to resume your working changes from the cloud.")));
|
|
640
640
|
}
|
|
641
641
|
performance.mark("code/didResumeEditSessionFromIdentifier");
|
|
642
642
|
}
|
|
@@ -670,10 +670,10 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
670
670
|
} else if (match === EditSessionIdentityMatch.Partial && this.configurationService.getValue("workbench.experimental.cloudChanges.partialMatches.enabled") === true) {
|
|
671
671
|
if (!applyPartialMatch) {
|
|
672
672
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
673
|
-
|
|
673
|
+
19525,
|
|
674
674
|
"You have pending working changes in the cloud for this workspace. Would you like to resume them?"
|
|
675
675
|
)), [{
|
|
676
|
-
label: ( localize(
|
|
676
|
+
label: ( localize(19526, "Resume")),
|
|
677
677
|
run: () => this.resumeEditSession(ref, false, undefined, true)
|
|
678
678
|
}]);
|
|
679
679
|
} else {
|
|
@@ -798,7 +798,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
798
798
|
const contents = encodeBase64((await this.fileService.readFile(uri)).value);
|
|
799
799
|
editSessionSize += contents.length;
|
|
800
800
|
if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
|
|
801
|
-
this.notificationService.error(( localize(
|
|
801
|
+
this.notificationService.error(( localize(19527, "Your working changes exceed the size limit and cannot be stored.")));
|
|
802
802
|
return undefined;
|
|
803
803
|
}
|
|
804
804
|
workingChanges.push({
|
|
@@ -834,7 +834,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
834
834
|
);
|
|
835
835
|
if (fromStoreCommand) {
|
|
836
836
|
this.notificationService.info(( localize(
|
|
837
|
-
|
|
837
|
+
19528,
|
|
838
838
|
"Skipped storing working changes in the cloud as there are no edits to store."
|
|
839
839
|
)));
|
|
840
840
|
}
|
|
@@ -858,13 +858,13 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
858
858
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
859
859
|
reason: "TooLarge"
|
|
860
860
|
});
|
|
861
|
-
this.notificationService.error(( localize(
|
|
861
|
+
this.notificationService.error(( localize(19527, "Your working changes exceed the size limit and cannot be stored.")));
|
|
862
862
|
break;
|
|
863
863
|
default:
|
|
864
864
|
this.telemetryService.publicLog2("editSessions.upload.failed", {
|
|
865
865
|
reason: "unknown"
|
|
866
866
|
});
|
|
867
|
-
this.notificationService.error(( localize(
|
|
867
|
+
this.notificationService.error(( localize(19529, "Your working changes cannot be stored.")));
|
|
868
868
|
break;
|
|
869
869
|
}
|
|
870
870
|
}
|
|
@@ -898,14 +898,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
898
898
|
if (this.hasEditSession()) {
|
|
899
899
|
const disposables = ( new DisposableStore());
|
|
900
900
|
const quickpick = disposables.add(this.quickInputService.createQuickPick());
|
|
901
|
-
quickpick.placeholder = ( localize(
|
|
901
|
+
quickpick.placeholder = ( localize(19530, "Select whether to bring your working changes with you"));
|
|
902
902
|
quickpick.ok = false;
|
|
903
903
|
quickpick.ignoreFocusOut = true;
|
|
904
904
|
const withCloudChanges = {
|
|
905
|
-
label: ( localize(
|
|
905
|
+
label: ( localize(19531, "Yes, continue with my working changes"))
|
|
906
906
|
};
|
|
907
907
|
const withoutCloudChanges = {
|
|
908
|
-
label: ( localize(
|
|
908
|
+
label: ( localize(19532, "No, continue without my working changes"))
|
|
909
909
|
};
|
|
910
910
|
quickpick.items = [withCloudChanges, withoutCloudChanges];
|
|
911
911
|
const continueWithCloudChanges = await ( new Promise((resolve, reject) => {
|
|
@@ -1015,7 +1015,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1015
1015
|
}
|
|
1016
1016
|
async run(accessor) {
|
|
1017
1017
|
const selection = await that.fileDialogService.showOpenDialog({
|
|
1018
|
-
title: ( localize(
|
|
1018
|
+
title: ( localize(19533, "Select a local folder to continue working in")),
|
|
1019
1019
|
canSelectFolders: true,
|
|
1020
1020
|
canSelectMany: false,
|
|
1021
1021
|
canSelectFiles: false,
|
|
@@ -1029,7 +1029,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1029
1029
|
}
|
|
1030
1030
|
}));
|
|
1031
1031
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1032
|
-
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(
|
|
1032
|
+
this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(19534, "Continue Working in Existing Local Folder")), undefined, openLocalFolderCommand.precondition, undefined);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
async pickContinueEditSessionDestination() {
|
|
@@ -1039,7 +1039,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1039
1039
|
}));
|
|
1040
1040
|
const workspaceContext = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0].name : this.contextService.getWorkspace().folders.map(folder => folder.name).join(", ");
|
|
1041
1041
|
quickPick.placeholder = ( localize(
|
|
1042
|
-
|
|
1042
|
+
19535,
|
|
1043
1043
|
"Select a development environment to continue working on {0} in",
|
|
1044
1044
|
`'${workspaceContext}'`
|
|
1045
1045
|
));
|
|
@@ -1118,7 +1118,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
|
|
|
1118
1118
|
option => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when)
|
|
1119
1119
|
);
|
|
1120
1120
|
if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
|
|
1121
|
-
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(
|
|
1121
|
+
items.push(( new ContinueEditSessionItem("$(folder) " + ( localize(19536, "Open in Local Folder")), openLocalFolderCommand.id, ( localize(19537, "Built-in")))));
|
|
1122
1122
|
}
|
|
1123
1123
|
const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
|
|
1124
1124
|
return sortedItems.concat({
|
|
@@ -1141,7 +1141,7 @@ class ContinueEditSessionItem {
|
|
|
1141
1141
|
if (documentation !== undefined) {
|
|
1142
1142
|
this.buttons = [{
|
|
1143
1143
|
iconClass: infoButtonClass,
|
|
1144
|
-
tooltip: ( localize(
|
|
1144
|
+
tooltip: ( localize(19538, "Learn More"))
|
|
1145
1145
|
}];
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
@@ -1150,7 +1150,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1150
1150
|
extensionPoint: "continueEditSession",
|
|
1151
1151
|
jsonSchema: {
|
|
1152
1152
|
description: ( localize(
|
|
1153
|
-
|
|
1153
|
+
19539,
|
|
1154
1154
|
"Contributes options for continuing the current edit session in a different environment"
|
|
1155
1155
|
)),
|
|
1156
1156
|
type: "array",
|
|
@@ -1159,35 +1159,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
1159
1159
|
properties: {
|
|
1160
1160
|
command: {
|
|
1161
1161
|
description: ( localize(
|
|
1162
|
-
|
|
1162
|
+
19540,
|
|
1163
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."
|
|
1164
1164
|
)),
|
|
1165
1165
|
type: "string"
|
|
1166
1166
|
},
|
|
1167
1167
|
group: {
|
|
1168
|
-
description: ( localize(
|
|
1168
|
+
description: ( localize(19541, "Group into which this item belongs.")),
|
|
1169
1169
|
type: "string"
|
|
1170
1170
|
},
|
|
1171
1171
|
qualifiedName: {
|
|
1172
1172
|
description: ( localize(
|
|
1173
|
-
|
|
1173
|
+
19542,
|
|
1174
1174
|
"A fully qualified name for this item which is used for display in menus."
|
|
1175
1175
|
)),
|
|
1176
1176
|
type: "string"
|
|
1177
1177
|
},
|
|
1178
1178
|
description: {
|
|
1179
1179
|
description: ( localize(
|
|
1180
|
-
|
|
1180
|
+
19543,
|
|
1181
1181
|
"The url, or a command that returns the url, to the option's documentation page."
|
|
1182
1182
|
)),
|
|
1183
1183
|
type: "string"
|
|
1184
1184
|
},
|
|
1185
1185
|
remoteGroup: {
|
|
1186
|
-
description: ( localize(
|
|
1186
|
+
description: ( localize(19544, "Group into which this item belongs in the remote indicator.")),
|
|
1187
1187
|
type: "string"
|
|
1188
1188
|
},
|
|
1189
1189
|
when: {
|
|
1190
|
-
description: ( localize(
|
|
1190
|
+
description: ( localize(19545, "Condition which must be true to show this item.")),
|
|
1191
1191
|
type: "string"
|
|
1192
1192
|
}
|
|
1193
1193
|
},
|
|
@@ -1203,48 +1203,48 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1203
1203
|
"workbench.experimental.cloudChanges.autoStore": {
|
|
1204
1204
|
enum: ["onShutdown", "off"],
|
|
1205
1205
|
enumDescriptions: [( localize(
|
|
1206
|
-
|
|
1206
|
+
19546,
|
|
1207
1207
|
"Automatically store current working changes in the cloud on window close."
|
|
1208
1208
|
)), ( localize(
|
|
1209
|
-
|
|
1209
|
+
19547,
|
|
1210
1210
|
"Never attempt to automatically store working changes in the cloud."
|
|
1211
1211
|
))],
|
|
1212
1212
|
"type": "string",
|
|
1213
1213
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1214
1214
|
"default": "off",
|
|
1215
1215
|
"markdownDescription": ( localize(
|
|
1216
|
-
|
|
1216
|
+
19548,
|
|
1217
1217
|
"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
|
|
1218
1218
|
))
|
|
1219
1219
|
},
|
|
1220
1220
|
"workbench.cloudChanges.autoResume": {
|
|
1221
1221
|
enum: ["onReload", "off"],
|
|
1222
1222
|
enumDescriptions: [( localize(
|
|
1223
|
-
|
|
1223
|
+
19549,
|
|
1224
1224
|
"Automatically resume available working changes from the cloud on window reload."
|
|
1225
|
-
)), ( localize(
|
|
1225
|
+
)), ( localize(19550, "Never attempt to resume working changes from the cloud."))],
|
|
1226
1226
|
"type": "string",
|
|
1227
1227
|
"tags": ["usesOnlineServices"],
|
|
1228
1228
|
"default": "onReload",
|
|
1229
1229
|
"markdownDescription": ( localize(
|
|
1230
|
-
|
|
1230
|
+
19551,
|
|
1231
1231
|
"Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
|
|
1232
1232
|
))
|
|
1233
1233
|
},
|
|
1234
1234
|
"workbench.cloudChanges.continueOn": {
|
|
1235
1235
|
enum: ["prompt", "off"],
|
|
1236
1236
|
enumDescriptions: [( localize(
|
|
1237
|
-
|
|
1237
|
+
19552,
|
|
1238
1238
|
"Prompt the user to sign in to store working changes in the cloud with Continue Working On."
|
|
1239
1239
|
)), ( localize(
|
|
1240
|
-
|
|
1240
|
+
19553,
|
|
1241
1241
|
"Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes."
|
|
1242
1242
|
))],
|
|
1243
1243
|
type: "string",
|
|
1244
1244
|
tags: ["usesOnlineServices"],
|
|
1245
1245
|
default: "prompt",
|
|
1246
1246
|
markdownDescription: ( localize(
|
|
1247
|
-
|
|
1247
|
+
19554,
|
|
1248
1248
|
"Controls whether to prompt the user to store working changes in the cloud when using Continue Working On."
|
|
1249
1249
|
))
|
|
1250
1250
|
},
|
|
@@ -1253,7 +1253,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, Lifecy
|
|
|
1253
1253
|
"tags": ["experimental", "usesOnlineServices"],
|
|
1254
1254
|
"default": false,
|
|
1255
1255
|
"markdownDescription": ( localize(
|
|
1256
|
-
|
|
1256
|
+
19555,
|
|
1257
1257
|
"Controls whether to surface cloud changes which partially match the current session."
|
|
1258
1258
|
))
|
|
1259
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(19556, "Select an account to restore your working changes from the cloud")) : ( localize(19557, "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(19558, "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(19559, "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(19560, "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(19561, "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(19562, "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(19563, "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(19564, "Do you want to disable storing working changes in the cloud?")),
|
|
484
484
|
checkbox: {
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(19565, "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
|
+
19566,
|
|
57
57
|
"You have no stored changes in the cloud to display.\n{0}",
|
|
58
|
-
`[${( localize(
|
|
58
|
+
`[${( localize(19567, "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(19568, "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(19569, "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(19570, "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
|
+
19571,
|
|
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(19572, " 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(19573, "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
|
+
19574,
|
|
148
148
|
"Are you sure you want to permanently delete all stored changes from the cloud?"
|
|
149
149
|
)),
|
|
150
|
-
detail: ( localize(
|
|
150
|
+
detail: ( localize(19575, " 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(19576, "Compare Changes")),
|
|
277
277
|
arguments: [
|
|
278
278
|
localCopy,
|
|
279
279
|
cloudChangeUri,
|
|
280
|
-
`${basename(change.relativeFilePath)} (${( localize(
|
|
280
|
+
`${basename(change.relativeFilePath)} (${( localize(19577, "Local Copy"))} \u2194 ${( localize(19578, "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(19579, "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(19580, "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(19580, "Cloud Changes"));
|
|
27
|
+
const EDIT_SESSIONS_VIEW_ICON = registerIcon("edit-sessions-view-icon", Codicon.cloudDownload, ( localize(19581, "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(19582, "Cloud Changes")),
|
|
18
18
|
group: windowLogGroup
|
|
19
19
|
})
|
|
20
20
|
);
|