src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.ts/RenameProfileAction/run
class RenameProfileAction:	async run(accessor: ServicesAccessor, profile?: IUserDataProfile) {
		const quickInputService = accessor.get(IQuickInputService);
		const userDataProfileService = accessor.get(IUserDataProfileService);
		const userDataProfilesService = accessor.get(IUserDataProfilesService);
		const userDataProfileManagementService = accessor.get(IUserDataProfileManagementService);
		const notificationService = accessor.get(INotificationService);

		if (!profile) {
			profile = await this.pickProfile(quickInputService, userDataProfileService, userDataProfilesService);
		}

		if (!profile || profile.isDefault) {
			return;
		}

		const name = await quickInputService.input({
			value: profile.name,
			title: localize('select profile to rename', 'Rename {0}', profile.name),
			validateInput: async (value: string) => {
				if (profile!.name !== value && userDataProfilesService.profiles.some(p => p.name === value)) {
					return localize('profileExists', "Profile with name {0} already exists.", value);
				}
				return undefined;
			}
		});
		if (name && name !== profile.name) {
			try {
				await userDataProfileManagementService.updateProfile(profile, { name });
			} catch (error) {
				notificationService.error(error);
			}
		}
	}