SessionRunner<State> constructor
SessionRunner<State> (
- Session<
State> session, - Stream<
AgentInput> inputCh, { - SessionSnapshot? lastSnapshot,
- SessionStore? store,
- Map<
String, dynamic> ? context, - CancellationToken? cancel,
- OnEndTurn? onEndTurn,
- OnDetach? onDetach,
Implementation
SessionRunner(
this.session,
this.inputCh, {
this._lastSnapshot,
this._store,
this.context,
this.cancel,
this.onEndTurn,
this.onDetach,
}) {
// Seed the last-good state with the initial session state so a failure on
// the very first turn still has a valid fallback state.
lastGoodState = session.getState();
lastGoodStateVersion = session.getVersion();
}