toast-api 0.1.9

An unofficial CLI client and API server for Claude/Deepseek
Documentation
fn main() {
    // Test the extraction
    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:");
    
    // First check what extract_commands returns
    let (reads, execs) = toast_api::utils::extract_commands(response);
    println!("Reads: {:?}", reads);
    println!("Execs: {:?}", execs);
    
    // Now test parse_tool_calls
    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());
    }
}