mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
Have a helper function for deciding if we are rolling out a function or not
17 lines
617 B
Rust
17 lines
617 B
Rust
use codex_protocol::models::ResponseItem;
|
|
|
|
/// Whether a `ResponseItem` should be persisted in rollout files.
|
|
#[inline]
|
|
pub(crate) fn is_persisted_response_item(item: &ResponseItem) -> bool {
|
|
match item {
|
|
ResponseItem::Message { .. }
|
|
| ResponseItem::Reasoning { .. }
|
|
| ResponseItem::LocalShellCall { .. }
|
|
| ResponseItem::FunctionCall { .. }
|
|
| ResponseItem::FunctionCallOutput { .. }
|
|
| ResponseItem::CustomToolCall { .. }
|
|
| ResponseItem::CustomToolCallOutput { .. } => true,
|
|
ResponseItem::WebSearchCall { .. } | ResponseItem::Other => false,
|
|
}
|
|
}
|