Don't force avatar on neutral assistant chat

a989ccf318c8e40693f9337956a418ae756ac8a1

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +5 -1Showing whitespace changes
public/scripts/slash-commands.js+5 -1
@@ -24,6 +24,7 @@ import {
24 main_api,24 main_api,
25 name1,25 name1,
26 name2,26 name2,
27 neutralCharacterName,
27 reloadCurrentChat,28 reloadCurrentChat,
28 removeMacros,29 removeMacros,
29 renameCharacter,30 renameCharacter,
@@ -3129,7 +3130,10 @@ export async function sendMessageAs(args, text) {
3129 const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);3130 const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);
3130 let force_avatar, original_avatar;3131 let force_avatar, original_avatar;
31313132
3132 if (this_chid !== undefined && characters[this_chid] === character) {3133 const chatCharacter = this_chid !== null ? characters[this_chid] : null;
3134 const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName;
3135
3136 if (chatCharacter === character || isNeutralCharacter) {
3133 // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars3137 // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars
3134 }3138 }
3135 else if (character && character.avatar !== 'none') {3139 else if (character && character.avatar !== 'none') {