YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix all
Louis Beaumontb3d829b09d75
diff --git a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js b/examples/apps/screenpipe-app-tauri/scripts/pre_build.jsindex a8fdc343f..981472ad0 100644--- a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js+++ b/examples/apps/screenpipe-app-tauri/scripts/pre_build.js@@ -138,7 +138,7 @@ if (platform == 'windows') {// Setup FFMPEGif (!(await fs.exists(config.ffmpegRealname))) {- await $`${wgetPath} -nc --show-progress ${config.windows.ffmpegUrl} -O ${config.windows.ffmpegName}.7z`+ await $`${wgetPath} -nc --no-check-certificate --show-progress ${config.windows.ffmpegUrl} -O ${config.windows.ffmpegName}.7z`await $`'C:\\Program Files\\7-Zip\\7z.exe' x ${config.windows.ffmpegName}.7z`await $`mv ${config.windows.ffmpegName} ${config.ffmpegRealname}`await $`rm -rf ${config.windows.ffmpegName}.7z`@@ -152,7 +152,7 @@ if (platform == 'windows') {if (!(await fs.exists('tesseract'))) {console.log('Setting up Tesseract for Windows...')- await $`${wgetPath} -nc --show-progress ${tesseractUrl} -O ${tesseractInstaller}`+ await $`${wgetPath} -nc --no-check-certificate --show-progress ${tesseractUrl} -O ${tesseractInstaller}`await $`"${process.cwd()}\\${tesseractInstaller}" /S /D=C:\\Program Files\\Tesseract-OCR`await $`rm ${tesseractInstaller}`// Replace the mv command with xcopydiff --git a/screenpipe-vision/src/utils.rs b/screenpipe-vision/src/utils.rsindex 2cdaf7616..6041eb0b4 100644--- a/screenpipe-vision/src/utils.rs+++ b/screenpipe-vision/src/utils.rs@@ -335,17 +335,19 @@ pub async fn perform_ocr_windows(image: &DynamicImage) -> (String, DataOutput, Slet text = result.Text().unwrap().to_string();+ let text = result.Text().unwrap().to_string();+// Create a simple DataOutput structurelet data_output = DataOutput {data: vec![],output: text.clone(),};- // Create a simple JSON output- let json_output = serde_json::json!({+ // Create a JSON output similar to other OCR functions+ let json_output = serde_json::json!([{"text": text,- "confidence": 1.0, // Windows OCR doesn't provide confidence scores- })+ "confidence": "100.00" // Windows OCR doesn't provide confidence scores, so we use a default high value+ }]).to_string();(text, data_output, json_output)diff --git a/screenpipe-vision/tests/windows_vision_test.rs b/screenpipe-vision/tests/windows_vision_test.rsindex 853429192..3a2ff146e 100644--- a/screenpipe-vision/tests/windows_vision_test.rs+++ b/screenpipe-vision/tests/windows_vision_test.rs@@ -1,3 +1,4 @@+#[cfg(target_os = "windows")]#[cfg(test)]mod tests {use screenpipe_vision::{get_monitor, process_ocr_task, OcrEngine};@@ -9,7 +10,7 @@ mod tests {use std::time::Duration;use tokio::time::timeout;- // #[cfg(target_os = "windows")]+ #[cfg(target_os = "windows")]#[tokio::test]async fn test_process_ocr_task_windows() {// Use an absolute path that works in both local and CI environments@@ -24,7 +25,7 @@ mod tests {let timestamp = Instant::now();let (tx, _rx) = mpsc::channel(1);let previous_text_json = Arc::new(Mutex::new(None));- let ocr_engine = Arc::new(OcrEngine::Tesseract);+ let ocr_engine = Arc::new(OcrEngine::WindowsNative);let app_name = "test_app".to_string();let result = process_ocr_task(@@ -55,7 +56,7 @@ mod tests {// Set up test parameterslet interval = Duration::from_millis(1000);let save_text_files_flag = false;- let ocr_engine = Arc::new(OcrEngine::Tesseract);+ let ocr_engine = Arc::new(OcrEngine::WindowsNative);// Spawn the continuous_capture functionlet capture_handle = tokio::spawn(continuous_capture(