mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Break out on result of secondary key checks
This commit is contained in:
@@ -3735,15 +3735,18 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
|
|||||||
if (selectiveLogic === world_info_logic.NOT_ANY && !hasAnyMatch) {
|
if (selectiveLogic === world_info_logic.NOT_ANY && !hasAnyMatch) {
|
||||||
console.debug(`[WI] Entry ${entry.uid} activated. (NOT ANY) No secondary keywords found`, entry.keysecondary);
|
console.debug(`[WI] Entry ${entry.uid} activated. (NOT ANY) No secondary keywords found`, entry.keysecondary);
|
||||||
activatedNow.add(entry);
|
activatedNow.add(entry);
|
||||||
|
break primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle AND ALL logic
|
// Handle AND ALL logic
|
||||||
if (selectiveLogic === world_info_logic.AND_ALL && hasAllMatch) {
|
if (selectiveLogic === world_info_logic.AND_ALL && hasAllMatch) {
|
||||||
console.debug(`[WI] Entry ${entry.uid} activated. (AND ALL) All secondary keywords found`, entry.keysecondary);
|
console.debug(`[WI] Entry ${entry.uid} activated. (AND ALL) All secondary keywords found`, entry.keysecondary);
|
||||||
activatedNow.add(entry);
|
activatedNow.add(entry);
|
||||||
|
break primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.debug(`[WI] Entry ${entry.uid} skipped. Secondary keywords not satisfied`, entry.keysecondary);
|
console.debug(`[WI] Entry ${entry.uid} skipped. Secondary keywords not satisfied`, entry.keysecondary);
|
||||||
|
break primary;
|
||||||
} else {
|
} else {
|
||||||
// Handle cases where secondary is empty
|
// Handle cases where secondary is empty
|
||||||
console.debug(`[WI] Entry ${entry.uid} activated by primary keyword`, substituted);
|
console.debug(`[WI] Entry ${entry.uid} activated by primary keyword`, substituted);
|
||||||
|
Reference in New Issue
Block a user