mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Merge pull request #2817 from SillyTavern/emit-on-stream-error
Emit message events on stream abortion
This commit is contained in:
commit
4464d3a47f
@ -3102,6 +3102,12 @@ class StreamingProcessor {
|
||||
this.hideMessageButtons(this.messageId);
|
||||
generatedPromptCache = '';
|
||||
unblockGeneration();
|
||||
|
||||
const noEmitTypes = ['swipe', 'impersonate', 'continue'];
|
||||
if (!noEmitTypes.includes(this.type)) {
|
||||
eventSource.emit(event_types.MESSAGE_RECEIVED, this.messageId);
|
||||
eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, this.messageId);
|
||||
}
|
||||
}
|
||||
|
||||
setFirstSwipe(messageId) {
|
||||
|
Loading…
Reference in New Issue
Block a user