Skip to content

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

Bump app to v2.0.445

Louis Beaumontba688f325320
diff --git a/Cargo.lock b/Cargo.lock
index 515fd1107..a06b430cf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1167,15 +1167,6 @@ dependencies = [
"strsim 0.11.1",
]
-[[package]]
-name = "clap_complete"
-version = "4.5.47"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6"
-dependencies = [
- "clap",
-]
-
[[package]]
name = "clap_derive"
version = "4.5.32"
@@ -6503,13 +6494,9 @@ dependencies = [
"axum",
"base64 0.22.1",
"bincode",
- "candle-core",
- "candle-nn",
- "candle-transformers",
"chrono",
"cidre 0.14.0",
"clap",
- "clap_complete",
"colored",
"console-subscriber",
"criterion",
@@ -6519,7 +6506,6 @@ dependencies = [
"env_logger",
"fastrand",
"futures",
- "hf-hub",
"hostname",
"image",
"imageproc",
@@ -6546,7 +6532,6 @@ dependencies = [
"sqlx",
"sysinfo",
"tempfile",
- "tokenizers",
"tokio",
"tokio-stream",
"tokio-tungstenite 0.24.0",
@@ -6558,7 +6543,6 @@ dependencies = [
"tracing-subscriber",
"url",
"uuid",
- "walkdir",
"windows 0.58.0",
]
diff --git a/apps/screenpipe-app-tauri/public/CHANGELOG.md b/apps/screenpipe-app-tauri/public/CHANGELOG.md
index 14481958d..d58eff9ba 100644
--- a/apps/screenpipe-app-tauri/public/CHANGELOG.md
+++ b/apps/screenpipe-app-tauri/public/CHANGELOG.md
@@ -1,9 +1,12 @@
## Improvements
-- Audio metrics and monitoring for transcription pipeline
-- Keyboard shortcuts corrected in onboarding and timeline controls
+- Pi agent auto-restarts on crash with better error messages
+- Chat button added to timeline controls
+- Meeting end time now includes duration of last audio segment
## Bug Fixes
-- Fixed keyboard shortcuts display in onboarding and timeline
-- Fixed search modal keyword search improvements
+- Fixed Pi agent 'Connecting...' stuck forever on startup (race condition)
+- Fixed Pi agent path resolution on macOS (missing trailing slash)
+- Fixed Pi stderr noise — only shows errors when user is waiting for a response
+- Fixed shortcut modifier key ordering in timeline controls
-#### **Full Changelog:** [a9768a6d..HEAD](https://github.com/mediar-ai/screenpipe/compare/a9768a6d..HEAD)
+#### **Full Changelog:** [ca7d2575..HEAD](https://github.com/mediar-ai/screenpipe/compare/ca7d2575..HEAD)
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index f0fd15060..91245ca31 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -1601,15 +1601,6 @@ dependencies = [
"strsim",
]
-[[package]]
-name = "clap_complete"
-version = "4.5.65"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5d"
-dependencies = [
- "clap",
-]
-
[[package]]
name = "clap_derive"
version = "4.5.55"
@@ -8741,7 +8732,6 @@ dependencies = [
"screenpipe-vision",
"sentry 0.42.0",
"serde",
- "serde_derive",
"serde_json",
"specta",
"specta-typescript",
@@ -8954,20 +8944,15 @@ dependencies = [
"axum 0.7.9",
"base64 0.22.1",
"bincode",
- "candle-core",
- "candle-nn",
- "candle-transformers",
"chrono",
"cidre 0.14.0",
"clap",
- "clap_complete",
"colored",
"crossbeam",
"dashmap",
"dirs 5.0.1",
"fastrand",
"futures",
- "hf-hub 0.3.2 (git+https://github.com/neo773/hf-hub)",
"hostname",
"image 0.25.9",
"imageproc",
@@ -8994,7 +8979,6 @@ dependencies = [
"sqlx",
"sysinfo",
"tempfile",
- "tokenizers",
"tokio",
"tokio-stream",
"tokio-util",
@@ -9004,7 +8988,6 @@ dependencies = [
"tracing-appender",
"tracing-subscriber",
"uuid",
- "walkdir",
"windows 0.58.0",
]
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index d38ce1d2c..032714a3a 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.444"
+version = "2.0.445"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
@@ -37,7 +37,6 @@ tauri-plugin-store = "=2.4.2"
tauri-plugin-http = "=2.5.7"
serde = { version = "1.0", features = ["derive"] }
-serde_derive = "1.0"
serde_json = "1.0"
tower-http = { version = "0.4.0", features = ["cors", "trace"] }
diff --git a/crates/screenpipe-audio/src/metrics.rs b/crates/screenpipe-audio/src/metrics.rs
index a0e541ff2..e35ea7f45 100644
--- a/crates/screenpipe-audio/src/metrics.rs
+++ b/crates/screenpipe-audio/src/metrics.rs
@@ -97,7 +97,8 @@ impl AudioPipelineMetrics {
// --- Transcription stage ---
pub fn record_transcription_completed(&self) {
- self.transcriptions_completed.fetch_add(1, Ordering::Relaxed);
+ self.transcriptions_completed
+ .fetch_add(1, Ordering::Relaxed);
}
pub fn record_transcription_empty(&self) {
diff --git a/crates/screenpipe-audio/src/vad/silero.rs b/crates/screenpipe-audio/src/vad/silero.rs
index c67c4ef9d..0b22c3417 100644
--- a/crates/screenpipe-audio/src/vad/silero.rs
+++ b/crates/screenpipe-audio/src/vad/silero.rs
@@ -13,8 +13,8 @@ use vad_rs::{Vad, VadStatus};
use crate::vad::FRAME_HISTORY;
use super::{
- VadEngine, VadSensitivity, DOWNLOADING, MODEL_PATH, SILENCE_THRESHOLD,
- SPEECH_FRAME_THRESHOLD, SPEECH_THRESHOLD,
+ VadEngine, VadSensitivity, DOWNLOADING, MODEL_PATH, SILENCE_THRESHOLD, SPEECH_FRAME_THRESHOLD,
+ SPEECH_THRESHOLD,
};
pub struct SileroVad {
@@ -132,7 +132,10 @@ impl SileroVad {
drop(file);
tokio::fs::rename(&tmp_path, &final_path).await?;
- info!("Silero VAD v5 model downloaded and saved to: {:?}", final_path);
+ info!(
+ "Silero VAD v5 model downloaded and saved to: {:?}",
+ final_path
+ );
Ok(())
}
diff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rs
index 80f6ff117..dfd0fd340 100644
--- a/crates/screenpipe-core/src/pipes/mod.rs
+++ b/crates/screenpipe-core/src/pipes/mod.rs
@@ -147,21 +147,31 @@ fn resolve_preset(pipes_dir: &Path, preset_id: &str) -> Option<ResolvedPreset> {
let preset = if preset_id == "default" {
// find the one with defaultPreset: true
- presets.iter().find(|p| p.get("defaultPreset").and_then(|v| v.as_bool()).unwrap_or(false))
+ presets.iter().find(|p| {
+ p.get("defaultPreset")
+ .and_then(|v| v.as_bool())
+ .unwrap_or(false)
+ })
} else {
- presets.iter().find(|p| p.get("id").and_then(|v| v.as_str()) == Some(preset_id))
+ presets
+ .iter()
+ .find(|p| p.get("id").and_then(|v| v.as_str()) == Some(preset_id))
}?;
let model = preset.get("model")?.as_str()?.to_string();
// Map app provider types to pipe provider strings
- let provider = preset.get("provider").and_then(|v| v.as_str()).and_then(|p| match p {
- "pi" => Some("screenpipe"),
- "native-ollama" => Some("ollama"),
- "openai" => Some("openai"),
- "custom" => Some("openai"), // custom uses openai-compatible API
- _ => None,
- }).map(|s| s.to_string());
+ let provider = preset
+ .get("provider")
+ .and_then(|v| v.as_str())
+ .and_then(|p| match p {
+ "pi" => Some("screenpipe"),
+ "native-ollama" => Some("ollama"),
+ "openai" => Some("openai"),
+ "custom" => Some("openai"), // custom uses openai-compatible API
+ _ => None,
+ })
+ .map(|s| s.to_string());
Some(ResolvedPreset { model, provider })
}
@@ -275,8 +285,9 @@ impl PipeManager {
let last_log = pipe_logs.and_then(|l| l.back());
let last_error = last_log.filter(|l| !l.success).map(|l| l.stderr.clone());
// Read raw file from disk for editing
- let raw_content = std::fs::read_to_string(self.pipes_dir.join(name).join("pipe.md"))
- .unwrap_or_else(|_| serialize_pipe(config, body).unwrap_or_default());
+ let raw_content =
+ std::fs::read_to_string(self.pipes_dir.join(name).join("pipe.md"))
+ .unwrap_or_else(|_| serialize_pipe(config, body).unwrap_or_default());
let mut cfg = config.clone();
cfg.name = name.clone(); // always use directory name
PipeStatus {
@@ -367,8 +378,10 @@ impl PipeManager {
let (run_model, run_provider) = if let Some(ref preset_id) = config.preset {
match resolve_preset(&self.pipes_dir, preset_id) {
Some(resolved) => {
- info!("pipe '{}': using preset '{}' → model={}, provider={:?}",
- name, preset_id, resolved.model, resolved.provider);
+ info!(
+ "pipe '{}': using preset '{}' → model={}, provider={:?}",
+ name, preset_id, resolved.model, resolved.provider
+ );
(resolved.model, resolved.provider)
}
None => {
@@ -388,12 +401,7 @@ impl PipeManager {
let _permit = self.semaphore.acquire().await?;
let result = executor
- .run(
- &prompt,
- &run_model,
- &pipe_dir,
- run_provider.as_deref(),
- )
+ .run(&prompt, &run_model, &pipe_dir, run_provider.as_deref())
.await;
// Remove from running
@@ -758,7 +766,7 @@ impl PipeManager {
name, preset_id, resolved.model, resolved.provider);
(resolved.model, resolved.provider)
}
- None => (config.model.clone(), config.provider.clone())
+ None => (config.model.clone(), config.provider.clone()),
}
} else {
(config.model.clone(), config.provider.clone())
@@ -824,7 +832,8 @@ impl PipeManager {
);
// Append to in-memory logs
- let duration_secs = (finished_at - started_at).num_milliseconds() as f64 / 1000.0;
+ let duration_secs =
+ (finished_at - started_at).num_milliseconds() as f64 / 1000.0;
let success = log.success;
let name_for_cb = log.pipe_name.clone();
let mut l = logs_ref.lock().await;
@@ -1007,7 +1016,9 @@ pub fn parse_schedule(schedule: &str) -> Option<ParsedSchedule> {
return None;
}
if s.eq_ignore_ascii_case("daily") {
- return Some(ParsedSchedule::Interval(std::time::Duration::from_secs(86400)));
+ return Some(ParsedSchedule::Interval(std::time::Duration::from_secs(
+ 86400,
+ )));
}
// Try human-readable interval first
if let Some(d) = parse_duration_str(s) {
@@ -1017,8 +1028,8 @@ pub fn parse_schedule(schedule: &str) -> Option<ParsedSchedule> {
// cron crate requires 7 fields (sec min hour dom month dow year),
// so we pad short expressions.
let padded = match s.split_whitespace().count() {
- 5 => format!("0 {} *", s), // standard 5-field → add seconds + year
- 6 => format!("{} *", s), // 6-field → add year
+ 5 => format!("0 {} *", s), // standard 5-field → add seconds + year
+ 6 => format!("{} *", s), // 6-field → add year
_ => s.to_string(),
};
if let Ok(cron) = CronSchedule::from_str(&padded) {
diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rs
index 1be877782..2de0deedc 100644
--- a/crates/screenpipe-db/src/db.rs
+++ b/crates/screenpipe-db/src/db.rs
@@ -27,11 +27,10 @@ use futures::future::try_join_all;
use crate::{
text_similarity::is_similar_transcription, AudioChunksResponse, AudioDevice, AudioEntry,
- AudioResult, AudioResultRaw, ContentType, DeviceType, FrameData, FrameRow, FrameWindowData,
- FrameRowLight, InsertUiEvent, OCREntry, OCRResult, OCRResultRaw, OcrEngine, OcrTextBlock, Order,
- SearchMatch, SearchMatchGroup, SearchResult, Speaker, TagContentType, TextBounds, TextPosition,
- TimeSeriesChunk, UiContent,
- UiEventRecord, UiEventRow, VideoMetadata,
+ AudioResult, AudioResultRaw, ContentType, DeviceType, FrameData, FrameRow, FrameRowLight,
+ FrameWindowData, InsertUiEvent, OCREntry, OCRResult, OCRResultRaw, OcrEngine, OcrTextBlock,
+ Order, SearchMatch, SearchMatchGroup, SearchResult, Speaker, TagContentType, TextBounds,
+ TextPosition, TimeSeriesChunk, UiContent, UiEventRecord, UiEventRow, VideoMetadata,
};
/// Time window (in seconds) to check for similar transcriptions across devices.
@@ -4366,7 +4365,14 @@ mod tests {
assert_eq!(positions.len(), 2);
}
- fn make_search_match(frame_id: i64, timestamp_secs: i64, app: &str, window: &str, url: &str, confidence: f32) -> SearchMatch {
+ fn make_search_match(
+ frame_id: i64,
+ timestamp_secs: i64,
+ app: &str,
+ window: &str,
+ url: &str,
+ confidence: f32,
+ ) -> SearchMatch {
SearchMatch {
frame_id,
timestamp: DateTime::from_timestamp(timestamp_secs, 0).unwrap(),
@@ -4387,7 +4393,14 @@ mod tests {
#[test]
fn test_cluster_single() {
- let matches = vec![make_search_match(1, 1000, "Chrome", "Google", "https://google.com", 0.9)];
+ let matches = vec![make_search_match(
+ 1,
+ 1000,
+ "Chrome",
+ "Google",
+ "https://google.com",
+ 0.9,
+ )];
let groups = DatabaseManager::cluster_search_matches(matches, 120);
assert_eq!(groups.len(), 1);
assert_eq!(groups[0].group_size, 1);
diff --git a/crates/screenpipe-db/tests/keyword_search_order_test.rs b/crates/screenpipe-db/tests/keyword_search_order_test.rs
index bd1ceaad5..14f21b774 100644
--- a/crates/screenpipe-db/tests/keyword_search_order_test.rs
+++ b/crates/screenpipe-db/tests/keyword_search_order_test.rs
@@ -74,7 +74,17 @@ mod tests {
let _frame_c = insert_frame_with_ocr(&db, "Cursor", "editor", "println hello", 30).await;
let results = db
- .search_with_text_positions("hello", 10, 0, None, None, true, Order::Descending, None, None)
+ .search_with_text_positions(
+ "hello",
+ 10,
+ 0,
+ None,
+ None,
+ true,
+ Order::Descending,
+ None,
+ None,
+ )
.await
.unwrap();
@@ -117,7 +127,17 @@ mod tests {
insert_frame_with_ocr(&db, "WezTerm", "terminal", "new content hello world", 5).await;
let results = db
- .search_with_text_positions("hello", 10, 0, None, None, true, Order::Ascending, None, None)
+ .search_with_text_positions(
+ "hello",
+ 10,
+ 0,
+ None,
+ None,
+ true,
+ Order::Ascending,
+ None,
+ None,
+ )
.await
.unwrap();
@@ -161,7 +181,17 @@ mod tests {
.await;
let results = db
- .search_with_text_positions("hello", 10, 0, None, None, true, Order::Descending, None, None)
+ .search_with_text_positions(
+ "hello",
+ 10,
+ 0,
+ None,
+ None,
+ true,
+ Order::Descending,
+ None,
+ None,
+ )
.await
.unwrap();
diff --git a/crates/screenpipe-server/Cargo.toml b/crates/screenpipe-server/Cargo.toml
index 42cbfe79c..fcaf22416 100644
--- a/crates/screenpipe-server/Cargo.toml
+++ b/crates/screenpipe-server/Cargo.toml
@@ -38,16 +38,9 @@ sqlx = { version = "0.7", features = [
"migrate",
] }
-# Local Embeddings + STT
-candle = { workspace = true }
-candle-nn = { workspace = true }
-candle-transformers = { workspace = true }
-tokenizers = { workspace = true }
-
anyhow = "1.0.86"
async-trait = "0.1"
moka = { version = "0.12", features = ["future"] }
-hf-hub = { workspace = true }
#opentelemetry
sentry = { workspace = true }
@@ -72,9 +65,6 @@ sysinfo = "0.29.0"
# Color
colored = "2.0"
-# Completions
-clap_complete = "4.2"
-
# Plugins
tower = { version = "0.5", features = ["util"] }
futures = { version = "0.3.31", features = ["std"] }
@@ -112,8 +102,6 @@ sha2 = "0.10.6"
fastrand = "2.1.1"
port_check = "0.2.1"
-walkdir = "2.3.4"
-
regex = "1.10.0"
lru = "0.13.0"
@@ -132,9 +120,9 @@ criterion = { workspace = true }
[features]
default = ["ui-events"]
-metal = ["candle/metal", "candle-nn/metal", "candle-transformers/metal"]
-cuda = ["candle/cuda", "candle-nn/cuda", "candle-transformers/cuda"]
-mkl = ["candle/mkl", "candle-nn/mkl", "candle-transformers/mkl"]
+metal = ["screenpipe-core/metal"]
+cuda = ["screenpipe-core/cuda"]
+mkl = ["screenpipe-core/mkl"]
vulkan = ["screenpipe-audio/vulkan"]
experimental = []
debug-console = ["console-subscriber"]
@@ -149,7 +137,7 @@ path = "src/bin/screenpipe-server.rs"
[package.metadata.cargo-machete]
-ignored = ["url", "console-subscriber"]
+ignored = ["url"]
[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["signal"] }
diff --git a/crates/screenpipe-server/src/bin/screenpipe-server.rs b/crates/screenpipe-server/src/bin/screenpipe-server.rs
index 11b1ff39c..73224cc99 100644
--- a/crates/screenpipe-server/src/bin/screenpipe-server.rs
+++ b/crates/screenpipe-server/src/bin/screenpipe-server.rs
@@ -592,7 +592,9 @@ async fn main() -> anyhow::Result<()> {
for d in &cli.realtime_audio_device {
match parse_audio_device(d) {
Ok(device) => realtime_audio_devices.push(Arc::new(device.clone())),
- Err(e) => warn!("skipping unparseable realtime audio device '{}': {}", d, e),
+ Err(e) => {
+ warn!("skipping unparseable realtime audio device '{}': {}", d, e)
+ }
}
}
}
@@ -896,11 +898,14 @@ async fn main() -> anyhow::Result<()> {
let mut pipe_manager = screenpipe_core::pipes::PipeManager::new(pipes_dir, agent_executors);
pipe_manager.set_on_run_complete(std::sync::Arc::new(|pipe_name, success, duration_secs| {
- analytics::capture_event_nonblocking("pipe_scheduled_run", serde_json::json!({
- "pipe": pipe_name,
- "success": success,
- "duration_secs": duration_secs,
- }));
+ analytics::capture_event_nonblocking(
+ "pipe_scheduled_run",
+ serde_json::json!({
+ "pipe": pipe_name,
+ "success": success,
+ "duration_secs": duration_secs,
+ }),
+ );
}));
pipe_manager.install_builtin_pipes().ok();
if let Err(e) = pipe_manager.load_pipes().await {
diff --git a/crates/screenpipe-server/src/server.rs b/crates/screenpipe-server/src/server.rs
index 5c8aaf417..70ab02e13 100644
--- a/crates/screenpipe-server/src/server.rs
+++ b/crates/screenpipe-server/src/server.rs
@@ -1461,10 +1461,7 @@ impl SCServer {
axum::routing::post(crate::pipes_api::install_pipe),
)
.route("/:id", axum::routing::get(crate::pipes_api::get_pipe))
- .route(
- "/:id",
- axum::routing::delete(crate::pipes_api::delete_pipe),
- )
+ .route("/:id", axum::routing::delete(crate::pipes_api::delete_pipe))
.route(
"/:id/enable",
axum::routing::post(crate::pipes_api::enable_pipe),
diff --git a/crates/screenpipe-server/src/video.rs b/crates/screenpipe-server/src/video.rs
index 21b9d23c4..d3f0ace14 100644
--- a/crates/screenpipe-server/src/video.rs
+++ b/crates/screenpipe-server/src/video.rs
@@ -252,9 +252,8 @@ impl VideoCapture {
break;
}
- let backoff = Duration::from_secs(
- (1u64 << consecutive_restarts.min(4)).min(30),
- );
+ let backoff =
+ Duration::from_secs((1u64 << consecutive_restarts.min(4)).min(30));
error!(
"continuous_capture for monitor {} failed (restart #{}): {}, retrying in {:?}",
monitor_id, consecutive_restarts, e, backoff
@@ -335,10 +334,8 @@ impl VideoCapture {
let result = Arc::new(result);
- let video_pushed =
- push_to_raw_queue(&capture_video_frame_queue, &result, "Video");
- let ocr_pushed =
- push_to_raw_queue(&capture_ocr_work_queue, &result, "OCR-work");
+ let video_pushed = push_to_raw_queue(&capture_video_frame_queue, &result, "Video");
+ let ocr_pushed = push_to_raw_queue(&capture_ocr_work_queue, &result, "OCR-work");
if !video_pushed || !ocr_pushed {
error!(
diff --git a/crates/screenpipe-vision/src/browser_utils/macos.rs b/crates/screenpipe-vision/src/browser_utils/macos.rs
index 92113556b..1d126c62a 100644
--- a/crates/screenpipe-vision/src/browser_utils/macos.rs
+++ b/crates/screenpipe-vision/src/browser_utils/macos.rs
@@ -253,7 +253,10 @@ impl BrowserUrlDetector for MacOSUrlDetector {
}
Ok(None) => Ok(None),
Err(e) => {
- debug!("Arc title+URL fetch failed, falling back to URL-only: {}", e);
+ debug!(
+ "Arc title+URL fetch failed, falling back to URL-only: {}",
+ e
+ );
// Fallback to the old URL-only method without title check
let script =
r#"tell application "Arc" to return URL of active tab of front window"#;
diff --git a/crates/screenpipe-vision/src/core.rs b/crates/screenpipe-vision/src/core.rs
index 2d78bd408..1e6f1ccea 100644
--- a/crates/screenpipe-vision/src/core.rs
+++ b/crates/screenpipe-vision/src/core.rs
@@ -8,6 +8,7 @@ use crate::capture_screenshot_by_window::CapturedWindow;
use crate::capture_screenshot_by_window::WindowFilters;
use crate::custom_ocr::perform_ocr_custom;
use crate::frame_comparison::{FrameComparer, FrameComparisonConfig};
+use crate::metrics::PipelineMetrics;
#[cfg(target_os = "windows")]
use crate::microsoft::perform_ocr_windows;
use crate::monitor::get_monitor_by_id;
@@ -27,7 +28,6 @@ use serde::Deserializer;
use serde::Serialize;
use serde::Serializer;
use serde_json;
-use crate::metrics::PipelineMetrics;
use std::sync::Arc;
use std::{
collections::HashMap,
@@ -338,9 +338,7 @@ pub async fn continuous_capture(
metrics.record_capture();
if let Err(e) = result_tx.send(raw).await {
error!("Failed to send raw capture result: {}", e);
- return Err(ContinuousCaptureError::ErrorSendingOcrResult(
- e.to_string(),
- ));
+ return Err(ContinuousCaptureError::ErrorSendingOcrResult(e.to_string()));
}
// Log frame comparison stats periodically
diff --git a/crates/screenpipe-vision/src/metrics.rs b/crates/screenpipe-vision/src/metrics.rs
index 11ba81104..9d8bdbcd5 100644
--- a/crates/screenpipe-vision/src/metrics.rs
+++ b/crates/screenpipe-vision/src/metrics.rs
@@ -90,8 +90,7 @@ impl PipelineMetrics {
self.ocr_completed.fetch_add(1, Ordering::Relaxed);
self.ocr_total_latency_us
.fetch_add(latency.as_micros() as u64, Ordering::Relaxed);
- self.ocr_cache_hits
- .fetch_add(cache_hits, Ordering::Relaxed);
+ self.ocr_cache_hits.fetch_add(cache_hits, Ordering::Relaxed);
self.ocr_cache_misses
.fetch_add(cache_misses, Ordering::Relaxed);
}
@@ -159,8 +158,7 @@ impl PipelineMetrics {
frames_db_written,
frames_dropped: self.frames_dropped.load(Ordering::Relaxed),
avg_db_latency_ms: if frames_db_written > 0 {
- (self.db_total_latency_us.load(Ordering::Relaxed) as f64
- / frames_db_written as f64)
+ (self.db_total_latency_us.load(Ordering::Relaxed) as f64 / frames_db_written as f64)
/ 1000.0
} else {
0.0
diff --git a/crates/screenpipe-vision/src/utils.rs b/crates/screenpipe-vision/src/utils.rs
index 0f4ba3608..d4f693dc8 100644
--- a/crates/screenpipe-vision/src/utils.rs
+++ b/crates/screenpipe-vision/src/utils.rs
@@ -150,4 +150,3 @@ pub async fn capture_screenshot(
Ok((image, window_images, image_hash, capture_duration))
}
-
diff --git a/crates/screenpipe-vision/tests/decoupled_pipeline_test.rs b/crates/screenpipe-vision/tests/decoupled_pipeline_test.rs
index b7ac08188..58b25cf8e 100644
--- a/crates/screenpipe-vision/tests/decoupled_pipeline_test.rs
+++ b/crates/screenpipe-vision/tests/decoupled_pipeline_test.rs
@@ -26,12 +26,7 @@ use tokio::sync::Mutex;
/// Create a synthetic test image
fn create_test_image(width: u32, height: u32) -> DynamicImage {
let img: ImageBuffer<Rgba<u8>, Vec<u8>> = ImageBuffer::from_fn(width, height, |x, y| {
- Rgba([
- (x % 256) as u8,
- (y % 256) as u8,
- ((x + y) % 256) as u8,
- 255,
- ])
+ Rgba([(x % 256) as u8, (y % 256) as u8, ((x + y) % 256) as u8, 255])
});
DynamicImage::ImageRgba8(img)
}
@@ -185,10 +180,7 @@ async fn test_process_ocr_task_returns_capture_result() {
assert_eq!(window.app_name, "TestApp0");
assert_eq!(window.window_name, "Window 0");
assert!(window.focused);
- assert_eq!(
- window.browser_url,
- Some("https://example.com".to_string())
- );
+ assert_eq!(window.browser_url, Some("https://example.com".to_string()));
}
Err(e) => {
eprintln!("Skipping OCR test (Tesseract not available): {}", e);
@@ -279,8 +271,7 @@ async fn test_ocr_cache_hit_on_same_image() {
);
if !r1.capture.window_ocr_results.is_empty() {
assert_eq!(
- r1.capture.window_ocr_results[0].text,
- r2.capture.window_ocr_results[0].text,
+ r1.capture.window_ocr_results[0].text, r2.capture.window_ocr_results[0].text,
"Cached result should produce identical text"
);
assert_eq!(
diff --git a/crates/screenpipe-vision/tests/windows_vision_test.rs b/crates/screenpipe-vision/tests/windows_vision_test.rs
index 2bfa8dd95..7145c3a55 100644
--- a/crates/screenpipe-vision/tests/windows_vision_test.rs
+++ b/crates/screenpipe-vision/tests/windows_vision_test.rs
@@ -54,13 +54,7 @@ mod tests {
StdDuration::from_secs(60),
100,
)));
- let result = process_ocr_task(
- &raw,
- &ocr_engine,
- &[],
- ocr_cache,
- )
- .await;
+ let result = process_ocr_task(&raw, &ocr_engine, &[], ocr_cache).await;
assert!(result.is_ok());
// Add more specific assertions based on expected behavior