mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 04:37:40 +01:00
#1649 Fix inclusion groups with recursion
This commit is contained in:
parent
1a80ed7482
commit
ead0aa65ff
@ -1898,6 +1898,11 @@ async function checkWorldInfo(chat, maxContext) {
|
|||||||
needsToScan = false;
|
needsToScan = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newEntries.length === 0) {
|
||||||
|
console.debug('No new entries activated, stopping');
|
||||||
|
needsToScan = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (needsToScan) {
|
if (needsToScan) {
|
||||||
const text = newEntries
|
const text = newEntries
|
||||||
.filter(x => !failedProbabilityChecks.has(x))
|
.filter(x => !failedProbabilityChecks.has(x))
|
||||||
@ -2006,6 +2011,10 @@ function filterByInclusionGroups(newEntries, allActivatedEntries) {
|
|||||||
|
|
||||||
if (Array.from(allActivatedEntries).some(x => x.group === key)) {
|
if (Array.from(allActivatedEntries).some(x => x.group === key)) {
|
||||||
console.debug(`Skipping inclusion group check, group already activated '${key}'`);
|
console.debug(`Skipping inclusion group check, group already activated '${key}'`);
|
||||||
|
// We need to forcefully deactivate all other entries in the group
|
||||||
|
for (const entry of group) {
|
||||||
|
newEntries.splice(newEntries.indexOf(entry), 1);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user