Lightweight coding agent that runs in your terminal
Rust
fix: bad merge (#13461)
jif-oaie6b2e3a9f7ab
diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rsindex da196ef2c5..fe8aca54fd 100644--- a/codex-rs/tui/src/app.rs+++ b/codex-rs/tui/src/app.rs@@ -4020,6 +4020,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4096,6 +4097,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4176,6 +4178,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4255,6 +4258,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4328,6 +4332,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4440,6 +4445,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4508,6 +4514,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4610,6 +4617,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),@@ -4685,6 +4693,7 @@ mod tests {thread_name: None,model: "gpt-test".to_string(),model_provider_id: "test-provider".to_string(),+ service_tier: None,approval_policy: AskForApproval::Never,sandbox_policy: SandboxPolicy::new_read_only_policy(),cwd: PathBuf::from("/tmp/project"),diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rsindex fb9404a089..8c4f4ef57b 100644--- a/codex-rs/tui/src/chatwidget.rs+++ b/codex-rs/tui/src/chatwidget.rs@@ -760,6 +760,7 @@ impl ThreadComposerState {#[derive(Debug, Clone, PartialEq)]pub(crate) struct ThreadInputState {composer: Option<ThreadComposerState>,+ pending_steers: VecDeque<UserMessage>,queued_user_messages: VecDeque<UserMessage>,current_collaboration_mode: CollaborationMode,active_collaboration_mask: Option<CollaborationModeMask>,@@ -2064,6 +2065,11 @@ impl ChatWidget {};Some(ThreadInputState {composer: composer.has_content().then_some(composer),+ pending_steers: self+ .pending_steers+ .iter()+ .map(|pending| pending.user_message.clone())+ .collect(),queued_user_messages: self.queued_user_messages.clone(),current_collaboration_mode: self.current_collaboration_mode.clone(),active_collaboration_mask: self.active_collaboration_mask.clone(),@@ -2103,9 +2109,13 @@ impl ChatWidget {);self.bottom_pane.set_composer_pending_pastes(Vec::new());}- self.queued_user_messages = input_state.queued_user_messages;+ self.pending_steers.clear();+ self.queued_user_messages = input_state.pending_steers;+ self.queued_user_messages+ .extend(input_state.queued_user_messages);} else {self.agent_turn_running = false;+ self.pending_steers.clear();self.set_remote_image_urls(Vec::new());self.bottom_pane.set_composer_text_with_mention_bindings(String::new(),@@ -2119,7 +2129,7 @@ impl ChatWidget {self.turn_sleep_inhibitor.set_turn_running(self.agent_turn_running);self.update_task_running_state();- self.refresh_queued_user_messages();+ self.refresh_pending_input_preview();self.request_redraw();}diff --git a/codex-rs/tui/src/chatwidget/tests.rs b/codex-rs/tui/src/chatwidget/tests.rsindex b9167d211c..2ece156517 100644--- a/codex-rs/tui/src/chatwidget/tests.rs+++ b/codex-rs/tui/src/chatwidget/tests.rs@@ -3375,6 +3375,7 @@ async fn restore_thread_input_state_syncs_sleep_inhibitor_state() {chat.restore_thread_input_state(Some(ThreadInputState {composer: None,+ pending_steers: VecDeque::new(),queued_user_messages: VecDeque::new(),current_collaboration_mode: chat.current_collaboration_mode.clone(),active_collaboration_mask: chat.active_collaboration_mask.clone(),