fn main() {
let response = r#"
Let me check the files:
<tool_use>
{"tool": "bash", "params": {"command": "ls -la"}}
</tool_use>
And also:
# exec pwd
# read_file test.txt
"#;
println!("Testing extract_commands from utils:");
let (reads, execs) = toast_api::utils::extract_commands(response);
println!("Reads: {:?}", reads);
println!("Execs: {:?}", execs);
let tool_calls = toast_api::tools::parse_tool_calls(response);
println!("\nTool calls found: {}", tool_calls.len());
for call in &tool_calls {
println!(" Tool: {}, Params: {}", call.tool, serde_json::to_string(&call.params).unwrap());
}
}