diff --git a/public/scripts/personas.js b/public/scripts/personas.js index db2401a4e..376636860 100644 --- a/public/scripts/personas.js +++ b/public/scripts/personas.js @@ -748,16 +748,18 @@ function selectCurrentPersona() { } // As the last step, inform user if the persona is only temporarily chosen - const hasDifferentChatLock = !!chat_metadata['persona'] && chat_metadata['persona'] !== user_avatar; - const hasDifferentDefaultLock = power_user.default_persona && power_user.default_persona !== user_avatar; + if (power_user.persona_show_notifications) { + const hasDifferentChatLock = !!chat_metadata['persona'] && chat_metadata['persona'] !== user_avatar; + const hasDifferentDefaultLock = power_user.default_persona && power_user.default_persona !== user_avatar; - if (hasDifferentChatLock || (!chat_metadata['persona'] && hasDifferentDefaultLock)) { - const message = t`A different persona is locked to this chat, or you have a different default persona set. The currently selected persona will only be temporary, and resets on reload. Consider locking this persona to the chat if you want to permanently use it.` - + '

' - + t`Current Persona: ${power_user.personas[user_avatar]}` - + (hasDifferentChatLock ? '
' + t`Chat persona: ${power_user.personas[chat_metadata['persona']]}` : '') - + (hasDifferentDefaultLock ? '
' + t`Default persona: ${power_user.personas[power_user.default_persona]}` : ''); - toastr.info(message, t`Temporary Persona`, { escapeHtml: false, timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); + if (hasDifferentChatLock || (!chat_metadata['persona'] && hasDifferentDefaultLock)) { + const message = t`A different persona is locked to this chat, or you have a different default persona set. The currently selected persona will only be temporary, and resets on reload. Consider locking this persona to the chat if you want to permanently use it.` + + '

' + + t`Current Persona: ${power_user.personas[user_avatar]}` + + (hasDifferentChatLock ? '
' + t`Chat persona: ${power_user.personas[chat_metadata['persona']]}` : '') + + (hasDifferentDefaultLock ? '
' + t`Default persona: ${power_user.personas[power_user.default_persona]}` : ''); + toastr.info(message, t`Temporary Persona`, { escapeHtml: false, timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); + } } } }