[codex-analytics] add protocol-native turn timestamps

This commit is contained in:
rhan-oai
2026-04-06 13:13:44 -07:00
parent 9bb813353e
commit 6d273dd348
58 changed files with 1176 additions and 60 deletions
+4 -3
View File
@@ -109,11 +109,12 @@ impl ThreadState {
self.current_turn_history.active_turn_snapshot()
}
pub(crate) fn track_current_turn_event(&mut self, event: &EventMsg) {
self.current_turn_history.handle_event(event);
if !self.current_turn_history.has_active_turn() {
pub(crate) fn track_current_turn_event(&mut self, event: &EventMsg) -> Option<Turn> {
let terminal_turn = self.current_turn_history.handle_event(event);
if terminal_turn.is_some() && !self.current_turn_history.has_active_turn() {
self.current_turn_history.reset();
}
terminal_turn
}
}