From b7db5bab87468fe93ac7193138a32659a422fe1f Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Sun, 28 Dec 2025 11:37:51 -0800 Subject: [PATCH] Fix: Reset stop button in streamLocal mode --- src/streaming.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/streaming.js b/src/streaming.js index 6870c07..c0c3a2f 100644 --- a/src/streaming.js +++ b/src/streaming.js @@ -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) } -