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
chore(ci): cargo fmt across recent merges
Louis Beaumont7da0b92384df
diff --git a/crates/screenpipe-audio/src/core/process_tap.rs b/crates/screenpipe-audio/src/core/process_tap.rsindex a14d96050..5fc1e777e 100644--- a/crates/screenpipe-audio/src/core/process_tap.rs+++ b/crates/screenpipe-audio/src/core/process_tap.rs@@ -38,7 +38,11 @@ pub fn is_process_tap_available() -> bool {"Process Tap: macOS {}.{} — {}",major,minor,- if available { "available" } else { "not available" }+ if available {+ "available"+ } else {+ "not available"+ });available}@@ -135,7 +139,9 @@ impl Drop for ProcessTapCapture {fn drop(&mut self) {info!("Process Tap capture stopping");if !self._ctx_ptr.is_null() {- unsafe { let _ = Box::from_raw(self._ctx_ptr); }+ unsafe {+ let _ = Box::from_raw(self._ctx_ptr);+ }}}}diff --git a/crates/screenpipe-connect/src/connections/fireflies.rs b/crates/screenpipe-connect/src/connections/fireflies.rsindex 353ec0721..c8f9b25fe 100644--- a/crates/screenpipe-connect/src/connections/fireflies.rs+++ b/crates/screenpipe-connect/src/connections/fireflies.rs@@ -70,7 +70,9 @@ impl Integration for Fireflies {}}let email = body["data"]["user"]["email"].as_str().unwrap_or("");- let name = body["data"]["user"]["name"].as_str().unwrap_or("authenticated");+ let name = body["data"]["user"]["name"]+ .as_str()+ .unwrap_or("authenticated");Ok(if email.is_empty() {format!("connected — {}", name)} else {diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex 00496509c..692515b5f 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -1884,7 +1884,10 @@ impl DatabaseManager {sort_order += 1;if buf.len() >= BULK_CHUNK {if let Err(e) = flush_level0_bulk(tx, frame_id, &buf).await {- debug!("elements: OCR bulk insert failed for frame {}: {}", frame_id, e);+ debug!(+ "elements: OCR bulk insert failed for frame {}: {}",+ frame_id, e+ );return;}buf.clear();@@ -1896,7 +1899,10 @@ impl DatabaseManager {// first so sort_order interleaves correctly.if !buf.is_empty() {if let Err(e) = flush_level0_bulk(tx, frame_id, &buf).await {- debug!("elements: OCR bulk insert failed for frame {}: {}", frame_id, e);+ debug!(+ "elements: OCR bulk insert failed for frame {}: {}",+ frame_id, e+ );return;}buf.clear();@@ -1989,7 +1995,10 @@ impl DatabaseManager {// Flush any remaining buffered level-0 rows.if !buf.is_empty() {if let Err(e) = flush_level0_bulk(tx, frame_id, &buf).await {- debug!("elements: OCR bulk insert failed for frame {}: {}", frame_id, e);+ debug!(+ "elements: OCR bulk insert failed for frame {}: {}",+ frame_id, e+ );}}}diff --git a/crates/screenpipe-db/tests/ocr_elements_bulk_test.rs b/crates/screenpipe-db/tests/ocr_elements_bulk_test.rsindex e90f6d10a..e309b3d8f 100644--- a/crates/screenpipe-db/tests/ocr_elements_bulk_test.rs+++ b/crates/screenpipe-db/tests/ocr_elements_bulk_test.rs@@ -63,14 +63,24 @@ mod tests {assert_eq!(row.0, frame_id, "frame_id mismatch at idx {}", i);assert_eq!(row.1, "ocr", "source != 'ocr' at idx {}", i);assert_eq!(row.2, "block", "role != 'block' at idx {}", i);- assert_eq!(row.3.as_deref(), Some(format!("text-{}", i).as_str()), "text mismatch at idx {}", i);+ assert_eq!(+ row.3.as_deref(),+ Some(format!("text-{}", i).as_str()),+ "text mismatch at idx {}",+ i+ );assert!(row.4.is_none(), "parent_id should be NULL at idx {}", i);assert_eq!(row.5, 0, "depth != 0 at idx {}", i);assert_eq!(row.6, Some(10.0 + i as f64), "left mismatch at idx {}", i);assert_eq!(row.7, Some(20.0 + i as f64), "top mismatch at idx {}", i);assert_eq!(row.8, Some(100.0 + i as f64), "width mismatch at idx {}", i);assert_eq!(row.9, Some(30.0 + i as f64), "height mismatch at idx {}", i);- assert_eq!(row.10, Some((80 + (i % 20) as i64) as f64), "conf mismatch at idx {}", i);+ assert_eq!(+ row.10,+ Some((80 + (i % 20) as i64) as f64),+ "conf mismatch at idx {}",+ i+ );assert_eq!(row.11, i as i32, "sort_order mismatch at idx {}", i);}}@@ -184,7 +194,11 @@ mod tests {top: "0".into(),width: "10".into(),height: "10".into(),- text: if i % 2 == 0 { format!("kept-{}", i) } else { " ".into() },+ text: if i % 2 == 0 {+ format!("kept-{}", i)+ } else {+ " ".into()+ },});}let text_json = serde_json::to_string(&blocks).unwrap();@@ -208,13 +222,12 @@ mod tests {.unwrap();let frame_id = inserted[0].0;// Only 3 non-empty rows survive (idx 0, 2, 4).- let texts: Vec<(String,)> = sqlx::query_as(- "SELECT text FROM elements WHERE frame_id = ?1 ORDER BY sort_order ASC",- )- .bind(frame_id)- .fetch_all(&db.pool)- .await- .unwrap();+ let texts: Vec<(String,)> =+ sqlx::query_as("SELECT text FROM elements WHERE frame_id = ?1 ORDER BY sort_order ASC")+ .bind(frame_id)+ .fetch_all(&db.pool)+ .await+ .unwrap();let texts: Vec<&str> = texts.iter().map(|t| t.0.as_str()).collect();assert_eq!(texts, vec!["kept-0", "kept-2", "kept-4"]);}