presentation/providers/session_digest_provider library

Classes

SessionDigest
Structured digest of an ended learning session — written to learning_sessions.summary jsonb. Mirrors the JSON shape produced by the server's SESSION_DIGEST_PROMPT.
SessionDigestNotifier
Generates a session digest by calling the proxy with isSessionDigest: true, then persists the JSON to learning_sessions.summary. The digest is later read by the proxy's prior-session fetch when the learner returns to the same topic, so older sessions surface as compressed context rather than raw merged transcript.
SessionDigestState

Properties

sessionDigestNotifierProvider → NotifierProviderImpl<SessionDigestNotifier, SessionDigestState>
Generates a session digest by calling the proxy with isSessionDigest: true, then persists the JSON to learning_sessions.summary. The digest is later read by the proxy's prior-session fetch when the learner returns to the same topic, so older sessions surface as compressed context rather than raw merged transcript.
final

Functions

parseDigest(String response) SessionDigest
Strip markdown fences (defensive — the SESSION_DIGEST_PROMPT instructs no fences, but small models occasionally add them) and decode the JSON object. Throws FormatException on malformed input.