Fix persona auto-lock to chat not working

- When auto lock was enabled, it didn't auto-lock to chat when the persona was already selected (like choosing the same persona you have used before)
This commit is contained in:
Wolfsblvt
2025-03-09 15:27:48 +01:00
parent a392593e53
commit 67699d9cfa

View File

@ -1464,6 +1464,10 @@ async function loadPersonaForCurrentChat({ doRender = false } = {}) {
toastr.success(message, t`Persona Auto Selected`, { escapeHtml: false });
}
}
// Even if it's the same persona, we still might need to auto-lock to chat if that's enabled
else if (chatPersona && power_user.persona_auto_lock && !chat_metadata['persona']) {
lockPersona('chat');
}
updatePersonaUIStates();