mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 17:07:59 +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;
|
uimgBox.textContent = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
const arow = addMsg('assistant', '');
|
const arow = addMsg('assistant', '', true);
|
||||||
const abuf = arow.querySelector('.bmd');
|
const abuf = arow.querySelector('.bmd');
|
||||||
const thinkEl = arow.querySelector('.think');
|
const thinkEl = arow.querySelector('.think');
|
||||||
const hintEl = arow.querySelector('.tk-hint');
|
const hintEl = arow.querySelector('.tk-hint');
|
||||||
|
thinkEl.style.display = 'none';
|
||||||
const cursor = document.createElement('span'); cursor.className = 'cursor-dot';
|
const cursor = document.createElement('span'); cursor.className = 'cursor-dot';
|
||||||
abuf.appendChild(cursor);
|
abuf.appendChild(cursor);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user