refactor: optimize core engine and retrieval logic for v2.80.43
This commit is contained in:
@@ -518,6 +518,18 @@
|
||||
chat.scrollTop = chat.scrollHeight;
|
||||
}
|
||||
break;
|
||||
case 'streamReplace':
|
||||
// Progressive answering: the backend streamed raw tokens
|
||||
// live (including hidden reasoning, pre-sanitize text);
|
||||
// once everything is finalized it sends the cleaned full
|
||||
// text via streamReplace so the bubble ends up correct
|
||||
// regardless of what slipped through during streaming.
|
||||
if (streamBody) {
|
||||
streamBody._parent._raw = String(msg.value ?? '');
|
||||
streamBody.innerHTML = fmt(streamBody._parent._raw);
|
||||
chat.scrollTop = chat.scrollHeight;
|
||||
}
|
||||
break;
|
||||
case 'streamEnd':
|
||||
if (streamBody) {
|
||||
streamBody.classList.remove('stream-active');
|
||||
|
||||
Reference in New Issue
Block a user