pub(crate) async fn generate_recovered_title(
mstore: &Store,
filestore: &FileStore,
block_id: &str,
generation: u64,
word_target: u32,
) -> Option<Generated>Expand description
A session title recovered from the session’s recent activity, for an agent
that has none — called by the background sweep in
backend::reactive::activity_watcher, which writes an accepted result to
term:ambient_summary itself. Goes through the same Ambient Model Call gateway
(admission, cancellation-of-superseded, token accounting) under the distinct
purpose::ACTIVITY_SUMMARY_PUSHED purpose, so it never contends with the
pane’s own title request. The prompt is the pane’s own title prompt
(build_session_title_prompt), given the activity instead of a message, not a
“what is happening now” summary: the result is shown as the session’s title.
generation only needs to strictly increase across successive calls for
the same block_id — the sweep loop’s tick counter is sufficient; it
doesn’t need to correlate with the pull path’s per-turn generation.
Returns None when there’s nothing to summarize yet, the block/CLI path
isn’t resolvable, this call was superseded, or the CLI failed — the
caller treats all of these as “no summary this tick.”