renaming: task to turn (#8963)

This commit is contained in:
jif-oai
2026-01-09 17:31:17 +00:00
committed by GitHub
parent ed64804cb5
commit 1aed01e99f
58 changed files with 362 additions and 349 deletions

View File

@@ -91,7 +91,7 @@ async fn user_turn_with_local_image_attaches_image() -> anyhow::Result<()> {
})
.await?;
wait_for_event(&codex, |event| matches!(event, EventMsg::TaskComplete(_))).await;
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
let body = mock.single_request().body_json();
let image_message =
@@ -190,7 +190,7 @@ async fn view_image_tool_attaches_local_image() -> anyhow::Result<()> {
tool_event = Some(event.clone());
false
}
EventMsg::TaskComplete(_) => true,
EventMsg::TurnComplete(_) => true,
_ => false,
},
// Empirically, we have seen this run slow when run under
@@ -298,7 +298,7 @@ async fn view_image_tool_errors_when_path_is_directory() -> anyhow::Result<()> {
})
.await?;
wait_for_event(&codex, |event| matches!(event, EventMsg::TaskComplete(_))).await;
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
let req = mock.single_request();
let body_with_tool_output = req.body_json();
@@ -370,7 +370,7 @@ async fn view_image_tool_placeholder_for_non_image_files() -> anyhow::Result<()>
})
.await?;
wait_for_event(&codex, |event| matches!(event, EventMsg::TaskComplete(_))).await;
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
let request = mock.single_request();
assert!(
@@ -461,7 +461,7 @@ async fn view_image_tool_errors_when_file_missing() -> anyhow::Result<()> {
})
.await?;
wait_for_event(&codex, |event| matches!(event, EventMsg::TaskComplete(_))).await;
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
let req = mock.single_request();
let body_with_tool_output = req.body_json();
@@ -542,7 +542,7 @@ async fn replaces_invalid_local_image_after_bad_request() -> anyhow::Result<()>
})
.await?;
wait_for_event(&codex, |event| matches!(event, EventMsg::TaskComplete(_))).await;
wait_for_event(&codex, |event| matches!(event, EventMsg::TurnComplete(_))).await;
let first_body = invalid_image_mock.single_request().body_json();
assert!(