From 67699d9cfa1b0ec790d95ee9ffaf1f3d0b76a948 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Sun, 9 Mar 2025 15:27:48 +0100 Subject: [PATCH] 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) --- public/scripts/personas.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/personas.js b/public/scripts/personas.js index 9d4b2c83c..ce220ad5f 100644 --- a/public/scripts/personas.js +++ b/public/scripts/personas.js @@ -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();