add everything back

This commit is contained in:
dal 2025-04-09 09:22:39 -06:00
parent 5d08f3d20e
commit 6ebb364101
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
4 changed files with 6 additions and 1 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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<String>,
#[serde(skip_serializing_if = "Option::is_none")]

View File

@ -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<Self::Output> {
async fn execute(&self, params: Self::Params, _tool_call_id: String) -> Result<Self::Output> {
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,
})
}