use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum AgentAction {
ReadFile {
paths: Vec<String>,
},
WriteFile {
path: String,
content: String,
},
EditFile {
path: String,
old_string: String,
new_string: String,
},
DeleteFile {
path: String,
},
CreateDirectory {
path: String,
},
ExecuteCommand {
command: String,
working_dir: Option<String>,
timeout: Option<u64>,
},
GitDiff {
paths: Vec<Option<String>>,
},
GitCommit {
message: String,
files: Vec<String>,
},
GitStatus,
WebSearch {
queries: Vec<(String, usize)>,
},
WebFetch {
url: String,
},
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ActionResult {
Success { output: String },
Error { error: String },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ActionDisplay {
pub action_type: String,
pub target: String,
pub result: ActionResult,
pub preview: Option<String>,
pub line_count: Option<usize>,
pub file_content: Option<String>,
pub duration_seconds: Option<f64>,
pub targets: Option<Vec<String>>,
pub item_count: Option<usize>,
pub failed_items: Option<Vec<String>>,
}