Implement batch_store endpoint for Issue #12

This commit is contained in:
Agent Zero
2026-03-19 15:59:34 +00:00
parent 403b95229e
commit 03e8f246d1
3 changed files with 4 additions and 17 deletions

View File

@@ -9,6 +9,8 @@ use tokio_postgres::NoTls;
use tracing::info;
use uuid::Uuid;
use serde::Serialize;
use serde_json::Value;
use crate::config::DatabaseConfig;
/// Database wrapper with connection pool
@@ -177,7 +179,7 @@ impl Database {
/// Result for a single batch entry
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
pub struct BatchStoreResult {
pub id: String,
pub status: String,

View File

@@ -6,7 +6,7 @@
use anyhow::{Context, Result, anyhow};
use serde_json::Value;
use std::sync::Arc;
use tracing::{info, warn};
use tracing::info;
use crate::embedding::extract_keywords;
use crate::AppState;

View File

@@ -188,21 +188,6 @@ async fn sse_handler(
.event("endpoint")
.data(endpoint));
// Send initial tools list so Agent Zero knows what's available
let tools_response = JsonRpcResponse {
jsonrpc: "2.0".to_string(),
id: serde_json::json!("initial-tools"),
result: Some(serde_json::json!({
"tools": tools::get_tool_definitions()
})),
error: None,
};
yield Ok(Event::default()
.event("message")
.json_data(&tools_response)
.unwrap());
loop {
tokio::select! {
maybe_message = session_rx.recv() => {