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

Function abort_session

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

Source from the content-addressed store, hash-verified

1814}
1815
1816async fn abort_session(
1817 State(state): State<Arc<ServerState>>,
1818 Path(id): Path<String>,
1819) -> Result<Json<serde_json::Value>> {
1820 let sessions = state.sessions.lock().await;
1821 if sessions.get(&id).is_none() {
1822 return Err(ApiError::SessionNotFound(id));
1823 }
1824 Ok(Json(serde_json::json!({ "aborted": true })))
1825}
1826
1827#[derive(Debug, Deserialize)]
1828pub struct UpdateSessionTimeRequest {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected