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

Function reply_question

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

Source from the content-addressed store, hash-verified

3627}
3628
3629async fn reply_question(
3630 State(state): State<Arc<ServerState>>,
3631 Path(id): Path<String>,
3632 Json(req): Json<ReplyQuestionRequest>,
3633) -> Result<Json<bool>> {
3634 let mut pending = QUESTION_REQUESTS.write().await;
3635 let question = pending
3636 .remove(&id)
3637 .ok_or_else(|| ApiError::NotFound(format!("Question request not found: {}", id)))?;
3638 drop(pending);
3639
3640 state.broadcast(
3641 &serde_json::json!({
3642 "type": "question.replied",
3643 "requestID": id,
3644 "sessionID": question.session_id,
3645 "answers": req.answers,
3646 })
3647 .to_string(),
3648 );
3649 Ok(Json(true))
3650}
3651
3652async fn reject_question(
3653 State(state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 2

broadcastMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected