Update asr interim

This commit is contained in:
Xin Wang
2026-02-09 17:24:15 +08:00
parent b52cd65848
commit 088943166c
2 changed files with 16 additions and 18 deletions

View File

@@ -1703,16 +1703,10 @@ export const DebugDrawer: React.FC<{
}
const last = prev[prev.length - 1];
if (last?.role === 'user') {
if (last.text === finalText) {
lastUserFinalRef.current = finalText;
return prev;
}
if (finalText.startsWith(last.text) || last.text.startsWith(finalText)) {
const next = [...prev];
next[next.length - 1] = { ...last, text: finalText };
lastUserFinalRef.current = finalText;
return next;
}
const next = [...prev];
next[next.length - 1] = { ...last, text: finalText };
lastUserFinalRef.current = finalText;
return next;
}
lastUserFinalRef.current = finalText;
return [...prev, { role: 'user', text: finalText }];