mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Stamp conversation history items with creation times (#38272)
## What changed - Add fractional Unix creation times to locally authored user, developer, agent, and tool-output items when they enter durable conversation history. - Preserve any creation time already supplied with an item across subsequent requests, remote compaction, and resumed history. ## Testing - Cover timestamp assignment and preservation in session, client, tool, agent-spawn, and remote-compaction tests. GitOrigin-RevId: 431d1770b9746005c808bc0a43953845166d68ad
This commit is contained in:
committed by
copyberry
parent
842fae26c9
commit
361fe2d202
@@ -382,8 +382,15 @@ mod tests {
|
||||
session
|
||||
.record_conversation_items(&turn, std::slice::from_ref(&history_item))
|
||||
.await;
|
||||
let mut expected_history_item = history_item.clone();
|
||||
expected_history_item.set_turn_id_if_missing(&turn_id);
|
||||
let expected_history_item = strip_response_item_id(
|
||||
session
|
||||
.clone_history()
|
||||
.await
|
||||
.raw_items()
|
||||
.next()
|
||||
.expect("history item")
|
||||
.clone(),
|
||||
);
|
||||
let raw_history_event = rx.recv().await.expect("history raw response item event");
|
||||
let EventMsg::RawResponseItem(raw_history_item) = raw_history_event.msg else {
|
||||
panic!("expected raw response item event");
|
||||
|
||||
@@ -545,8 +545,13 @@ async fn extension_tool_executors_are_model_visible_and_dispatchable() -> anyhow
|
||||
session
|
||||
.record_conversation_items(&turn, std::slice::from_ref(&history_item))
|
||||
.await;
|
||||
let mut expected_history_item = history_item.clone();
|
||||
expected_history_item.set_turn_id_if_missing(&turn.sub_id);
|
||||
let expected_history_item = session
|
||||
.clone_history()
|
||||
.await
|
||||
.raw_items()
|
||||
.next()
|
||||
.expect("history item")
|
||||
.clone();
|
||||
|
||||
let router = test_tool_router(
|
||||
step_context.as_ref(),
|
||||
|
||||
Reference in New Issue
Block a user