pub fn extract_file_path(name: &str, args: &Value) -> Option<String>Expand description
Extract the target file path from tool arguments.
ยงExamples
use koda_core::undo::extract_file_path;
let args = serde_json::json!({"file_path": "src/main.rs"});
assert_eq!(extract_file_path("Write", &args), Some("src/main.rs".into()));
assert_eq!(extract_file_path("Read", &args), None);
// Also accepts "path" as an alias:
let args = serde_json::json!({"path": "lib.rs"});
assert_eq!(extract_file_path("Edit", &args), Some("lib.rs".into()));