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 2e0a9d21f..0cf9f3ad8 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 @@ -131,7 +131,7 @@ impl ToolExecutor for CreateDashboardFilesTool { async fn is_enabled(&self) -> bool { matches!(( - self.agent.get_state_value("dashboards_available").await, + self.agent.get_state_value("metrics_available").await, self.agent.get_state_value("plan_available").await, ), (Some(_), Some(_))) } @@ -311,11 +311,7 @@ impl ToolExecutor for CreateDashboardFilesTool { let duration = start_time.elapsed().as_millis() as i64; self.agent - .set_state_value(String::from("files_available"), Value::Bool(true)) - .await; - - self.agent - .set_state_value(String::from("dashboards_available"), Value::Bool(true)) + .set_state_value(String::from("metrics_available"), Value::Bool(true)) .await; Ok(CreateDashboardFilesOutput { diff --git a/api/libs/handlers/src/chats/context_loaders/chat_context.rs b/api/libs/handlers/src/chats/context_loaders/chat_context.rs index 7c6c6ae9a..2e8e0d51d 100644 --- a/api/libs/handlers/src/chats/context_loaders/chat_context.rs +++ b/api/libs/handlers/src/chats/context_loaders/chat_context.rs @@ -38,7 +38,7 @@ impl ChatContextLoader { agent.set_state_value(String::from("metrics_available"), Value::Bool(true)) .await; }, - "create_dashboard" | "update_dashboard" => { + "create_dashboards" | "update_dashboards" => { agent.set_state_value(String::from("dashboards_available"), Value::Bool(true)) .await; },