8 lines
297 B
TypeScript
8 lines
297 B
TypeScript
import type { AgentEventPayload } from "../infra/agent-events.js";
|
|
|
|
export function resolveAssistantStreamDeltaText(evt: AgentEventPayload): string {
|
|
const delta = evt.data.delta;
|
|
const text = evt.data.text;
|
|
return typeof delta === "string" ? delta : typeof text === "string" ? text : "";
|
|
}
|