diff --git a/src/core/agent/tools.rs b/src/core/agent/tools.rs index 88ac1442..c11af090 100644 --- a/src/core/agent/tools.rs +++ b/src/core/agent/tools.rs @@ -1218,10 +1218,8 @@ pub async fn exec_search_by_appearance( .to_string(), )?; - let output_dir = std::env::var("MOMENTRY_OUTPUT_DIR") - .unwrap_or_else(|_| "/Users/accusys/momentry/output".to_string()); - let scripts_dir = std::env::var("MOMENTRY_SCRIPTS_DIR") - .unwrap_or_else(|_| "/Users/accusys/momentry_core/scripts".to_string()); + let output_dir = crate::core::config::OUTPUT_DIR.to_string(); + let scripts_dir = crate::core::path_utils::scripts_dir().to_string_lossy().to_string(); let script_path = format!("{}/clothing_color_search.py", scripts_dir); let appearance_path = format!("{}/{}.appearance.json", output_dir, file_uuid); let output_path = format!("{}/{}.color_search_{}.json", output_dir, file_uuid, color); @@ -1280,8 +1278,7 @@ pub async fn exec_search_by_appearance( } fn face_crop_path(file_uuid: &str, trace_id: i32) -> Option { - let base = std::env::var("MOMENTRY_OUTPUT_DIR") - .unwrap_or_else(|_| "/Users/accusys/momentry/output".to_string()); + let base = crate::core::config::OUTPUT_DIR.to_string(); let dir = std::path::PathBuf::from(base) .join(".faces") .join(file_uuid)