Build a map from session turn_number → intent human key for a specific session, read from the manifest's `session`/`turn` provenance fields. The stored `turn` is `turn_count + 1` at creation time (see `resolve_active_session` in vault/intent.rs), so we subtract 1 to recover the 0-indexed session-ledger turn number.
(repo: &Repository, session_id: &str)
| 377 | /// `resolve_active_session` in vault/intent.rs), so we subtract 1 to recover |
| 378 | /// the 0-indexed session-ledger turn number. |
| 379 | fn build_turn_intent_map(repo: &Repository, session_id: &str) -> HashMap<u32, String> { |
| 380 | let mut map: HashMap<u32, String> = HashMap::new(); |
| 381 | let manifest = match repo.vault_manifest() { |
| 382 | Ok(m) => m, |
| 383 | Err(_) => return map, |
| 384 | }; |
| 385 | for (key, summary) in &manifest.intents { |
| 386 | if summary.session.as_deref() != Some(session_id) { |
| 387 | continue; |
| 388 | } |
| 389 | let Some(session_turn) = summary.turn.and_then(|t| t.checked_sub(1)) else { |
| 390 | continue; |
| 391 | }; |
| 392 | let label = if summary.human_key.is_empty() { |
| 393 | key.clone() |
| 394 | } else { |
| 395 | summary.human_key.clone() |
| 396 | }; |
| 397 | map.insert(session_turn, label); |
| 398 | } |
| 399 | map |
| 400 | } |
| 401 | |
| 402 | fn truncate_column(value: &str, width: usize) -> String { |
| 403 | let count = value.chars().count(); |