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

Function get_session_summary

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

Source from the content-addressed store, hash-verified

602}
603
604async fn get_session_summary(
605 State(state): State<Arc<ServerState>>,
606 Path(id): Path<String>,
607) -> Result<Json<Option<SessionSummaryInfo>>> {
608 let sessions = state.sessions.lock().await;
609 let session = sessions
610 .get(&id)
611 .ok_or_else(|| ApiError::SessionNotFound(id.clone()))?;
612 Ok(Json(session.summary.as_ref().map(|s| SessionSummaryInfo {
613 additions: s.additions,
614 deletions: s.deletions,
615 files: s.files,
616 })))
617}
618
619#[derive(Debug, Deserialize)]
620pub struct SetSummaryRequest {

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected