feat(embedding,vision): candle embeddings with offline fallback, on-demand clipboard vision capture, and concurrency audit

This commit is contained in:
Riz Ashraf committed 2026-10-07 06:36:09 +01:00
1 parent 5bd8b1587a
commit e4a0fe72df
47 files changed
+6292 -3503

No files matched your search

+15 -16
View File
@@ -15,13 +15,20 @@ fn get_stub_exe() -> std::path::PathBuf {
get_target_dir().join(format!("mcp-memory-stub{}", std::env::consts::EXE_SUFFIX))
}
fn ensure_stub_built() {
let stub_path = get_stub_exe();
if !stub_path.exists() {
let _ = std::process::Command::new("cargo")
.arg("build")
.arg("--bin")
.arg("mcp-memory-stub")
.status();
}
}
#[tokio::test]
async fn test_stub_connection_refused() {
let _ = std::process::Command::new("cargo")
.arg("build")
.arg("--bin")
.arg("mcp-memory-stub")
.status();
ensure_stub_built();
let target = "http://127.0.0.1:49999";
@@ -44,13 +51,9 @@ async fn test_stub_connection_refused() {
#[tokio::test]
async fn test_stub_handles_eof_cleanly() {
let _ = std::process::Command::new("cargo")
.arg("build")
.arg("--bin")
.arg("mcp-memory-stub")
.status();
ensure_stub_built();
let target = "http://127.0.0.1:49998";
let target = "http://127.0.0.1:4998";
let mut child = Command::new(get_stub_exe())
.arg("--target")
@@ -76,11 +79,7 @@ async fn test_stub_handles_eof_cleanly() {
#[tokio::test]
async fn test_stub_sse_fallback_failure() {
let _ = std::process::Command::new("cargo")
.arg("build")
.arg("--bin")
.arg("mcp-memory-stub")
.status();
ensure_stub_built();
let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
let local_addr = listener.local_addr().unwrap();