pub(crate) async fn rename_title(
state: &AppState,
id: &str,
title: &str,
refuse_taken: bool,
) -> Result<(AgentDefinition, String), RenameError>Expand description
Give agent id the displayed name title. Its slug, id, signing keys and workspace folder stay
as they are; the old name still reaches it as a former name (display_rename), and no other agent
may take a name it still answers to. refuse_taken also refuses a name another agent answers to now (its
name, slug or display name, or a slug it was renamed from): an agent renaming an agent must not make two
agents answer to one name. Returns the renamed definition and the displayed name it replaced.