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

Function abort_prompt

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

Source from the content-addressed store, hash-verified

1803}
1804
1805async fn abort_prompt(
1806 State(state): State<Arc<ServerState>>,
1807 Path(id): Path<String>,
1808) -> Result<Json<serde_json::Value>> {
1809 let sessions = state.sessions.lock().await;
1810 if sessions.get(&id).is_none() {
1811 return Err(ApiError::SessionNotFound(id));
1812 }
1813 Ok(Json(serde_json::json!({ "aborted": true })))
1814}
1815
1816async fn abort_session(
1817 State(state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected