class StreamManagerLast seen error from the stream, if any.
Reset to undefined when a new stream starts.
Whether the stream is currently running.
true while streaming, false when idle or completed.
The current state values of the stream. Updated as streaming events are received.
Get all currently running subagents.
Snapshot token for useSyncExternalStore compatibility.
Get a specific subagent by tool call ID.
Get all subagents as a Map.
Get all subagents triggered by a specific AI message.
Get all subagents of a specific type.
Check if any subagents are currently tracked.
Reconstruct subagent state from historical messages.
This method should be called when loading thread history to restore subagent visualization after:
Subscribe to state changes. Returns an unsubscribe function.