import type { Message } from "../types.js"; import type { ChatStreamState, StreamingReasoningPart } from "./chat-stream-handler.js"; export interface StreamedAssistantMessageIdentity { id: string; timestamp: number; } /** * Whether this reasoning part is kept in the assistant message, and so has * already been exposed to the client and written to history. A part carrying * no text, no signature and no redacted data is an id-only shell from a * `reasoning-start` that never received deltas; it is dropped. * * Empty counts as absent for every field. `reasoning-end` accepts a signature * or redacted payload on `typeof … === "string"`, so `""` is reachable, and * the matching SSE emission already treats it as absent. Keeping the same rule * here is what stops the persisted message from disagreeing with the wire. * * This is the single definition of "persisted reasoning". The runtime reuses * it to decide whether an interrupted local tool batch may be replayed — a * replay re-emits the step's reasoning, which duplicates whatever this * predicate kept. Adding a field to `StreamingReasoningPart` therefore has to * change this one function, not two copies of it. */ export declare function isPersistedReasoningPart(part: StreamingReasoningPart): boolean; export declare function buildStreamedAssistantMessage(state: Pick, identity: StreamedAssistantMessageIdentity, options?: { preserveRecoverablePlaceholderToolCalls?: boolean; }): Message; //# sourceMappingURL=streamed-assistant-message.d.ts.map