mirror of
https://github.com/openai/codex.git
synced 2026-05-04 05:11:37 +03:00
[codex-analytics] feature plumbing and emittance
This commit is contained in:
@@ -2275,6 +2275,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,
|
||||
|
||||
Reference in New Issue
Block a user