MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / runtime_session

Function runtime_session

libatomic/src/review/incremental.rs:205–218  ·  view source on GitHub ↗
(store: Option<&SessionStore>, id: &str)

Source from the content-addressed store, hash-verified

203}
204
205fn runtime_session(store: Option<&SessionStore>, id: &str) -> CliResult<Option<AgentSession>> {
206 validate_session(id)?;
207 let session = store
208 .map(|s| s.load(id))
209 .transpose()
210 .map_err(|e| CliError::Internal(e.into()))?
211 .flatten();
212 if session.as_ref().is_some_and(|s| s.session_id != id) {
213 return Err(invalid(
214 "Runtime session identity does not match its filename",
215 ));
216 }
217 Ok(session)
218}
219
220fn intent_key(repo: &Repository, reference: &str) -> CliResult<String> {
221 if reference.trim() != reference || reference.is_empty() {

Callers 2

current_planFunction · 0.85
resolve_with_sessionFunction · 0.85

Calls 4

validate_sessionFunction · 0.85
as_refMethod · 0.80
invalidFunction · 0.70
loadMethod · 0.45

Tested by

no test coverage detected