mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
tests: fix request-user-input rebase drift
This commit is contained in:
@@ -186,7 +186,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn interrupted_response_interrupts_turn() {
|
||||
let handler = RequestUserInputHandler;
|
||||
let handler = RequestUserInputHandler {
|
||||
default_mode_request_user_input: false,
|
||||
};
|
||||
let output = ToolOutput::Function {
|
||||
body: FunctionCallOutputBody::Text(r#"{"answers":{},"interrupted":true}"#.to_string()),
|
||||
success: Some(true),
|
||||
@@ -197,7 +199,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn non_interrupted_response_does_not_interrupt_turn() {
|
||||
let handler = RequestUserInputHandler;
|
||||
let handler = RequestUserInputHandler {
|
||||
default_mode_request_user_input: false,
|
||||
};
|
||||
let output = ToolOutput::Function {
|
||||
body: FunctionCallOutputBody::Text(r#"{"answers":{}}"#.to_string()),
|
||||
success: Some(true),
|
||||
|
||||
@@ -6,6 +6,7 @@ use std::time::Duration;
|
||||
use codex_core::features::Feature;
|
||||
use codex_protocol::config_types::CollaborationMode;
|
||||
use codex_protocol::config_types::ModeKind;
|
||||
use codex_protocol::config_types::ReasoningSummary;
|
||||
use codex_protocol::config_types::Settings;
|
||||
use codex_protocol::protocol::AskForApproval;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
@@ -257,7 +258,7 @@ async fn request_user_input_interrupted_response_preserves_tool_output() -> anyh
|
||||
sandbox_policy: SandboxPolicy::DangerFullAccess,
|
||||
model: session_model.clone(),
|
||||
effort: None,
|
||||
summary: ReasoningSummary::Auto,
|
||||
summary: Some(ReasoningSummary::Auto),
|
||||
collaboration_mode: Some(CollaborationMode {
|
||||
mode: ModeKind::Plan,
|
||||
settings: Settings {
|
||||
@@ -314,7 +315,7 @@ async fn request_user_input_interrupted_response_preserves_tool_output() -> anyh
|
||||
sandbox_policy: SandboxPolicy::DangerFullAccess,
|
||||
model: session_model,
|
||||
effort: None,
|
||||
summary: ReasoningSummary::Auto,
|
||||
summary: Some(ReasoningSummary::Auto),
|
||||
collaboration_mode: Some(CollaborationMode {
|
||||
mode: ModeKind::Plan,
|
||||
settings: Settings {
|
||||
@@ -415,7 +416,7 @@ async fn request_user_input_interrupt_not_blocked_by_earlier_tool() -> anyhow::R
|
||||
sandbox_policy: SandboxPolicy::DangerFullAccess,
|
||||
model: session_model,
|
||||
effort: None,
|
||||
summary: ReasoningSummary::Auto,
|
||||
summary: Some(ReasoningSummary::Auto),
|
||||
collaboration_mode: Some(CollaborationMode {
|
||||
mode: ModeKind::Plan,
|
||||
settings: Settings {
|
||||
|
||||
@@ -375,6 +375,7 @@ mod tests {
|
||||
id: "turn-1".to_string(),
|
||||
response: codex_protocol::request_user_input::RequestUserInputResponse {
|
||||
answers: HashMap::new(),
|
||||
interrupted: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -439,6 +440,7 @@ mod tests {
|
||||
id: "turn-1".to_string(),
|
||||
response: codex_protocol::request_user_input::RequestUserInputResponse {
|
||||
answers: HashMap::new(),
|
||||
interrupted: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -489,6 +491,7 @@ mod tests {
|
||||
id: "turn-1".to_string(),
|
||||
response: codex_protocol::request_user_input::RequestUserInputResponse {
|
||||
answers: HashMap::new(),
|
||||
interrupted: false,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user