mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
[codex-analytics] add protocol-native turn timestamps
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user