mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
codex: fix CI failure on PR #20175
This commit is contained in:
@@ -4378,7 +4378,7 @@ impl ChatWidget {
|
||||
command,
|
||||
parsed,
|
||||
source,
|
||||
None,
|
||||
/*interaction_input*/ None,
|
||||
self.config.animations,
|
||||
);
|
||||
let completed = orphan.complete_call(&id, output, duration);
|
||||
@@ -4395,7 +4395,7 @@ impl ChatWidget {
|
||||
command,
|
||||
parsed,
|
||||
source,
|
||||
None,
|
||||
/*interaction_input*/ None,
|
||||
self.config.animations,
|
||||
);
|
||||
let completed = cell.complete_call(&id, output, duration);
|
||||
@@ -4599,7 +4599,7 @@ impl ChatWidget {
|
||||
command.clone(),
|
||||
parsed_cmd.clone(),
|
||||
source,
|
||||
None,
|
||||
/*interaction_input*/ None,
|
||||
)
|
||||
{
|
||||
*cell = new_exec;
|
||||
@@ -4612,7 +4612,7 @@ impl ChatWidget {
|
||||
command,
|
||||
parsed_cmd,
|
||||
source,
|
||||
None,
|
||||
/*interaction_input*/ None,
|
||||
self.config.animations,
|
||||
)));
|
||||
self.bump_active_cell_revision();
|
||||
|
||||
@@ -625,7 +625,7 @@ async fn unified_exec_wait_after_final_agent_message_snapshot() {
|
||||
terminal_interaction(&mut chat, "call-wait-stdin", "proc-1", "");
|
||||
|
||||
complete_assistant_message(&mut chat, "msg-1", "Final response.", /*phase*/ None);
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let combined = cells
|
||||
@@ -649,7 +649,7 @@ async fn unified_exec_wait_before_streamed_agent_message_snapshot() {
|
||||
terminal_interaction(&mut chat, "call-wait-stream-stdin", "proc-1", "");
|
||||
|
||||
handle_agent_message_delta(&mut chat, "Streaming response.");
|
||||
handle_turn_completed(&mut chat, "turn-wait-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-wait-1", /*duration_ms*/ None);
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let combined = cells
|
||||
@@ -737,7 +737,7 @@ async fn unified_exec_waiting_multiple_empty_snapshots() {
|
||||
assert_eq!(status.header(), "Waiting for background terminal");
|
||||
assert_eq!(status.details(), Some("just fix"));
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-wait-3", None);
|
||||
handle_turn_completed(&mut chat, "turn-wait-3", /*duration_ms*/ None);
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let combined = cells
|
||||
@@ -809,7 +809,7 @@ async fn unified_exec_non_empty_then_empty_snapshots() {
|
||||
.collect::<String>();
|
||||
assert_chatwidget_snapshot!("unified_exec_non_empty_then_empty_active", active_combined);
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
let post_cells = drain_insert_history(&mut rx);
|
||||
let mut combined = pre_cells
|
||||
@@ -1009,7 +1009,7 @@ async fn user_message_during_user_shell_command_is_queued_not_steered() {
|
||||
"done",
|
||||
Some(MessagePhase::FinalAnswer),
|
||||
);
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
match next_submit_op(&mut op_rx) {
|
||||
Op::UserTurn { items, .. } => assert_eq!(
|
||||
@@ -1296,7 +1296,7 @@ async fn turn_complete_keeps_unified_exec_processes() {
|
||||
begin_unified_exec_startup(&mut chat, "call-2", "process-2", "sleep 6");
|
||||
assert_eq!(chat.unified_exec_processes.len(), 2);
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
assert_eq!(chat.unified_exec_processes.len(), 2);
|
||||
|
||||
|
||||
@@ -532,7 +532,7 @@ pub(super) fn handle_token_count(chat: &mut ChatWidget, info: Option<TokenUsageI
|
||||
/*replay_kind*/ None,
|
||||
);
|
||||
}
|
||||
None => chat.set_token_info(None),
|
||||
None => chat.set_token_info(/*info*/ None),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -870,7 +870,7 @@ async fn plan_implementation_popup_shows_once_when_replay_precedes_live_turn_com
|
||||
"Plan details",
|
||||
Some(MessagePhase::FinalAnswer),
|
||||
);
|
||||
handle_turn_completed(&mut chat, "live-turn-complete-1", None);
|
||||
handle_turn_completed(&mut chat, "live-turn-complete-1", /*duration_ms*/ None);
|
||||
|
||||
let popup = render_bottom_popup(&chat, /*width*/ 80);
|
||||
assert!(
|
||||
@@ -891,7 +891,7 @@ async fn plan_implementation_popup_shows_once_when_replay_precedes_live_turn_com
|
||||
"Plan details",
|
||||
Some(MessagePhase::FinalAnswer),
|
||||
);
|
||||
handle_turn_completed(&mut chat, "live-turn-complete-2", None);
|
||||
handle_turn_completed(&mut chat, "live-turn-complete-2", /*duration_ms*/ None);
|
||||
let duplicate_popup = render_bottom_popup(&chat, /*width*/ 80);
|
||||
assert!(
|
||||
!duplicate_popup.contains(PLAN_IMPLEMENTATION_TITLE),
|
||||
|
||||
@@ -252,7 +252,7 @@ async fn steer_rejection_queues_review_follow_up_before_existing_queued_messages
|
||||
assert!(drain_insert_history(&mut rx).is_empty());
|
||||
|
||||
handle_exited_review_mode(&mut chat);
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
match next_submit_op(&mut op_rx) {
|
||||
Op::UserTurn { items, .. } => assert_eq!(
|
||||
@@ -265,7 +265,7 @@ async fn steer_rejection_queues_review_follow_up_before_existing_queued_messages
|
||||
other => panic!("expected merged rejected-steer follow-up submit, got {other:?}"),
|
||||
}
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
match next_submit_op(&mut op_rx) {
|
||||
Op::UserTurn { items, .. } => assert_eq!(
|
||||
|
||||
@@ -1156,7 +1156,7 @@ async fn slash_copy_state_tracks_plan_item_completion() {
|
||||
}),
|
||||
/*replay_kind*/ None,
|
||||
);
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
assert_eq!(chat.last_agent_markdown_text(), Some(plan_text.as_str()));
|
||||
assert_matches!(
|
||||
@@ -1314,7 +1314,7 @@ async fn slash_copy_uses_agent_message_item_when_turn_complete_omits_final_text(
|
||||
/*phase*/ None,
|
||||
);
|
||||
let _ = drain_insert_history(&mut rx);
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
let _ = drain_insert_history(&mut rx);
|
||||
|
||||
assert_eq!(
|
||||
@@ -1334,7 +1334,7 @@ async fn agent_turn_complete_notification_does_not_reuse_stale_copy_source() {
|
||||
complete_turn_with_message(&mut chat, "turn-1", Some("Previous reply"));
|
||||
chat.pending_notification = None;
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-2", None);
|
||||
handle_turn_completed(&mut chat, "turn-2", /*duration_ms*/ None);
|
||||
|
||||
assert_matches!(
|
||||
chat.pending_notification,
|
||||
|
||||
@@ -91,7 +91,12 @@ async fn token_usage_update_uses_runtime_context_window() {
|
||||
|
||||
chat.config.model_context_window = Some(1_000_000);
|
||||
|
||||
handle_token_count(&mut chat, Some(make_token_info(0, 950_000)));
|
||||
handle_token_count(
|
||||
&mut chat,
|
||||
Some(make_token_info(
|
||||
/*total_tokens*/ 0, /*context_window*/ 950_000,
|
||||
)),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
chat.status_line_value_for_item(&crate::bottom_pane::StatusLineItem::ContextWindowSize),
|
||||
@@ -1308,7 +1313,7 @@ async fn status_line_branch_refreshes_after_turn_complete() {
|
||||
chat.status_line_branch_lookup_complete = true;
|
||||
chat.status_line_branch_pending = false;
|
||||
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
assert!(chat.status_line_branch_pending);
|
||||
}
|
||||
@@ -1905,7 +1910,7 @@ async fn multiple_agent_messages_in_single_turn_emit_multiple_headers() {
|
||||
);
|
||||
|
||||
// End turn
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let combined: String = cells
|
||||
@@ -2807,7 +2812,7 @@ printf 'fenced within fenced\n'
|
||||
}
|
||||
|
||||
// Finalize the stream without sending a final AgentMessage, to flush any tail.
|
||||
handle_turn_completed(&mut chat, "turn-1", None);
|
||||
handle_turn_completed(&mut chat, "turn-1", /*duration_ms*/ None);
|
||||
for lines in drain_insert_history(&mut rx) {
|
||||
crate::insert_history::insert_history_lines(&mut term, lines)
|
||||
.expect("Failed to insert history lines in test");
|
||||
|
||||
Reference in New Issue
Block a user