Shared termination logic for streaming sessions.
Tracks stop_reason updates and determines when a message should complete.
Summary
Types
@type stop_reason() :: String.t() | nil
Functions
@spec reduce([map()], stop_reason()) :: {stop_reason(), boolean()}
@spec step(map(), stop_reason()) :: {stop_reason(), boolean()}