mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
tests(app-server): send the correct approval response type
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -5,7 +5,9 @@ use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::create_mock_responses_server_sequence;
|
||||
use app_test_support::create_shell_command_sse_response;
|
||||
use app_test_support::to_response;
|
||||
use codex_app_server_protocol::CommandExecutionApprovalDecision;
|
||||
use codex_app_server_protocol::CommandExecutionRequestApprovalParams;
|
||||
use codex_app_server_protocol::CommandExecutionRequestApprovalResponse;
|
||||
use codex_app_server_protocol::ItemCompletedNotification;
|
||||
use codex_app_server_protocol::ItemStartedNotification;
|
||||
use codex_app_server_protocol::JSONRPCError;
|
||||
@@ -223,9 +225,9 @@ async fn review_start_exec_approval_item_id_matches_command_execution_item() ->
|
||||
approval_item_id = Some(params.item_id);
|
||||
mcp.send_response(
|
||||
request.id,
|
||||
serde_json::json!({
|
||||
"decision": codex_protocol::protocol::ReviewDecision::Approved
|
||||
}),
|
||||
serde_json::to_value(CommandExecutionRequestApprovalResponse {
|
||||
decision: CommandExecutionApprovalDecision::Accept,
|
||||
})?,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user