SessionRunner<State> constructor

SessionRunner<State>(
  1. Session<State> session,
  2. Stream<AgentInput> inputCh, {
  3. SessionSnapshot? lastSnapshot,
  4. SessionStore? store,
  5. Map<String, dynamic>? context,
  6. CancellationToken? cancel,
  7. OnEndTurn? onEndTurn,
  8. 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();
}