TTS: Ignore prompt-hidden messages on auto narration

This commit is contained in:
Cohee 2024-08-22 22:13:57 +03:00
parent e4d012e49d
commit b7f31cb2ce

View File

@ -755,6 +755,11 @@ async function onMessageEvent(messageId, lastCharIndex) {
const message = structuredClone(context.chat[messageId]);
const hashNew = getStringHash(message?.mes ?? '');
// Ignore prompt-hidden messages
if (message.is_system) {
return;
}
// if no new messages, or same message, or same message hash, do nothing
if (hashNew === lastMessageHash) {
return;