Builds the lean Cursor `sessionStart` context for a resolved project root. Adds index freshness, the skill index, and tokens-saved counter that the always-on plugin rule cannot know.
(root: Option<&Path>)
| 292 | /// Adds index freshness, the skill index, and tokens-saved counter that the |
| 293 | /// always-on plugin rule cannot know. |
| 294 | async fn cursor_session_context_for_root(root: Option<&Path>) -> String { |
| 295 | let (initialized, staleness, tokens_saved) = match root { |
| 296 | Some(r) if crate::tracedecay::TraceDecay::has_initialized_store(r).await => { |
| 297 | let (staleness, tokens_saved) = cursor_index_signals_for_root(r).await; |
| 298 | (true, staleness, tokens_saved) |
| 299 | } |
| 300 | _ => (false, None, None), |
| 301 | }; |
| 302 | build_cursor_session_context(initialized, staleness.as_deref(), tokens_saved) |
| 303 | } |
| 304 | |
| 305 | /// Cursor `afterShellExecution` hook handler. |
| 306 | /// |
no test coverage detected