get method
Returns the run state with an updated step cursor, if present.
Implementation
@override
/// Returns the run state with an updated step cursor, if present.
Future<RunState?> get(String runId) async {
final state = _runs[runId];
if (state == null) return null;
final steps = _steps[runId];
var cursor = 0;
if (steps != null) {
final seen = <String>{};
for (final name in steps.keys) {
seen.add(_baseStepName(name));
}
cursor = seen.length;
}
return state.copyWith(cursor: cursor);
}