@codingame/monaco-vscode-user-data-profile-service-override 33.0.9 → 34.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.
@@ -104,7 +104,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
104
104
  cancellable: true
105
105
  }, async progress => {
106
106
  const reportProgress = message => progress.report({
107
- message: ( localize(17303, "Create Profile: {0}", message))
107
+ message: ( localize(17518, "Create Profile: {0}", message))
108
108
  });
109
109
  creationPromise = createCancelablePromise(async token => {
110
110
  const userDataProfilesExportState = disposables.add(
@@ -129,7 +129,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
129
129
  try {
130
130
  await creationPromise;
131
131
  if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
132
- reportProgress(( localize(17304, "Installing Extensions...")));
132
+ reportProgress(( localize(17519, "Installing Extensions...")));
133
133
  await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
134
134
  }
135
135
  } catch (error) {
@@ -153,7 +153,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
153
153
  cancellable: true
154
154
  }, async progress => {
155
155
  const reportProgress = message => progress.report({
156
- message: ( localize(17303, "Create Profile: {0}", message))
156
+ message: ( localize(17518, "Create Profile: {0}", message))
157
157
  });
158
158
  creationPromise = createCancelablePromise(async token => {
159
159
  profile = await this.getProfileToImport({
@@ -181,42 +181,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
181
181
  }
182
182
  async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
183
183
  if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
184
- reportProgress(( localize(17305, "Creating Settings...")));
184
+ reportProgress(( localize(17520, "Creating Settings...")));
185
185
  await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
186
186
  }
187
187
  if (token.isCancellationRequested) {
188
188
  return;
189
189
  }
190
190
  if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
191
- reportProgress(( localize(17306, "Creating Keyboard Shortcuts...")));
191
+ reportProgress(( localize(17521, "Creating Keyboard Shortcuts...")));
192
192
  await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
193
193
  }
194
194
  if (token.isCancellationRequested) {
195
195
  return;
196
196
  }
197
197
  if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
198
- reportProgress(( localize(17307, "Creating Tasks...")));
198
+ reportProgress(( localize(17522, "Creating Tasks...")));
199
199
  await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
200
200
  }
201
201
  if (token.isCancellationRequested) {
202
202
  return;
203
203
  }
204
204
  if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
205
- reportProgress(( localize(17308, "Creating Snippets...")));
205
+ reportProgress(( localize(17523, "Creating Snippets...")));
206
206
  await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
207
207
  }
208
208
  if (token.isCancellationRequested) {
209
209
  return;
210
210
  }
211
211
  if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
212
- reportProgress(( localize(17309, "Applying UI State...")));
212
+ reportProgress(( localize(17524, "Applying UI State...")));
213
213
  await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
214
214
  }
215
215
  if (token.isCancellationRequested) {
216
216
  return;
217
217
  }
218
218
  if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
219
- reportProgress(( localize(17304, "Installing Extensions...")));
219
+ reportProgress(( localize(17519, "Installing Extensions...")));
220
220
  await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
221
221
  }
222
222
  }
@@ -238,22 +238,22 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
238
238
  undefined
239
239
  );
240
240
  try {
241
- const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(17310, "Troubleshoot Issue")), undefined);
241
+ const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(17525, "Troubleshoot Issue")), undefined);
242
242
  await this.progressService.withProgress({
243
243
  location: ProgressLocation.Notification,
244
244
  delay: 1000,
245
245
  sticky: true
246
246
  }, async progress => {
247
247
  const reportProgress = message => progress.report({
248
- message: ( localize(17311, "Setting up Troubleshoot Profile: {0}", message))
248
+ message: ( localize(17526, "Setting up Troubleshoot Profile: {0}", message))
249
249
  });
250
250
  const profile = await this.doCreateProfile(profileTemplate, true, false, {
251
251
  useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags
252
252
  }, reportProgress);
253
253
  if (profile) {
254
- reportProgress(( localize(17312, "Applying Extensions...")));
254
+ reportProgress(( localize(17527, "Applying Extensions...")));
255
255
  await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
256
- reportProgress(( localize(17313, "Switching Profile...")));
256
+ reportProgress(( localize(17528, "Switching Profile...")));
257
257
  await this.userDataProfileManagementService.switchProfile(profile);
258
258
  }
259
259
  });
@@ -270,7 +270,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
270
270
  try {
271
271
  await this.progressService.withProgress({
272
272
  location,
273
- title: ( localize(17314, "{0}: Exporting...", PROFILES_CATEGORY.value))
273
+ title: ( localize(17529, "{0}: Exporting...", PROFILES_CATEGORY.value))
274
274
  }, async progress => {
275
275
  const id = await this.pickProfileContentHandler(profile.name);
276
276
  if (!id) {
@@ -288,24 +288,24 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
288
288
  if (!saveResult) {
289
289
  return;
290
290
  }
291
- const message = ( localize(17315, "Profile '{0}' was exported successfully.", profile.name));
291
+ const message = ( localize(17530, "Profile '{0}' was exported successfully.", profile.name));
292
292
  if (profileContentHandler.extensionId) {
293
293
  const buttons = [];
294
294
  const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString());
295
295
  buttons.push({
296
- label: ( localize(17316, "&&Copy Link")),
296
+ label: ( localize(17531, "&&Copy Link")),
297
297
  run: () => this.clipboardService.writeText(link)
298
298
  });
299
299
  if (this.productService.webUrl) {
300
300
  buttons.push({
301
- label: ( localize(17317, "&&Open Link")),
301
+ label: ( localize(17532, "&&Open Link")),
302
302
  run: async () => {
303
303
  await this.openerService.open(link);
304
304
  }
305
305
  });
306
306
  } else {
307
307
  buttons.push({
308
- label: ( localize(17318, "&&Open in {0}", profileContentHandler.name)),
308
+ label: ( localize(17533, "&&Open in {0}", profileContentHandler.name)),
309
309
  run: async () => {
310
310
  await this.openerService.open(( saveResult.link.toString()));
311
311
  }
@@ -315,7 +315,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
315
315
  type: Severity.Info,
316
316
  message,
317
317
  buttons,
318
- cancelButton: ( localize(17319, "Close"))
318
+ cancelButton: ( localize(17534, "Close"))
319
319
  });
320
320
  } else {
321
321
  await this.dialogService.info(message);
@@ -334,7 +334,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
334
334
  try {
335
335
  profileTemplate = JSON.parse(profileContent);
336
336
  } catch (error) {
337
- throw ( new Error(( localize(17320, "This profile is not valid."))));
337
+ throw ( new Error(( localize(17535, "This profile is not valid."))));
338
338
  }
339
339
  if (!isUserDataProfileTemplate(profileTemplate)) {
340
340
  return null;
@@ -371,27 +371,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
371
371
  return undefined;
372
372
  }
373
373
  if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
374
- progress(( localize(17321, "Applying Settings...")));
374
+ progress(( localize(17536, "Applying Settings...")));
375
375
  await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
376
376
  }
377
377
  if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
378
- progress(( localize(17322, "Applying Keyboard Shortcuts...")));
378
+ progress(( localize(17537, "Applying Keyboard Shortcuts...")));
379
379
  await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
380
380
  }
381
381
  if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
382
- progress(( localize(17323, "Applying Tasks...")));
382
+ progress(( localize(17538, "Applying Tasks...")));
383
383
  await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
384
384
  }
385
385
  if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
386
- progress(( localize(17324, "Applying Snippets...")));
386
+ progress(( localize(17539, "Applying Snippets...")));
387
387
  await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
388
388
  }
389
389
  if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
390
- progress(( localize(17325, "Applying State...")));
390
+ progress(( localize(17540, "Applying State...")));
391
391
  await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
392
392
  }
393
393
  if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
394
- progress(( localize(17312, "Applying Extensions...")));
394
+ progress(( localize(17527, "Applying Extensions...")));
395
395
  await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
396
396
  }
397
397
  return profile;
@@ -448,7 +448,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
448
448
  });
449
449
  }
450
450
  const result = await this.quickInputService.pick(options.reverse(), {
451
- title: ( localize(17326, "Export '{0}' profile as...", name)),
451
+ title: ( localize(17541, "Export '{0}' profile as...", name)),
452
452
  hideInput: true
453
453
  });
454
454
  return result?.id;
@@ -468,11 +468,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
468
468
  } = await this.dialogService.confirm({
469
469
  type: Severity.Info,
470
470
  message: ( localize(
471
- 17327,
471
+ 17542,
472
472
  "Profile with name '{0}' already exists. Do you want to replace its contents?",
473
473
  profileName
474
474
  )),
475
- primaryButton: ( localize(17328, "&&Replace"))
475
+ primaryButton: ( localize(17543, "&&Replace"))
476
476
  });
477
477
  if (!confirmed) {
478
478
  return undefined;
@@ -510,12 +510,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
510
510
  this.fileService = fileService;
511
511
  this.productService = productService;
512
512
  this.textFileService = textFileService;
513
- this.name = ( localize(17329, "Local"));
514
- this.description = ( localize(17330, "file"));
513
+ this.name = ( localize(17544, "Local"));
514
+ this.description = ( localize(17545, "file"));
515
515
  }
516
516
  async saveProfile(name, content, token) {
517
517
  const link = await this.fileDialogService.showSaveDialog({
518
- title: ( localize(17331, "Save Profile")),
518
+ title: ( localize(17546, "Save Profile")),
519
519
  filters: PROFILE_FILTER,
520
520
  defaultUri: this.uriIdentityService.extUri.joinPath(
521
521
  await this.fileDialogService.defaultFilePath(),
@@ -552,7 +552,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
552
552
  canSelectFiles: true,
553
553
  canSelectMany: false,
554
554
  filters: PROFILE_FILTER,
555
- title: ( localize(17332, "Select Profile"))
555
+ title: ( localize(17547, "Select Profile"))
556
556
  });
557
557
  return profileLocation ? profileLocation[0] : null;
558
558
  }
@@ -593,13 +593,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
593
593
  const labelText = isMarkdownString(root.label.label) ? root.label.label.value : root.label.label;
594
594
  root.checkbox = {
595
595
  isChecked: !root.isFromDefaultProfile(),
596
- tooltip: ( localize(17333, "Select {0}", labelText)),
596
+ tooltip: ( localize(17548, "Select {0}", labelText)),
597
597
  accessibilityInformation: {
598
- label: ( localize(17333, "Select {0}", labelText))
598
+ label: ( localize(17548, "Select {0}", labelText))
599
599
  }
600
600
  };
601
601
  if (root.isFromDefaultProfile()) {
602
- root.description = ( localize(17334, "From Default Profile"));
602
+ root.description = ( localize(17549, "From Default Profile"));
603
603
  }
604
604
  }
605
605
  return this.roots;
@@ -761,6 +761,9 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
761
761
  mcpResource: profile.mcpResource.with({
762
762
  scheme: USER_DATA_PROFILE_EXPORT_SCHEME
763
763
  }),
764
+ languageModelsResource: profile.languageModelsResource.with({
765
+ scheme: USER_DATA_PROFILE_EXPORT_SCHEME
766
+ }),
764
767
  snippetsHome: profile.snippetsHome.with({
765
768
  scheme: USER_DATA_PROFILE_EXPORT_SCHEME
766
769
  }),
@@ -778,11 +781,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
778
781
  let name = this.profile.name;
779
782
  if (this.profile.isDefault) {
780
783
  name = await this.quickInputService.input({
781
- placeHolder: ( localize(17335, "Name the profile")),
782
- title: ( localize(17336, "Export Profile")),
784
+ placeHolder: ( localize(17550, "Name the profile")),
785
+ title: ( localize(17551, "Export Profile")),
783
786
  async validateInput(input) {
784
787
  if (!input.trim()) {
785
- return localize(17337, "Profile name must be provided.");
788
+ return localize(17552, "Profile name must be provided.");
786
789
  }
787
790
  return undefined;
788
791
  }
@@ -81,7 +81,12 @@ let UserDataProfileInitializer = class UserDataProfileInitializer {
81
81
  promises.push(this.initialize(( new McpResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.mcp, ProfileResourceType.Mcp));
82
82
  }
83
83
  if (profileTemplate?.snippets) {
84
- promises.push(this.initialize(( new SnippetsResourceInitializer(this.userDataProfileService, this.fileService, this.uriIdentityService)), profileTemplate.snippets, ProfileResourceType.Snippets));
84
+ promises.push(this.initialize(( new SnippetsResourceInitializer(
85
+ this.userDataProfileService,
86
+ this.fileService,
87
+ this.uriIdentityService,
88
+ this.logService
89
+ )), profileTemplate.snippets, ProfileResourceType.Snippets));
85
90
  }
86
91
  promises.push(this.initializeInstalledExtensions(instantiationService));
87
92
  await Promises.settled(promises);
@@ -58,7 +58,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
58
58
  const profileToUse = this.getProfileToUseForCurrentWorkspace();
59
59
  this.switchProfile(profileToUse);
60
60
  this.changeCurrentProfile(profileToUse, ( localize(
61
- 17338,
61
+ 17553,
62
62
  "The current profile has been removed. Please reload to switch back to default profile"
63
63
  )));
64
64
  return;
@@ -69,12 +69,12 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
69
69
  if (profileToUse?.id !== updatedCurrentProfile.id) {
70
70
  this.switchProfile(profileToUse);
71
71
  this.changeCurrentProfile(profileToUse, ( localize(
72
- 17339,
72
+ 17554,
73
73
  "The current workspace has been removed from the current profile. Please reload to switch back to the updated profile"
74
74
  )));
75
75
  } else {
76
76
  this.changeCurrentProfile(updatedCurrentProfile, ( localize(
77
- 17340,
77
+ 17555,
78
78
  "The current profile has been updated. Please reload to switch back to the updated profile"
79
79
  )));
80
80
  }
@@ -139,7 +139,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
139
139
  throw ( new Error(`Profile ${profile.name} does not exist`));
140
140
  }
141
141
  if (profile.isDefault) {
142
- throw ( new Error(( localize(17341, "Cannot rename the default profile"))));
142
+ throw ( new Error(( localize(17556, "Cannot rename the default profile"))));
143
143
  }
144
144
  const updatedProfile = await this.userDataProfilesService.updateProfile(profile, updateOptions);
145
145
  return updatedProfile;
@@ -149,7 +149,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
149
149
  throw ( new Error(`Profile ${profile.name} does not exist`));
150
150
  }
151
151
  if (profile.isDefault) {
152
- throw ( new Error(( localize(17342, "Cannot delete the default profile"))));
152
+ throw ( new Error(( localize(17557, "Cannot delete the default profile"))));
153
153
  }
154
154
  await this.userDataProfilesService.removeProfile(profile);
155
155
  }
@@ -197,7 +197,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
197
197
  );
198
198
  if (shouldRestartExtensionHosts) {
199
199
  if (!isRemoteWindow) {
200
- if (!(await this.extensionService.stopExtensionHosts(( localize(17343, "Switching to a profile"))))) {
200
+ if (!(await this.extensionService.stopExtensionHosts(( localize(17558, "Switching to a profile"))))) {
201
201
  if (( this.userDataProfilesService.profiles.some(p => p.id === this.userDataProfileService.currentProfile.id))) {
202
202
  await this.userDataProfilesService.setProfileForWorkspace(
203
203
  toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()),
@@ -214,8 +214,8 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
214
214
  const {
215
215
  confirmed
216
216
  } = await this.dialogService.confirm({
217
- message: reloadMessage ?? ( localize(17344, "Switching a profile requires reloading VS Code.")),
218
- primaryButton: ( localize(17345, "&&Reload"))
217
+ message: reloadMessage ?? ( localize(17559, "Switching a profile requires reloading VS Code.")),
218
+ primaryButton: ( localize(17560, "&&Reload"))
219
219
  });
220
220
  if (confirmed) {
221
221
  await this.hostService.reload();