fix(tui): align watchdog spawn replay fallback

This commit is contained in:
Friel
2026-03-28 16:33:33 -07:00
parent 90c18fd1b1
commit e5e3911799

View File

@@ -139,6 +139,7 @@ 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)]
@@ -3663,9 +3664,12 @@ impl ChatWidget {
.as_ref()
.and_then(|metadata| metadata.agent_role.clone()),
prompt: prompt.unwrap_or_default(),
spawn_mode: codex_protocol::protocol::AgentSpawnMode::Spawn,
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()))