mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add group members not currently generating a reply to a stopping strings arrays. #225
This commit is contained in:
@@ -1165,8 +1165,22 @@ function substituteParams(content, _name1, _name2) {
|
|||||||
function getStoppingStrings(isImpersonate, addSpace) {
|
function getStoppingStrings(isImpersonate, addSpace) {
|
||||||
const charString = `\n${name2}:`;
|
const charString = `\n${name2}:`;
|
||||||
const userString = is_pygmalion ? `\nYou:` : `\n${name1}:`;
|
const userString = is_pygmalion ? `\nYou:` : `\n${name1}:`;
|
||||||
const result = isImpersonate ? charString : userString;
|
const result = isImpersonate ? [charString] : [userString];
|
||||||
return [addSpace ? `${result} ` : result];
|
|
||||||
|
// Add other group members as the stopping strings
|
||||||
|
if (selected_group) {
|
||||||
|
const group = groups.find(x => x.id === selected_group);
|
||||||
|
|
||||||
|
if (group && Array.isArray(group.members)) {
|
||||||
|
const names = group.members
|
||||||
|
.map(x => characters.find(y => y.avatar == x))
|
||||||
|
.filter(x => x && x.name !== name2)
|
||||||
|
.map(x => `\n${x.name}:`);
|
||||||
|
result.push(...names);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return addSpace ? result.map(x => `${result} `) : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function processCommands(message, type) {
|
function processCommands(message, type) {
|
||||||
|
Reference in New Issue
Block a user