diff --git a/public/script.js b/public/script.js index 23be30980..9ea178df9 100644 --- a/public/script.js +++ b/public/script.js @@ -4130,6 +4130,7 @@ export async function sendMessageAsUser(messageText, messageBias, insertAt = nul if (messageBias) { message.extra.bias = messageBias; + message.mes = removeMacros(message.mes); } await populateFileAttachment(message); diff --git a/public/scripts/extensions.js b/public/scripts/extensions.js index 5d69673fa..f4bfc554c 100644 --- a/public/scripts/extensions.js +++ b/public/scripts/extensions.js @@ -18,6 +18,8 @@ const defaultUrl = 'http://localhost:5100'; let saveMetadataTimeout = null; +let requiresReload = false; + export function saveMetadataDebounced() { const context = getContext(); const groupId = context.groupId; @@ -193,24 +195,32 @@ async function discoverExtensions() { function onDisableExtensionClick() { const name = $(this).data('name'); - disableExtension(name); + disableExtension(name, false); } function onEnableExtensionClick() { const name = $(this).data('name'); - enableExtension(name); + enableExtension(name, false); } -async function enableExtension(name) { +async function enableExtension(name, reload = true) { extension_settings.disabledExtensions = extension_settings.disabledExtensions.filter(x => x !== name); await saveSettings(); - location.reload(); + if (reload) { + location.reload(); + } else { + requiresReload = true; + } } -async function disableExtension(name) { +async function disableExtension(name, reload = true) { extension_settings.disabledExtensions.push(name); await saveSettings(); - location.reload(); + if (reload) { + location.reload(); + } else { + requiresReload = true; + } } async function getManifests(names) { @@ -560,6 +570,7 @@ function getModuleInformation() { * Generates the HTML strings for all extensions and displays them in a popup. */ async function showExtensionsDetails() { + let popupPromise; try { showLoader(); let htmlDefault = '