Fix: Reset stop button in streamLocal mode

This commit is contained in:
2025-12-28 11:37:51 -08:00
parent fbc814b2bf
commit b7db5bab87

View File

@@ -36,7 +36,7 @@ async function streamLocal(body,onDelta,signal){
for(const line of lines){
if(line.startsWith('data: ')){
const d=line.slice(6);
if(d==='[DONE]')return;
if(d==='[DONE]'){onDelta('',true);return}
try{
const j=JSON.parse(d);
const delta=j.choices?.[0]?.delta?.content||'';
@@ -84,4 +84,3 @@ export async function streamChat(onDelta,streamId){
}
return await streamORP(body,onDelta,streamId)
}