diamond-in's picture
Update src/agent/mod.rs
75e762e verified
raw
history blame contribute delete
387 Bytes
pub mod executor;
use axum::{extract::State, Json};
use serde_json::json;
use std::sync::Arc;
use crate::AppState;
pub async fn chat_handler(
State(state): State<Arc<AppState>>,
Json(payload): Json<serde_json::Value>
) -> Json<serde_json::Value> {
let _ = state.tx.send(json!({"type": "log", "data": "Agent is thinking..."}).to_string());
Json(json!({"status": "ok"}))
}