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 a11y example clippy targets
Louis Beaumont209429cba06e
diff --git a/crates/screenpipe-a11y/Cargo.toml b/crates/screenpipe-a11y/Cargo.tomlindex 3ec439cab..734d6d38a 100644--- a/crates/screenpipe-a11y/Cargo.toml+++ b/crates/screenpipe-a11y/Cargo.toml@@ -78,6 +78,9 @@ libc = "0.2"[dev-dependencies]tokio = { version = "1", features = ["rt-multi-thread", "macros"] }tempfile = "3"+# Linux debug examples are compiled by `cargo clippy --all-targets` on every+# developer OS, so keep their D-Bus dependency available outside Linux too.+zbus = { version = "5", features = ["blocking"] }[target.'cfg(target_os = "macos")'.dev-dependencies]libc = "0.2"diff --git a/crates/screenpipe-a11y/examples/linux_e2e.rs b/crates/screenpipe-a11y/examples/linux_e2e.rsindex c86c46e2f..8508aa460 100644--- a/crates/screenpipe-a11y/examples/linux_e2e.rs+++ b/crates/screenpipe-a11y/examples/linux_e2e.rs@@ -31,72 +31,66 @@ fn main() {let mut event_count = 0;while start.elapsed() < Duration::from_secs(15) {- match handle.recv_timeout(Duration::from_millis(500)) {- Some(event) => {- event_count += 1;- let etype = event.event_type();- match etype {- "click" => {- if let screenpipe_a11y::events::EventData::Click {- x,- y,+ if let Some(event) = handle.recv_timeout(Duration::from_millis(500)) {+ event_count += 1;+ let etype = event.event_type();+ match etype {+ "click" => {+ if let screenpipe_a11y::events::EventData::Click {+ x, y, button, ..+ } = &event.data+ {+ println!(+ " [{:>5.1}s] CLICK button={} at ({}, {})",+ start.elapsed().as_secs_f64(),button,- ..- } = &event.data- {- println!(- " [{:>5.1}s] CLICK button={} at ({}, {})",- start.elapsed().as_secs_f64(),- button,- x,- y- );- }- }- "text" => {- if let Some(text) = event.text_content() {- println!(- " [{:>5.1}s] TEXT: {:?}",- start.elapsed().as_secs_f64(),- if text.len() > 100 { &text[..100] } else { text }- );- }- }- "scroll" => {- println!(" [{:>5.1}s] SCROLL", start.elapsed().as_secs_f64());+ x,+ y+ );}- "clipboard" => {- if let Some(text) = event.text_content() {- println!(- " [{:>5.1}s] CLIPBOARD: {:?}",- start.elapsed().as_secs_f64(),- if text.len() > 100 { &text[..100] } else { text }- );- }+ }+ "text" => {+ if let Some(text) = event.text_content() {+ println!(+ " [{:>5.1}s] TEXT: {:?}",+ start.elapsed().as_secs_f64(),+ if text.len() > 100 { &text[..100] } else { text }+ );}- "app_switch" => {- if let screenpipe_a11y::events::EventData::AppSwitch { name, pid } =- &event.data- {- println!(- " [{:>5.1}s] APP_SWITCH: {:?} (pid={})",- start.elapsed().as_secs_f64(),- name,- pid- );- }+ }+ "scroll" => {+ println!(" [{:>5.1}s] SCROLL", start.elapsed().as_secs_f64());+ }+ "clipboard" => {+ if let Some(text) = event.text_content() {+ println!(+ " [{:>5.1}s] CLIPBOARD: {:?}",+ start.elapsed().as_secs_f64(),+ if text.len() > 100 { &text[..100] } else { text }+ );}- _ => {+ }+ "app_switch" => {+ if let screenpipe_a11y::events::EventData::AppSwitch { name, pid } =+ &event.data+ {println!(- " [{:>5.1}s] {} ({})",+ " [{:>5.1}s] APP_SWITCH: {:?} (pid={})",start.elapsed().as_secs_f64(),- etype,- event_count+ name,+ pid);}}+ _ => {+ println!(+ " [{:>5.1}s] {} ({})",+ start.elapsed().as_secs_f64(),+ etype,+ event_count+ );+ }}- None => {} // timeout, keep waiting}}