mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
New context methods, added type parameters to message events
This commit is contained in:
@ -3739,9 +3739,9 @@ 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);
|
||||
await eventSource.emit(event_types.MESSAGE_RECEIVED, messageId, 'stable-diffusion');
|
||||
context.addOneMessage(message);
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId);
|
||||
await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, messageId, 'stable-diffusion');
|
||||
await context.saveChat();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user