diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 4ee3f8958..8a43c5687 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1281,6 +1281,11 @@ async function getCharacterLore() { continue; } + if (chat_metadata[METADATA_KEY] === worldName) { + console.debug(`Character ${name}'s world ${worldName} is already activated in chat lore! Skipping...`); + continue; + } + const data = await loadWorldInfoData(worldName); const newEntries = data ? Object.keys(data.entries).map((x) => data.entries[x]) : []; entries = entries.concat(newEntries); @@ -1314,6 +1319,11 @@ async function getChatLore() { return []; } + if (selected_world_info.includes(chatWorld)) { + console.debug(`Chat world ${chatWorld} is already activated in global world info! Skipping...`); + return []; + } + const data = await loadWorldInfoData(chatWorld); const entries = data ? Object.keys(data.entries).map((x) => data.entries[x]) : [];