chat context working

This commit is contained in:
dal 2025-04-04 11:20:32 -06:00
parent 481d7af164
commit 5b039a1f29
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 3 additions and 7 deletions

View File

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

View File

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