Files
DeepTutor/web/lib/stream.ts
Bingxi Zhao (Frank) 91197f3729 chore: deeptutor 2.0
2026-03-13 01:47:38 +08:00

12 lines
364 B
TypeScript

import type { StreamEvent } from "@/lib/unified-ws";
export function shouldAppendEventContent(event: StreamEvent): boolean {
if (event.type !== "content") return false;
const metadata = (event.metadata ?? {}) as {
call_id?: string;
call_kind?: string;
};
if (!metadata.call_id) return true;
return metadata.call_kind === "llm_final_response";
}