mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Emit events on caption and SD image messages
This commit is contained in:
@ -3351,8 +3351,11 @@ async function sendMessage(prompt, image, generationType, additionalNegativePref
|
||||
},
|
||||
};
|
||||
context.chat.push(message);
|
||||
const messageId = context.chat.length - 1;
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, messageId);
|
||||
context.addOneMessage(message);
|
||||
context.saveChat();
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId);
|
||||
await context.saveChat();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user