getSnapshot abstract method

Future<SessionSnapshot?> getSnapshot({
  1. String? snapshotId,
  2. String? sessionId,
  3. Map<String, dynamic>? context,
  4. bool metadataOnly = false,
})

Reads a snapshot. Requires a server store.

When metadataOnly is set the returned snapshot carries the shaped metadata (status, finish reason, parent, session, timestamps, error) with no state payload, so a poll that only branches on where a task stands can skip loading the conversation history.

Implementation

Future<SessionSnapshot?> getSnapshot({
  String? snapshotId,
  String? sessionId,
  Map<String, dynamic>? context,
  bool metadataOnly = false,
});