mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Preserve agents when deleting persona templates
This commit is contained in:
@@ -602,21 +602,17 @@ export function UserProfilePanel({
|
||||
}
|
||||
|
||||
try {
|
||||
const deletedInstances =
|
||||
await deleteManagedAgentsForPersona(personaToConfirm);
|
||||
if (deletedInstances.cancelled) return;
|
||||
|
||||
await deletePersonaMutation.mutateAsync(personaToConfirm.id);
|
||||
toast.success(`Deleted ${personaToConfirm.displayName}.`);
|
||||
setPersonaToDelete(null);
|
||||
onClose();
|
||||
} catch (error) {
|
||||
toast.error(
|
||||
error instanceof Error ? error.message : "Failed to delete agent.",
|
||||
error instanceof Error ? error.message : "Failed to delete persona.",
|
||||
);
|
||||
}
|
||||
},
|
||||
[deleteManagedAgentsForPersona, deletePersonaMutation.mutateAsync, onClose],
|
||||
[deletePersonaMutation.mutateAsync, onClose],
|
||||
);
|
||||
|
||||
const handleAddedToChannel = React.useCallback(
|
||||
|
||||
Reference in New Issue
Block a user