#[derive(Debug, Clone)]
pub struct PreToolUseEvent {
pub tool_name: String,
pub tool_input: Value,
pub tool_use_id: String,
pub history: Vec<Value>,
}
impl PreToolUseEvent {
pub fn new(
tool_name: String,
tool_input: Value,
tool_use_id: String,
history: Vec<Value>,
) -> Self {
Self {
tool_name,
tool_input,
tool_use_id,
history,
}
}
}
#[derive(Debug, Clone)]
pub struct PostToolUseEvent {
pub tool_name: String,
pub tool_input: Value,
pub tool_use_id: String,
pub tool_result: Value,
pub history: Vec<Value>,
}
impl PostToolUseEvent {
pub fn new(
tool_name: String,
tool_input: Value,
tool_use_id: String,
tool_result: Value,
history: Vec<Value>,
) -> Self {
Self {
tool_name,
tool_input,
tool_use_id,
tool_result,
history,
}
}
}
#[derive(Debug, Clone)]
pub struct UserPromptSubmitEvent {
pub prompt: String,
pub history: Vec<Value>,
}
impl UserPromptSubmitEvent {
pub fn new(prompt: String, history: Vec<Value>) -> Self {
Self { prompt, history }
}
}