Skip to content

Commit 6c27de5

Browse files
committed
Run cargo fmt for stale turn output changes
1 parent bfbaf84 commit 6c27de5

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

codex-rs/tui/src/chatwidget.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7179,7 +7179,10 @@ impl ChatWidget {
71797179
if from_replay || self.is_review_mode =>
71807180
{
71817181
if !from_replay
7182-
&& !self.should_accept_live_turn_from(live_event_turn_id, /*explicit_turn_id*/ None)
7182+
&& !self.should_accept_live_turn_from(
7183+
live_event_turn_id,
7184+
/*explicit_turn_id*/ None,
7185+
)
71837186
{
71847187
tracing::debug!(
71857188
event_turn_id = ?live_event_turn_id,
@@ -7198,7 +7201,10 @@ impl ChatWidget {
71987201
}
71997202
EventMsg::AgentMessage(AgentMessageEvent { message, .. }) => {
72007203
if !from_replay
7201-
&& !self.should_accept_live_turn_from(live_event_turn_id, /*explicit_turn_id*/ None)
7204+
&& !self.should_accept_live_turn_from(
7205+
live_event_turn_id,
7206+
/*explicit_turn_id*/ None,
7207+
)
72027208
{
72037209
tracing::debug!(
72047210
event_turn_id = ?live_event_turn_id,
@@ -7264,10 +7270,8 @@ impl ChatWidget {
72647270
}
72657271
EventMsg::AgentReasoningSectionBreak(event) => {
72667272
if !from_replay
7267-
&& !self.should_accept_live_turn_from(
7268-
live_event_turn_id,
7269-
event.turn_id.as_deref(),
7270-
)
7273+
&& !self
7274+
.should_accept_live_turn_from(live_event_turn_id, event.turn_id.as_deref())
72717275
{
72727276
tracing::debug!(
72737277
event_turn_id = ?event.turn_id.as_deref().or(live_event_turn_id),

codex-rs/tui/src/chatwidget/tests/history_replay.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,14 @@ async fn stale_plan_and_reasoning_deltas_are_ignored_after_new_turn_starts() {
327327
None,
328328
);
329329

330-
assert!(rx.try_recv().is_err(), "stale deltas should not emit history cells");
331-
assert!(chat.plan_delta_buffer.is_empty(), "stale plan delta should be ignored");
330+
assert!(
331+
rx.try_recv().is_err(),
332+
"stale deltas should not emit history cells"
333+
);
334+
assert!(
335+
chat.plan_delta_buffer.is_empty(),
336+
"stale plan delta should be ignored"
337+
);
332338
assert!(
333339
chat.reasoning_buffer.is_empty(),
334340
"stale reasoning delta should be ignored"

0 commit comments

Comments
 (0)