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:
parent
0d3505c44b
commit
4fc2f15448
|
@ -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) {
|
||||||
|
if (!dryRun) {
|
||||||
// Returns the promise that generateGroupWrapper returns; resolves when generation is done
|
// Returns the promise that generateGroupWrapper returns; resolves when generation is done
|
||||||
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage, maxLoops });
|
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage, maxLoops });
|
||||||
} else if (selected_group && !is_group_generating && dryRun) {
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue