MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / unshare_session

Function unshare_session

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

Source from the content-addressed store, hash-verified

519}
520
521async fn unshare_session(
522 State(state): State<Arc<ServerState>>,
523 Path(id): Path<String>,
524) -> Result<Json<serde_json::Value>> {
525 let mut sessions = state.sessions.lock().await;
526 sessions
527 .unshare(&id)
528 .ok_or_else(|| ApiError::SessionNotFound(id.clone()))?;
529 drop(sessions);
530 persist_sessions_if_enabled(&state).await;
531 Ok(Json(serde_json::json!({ "unshared": true })))
532}
533
534#[derive(Debug, Deserialize)]
535pub struct ArchiveSessionRequest {

Callers

nothing calls this directly

Calls 3

unshareMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected