diff --git a/api/libs/agents/src/tools/categories/file_tools/create_dashboards.rs b/api/libs/agents/src/tools/categories/file_tools/create_dashboards.rs index 2f84b8d23..a17943cec 100644 --- a/api/libs/agents/src/tools/categories/file_tools/create_dashboards.rs +++ b/api/libs/agents/src/tools/categories/file_tools/create_dashboards.rs @@ -257,6 +257,7 @@ impl ToolExecutor for CreateDashboardFilesTool { id: dashboard_records[i].id, name: dashboard_records[i].name.clone(), file_type: "dashboard".to_string(), + yml_content: serde_yaml::to_string(&yml).unwrap_or_default(), result_message: None, results: None, created_at: dashboard_records[i].created_at, diff --git a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs index 8afbc562f..7ab920515 100644 --- a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs +++ b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs @@ -191,6 +191,7 @@ impl ToolExecutor for CreateMetricFilesTool { id: metric_records[i].id, name: metric_records[i].name.clone(), file_type: "metric".to_string(), + yml_content: serde_yaml::to_string(&yml).unwrap_or_default(), result_message: Some(results_vec[i].0.clone()), results: Some(results_vec[i].1.clone()), created_at: metric_records[i].created_at, diff --git a/api/libs/agents/src/tools/categories/file_tools/file_types/file.rs b/api/libs/agents/src/tools/categories/file_tools/file_types/file.rs index 7046f9038..b2cf2fcde 100644 --- a/api/libs/agents/src/tools/categories/file_tools/file_types/file.rs +++ b/api/libs/agents/src/tools/categories/file_tools/file_types/file.rs @@ -18,6 +18,7 @@ pub struct FileWithId { pub id: Uuid, pub name: String, pub file_type: String, + pub yml_content: String, #[serde(skip_serializing_if = "Option::is_none")] pub result_message: Option, #[serde(skip_serializing_if = "Option::is_none")] diff --git a/api/libs/agents/src/tools/categories/planning_tools/create_plan.rs b/api/libs/agents/src/tools/categories/planning_tools/create_plan.rs index a8ca92603..066511663 100644 --- a/api/libs/agents/src/tools/categories/planning_tools/create_plan.rs +++ b/api/libs/agents/src/tools/categories/planning_tools/create_plan.rs @@ -11,6 +11,7 @@ use crate::{agent::Agent, tools::ToolExecutor}; #[derive(Debug, Serialize, Deserialize)] pub struct CreatePlanOutput { pub message: String, + pub plan_markdown: String, } #[derive(Debug, Deserialize)] @@ -37,13 +38,14 @@ impl ToolExecutor for CreatePlan { "create_plan".to_string() } - async fn execute(&self, _params: Self::Params, _tool_call_id: String) -> Result { + async fn execute(&self, params: Self::Params, _tool_call_id: String) -> Result { self.agent .set_state_value(String::from("plan_available"), Value::Bool(true)) .await; Ok(CreatePlanOutput { message: "Plan created successfully".to_string(), + plan_markdown: params.plan_markdown, }) }