pub fn resolve_session(
store: &SessionStore,
identifier: &str,
interactive: bool,
) -> Result<Session, ResolveError>Expand description
Resolve a session identifier to a loaded Session.
Resolution order:
- Scan all sessions for a name match (collecting names for fuzzy fallback)
- If exactly one name match: return it
- If no name match: try UUID lookup via
store.load(identifier) - If no UUID match either: return
ResolveErrorwith fuzzy suggestions - If multiple name matches AND
interactive: enhanceddialoguer::Selectwith date + command count - If multiple name matches AND NOT
interactive: pick most recent bystarted_at(deterministic duplicate resolution)
§Errors
Returns ResolveError containing a RecError and optional fuzzy suggestions.
§Panics
Panics if internal iterator operations produce an empty collection when a non-empty result is expected (should not happen due to match guards).