File size: 387 Bytes
75e762e
7a20209
 
 
 
 
 
 
 
 
75e762e
 
7a20209
1
2
3
4
5
6
7
8
9
10
11
12
13
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"}))
}