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

Function reject_question

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

Source from the content-addressed store, hash-verified

3650}
3651
3652async fn reject_question(
3653 State(state): State<Arc<ServerState>>,
3654 Path(id): Path<String>,
3655) -> Result<Json<bool>> {
3656 let mut pending = QUESTION_REQUESTS.write().await;
3657 let question = pending
3658 .remove(&id)
3659 .ok_or_else(|| ApiError::NotFound(format!("Question request not found: {}", id)))?;
3660 drop(pending);
3661
3662 state.broadcast(
3663 &serde_json::json!({
3664 "type": "question.rejected",
3665 "requestID": id,
3666 "sessionID": question.session_id,
3667 })
3668 .to_string(),
3669 );
3670 Ok(Json(true))
3671}
3672
3673/// TUI communication routes.
3674///

Callers

nothing calls this directly

Calls 2

broadcastMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected