Don't force avatar on neutral assistant chat

a989ccf318c8e40693f9337956a418ae756ac8a1

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +5 -1Ignore whitespace
public/scripts/slash-commands.js+5 -1
@@ -24,6 +24,7 @@ import {
2424 main_api,
2525 name1,
2626 name2,
27+ neutralCharacterName,
2728 reloadCurrentChat,
2829 removeMacros,
2930 renameCharacter,
@@ -3129,7 +3130,10 @@ export async function sendMessageAs(args, text) {
31293130 const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);
31303131 let force_avatar, original_avatar;
31313132
31323133 ifconst (chatCharacter = this_chid !== undefinednull &&? characters[this_chid] === character): {null;
3134+ const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName;
3135+
3136+ if (chatCharacter === character || isNeutralCharacter) {
31333137 // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars
31343138 }
31353139 else if (character && character.avatar !== 'none') {