mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
preserve resume updated at
This commit is contained in:
@@ -3177,6 +3177,18 @@ impl ThreadRequestProcessor {
|
||||
InitialHistory::Resumed(resumed) => {
|
||||
let fallback_provider = config_snapshot.model_provider_id.as_str();
|
||||
if let Some(mut stored_thread) = resume_source_thread {
|
||||
if let Some(created_at) = resumed.history.iter().find_map(|item| match item {
|
||||
RolloutItem::SessionMeta(session_meta) => {
|
||||
chrono::DateTime::parse_from_rfc3339(&session_meta.meta.timestamp)
|
||||
.ok()
|
||||
.map(|timestamp| timestamp.with_timezone(&chrono::Utc))
|
||||
}
|
||||
_ => None,
|
||||
}) {
|
||||
// Resume does not advance updated_at until the next turn starts.
|
||||
stored_thread.created_at = created_at;
|
||||
stored_thread.updated_at = created_at;
|
||||
}
|
||||
if stored_thread.preview.is_empty() {
|
||||
stored_thread.preview = preview_from_rollout_items(&resumed.history);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user