chore: remove unused dead code

This commit is contained in:
chengyongru
2026-07-07 15:41:27 +08:00
committed by Xubin Ren
parent 29e99d3742
commit 3f33ff3143
12 changed files with 7 additions and 154 deletions
@@ -19,21 +19,6 @@ interface ThreadMessagesProps {
export type DisplayUnit = TurnUnit;
/** True when this unit index is the last assistant text slice before the next user message (or end of thread). */
export function isFinalAssistantSliceBeforeNextUser(
units: DisplayUnit[],
index: number,
): boolean {
const u = units[index];
if (u.type !== "message" || u.message.role !== "assistant") return true;
for (let j = index + 1; j < units.length; j++) {
const v = units[j];
if (v.type === "message" && v.message.role === "user") break;
return false;
}
return true;
}
export function buildDisplayUnits(
messages: UIMessage[],
isStreaming = false,