You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 06591f6
Browse filesBrowse the repository at this point in the historyBrowse files
feat(react-hooks,core): useSessionStream hook and stream access-token refresh
Folds two related changes into the realtime stream work.
useSessionStream reads one channel of a session's realtime stream (out by
default, or in), accumulating records with automatic resume from the last
record seen. It is read-only; useSession is reserved for two-way (read and
write) communication.
Realtime stream subscriptions can refresh an expired access token and
reconnect once, via an optional refreshAccessToken on the client configuration
and the React hooks. Behavior is unchanged when no refresher is supplied:
auth errors stay terminal.
Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks.
Added a `useSessionStream` React hook for reading a session's output or input channel in realtime, with automatic resume from the last record you received.
0 commit comments