@codingame/monaco-vscode-edit-sessions-service-override 10.1.4 → 11.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-edit-sessions-service-override",
3
- "version": "10.1.4",
3
+ "version": "11.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@10.1.4"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@11.0.0"
30
30
  }
31
31
  }
@@ -53,7 +53,6 @@ import { EditSessionIdentityMatch } from 'vscode/vscode/vs/platform/workspace/co
53
53
  import { IEditSessionIdentityService } from 'vscode/vscode/vs/platform/workspace/common/editSessions.service';
54
54
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
55
55
  import { IOutputService } from 'vscode/vscode/vs/workbench/services/output/common/output.service';
56
- import { sha1Hex } from '../../../../base/browser/hash.js';
57
56
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
58
57
  import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
59
58
  import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
@@ -68,29 +67,30 @@ import { IRequestService } from 'vscode/vscode/vs/platform/request/common/reques
68
67
  import { EditSessionsStoreClient } from '../common/editSessionsStorageClient.js';
69
68
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
70
69
  import { IWorkspaceIdentityService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceIdentityService.service';
70
+ import { hashAsync } from 'vscode/vscode/vs/base/common/hash';
71
71
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
72
72
 
73
73
  var EditSessionsContribution_1;
74
74
  const continueWorkingOnCommand = {
75
75
  id: '_workbench.editSessions.actions.continueEditSession',
76
- title: ( localize2(2404, 'Continue Working On...')),
76
+ title: ( localize2(1926, 'Continue Working On...')),
77
77
  precondition: ( (WorkspaceFolderCountContext.notEqualsTo('0'))),
78
78
  f1: true
79
79
  };
80
80
  const openLocalFolderCommand = {
81
81
  id: '_workbench.editSessions.actions.continueEditSession.openLocalFolder',
82
- title: ( localize2(2405, 'Open In Local Folder')),
82
+ title: ( localize2(1927, 'Open In Local Folder')),
83
83
  category: EDIT_SESSION_SYNC_CATEGORY,
84
84
  precondition: ( (ContextKeyExpr.and( (IsWebContext.toNegated()), VirtualWorkspaceContext)))
85
85
  };
86
86
  const showOutputChannelCommand = {
87
87
  id: 'workbench.editSessions.actions.showOutputChannel',
88
- title: ( localize2(2406, "Show Log")),
88
+ title: ( localize2(1928, "Show Log")),
89
89
  category: EDIT_SESSION_SYNC_CATEGORY
90
90
  };
91
91
  const installAdditionalContinueOnOptionsCommand = {
92
92
  id: 'workbench.action.continueOn.extensions',
93
- title: ( localize(2407, 'Install additional development environment options')),
93
+ title: ( localize(1929, 'Install additional development environment options')),
94
94
  };
95
95
  registerAction2(class extends Action2 {
96
96
  constructor() {
@@ -100,7 +100,7 @@ registerAction2(class extends Action2 {
100
100
  return accessor.get(IExtensionsWorkbenchService).openSearch('@tag:continueOn');
101
101
  }
102
102
  });
103
- const resumeProgressOptionsTitle = `[${( localize(2408, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
103
+ const resumeProgressOptionsTitle = `[${( localize(1930, 'Resuming working changes...'))}](command:${showOutputChannelCommand.id})`;
104
104
  const resumeProgressOptions = {
105
105
  location: 10 ,
106
106
  type: 'syncing',
@@ -181,7 +181,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
181
181
  this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, ( (new EditSessionsFileSystemProvider(this.editSessionsStorageService)))));
182
182
  this.lifecycleService.onWillShutdown((e) => {
183
183
  if (e.reason !== 3 && this.editSessionsStorageService.isSignedIn && this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) {
184
- e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(2409, 'Storing current working changes...')) });
184
+ e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: ( localize(1931, 'Storing current working changes...')) });
185
185
  }
186
186
  });
187
187
  this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge()));
@@ -239,7 +239,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
239
239
  if (this.editSessionsStorageService.isSignedIn) {
240
240
  return this.accountsMenuBadgeDisposable.clear();
241
241
  }
242
- const badge = ( (new NumberBadge(1, () => ( localize(2410, 'Check for pending cloud changes')))));
242
+ const badge = ( (new NumberBadge(1, () => ( localize(1932, 'Check for pending cloud changes')))));
243
243
  this.accountsMenuBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
244
244
  }
245
245
  async autoStoreEditSession() {
@@ -247,7 +247,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
247
247
  await this.progressService.withProgress({
248
248
  location: 10 ,
249
249
  type: 'syncing',
250
- title: ( localize(2411, 'Storing working changes...'))
250
+ title: ( localize(1933, 'Storing working changes...'))
251
251
  }, async () => this.storeEditSession(false, cancellationTokenSource.token), () => {
252
252
  cancellationTokenSource.cancel();
253
253
  cancellationTokenSource.dispose();
@@ -291,7 +291,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
291
291
  constructor() {
292
292
  super({
293
293
  id: 'workbench.editSessions.actions.showEditSessions',
294
- title: ( localize2(2412, 'Show Cloud Changes')),
294
+ title: ( localize2(1934, 'Show Cloud Changes')),
295
295
  category: EDIT_SESSION_SYNC_CATEGORY,
296
296
  f1: true
297
297
  });
@@ -328,7 +328,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
328
328
  location: 15 ,
329
329
  cancellable: true,
330
330
  type: 'syncing',
331
- title: ( localize(2413, 'Storing your working changes...'))
331
+ title: ( localize(1935, 'Storing your working changes...'))
332
332
  }, async () => {
333
333
  const ref = await that.storeEditSession(false, cancellationTokenSource.token);
334
334
  if (ref !== undefined) {
@@ -377,7 +377,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
377
377
  constructor() {
378
378
  super({
379
379
  id: 'workbench.editSessions.actions.resumeLatest',
380
- title: ( localize2(2414, 'Resume Latest Changes from Cloud')),
380
+ title: ( localize2(1936, 'Resume Latest Changes from Cloud')),
381
381
  category: EDIT_SESSION_SYNC_CATEGORY,
382
382
  f1: true,
383
383
  });
@@ -390,7 +390,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
390
390
  constructor() {
391
391
  super({
392
392
  id: 'workbench.editSessions.actions.resumeFromSerializedPayload',
393
- title: ( localize2(2415, 'Resume Changes from Serialized Data')),
393
+ title: ( localize2(1937, 'Resume Changes from Serialized Data')),
394
394
  category: 'Developer',
395
395
  f1: true,
396
396
  });
@@ -410,7 +410,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
410
410
  constructor() {
411
411
  super({
412
412
  id: 'workbench.editSessions.actions.storeCurrent',
413
- title: ( localize2(2416, 'Store Working Changes in Cloud')),
413
+ title: ( localize2(1938, 'Store Working Changes in Cloud')),
414
414
  category: EDIT_SESSION_SYNC_CATEGORY,
415
415
  f1: true,
416
416
  });
@@ -419,7 +419,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
419
419
  const cancellationTokenSource = ( (new CancellationTokenSource()));
420
420
  await that.progressService.withProgress({
421
421
  location: 15 ,
422
- title: ( localize(2417, 'Storing working changes...'))
422
+ title: ( localize(1939, 'Storing working changes...'))
423
423
  }, async () => {
424
424
  that.telemetryService.publicLog2('editSessions.store');
425
425
  await that.storeEditSession(true, cancellationTokenSource.token);
@@ -441,14 +441,14 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
441
441
  }
442
442
  this.telemetryService.publicLog2('editSessions.resume');
443
443
  performance.mark('code/willResumeEditSessionFromIdentifier');
444
- progress?.report({ message: ( localize(2418, 'Checking for pending cloud changes...')) });
444
+ progress?.report({ message: ( localize(1940, 'Checking for pending cloud changes...')) });
445
445
  const data = serializedData ? { content: serializedData, ref: '' } : await this.editSessionsStorageService.read('editSessions', ref);
446
446
  if (!data) {
447
447
  if (ref === undefined && !silent) {
448
- this.notificationService.info(( localize(2419, 'There are no changes to resume from the cloud.')));
448
+ this.notificationService.info(( localize(1941, 'There are no changes to resume from the cloud.')));
449
449
  }
450
450
  else if (ref !== undefined) {
451
- this.notificationService.warn(( localize(2420, 'Could not resume changes from the cloud for ID {0}.', ref)));
451
+ this.notificationService.warn(( localize(1942, 'Could not resume changes from the cloud for ID {0}.', ref)));
452
452
  }
453
453
  this.logService.info(ref !== undefined ? `Aborting resuming changes from cloud as no edit session content is available to be applied from ref ${ref}.` : `Aborting resuming edit session as no edit session content is available to be applied`);
454
454
  return;
@@ -458,7 +458,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
458
458
  ref = data.ref;
459
459
  if (editSession.version > EditSessionSchemaVersion) {
460
460
  this.notificationService.error(( localize(
461
- 2421,
461
+ 1943,
462
462
  "Please upgrade to a newer version of {0} to resume your working changes from the cloud.",
463
463
  this.productService.nameLong
464
464
  )));
@@ -475,12 +475,12 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
475
475
  type: Severity$1.Warning,
476
476
  message: conflictingChanges.length > 1 ?
477
477
  ( localize(
478
- 2422,
478
+ 1944,
479
479
  'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?',
480
480
  conflictingChanges.length
481
481
  )) :
482
482
  ( localize(
483
- 2423,
483
+ 1945,
484
484
  'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?',
485
485
  basename(conflictingChanges[0].uri)
486
486
  )),
@@ -506,7 +506,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
506
506
  }
507
507
  catch (ex) {
508
508
  this.logService.error('Failed to resume edit session, reason: ', ( (ex.toString())));
509
- this.notificationService.error(( localize(2424, "Failed to resume your working changes from the cloud.")));
509
+ this.notificationService.error(( localize(1946, "Failed to resume your working changes from the cloud.")));
510
510
  }
511
511
  performance.mark('code/didResumeEditSessionFromIdentifier');
512
512
  }
@@ -535,9 +535,9 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
535
535
  this.configurationService.getValue('workbench.experimental.cloudChanges.partialMatches.enabled') === true) {
536
536
  if (!applyPartialMatch) {
537
537
  this.notificationService.prompt(Severity$1.Info, ( localize(
538
- 2425,
538
+ 1947,
539
539
  'You have pending working changes in the cloud for this workspace. Would you like to resume them?'
540
- )), [{ label: ( localize(2426, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
540
+ )), [{ label: ( localize(1948, 'Resume')), run: () => this.resumeEditSession(ref, false, undefined, true) }]);
541
541
  }
542
542
  else {
543
543
  folderRoot = f;
@@ -579,7 +579,10 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
579
579
  const { contents, type } = incomingChange;
580
580
  switch (type) {
581
581
  case (ChangeType.Addition): {
582
- const [originalContents, incomingContents] = await Promise.all([sha1Hex(contents), sha1Hex(encodeBase64((await this.fileService.readFile(uriWithIncomingChanges)).value))]);
582
+ const [originalContents, incomingContents] = await Promise.all([
583
+ hashAsync(contents),
584
+ hashAsync(encodeBase64((await this.fileService.readFile(uriWithIncomingChanges)).value))
585
+ ]);
583
586
  return originalContents !== incomingContents;
584
587
  }
585
588
  case (ChangeType.Deletion): {
@@ -620,7 +623,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
620
623
  const contents = encodeBase64((await this.fileService.readFile(uri)).value);
621
624
  editSessionSize += contents.length;
622
625
  if (editSessionSize > this.editSessionsStorageService.SIZE_LIMIT) {
623
- this.notificationService.error(( localize(2427, 'Your working changes exceed the size limit and cannot be stored.')));
626
+ this.notificationService.error(( localize(1949, 'Your working changes exceed the size limit and cannot be stored.')));
624
627
  return undefined;
625
628
  }
626
629
  workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: contents, relativeFilePath: relativeFilePath });
@@ -640,7 +643,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
640
643
  this.logService.info('Skipped storing working changes in the cloud as there are no edits to store.');
641
644
  if (fromStoreCommand) {
642
645
  this.notificationService.info(( localize(
643
- 2428,
646
+ 1950,
644
647
  'Skipped storing working changes in the cloud as there are no edits to store.'
645
648
  )));
646
649
  }
@@ -659,11 +662,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
659
662
  switch (ex.code) {
660
663
  case "TooLarge" :
661
664
  this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'TooLarge' });
662
- this.notificationService.error(( localize(2427, 'Your working changes exceed the size limit and cannot be stored.')));
665
+ this.notificationService.error(( localize(1949, 'Your working changes exceed the size limit and cannot be stored.')));
663
666
  break;
664
667
  default:
665
668
  this.telemetryService.publicLog2('editSessions.upload.failed', { reason: 'unknown' });
666
- this.notificationService.error(( localize(2429, 'Your working changes cannot be stored.')));
669
+ this.notificationService.error(( localize(1951, 'Your working changes cannot be stored.')));
667
670
  break;
668
671
  }
669
672
  }
@@ -695,11 +698,11 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
695
698
  if (this.hasEditSession()) {
696
699
  const disposables = ( (new DisposableStore()));
697
700
  const quickpick = disposables.add(this.quickInputService.createQuickPick());
698
- quickpick.placeholder = ( localize(2430, "Select whether to bring your working changes with you"));
701
+ quickpick.placeholder = ( localize(1952, "Select whether to bring your working changes with you"));
699
702
  quickpick.ok = false;
700
703
  quickpick.ignoreFocusOut = true;
701
- const withCloudChanges = { label: ( localize(2431, "Yes, continue with my working changes")) };
702
- const withoutCloudChanges = { label: ( localize(2432, "No, continue without my working changes")) };
704
+ const withCloudChanges = { label: ( localize(1953, "Yes, continue with my working changes")) };
705
+ const withoutCloudChanges = { label: ( localize(1954, "No, continue without my working changes")) };
703
706
  quickpick.items = [withCloudChanges, withoutCloudChanges];
704
707
  const continueWithCloudChanges = await ( (new Promise((resolve, reject) => {
705
708
  disposables.add(quickpick.onDidAccept(() => {
@@ -792,7 +795,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
792
795
  }
793
796
  async run(accessor) {
794
797
  const selection = await that.fileDialogService.showOpenDialog({
795
- title: ( localize(2433, 'Select a local folder to continue working in')),
798
+ title: ( localize(1955, 'Select a local folder to continue working in')),
796
799
  canSelectFolders: true,
797
800
  canSelectMany: false,
798
801
  canSelectFiles: false,
@@ -806,7 +809,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
806
809
  }
807
810
  }));
808
811
  if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
809
- this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(2434, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
812
+ this.generateStandaloneOptionCommand(openLocalFolderCommand.id, ( localize(1956, 'Continue Working in Existing Local Folder')), undefined, openLocalFolderCommand.precondition, undefined);
810
813
  }
811
814
  }
812
815
  async pickContinueEditSessionDestination() {
@@ -816,7 +819,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
816
819
  ? this.contextService.getWorkspace().folders[0].name
817
820
  : ( (this.contextService.getWorkspace().folders.map((folder) => folder.name))).join(', ');
818
821
  quickPick.placeholder = ( localize(
819
- 2435,
822
+ 1957,
820
823
  "Select a development environment to continue working on {0} in",
821
824
  `'${workspaceContext}'`
822
825
  ));
@@ -877,7 +880,7 @@ let EditSessionsContribution = class EditSessionsContribution extends Disposable
877
880
  createPickItems() {
878
881
  const items = [...this.continueEditSessionOptions].filter((option) => option.when === undefined || this.contextKeyService.contextMatchesRules(option.when));
879
882
  if (getVirtualWorkspaceLocation(this.contextService.getWorkspace()) !== undefined && isNative) {
880
- items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(2436, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(2437, 'Built-in'))))));
883
+ items.push(( (new ContinueEditSessionItem('$(folder) ' + ( localize(1958, 'Open in Local Folder')), openLocalFolderCommand.id, ( localize(1959, 'Built-in'))))));
881
884
  }
882
885
  const sortedItems = items.sort((item1, item2) => item1.label.localeCompare(item2.label));
883
886
  return sortedItems.concat({ type: 'separator' }, ( (new ContinueEditSessionItem(
@@ -928,7 +931,7 @@ class ContinueEditSessionItem {
928
931
  if (documentation !== undefined) {
929
932
  this.buttons = [{
930
933
  iconClass: infoButtonClass,
931
- tooltip: ( localize(2438, 'Learn More')),
934
+ tooltip: ( localize(1960, 'Learn More')),
932
935
  }];
933
936
  }
934
937
  }
@@ -937,7 +940,7 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
937
940
  extensionPoint: 'continueEditSession',
938
941
  jsonSchema: {
939
942
  description: ( localize(
940
- 2439,
943
+ 1961,
941
944
  'Contributes options for continuing the current edit session in a different environment'
942
945
  )),
943
946
  type: 'array',
@@ -946,35 +949,35 @@ const continueEditSessionExtPoint = ExtensionsRegistry.registerExtensionPoint({
946
949
  properties: {
947
950
  command: {
948
951
  description: ( localize(
949
- 2440,
952
+ 1962,
950
953
  '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.'
951
954
  )),
952
955
  type: 'string'
953
956
  },
954
957
  group: {
955
- description: ( localize(2441, 'Group into which this item belongs.')),
958
+ description: ( localize(1963, 'Group into which this item belongs.')),
956
959
  type: 'string'
957
960
  },
958
961
  qualifiedName: {
959
962
  description: ( localize(
960
- 2442,
963
+ 1964,
961
964
  'A fully qualified name for this item which is used for display in menus.'
962
965
  )),
963
966
  type: 'string'
964
967
  },
965
968
  description: {
966
969
  description: ( localize(
967
- 2443,
970
+ 1965,
968
971
  "The url, or a command that returns the url, to the option's documentation page."
969
972
  )),
970
973
  type: 'string'
971
974
  },
972
975
  remoteGroup: {
973
- description: ( localize(2444, 'Group into which this item belongs in the remote indicator.')),
976
+ description: ( localize(1966, 'Group into which this item belongs in the remote indicator.')),
974
977
  type: 'string'
975
978
  },
976
979
  when: {
977
- description: ( localize(2445, 'Condition which must be true to show this item.')),
980
+ description: ( localize(1967, 'Condition which must be true to show this item.')),
978
981
  type: 'string'
979
982
  }
980
983
  },
@@ -991,16 +994,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
991
994
  enum: ['onShutdown', 'off'],
992
995
  enumDescriptions: [
993
996
  ( localize(
994
- 2446,
997
+ 1968,
995
998
  "Automatically store current working changes in the cloud on window close."
996
999
  )),
997
- ( localize(2447, "Never attempt to automatically store working changes in the cloud."))
1000
+ ( localize(1969, "Never attempt to automatically store working changes in the cloud."))
998
1001
  ],
999
1002
  'type': 'string',
1000
1003
  'tags': ['experimental', 'usesOnlineServices'],
1001
1004
  'default': 'off',
1002
1005
  'markdownDescription': ( localize(
1003
- 2448,
1006
+ 1970,
1004
1007
  "Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web."
1005
1008
  )),
1006
1009
  },
@@ -1008,16 +1011,16 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
1008
1011
  enum: ['onReload', 'off'],
1009
1012
  enumDescriptions: [
1010
1013
  ( localize(
1011
- 2449,
1014
+ 1971,
1012
1015
  "Automatically resume available working changes from the cloud on window reload."
1013
1016
  )),
1014
- ( localize(2450, "Never attempt to resume working changes from the cloud."))
1017
+ ( localize(1972, "Never attempt to resume working changes from the cloud."))
1015
1018
  ],
1016
1019
  'type': 'string',
1017
1020
  'tags': ['usesOnlineServices'],
1018
1021
  'default': 'onReload',
1019
1022
  'markdownDescription': ( localize(
1020
- 2451,
1023
+ 1973,
1021
1024
  "Controls whether to automatically resume available working changes stored in the cloud for the current workspace."
1022
1025
  )),
1023
1026
  },
@@ -1025,11 +1028,11 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
1025
1028
  enum: ['prompt', 'off'],
1026
1029
  enumDescriptions: [
1027
1030
  ( localize(
1028
- 2452,
1031
+ 1974,
1029
1032
  'Prompt the user to sign in to store working changes in the cloud with Continue Working On.'
1030
1033
  )),
1031
1034
  ( localize(
1032
- 2453,
1035
+ 1975,
1033
1036
  'Do not store working changes in the cloud with Continue Working On unless the user has already turned on Cloud Changes.'
1034
1037
  ))
1035
1038
  ],
@@ -1037,7 +1040,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
1037
1040
  tags: ['usesOnlineServices'],
1038
1041
  default: 'prompt',
1039
1042
  markdownDescription: ( localize(
1040
- 2454,
1043
+ 1976,
1041
1044
  'Controls whether to prompt the user to store working changes in the cloud when using Continue Working On.'
1042
1045
  ))
1043
1046
  },
@@ -1046,7 +1049,7 @@ workbenchRegistry.registerWorkbenchContribution(EditSessionsContribution, 3 );
1046
1049
  'tags': ['experimental', 'usesOnlineServices'],
1047
1050
  'default': false,
1048
1051
  'markdownDescription': ( localize(
1049
- 2455,
1052
+ 1977,
1050
1053
  "Controls whether to surface cloud changes which partially match the current session."
1051
1054
  ))
1052
1055
  }
@@ -232,7 +232,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
232
232
  const disposables = ( (new DisposableStore()));
233
233
  const quickpick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
234
234
  quickpick.ok = false;
235
- quickpick.placeholder = reason === 'read' ? ( localize(2394, "Select an account to restore your working changes from the cloud")) : ( localize(2395, "Select an account to store your working changes in the cloud"));
235
+ quickpick.placeholder = reason === 'read' ? ( localize(1916, "Select an account to restore your working changes from the cloud")) : ( localize(1917, "Select an account to store your working changes in the cloud"));
236
236
  quickpick.ignoreFocusOut = true;
237
237
  quickpick.items = await this.createQuickpickItems();
238
238
  return (
@@ -253,15 +253,15 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
253
253
  }
254
254
  async createQuickpickItems() {
255
255
  const options = [];
256
- options.push({ type: 'separator', label: ( localize(2396, "Signed In")) });
256
+ options.push({ type: 'separator', label: ( localize(1918, "Signed In")) });
257
257
  const sessions = await this.getAllSessions();
258
258
  options.push(...sessions);
259
- options.push({ type: 'separator', label: ( localize(2397, "Others")) });
259
+ options.push({ type: 'separator', label: ( localize(1919, "Others")) });
260
260
  for (const authenticationProvider of (await this.getAuthenticationProviders())) {
261
261
  const signedInForProvider = ( (sessions.some(account => account.session.providerId === authenticationProvider.id)));
262
262
  if (!signedInForProvider || this.authenticationService.getProvider(authenticationProvider.id).supportsMultipleAccounts) {
263
263
  const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
264
- options.push({ label: ( localize(2398, "Sign in with {0}", providerName)), provider: authenticationProvider });
264
+ options.push({ label: ( localize(1920, "Sign in with {0}", providerName)), provider: authenticationProvider });
265
265
  }
266
266
  }
267
267
  return options;
@@ -350,7 +350,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
350
350
  constructor() {
351
351
  super({
352
352
  id,
353
- title: ( localize(2399, 'Turn on Cloud Changes...')),
353
+ title: ( localize(1921, 'Turn on Cloud Changes...')),
354
354
  category: EDIT_SESSION_SYNC_CATEGORY,
355
355
  precondition: when,
356
356
  menu: [{
@@ -371,7 +371,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
371
371
  group: '2_editSessions',
372
372
  command: {
373
373
  id,
374
- title: ( localize(2400, 'Turn on Cloud Changes... (1)')),
374
+ title: ( localize(1922, 'Turn on Cloud Changes... (1)')),
375
375
  },
376
376
  when: ( (ContextKeyExpr.and(
377
377
  (ContextKeyExpr.equals(EDIT_SESSIONS_PENDING_KEY, true)),
@@ -385,7 +385,7 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
385
385
  constructor() {
386
386
  super({
387
387
  id: 'workbench.editSessions.actions.resetAuth',
388
- title: ( localize(2401, 'Turn off Cloud Changes...')),
388
+ title: ( localize(1923, 'Turn off Cloud Changes...')),
389
389
  category: EDIT_SESSION_SYNC_CATEGORY,
390
390
  precondition: ( (ContextKeyExpr.equals(EDIT_SESSIONS_SIGNED_IN_KEY, true))),
391
391
  menu: [{
@@ -400,8 +400,8 @@ let EditSessionsWorkbenchService = class EditSessionsWorkbenchService extends Di
400
400
  }
401
401
  async run() {
402
402
  const result = await that.dialogService.confirm({
403
- message: ( localize(2402, 'Do you want to disable storing working changes in the cloud?')),
404
- checkbox: { label: ( localize(2403, 'Delete all stored data from the cloud.')) }
403
+ message: ( localize(1924, 'Do you want to disable storing working changes in the cloud?')),
404
+ checkbox: { label: ( localize(1925, 'Delete all stored data from the cloud.')) }
405
405
  });
406
406
  if (result.confirmed) {
407
407
  if (result.checkboxChecked) {
@@ -51,9 +51,9 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
51
51
  }], container);
52
52
  viewsRegistry.registerViewWelcomeContent(viewId, {
53
53
  content: ( localize(
54
- 5698,
54
+ 5696,
55
55
  'You have no stored changes in the cloud to display.\n{0}',
56
- `[${( localize(5699, 'Store Working Changes'))}](command:workbench.editSessions.actions.store)`
56
+ `[${( localize(5697, 'Store Working Changes'))}](command:workbench.editSessions.actions.store)`
57
57
  )),
58
58
  when: ( (ContextKeyExpr.equals(EDIT_SESSIONS_COUNT_KEY, 0))),
59
59
  order: 1
@@ -62,7 +62,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
62
62
  constructor() {
63
63
  super({
64
64
  id: 'workbench.editSessions.actions.resume',
65
- title: ( localize(5700, "Resume Working Changes")),
65
+ title: ( localize(5698, "Resume Working Changes")),
66
66
  icon: Codicon.desktopDownload,
67
67
  menu: {
68
68
  id: MenuId.ViewItemContext,
@@ -85,7 +85,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
85
85
  constructor() {
86
86
  super({
87
87
  id: 'workbench.editSessions.actions.store',
88
- title: ( localize(5701, "Store Working Changes")),
88
+ title: ( localize(5699, "Store Working Changes")),
89
89
  icon: Codicon.cloudUpload,
90
90
  });
91
91
  }
@@ -99,7 +99,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
99
99
  constructor() {
100
100
  super({
101
101
  id: 'workbench.editSessions.actions.delete',
102
- title: ( localize(5702, "Delete Working Changes")),
102
+ title: ( localize(5700, "Delete Working Changes")),
103
103
  icon: Codicon.trash,
104
104
  menu: {
105
105
  id: MenuId.ViewItemContext,
@@ -117,11 +117,11 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
117
117
  const editSessionStorageService = accessor.get(IEditSessionsStorageService);
118
118
  const result = await dialogService.confirm({
119
119
  message: ( localize(
120
- 5703,
120
+ 5701,
121
121
  'Are you sure you want to permanently delete your working changes with ref {0}?',
122
122
  editSessionId
123
123
  )),
124
- detail: ( localize(5704, ' You cannot undo this action.')),
124
+ detail: ( localize(5702, ' You cannot undo this action.')),
125
125
  type: 'warning',
126
126
  title: EDIT_SESSIONS_TITLE.value
127
127
  });
@@ -135,7 +135,7 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
135
135
  constructor() {
136
136
  super({
137
137
  id: 'workbench.editSessions.actions.deleteAll',
138
- title: ( localize(5705, "Delete All Working Changes from Cloud")),
138
+ title: ( localize(5703, "Delete All Working Changes from Cloud")),
139
139
  icon: Codicon.trash,
140
140
  menu: {
141
141
  id: MenuId.ViewTitle,
@@ -151,10 +151,10 @@ let EditSessionsDataViews = class EditSessionsDataViews extends Disposable {
151
151
  const editSessionStorageService = accessor.get(IEditSessionsStorageService);
152
152
  const result = await dialogService.confirm({
153
153
  message: ( localize(
154
- 5706,
154
+ 5704,
155
155
  'Are you sure you want to permanently delete all stored changes from the cloud?'
156
156
  )),
157
- detail: ( localize(5707, ' You cannot undo this action.')),
157
+ detail: ( localize(5705, ' You cannot undo this action.')),
158
158
  type: 'warning',
159
159
  title: EDIT_SESSIONS_TITLE.value
160
160
  });
@@ -268,11 +268,11 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
268
268
  themeIcon: Codicon.file,
269
269
  command: {
270
270
  id: 'vscode.diff',
271
- title: ( localize(5708, 'Compare Changes')),
271
+ title: ( localize(5706, 'Compare Changes')),
272
272
  arguments: [
273
273
  localCopy,
274
274
  cloudChangeUri,
275
- `${basename(change.relativeFilePath)} (${( localize(5709, 'Local Copy'))} \u2194 ${( localize(5710, 'Cloud Changes'))})`,
275
+ `${basename(change.relativeFilePath)} (${( localize(5707, 'Local Copy'))} \u2194 ${( localize(5708, 'Cloud Changes'))})`,
276
276
  undefined
277
277
  ]
278
278
  }
@@ -287,7 +287,7 @@ let EditSessionDataViewDataProvider = class EditSessionDataViewDataProvider {
287
287
  themeIcon: Codicon.file,
288
288
  command: {
289
289
  id: API_OPEN_EDITOR_COMMAND_ID,
290
- title: ( localize(5711, 'Open File')),
290
+ title: ( localize(5709, 'Open File')),
291
291
  arguments: [cloudChangeUri, undefined, undefined]
292
292
  }
293
293
  };
@@ -5,7 +5,7 @@ import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/conte
5
5
  import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
6
6
  import { StringSHA1 } from 'vscode/vscode/vs/base/common/hash';
7
7
 
8
- const EDIT_SESSION_SYNC_CATEGORY = ( localize2(5647, 'Cloud Changes'));
8
+ const EDIT_SESSION_SYNC_CATEGORY = ( localize2(5684, 'Cloud Changes'));
9
9
  var ChangeType;
10
10
  ( ((function(ChangeType) {
11
11
  ChangeType[ChangeType["Addition"] = 1] = "Addition";
@@ -22,8 +22,8 @@ const EDIT_SESSIONS_PENDING_KEY = 'editSessionsPending';
22
22
  const EDIT_SESSIONS_PENDING = ( (new RawContextKey(EDIT_SESSIONS_PENDING_KEY, false)));
23
23
  const EDIT_SESSIONS_CONTAINER_ID = 'workbench.view.editSessions';
24
24
  const EDIT_SESSIONS_DATA_VIEW_ID = 'workbench.views.editSessions.data';
25
- const EDIT_SESSIONS_TITLE = ( localize2(5647, 'Cloud Changes'));
26
- const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(5648, 'View icon of the cloud changes view.')));
25
+ const EDIT_SESSIONS_TITLE = ( localize2(5684, 'Cloud Changes'));
26
+ const EDIT_SESSIONS_VIEW_ICON = registerIcon('edit-sessions-view-icon', Codicon.cloudDownload, ( localize(5685, 'View icon of the cloud changes view.')));
27
27
  const EDIT_SESSIONS_SHOW_VIEW = ( (new RawContextKey('editSessionsShowView', false)));
28
28
  const EDIT_SESSIONS_SCHEME = 'vscode-edit-sessions';
29
29
  function decodeEditSessionFileContent(version, content) {
@@ -9,7 +9,7 @@ import { editSessionsLogId } from './editSessions.js';
9
9
  let EditSessionsLogService = class EditSessionsLogService extends AbstractLogger {
10
10
  constructor(loggerService, environmentService) {
11
11
  super();
12
- this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(2377, "Cloud Changes")) }));
12
+ this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${editSessionsLogId}.log`), { id: editSessionsLogId, name: ( localize(1915, "Cloud Changes")) }));
13
13
  }
14
14
  trace(message, ...args) {
15
15
  this.logger.trace(message, ...args);
@@ -1,17 +0,0 @@
1
- import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
2
- import { toHexString, StringSHA1 } from 'vscode/vscode/vs/base/common/hash';
3
-
4
- async function sha1Hex(str) {
5
- if (globalThis?.crypto?.subtle) {
6
- const buffer = VSBuffer.fromString(str, { dontUseNodeBuffer: true }).buffer;
7
- const hash = await globalThis.crypto.subtle.digest({ name: 'sha-1' }, buffer);
8
- return toHexString(hash);
9
- }
10
- else {
11
- const computer = ( new StringSHA1());
12
- computer.update(str);
13
- return computer.digest();
14
- }
15
- }
16
-
17
- export { sha1Hex };