mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Don't force avatar on neutral assistant chat
This commit is contained in:
@ -24,6 +24,7 @@ import {
|
|||||||
main_api,
|
main_api,
|
||||||
name1,
|
name1,
|
||||||
name2,
|
name2,
|
||||||
|
neutralCharacterName,
|
||||||
reloadCurrentChat,
|
reloadCurrentChat,
|
||||||
removeMacros,
|
removeMacros,
|
||||||
renameCharacter,
|
renameCharacter,
|
||||||
@ -3129,7 +3130,10 @@ export async function sendMessageAs(args, text) {
|
|||||||
const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);
|
const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);
|
||||||
let force_avatar, original_avatar;
|
let force_avatar, original_avatar;
|
||||||
|
|
||||||
if (this_chid !== undefined && characters[this_chid] === character) {
|
const chatCharacter = this_chid !== null ? characters[this_chid] : null;
|
||||||
|
const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName;
|
||||||
|
|
||||||
|
if (chatCharacter === character || isNeutralCharacter) {
|
||||||
// If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars
|
// If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars
|
||||||
}
|
}
|
||||||
else if (character && character.avatar !== 'none') {
|
else if (character && character.avatar !== 'none') {
|
||||||
|
Reference in New Issue
Block a user