mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix instruct name formatting for groups
This commit is contained in:
@ -624,10 +624,10 @@ function loadInstructMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatInstructModeChat(name, mes, isUser) {
|
export function formatInstructModeChat(name, mes, isUser) {
|
||||||
const includeNames = power_user.instruct.names || (selected_group && !isUser);
|
const includeNames = power_user.instruct.names || !!selected_group;
|
||||||
const sequence = isUser ? power_user.instruct.input_sequence : power_user.instruct.output_sequence;
|
const sequence = isUser ? power_user.instruct.input_sequence : power_user.instruct.output_sequence;
|
||||||
const separator = power_user.instruct.wrap ? '\n' : '';
|
const separator = power_user.instruct.wrap ? '\n' : '';
|
||||||
const textArray = includeNames ? [sequence, name, ': ', mes, separator] : [sequence, mes, separator];
|
const textArray = includeNames ? [sequence, `${name}: ${mes}`, separator] : [sequence, mes, separator];
|
||||||
const text = textArray.filter(x => x).join(separator);
|
const text = textArray.filter(x => x).join(separator);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user