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(windows): prefer OCR over accessibility chrome for terminal apps
louis030195caae1ebc41fc
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 04bdda554..91d2a8de1 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.0.617"+version = "2.0.618"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-server/src/paired_capture.rs b/crates/screenpipe-server/src/paired_capture.rsindex ee428f711..9cae09185 100644--- a/crates/screenpipe-server/src/paired_capture.rs+++ b/crates/screenpipe-server/src/paired_capture.rs@@ -155,23 +155,32 @@ pub async fn paired_capture(};// --- Extract data from tree snapshot, fall back to OCR text ---- let (accessibility_text, tree_json, content_hash, simhash) = match tree_snapshot {- Some(snap) if !snap.text_content.is_empty() => {- let json = serde_json::to_string(&snap.nodes).ok();- (- Some(snap.text_content.clone()),- json,- Some(snap.content_hash as i64),- Some(snap.simhash as i64),- )- }- _ => {- // OCR fallback: accessibility returned no text (games, bad a11y apps)- // or app_prefers_ocr forced OCR (terminals).- if ocr_text.is_empty() {- (None, None, None, None)- } else {- (Some(ocr_text.clone()), None, None, None)+ // When app_prefers_ocr (terminals), always prefer OCR over accessibility tree+ // because the tree only returns window chrome (Minimize/Maximize/Close), not+ // the actual terminal content.+ let (accessibility_text, tree_json, content_hash, simhash) = if app_prefers_ocr+ && !ocr_text.is_empty()+ {+ // Terminal with successful OCR: use OCR text, skip tree+ (Some(ocr_text.clone()), None, None, None)+ } else {+ match tree_snapshot {+ Some(snap) if !snap.text_content.is_empty() => {+ let json = serde_json::to_string(&snap.nodes).ok();+ (+ Some(snap.text_content.clone()),+ json,+ Some(snap.content_hash as i64),+ Some(snap.simhash as i64),+ )+ }+ _ => {+ // OCR fallback: accessibility returned no text (games, bad a11y apps)+ if ocr_text.is_empty() {+ (None, None, None, None)+ } else {+ (Some(ocr_text.clone()), None, None, None)+ }}}};