[codex-analytics] feature plumbing and emittance

This commit is contained in:
rhan-oai
2026-04-09 15:26:42 -07:00
parent 600c3e49e0
commit f58ed8990c
29 changed files with 1451 additions and 55 deletions

View File

@@ -2279,6 +2279,14 @@ pub enum InitialHistory {
}
impl InitialHistory {
pub fn scan_rollout_items(&self, mut predicate: impl FnMut(&RolloutItem) -> bool) -> bool {
match self {
InitialHistory::New => false,
InitialHistory::Resumed(resumed) => resumed.history.iter().any(&mut predicate),
InitialHistory::Forked(items) => items.iter().any(predicate),
}
}
pub fn forked_from_id(&self) -> Option<ThreadId> {
match self {
InitialHistory::New => None,