pub fn validate_stream_completion(
result: &StreamingResult,
) -> Result<(), AgentError>Expand description
Validates that a stream completed properly. Matches TypeScript’s check: if (!partialMessage || (newMessages.length === 0 && !stopReason)) throw new Error(‘Stream ended without receiving any events’)