| 748 | } | 748 | } |
| 749 | | 749 | |
| 750 | // As the last step, inform user if the persona is only temporarily chosen | 750 | // As the last step, inform user if the persona is only temporarily chosen |
| 751 | const hasDifferentChatLock = !!chat_metadata['persona'] && chat_metadata['persona'] !== user_avatar; | 751 | if (power_user.persona_show_notifications) { |
| 752 | const hasDifferentDefaultLock = power_user.default_persona && power_user.default_persona !== user_avatar; | 752 | const hasDifferentChatLock = !!chat_metadata['persona'] && chat_metadata['persona'] !== user_avatar; |
| 753 | | 753 | const hasDifferentDefaultLock = power_user.default_persona && power_user.default_persona !== user_avatar; |
| 754 | if (hasDifferentChatLock || (!chat_metadata['persona'] && hasDifferentDefaultLock)) { | 754 | |
| 755 | 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.` | 755 | if (hasDifferentChatLock || (!chat_metadata['persona'] && hasDifferentDefaultLock)) { |
| 756 | + '<br /><br />' | 756 | 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.` |
| 757 | + t`Current Persona: ${power_user.personas[user_avatar]}` | 757 | + '<br /><br />' |
| 758 | + (hasDifferentChatLock ? '<br />' + t`Chat persona: ${power_user.personas[chat_metadata['persona']]}` : '') | 758 | + t`Current Persona: ${power_user.personas[user_avatar]}` |
| 759 | + (hasDifferentDefaultLock ? '<br />' + t`Default persona: ${power_user.personas[power_user.default_persona]}` : ''); | 759 | + (hasDifferentChatLock ? '<br />' + t`Chat persona: ${power_user.personas[chat_metadata['persona']]}` : '') |
| 760 | toastr.info(message, t`Temporary Persona`, { escapeHtml: false, timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); | 760 | + (hasDifferentDefaultLock ? '<br />' + t`Default persona: ${power_user.personas[power_user.default_persona]}` : ''); |
| | 761 | toastr.info(message, t`Temporary Persona`, { escapeHtml: false, timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); |
| | 762 | } |
| 761 | } | 763 | } |
| 762 | } | 764 | } |
| 763 | } | 765 | } |