Remove request_user_input call_id plumbing

This commit is contained in:
Charles Cunningham
2026-02-02 22:29:40 -08:00
parent 7af9dce46b
commit 954b0884d5
9 changed files with 10 additions and 77 deletions
@@ -294,25 +294,17 @@ pub(crate) async fn apply_bespoke_event_handling(
}),
})
.collect();
let call_id = request.call_id.clone();
let params = ToolRequestUserInputParams {
thread_id: conversation_id.to_string(),
turn_id: request.turn_id,
item_id: call_id.clone(),
item_id: request.call_id,
questions,
};
let rx = outgoing
.send_request(ServerRequestPayload::ToolRequestUserInput(params))
.await;
let response_call_id = call_id.clone();
tokio::spawn(async move {
on_request_user_input_response(
event_turn_id,
response_call_id,
rx,
conversation,
)
.await;
on_request_user_input_response(event_turn_id, rx, conversation).await;
});
} else {
error!(
@@ -325,7 +317,6 @@ pub(crate) async fn apply_bespoke_event_handling(
if let Err(err) = conversation
.submit(Op::UserInputAnswer {
id: event_turn_id,
call_id: Some(request.call_id.clone()),
response: empty,
})
.await
@@ -1492,7 +1483,6 @@ async fn on_exec_approval_response(
async fn on_request_user_input_response(
event_turn_id: String,
call_id: String,
receiver: oneshot::Receiver<JsonValue>,
conversation: Arc<CodexThread>,
) {
@@ -1507,7 +1497,6 @@ async fn on_request_user_input_response(
if let Err(err) = conversation
.submit(Op::UserInputAnswer {
id: event_turn_id,
call_id: Some(call_id.clone()),
response: empty,
})
.await
@@ -1543,7 +1532,6 @@ async fn on_request_user_input_response(
if let Err(err) = conversation
.submit(Op::UserInputAnswer {
id: event_turn_id,
call_id: Some(call_id),
response,
})
.await