MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_session

Function get_session

crates/opencode-server/src/routes.rs:417–426  ·  view source on GitHub ↗
(
    State(state): State<Arc<ServerState>>,
    Path(id): Path<String>,
)

Source from the content-addressed store, hash-verified

415}
416
417async fn get_session(
418 State(state): State<Arc<ServerState>>,
419 Path(id): Path<String>,
420) -> Result<Json<SessionInfo>> {
421 let sessions = state.sessions.lock().await;
422 let session = sessions
423 .get(&id)
424 .ok_or_else(|| ApiError::SessionNotFound(id))?;
425 Ok(Json(session_to_info(session)))
426}
427
428async fn delete_session(
429 State(state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 2

session_to_infoFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected