mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 00:48:00 +00:00
fix: WebUI chat crashes on streaming reasoning — sendChat never passed the reason flag to addMsg, so .think/.tk-hint were null and first reasoning_content chunk threw 'Cannot set properties of null'; pass reason=true and hide the empty box until thinking arrives
This commit is contained in:
@ -963,10 +963,11 @@ async function sendChat() {
|
||||
uimgBox.textContent = msg;
|
||||
}
|
||||
|
||||
const arow = addMsg('assistant', '');
|
||||
const arow = addMsg('assistant', '', true);
|
||||
const abuf = arow.querySelector('.bmd');
|
||||
const thinkEl = arow.querySelector('.think');
|
||||
const hintEl = arow.querySelector('.tk-hint');
|
||||
thinkEl.style.display = 'none';
|
||||
const cursor = document.createElement('span'); cursor.className = 'cursor-dot';
|
||||
abuf.appendChild(cursor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user