Merge pull request #3646 from SillyTavern/fix-persona-auto-lock Fix persona auto-lock to chat not working when the persona was already selected

d94c301b10c296e2abdbfeb548816ed1b084252d

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +4 -0Showing whitespace changes
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