430
431
async updateProfile(profile: IUserDataProfile, options: IUserDataProfileUpdateOptions): Promise<IUserDataProfile> {
433
throw new Error('Cannot update agents window profile');
434
}
436
>
const profilesToUpdate: IUserDataProfile[] = [];
437
>
for (const existing of this.profiles) {
438
>
let profileToUpdate: Mutable<IUserDataProfile> | undefined;
439
>
440
>
if (profile.id === existing.id) {
441
>
if (!existing.isDefault) {
442
profileToUpdate = toUserDataProfile(existing.id, options.name ?? existing.name, existing.location, this.profilesCacheHome, {
443
icon: options.icon === null ? undefined : options.icon ?? existing.icon,