[codex-analytics] feature plumbing and emittance

This commit is contained in:
rhan-oai
2026-04-09 17:24:11 -07:00
parent ecca34209d
commit dd2f563418
34 changed files with 1504 additions and 70 deletions
+8
View File
@@ -2416,6 +2416,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,