use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
#[allow(unreachable_patterns)]
pub enum Item {
InputMessage(Box<models::InputMessage>),
OutputMessage(Box<models::OutputMessage>),
FileSearchToolCall(Box<models::FileSearchToolCall>),
ComputerToolCall(Box<models::ComputerToolCall>),
ComputerCallOutputItemParam(Box<models::ComputerCallOutputItemParam>),
WebSearchToolCall(Box<models::WebSearchToolCall>),
FunctionToolCall(Box<models::FunctionToolCall>),
FunctionCallOutputItemParam(Box<models::FunctionCallOutputItemParam>),
ToolSearchCallItemParam(Box<models::ToolSearchCallItemParam>),
ToolSearchOutputItemParam(Box<models::ToolSearchOutputItemParam>),
ReasoningItem(Box<models::ReasoningItem>),
CompactionSummaryItemParam(Box<models::CompactionSummaryItemParam>),
ImageGenToolCall(Box<models::ImageGenToolCall>),
CodeInterpreterToolCall(Box<models::CodeInterpreterToolCall>),
LocalShellToolCall(Box<models::LocalShellToolCall>),
LocalShellToolCallOutput(Box<models::LocalShellToolCallOutput>),
FunctionShellCallItemParam(Box<models::FunctionShellCallItemParam>),
FunctionShellCallOutputItemParam(Box<models::FunctionShellCallOutputItemParam>),
ApplyPatchToolCallItemParam(Box<models::ApplyPatchToolCallItemParam>),
ApplyPatchToolCallOutputItemParam(Box<models::ApplyPatchToolCallOutputItemParam>),
McpListTools(Box<models::McpListTools>),
McpApprovalRequest(Box<models::McpApprovalRequest>),
McpApprovalResponse(Box<models::McpApprovalResponse>),
McpToolCall(Box<models::McpToolCall>),
CustomToolCallOutput(Box<models::CustomToolCallOutput>),
CustomToolCall(Box<models::CustomToolCall>),
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Role {
Assistant,
}
impl Default for Role {
fn default() -> Role {
Self::Assistant
}
}