mirror of https://github.com/buster-so/buster.git
ok conditional logic good
This commit is contained in:
parent
242f648d85
commit
e1c4c6ba41
|
@ -1,7 +1,8 @@
|
|||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc::Receiver;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
@ -156,18 +157,6 @@ impl ManagerAgent {
|
|||
|
||||
let mut rx = self.stream_process_thread(thread).await?;
|
||||
|
||||
while let Some(message) = rx.recv().await {
|
||||
let message = message?;
|
||||
if let AgentMessage::Tool {
|
||||
id,
|
||||
content,
|
||||
tool_call_id,
|
||||
name,
|
||||
progress,
|
||||
} = message
|
||||
{}
|
||||
}
|
||||
|
||||
Ok(rx)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,11 @@ impl ToolExecutor for DashboardAgentTool {
|
|||
println!("DashboardAgentTool: Dashboard agent run completed");
|
||||
|
||||
println!("DashboardAgentTool: Preparing success response");
|
||||
|
||||
self.agent
|
||||
.set_state_value(String::from("files_created"), Value::Bool(false))
|
||||
.await;
|
||||
|
||||
// Return success with the output
|
||||
Ok(serde_json::json!({
|
||||
"status": "success",
|
||||
|
|
|
@ -60,6 +60,10 @@ impl ToolExecutor for MetricAgentTool {
|
|||
// Run the metric agent and get the receiver
|
||||
let _rx = metric_agent.run(&mut current_thread).await?;
|
||||
|
||||
self.agent
|
||||
.set_state_value(String::from("files_created"), Value::Bool(false))
|
||||
.await;
|
||||
|
||||
// Return immediately with status
|
||||
Ok(serde_json::json!({
|
||||
"status": "running",
|
||||
|
|
|
@ -254,6 +254,10 @@ impl ToolExecutor for SearchDataCatalogTool {
|
|||
format!("Found {} relevant datasets", search_results.len())
|
||||
};
|
||||
|
||||
self.agent
|
||||
.set_state_value(String::from("data_context"), Value::Bool(true))
|
||||
.await;
|
||||
|
||||
let duration = start_time.elapsed().as_millis();
|
||||
|
||||
Ok(SearchDataCatalogOutput {
|
||||
|
|
Loading…
Reference in New Issue