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);
|
this.hideMessageButtons(this.messageId);
|
||||||
generatedPromptCache = '';
|
generatedPromptCache = '';
|
||||||
unblockGeneration();
|
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) {
|
setFirstSwipe(messageId) {
|
||||||
|
|
Loading…
Reference in New Issue