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: cargo fmt --all + clippy field-reassign fix in persistence test
Louis Beaumont1c1aef34d486
diff --git a/crates/screenpipe-audio/src/core/process_tap.rs b/crates/screenpipe-audio/src/core/process_tap.rsindex 589e7a8bf..b519c3a0b 100644--- a/crates/screenpipe-audio/src/core/process_tap.rs+++ b/crates/screenpipe-audio/src/core/process_tap.rs@@ -365,8 +365,7 @@ pub fn spawn_process_tap_capture(// Watchdog: drain the peak-amp window and decide if we're silent.let window_callbacks = TAP_WATCHDOG_CALLBACKS.swap(0, Ordering::Relaxed);- let window_peak =- f32::from_bits(TAP_WATCHDOG_AMP_BITS.swap(0, Ordering::Relaxed));+ let window_peak = f32::from_bits(TAP_WATCHDOG_AMP_BITS.swap(0, Ordering::Relaxed));let got_real_audio = window_callbacks > 0 && window_peak > SILENCE_AMP_EPS;if got_real_audio {diff --git a/crates/screenpipe-config/src/persistence.rs b/crates/screenpipe-config/src/persistence.rsindex 9d4e19efd..d8499e3c5 100644--- a/crates/screenpipe-config/src/persistence.rs+++ b/crates/screenpipe-config/src/persistence.rs@@ -62,13 +62,15 @@ mod tests {#[test]fn save_and_load_round_trip() {- let mut settings = RecordingSettings::default();- settings.port = 4040;- settings.power_mode = Some("battery_saver".to_string());- settings.vocabulary = vec![crate::VocabEntry {- word: "screenpipe".to_string(),- replace_with: None,- }];+ let settings = RecordingSettings {+ port: 4040,+ power_mode: Some("battery_saver".to_string()),+ vocabulary: vec![crate::VocabEntry {+ word: "screenpipe".to_string(),+ replace_with: None,+ }],+ ..Default::default()+ };let file = NamedTempFile::new().unwrap();let path = file.path().to_path_buf();diff --git a/crates/screenpipe-connect/src/oauth.rs b/crates/screenpipe-connect/src/oauth.rsindex 71a9a905e..0a7caaf80 100644--- a/crates/screenpipe-connect/src/oauth.rs+++ b/crates/screenpipe-connect/src/oauth.rs@@ -198,8 +198,7 @@ pub async fn load_oauth_json(return None;}let instances = list_oauth_instances(store, integration_id).await;- let named: Vec<Option<String>> =- instances.into_iter().filter(|i| i.is_some()).collect();+ let named: Vec<Option<String>> = instances.into_iter().filter(|i| i.is_some()).collect();if named.len() == 1 {let inst = named[0].as_deref();tracing::debug!(@@ -677,7 +676,10 @@ mod tests {let store = mem_store().await;let id = "_t_prefer";store- .set_json(&format!("oauth:{}", id), &json!({"access_token": "default"}))+ .set_json(+ &format!("oauth:{}", id),+ &json!({"access_token": "default"}),+ ).await.unwrap();store@@ -816,11 +818,7 @@ mod tests {let deleted = sweep_shadowed_default_slots(&store).await.unwrap();assert_eq!(deleted, 0);- let kept: serde_json::Value = store- .get_json("oauth:_t_sweep2")- .await- .unwrap()- .unwrap();+ let kept: serde_json::Value = store.get_json("oauth:_t_sweep2").await.unwrap().unwrap();assert_eq!(kept["access_token"], "keep");}@@ -901,10 +899,7 @@ mod tests {async fn sweep_is_idempotent() {// Running twice is a no-op on the second call.let store = mem_store().await;- store- .set_json("oauth:_t_idem", &json!({}))- .await- .unwrap();+ store.set_json("oauth:_t_idem", &json!({})).await.unwrap();store.set_json("oauth:_t_idem:[email protected]", &json!({})).awaitdiff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rsindex 1f5669c66..36be93be0 100644--- a/crates/screenpipe-core/src/pipes/mod.rs+++ b/crates/screenpipe-core/src/pipes/mod.rs@@ -5079,7 +5079,7 @@ mod tests {installed_version: None,source_hash: None,subagent: false,- privacy_filter: false,+ privacy_filter: false,trigger: None,},last_run: None,diff --git a/crates/screenpipe-engine/src/privacy_filter.rs b/crates/screenpipe-engine/src/privacy_filter.rsindex 5ce69ea20..5268fd701 100644--- a/crates/screenpipe-engine/src/privacy_filter.rs+++ b/crates/screenpipe-engine/src/privacy_filter.rs@@ -181,7 +181,10 @@ mod tests {hasher.update(text.as_bytes());let key: [u8; 32] = hasher.finalize().into();f.cache- .insert(key, Arc::new("my email is [EMAIL] and this is long enough to filter".into()))+ .insert(+ key,+ Arc::new("my email is [EMAIL] and this is long enough to filter".into()),+ ).await;let out = f.filter(text).await.unwrap();assert_eq!(out, "my email is [EMAIL] and this is long enough to filter");