feat(core): remove spawn_mode from agent roles

This commit is contained in:
Friel
2026-04-01 03:06:22 +00:00
parent e07c0a963d
commit a2ebccc904
11 changed files with 12 additions and 64 deletions
-5
View File
@@ -139,7 +139,6 @@ use codex_protocol::protocol::AgentReasoningEvent;
use codex_protocol::protocol::AgentReasoningRawContentDeltaEvent;
#[cfg(test)]
use codex_protocol::protocol::AgentReasoningRawContentEvent;
use codex_protocol::protocol::AgentSpawnMode;
use codex_protocol::protocol::AgentStatus;
use codex_protocol::protocol::ApplyPatchApprovalRequestEvent;
#[cfg(test)]
@@ -3666,10 +3665,6 @@ impl ChatWidget {
prompt: prompt.unwrap_or_default(),
model: String::new(),
reasoning_effort: ReasoningEffortConfig::Medium,
// Thread history items do not carry spawn_mode yet, so the
// replay path must choose an explicit fallback for reconstructed
// spawn rows. Plain spawn is the least surprising default.
spawn_mode: AgentSpawnMode::Spawn,
status: first_receiver
.as_ref()
.and_then(|thread_id| agents_states.get(&thread_id.to_string()))
-1
View File
@@ -2341,7 +2341,6 @@ async fn collab_spawn_end_shows_requested_model_and_effort() {
new_agent_nickname: Some("Robie".to_string()),
new_agent_role: Some("explorer".to_string()),
prompt: "Explore the repo".to_string(),
spawn_mode: codex_protocol::protocol::AgentSpawnMode::Spawn,
model: "gpt-5".to_string(),
reasoning_effort: ReasoningEffortConfig::High,
status: AgentStatus::PendingInit,
-3
View File
@@ -583,7 +583,6 @@ fn status_summary_spans(status: &AgentStatus) -> Vec<Span<'static>> {
mod tests {
use super::*;
use crate::history_cell::HistoryCell;
use codex_protocol::protocol::AgentSpawnMode;
#[cfg(target_os = "macos")]
use crossterm::event::KeyEvent;
#[cfg(target_os = "macos")]
@@ -610,7 +609,6 @@ mod tests {
new_agent_nickname: Some("Robie".to_string()),
new_agent_role: Some("explorer".to_string()),
prompt: "Compute 11! and reply with just the integer result.".to_string(),
spawn_mode: AgentSpawnMode::Spawn,
model: "gpt-5".to_string(),
reasoning_effort: ReasoningEffortConfig::High,
status: AgentStatus::PendingInit,
@@ -749,7 +747,6 @@ mod tests {
new_agent_nickname: Some("Robie".to_string()),
new_agent_role: Some("explorer".to_string()),
prompt: String::new(),
spawn_mode: AgentSpawnMode::Spawn,
model: "gpt-5".to_string(),
reasoning_effort: ReasoningEffortConfig::High,
status: AgentStatus::PendingInit,