fix: live transcription partials update in place instead of stacking rows
- lk.transcription handler now uses addPartial() (in-place update) instead of addMessage() (new row per word) - addMessage() clears stale partials before rendering the final
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user