mirror of
https://github.com/openai/codex.git
synced 2026-05-03 10:56:37 +00:00
[codex-analytics] denormalize thread metadata onto turn events
This commit is contained in:
@@ -367,3 +367,27 @@ fn subagent_parent_thread_id(subagent_source: &SubAgentSource) -> Option<String>
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn turn_subagent_source_name(thread_source: &SessionSource) -> Option<String> {
|
||||
match thread_source {
|
||||
SessionSource::SubAgent(subagent_source) => Some(subagent_source_name(subagent_source)),
|
||||
SessionSource::Cli
|
||||
| SessionSource::VSCode
|
||||
| SessionSource::Exec
|
||||
| SessionSource::Mcp
|
||||
| SessionSource::Custom(_)
|
||||
| SessionSource::Unknown => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn turn_parent_thread_id(thread_source: &SessionSource) -> Option<String> {
|
||||
match thread_source {
|
||||
SessionSource::SubAgent(subagent_source) => subagent_parent_thread_id(subagent_source),
|
||||
SessionSource::Cli
|
||||
| SessionSource::VSCode
|
||||
| SessionSource::Exec
|
||||
| SessionSource::Mcp
|
||||
| SessionSource::Custom(_)
|
||||
| SessionSource::Unknown => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user