feat: add missing database functions and fix tool errors

Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-23 13:01:30 -03:00
parent 4d87a9822b
commit fb40809078
5 changed files with 66 additions and 178 deletions

View File

@@ -4,14 +4,13 @@ use axum::{
http::StatusCode,
};
use futures::stream::{self, Stream};
use log::{debug, error, info};
use log::{debug, info};
use std::convert::Infallible;
use std::time::Duration;
use tokio_stream::StreamExt as _;
use crate::modes::server::common::AppState;
use crate::modes::server::mcp::KeepMcpServer;
use rmcp::ServiceExt;
#[utoipa::path(
get,
@@ -34,10 +33,10 @@ pub async fn handle_mcp_sse(
) -> Result<Sse<impl Stream<Item = Result<Event, Infallible>>>, StatusCode> {
debug!("MCP: Starting SSE endpoint");
let mcp_server = KeepMcpServer::new(state);
let _mcp_server = KeepMcpServer::new(state);
// Create a simple message channel for SSE communication
let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::<String>();
let (tx, rx) = tokio::sync::mpsc::unbounded_channel::<String>();
// Send initial connection message
let _ = tx.send("data: {\"type\":\"connection\",\"status\":\"connected\"}\n\n".to_string());