Skip to main content

Module session_summary

Module session_summary 

Source
Expand description

AI session summaries (#292): periodically distil the working session into a compact, semantically-recallable digest.

Pipeline: generate::build_candidate (under the session lock, cheap, owned) → maybe_record_periodic (off the hot path: cadence check + persist) → recall::recall (semantic when embeddings are warm, else lexical).

Deterministic and local-first: no LLM is required to produce or recall a summary.

Re-exports§

pub use recall::RecallHit;
pub use recall::recall;
pub use record::SummaryCandidate;
pub use record::SummaryRecord;

Modules§

generate
Build a deterministic session-summary candidate from SessionState (#292).
recall
Recall past session summaries — semantic when embeddings are loaded, else a lexical token-overlap fallback (#292).
record
Persisted session-summary record + the lock-free candidate built under the session lock (#292).
store
Bounded, per-project persistence for session summaries (#292).

Functions§

build_candidate
Build a lock-free candidate from the live session. Call while holding the session lock; persist the result off the hot path with maybe_record_periodic.
list
All stored summaries for a project (oldest first).
maybe_record_periodic
Record candidate iff enabled and the turn cadence is due. Returns the title of the recorded summary, or None if skipped.
record_now
Force-record a summary now (explicit action), ignoring the turn cadence.