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)

67699d9cfa1b0ec790d95ee9ffaf1f3d0b76a948

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +4 -0Ignore whitespace
public/scripts/personas.js+4 -0
@@ -1464,6 +1464,10 @@ async function loadPersonaForCurrentChat({ doRender = false } = {}) {
1464 toastr.success(message, t`Persona Auto Selected`, { escapeHtml: false });1464 toastr.success(message, t`Persona Auto Selected`, { escapeHtml: false });
1465 }1465 }
1466 }1466 }
1467 // Even if it's the same persona, we still might need to auto-lock to chat if that's enabled
1468 else if (chatPersona && power_user.persona_auto_lock && !chat_metadata['persona']) {
1469 lockPersona('chat');
1470 }
14671471
1468 updatePersonaUIStates();1472 updatePersonaUIStates();
14691473