diff --git a/web/app.js b/web/app.js index 8c06794..93a1f29 100644 --- a/web/app.js +++ b/web/app.js @@ -264,6 +264,7 @@ function renderMessage(msg) { } function addMessage(role, text) { + clearPartials(); const msg = { role, text, ts: Date.now() }; history.push(msg); persistHistory(); @@ -335,7 +336,8 @@ function registerTranscriptionStream(rm) { if (pub) { role = isAgent(p) ? "agent" : "user"; break; } } } - addMessage(role, text.trim()); + // Use partial rendering: updates the same row in place until final. + addPartial(role, text.trim()); }); } catch (e) { // Older SDKs may not support registerTextStreamHandler — the data