mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
feat: add compaction event (#7289)
This commit is contained in:
@@ -180,13 +180,13 @@ async fn remote_compact_runs_automatically() -> Result<()> {
|
||||
})
|
||||
.await?;
|
||||
let message = wait_for_event_match(&codex, |ev| match ev {
|
||||
EventMsg::AgentMessage(ev) => Some(ev.message.clone()),
|
||||
EventMsg::ContextCompacted(_) => Some(true),
|
||||
_ => None,
|
||||
})
|
||||
.await;
|
||||
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await;
|
||||
|
||||
assert_eq!(message, "Compact task completed");
|
||||
assert!(message);
|
||||
assert_eq!(compact_mock.requests().len(), 1);
|
||||
let follow_up_body = responses_mock.single_request().body_json().to_string();
|
||||
assert!(follow_up_body.contains("REMOTE_COMPACTED_SUMMARY"));
|
||||
|
||||
Reference in New Issue
Block a user