mirror of
https://github.com/openai/codex.git
synced 2026-04-30 03:12:20 +03:00
Restore phase when loading from history (#12244)
This commit is contained in:
@@ -190,13 +190,12 @@ impl AgentMessageItem {
|
||||
}
|
||||
|
||||
pub fn as_legacy_events(&self) -> Vec<EventMsg> {
|
||||
// Legacy events only preserve visible assistant text; `phase` has no
|
||||
// representation in the v1 event stream.
|
||||
self.content
|
||||
.iter()
|
||||
.map(|c| match c {
|
||||
AgentMessageContent::Text { text } => EventMsg::AgentMessage(AgentMessageEvent {
|
||||
message: text.clone(),
|
||||
phase: self.phase.clone(),
|
||||
}),
|
||||
})
|
||||
.collect()
|
||||
|
||||
Reference in New Issue
Block a user