[codex-analytics] feature plumbing and emittance

This commit is contained in:
rhan-oai
2026-04-10 20:50:42 -07:00
parent 58933237cd
commit 2ab4bc05df
26 changed files with 1416 additions and 66 deletions
+8
View File
@@ -2430,6 +2430,14 @@ pub enum InitialHistory {
}
impl InitialHistory {
pub fn scan_rollout_items(&self, mut predicate: impl FnMut(&RolloutItem) -> bool) -> bool {
match self {
InitialHistory::New | InitialHistory::Cleared => 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 | InitialHistory::Cleared => None,