mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Reformat up Generate() group logic
The first two conditions in the group if/else blocks are the same, so we can combine them.
This commit is contained in:
@ -2978,10 +2978,12 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
|
|||||||
chat_metadata['tainted'] = true;
|
chat_metadata['tainted'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected_group && !is_group_generating && !dryRun) {
|
if (selected_group && !is_group_generating) {
|
||||||
// Returns the promise that generateGroupWrapper returns; resolves when generation is done
|
if (!dryRun) {
|
||||||
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage, maxLoops });
|
// Returns the promise that generateGroupWrapper returns; resolves when generation is done
|
||||||
} else if (selected_group && !is_group_generating && dryRun) {
|
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage, maxLoops });
|
||||||
|
}
|
||||||
|
|
||||||
const characterIndexMap = new Map(characters.map((char, index) => [char.avatar, index]));
|
const characterIndexMap = new Map(characters.map((char, index) => [char.avatar, index]));
|
||||||
const group = groups.find((x) => x.id === selected_group);
|
const group = groups.find((x) => x.id === selected_group);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user