pub enum HeadlessStreamEvent {
TextDelta(String),
ToolCall(ObservedToolCall),
Done(HeadlessToolResponse),
}Expand description
Event emitted by HeadlessTurnProvider::converse_stream as the turn
progresses.
Unlike StreamChunk (which only carries text
deltas), this enum surfaces tool-call observations alongside text —
keeping the rich metadata that HeadlessTurnProvider::converse returns
at the end of the turn while delivering it incrementally.
Variants§
TextDelta(String)
Partial assistant text — the next chunk to append to the in-flight assistant message.
ToolCall(ObservedToolCall)
A tool call was observed (start or status update). Each event is a snapshot of the tool call’s latest known state, so a consumer can either accumulate updates or replace by id.
Done(HeadlessToolResponse)
The turn has finished. Carries the aggregated
HeadlessToolResponse — same shape that
HeadlessTurnProvider::converse would have returned.
Always emitted as the last event before the stream closes
successfully.