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

style: apply rustfmt across workspace

Louis Beaumont03bc1bbba247
diff --git a/crates/screenpipe-audio/src/speaker/segment.rs b/crates/screenpipe-audio/src/speaker/segment.rs
index e8fb60290..9dea62d36 100644
--- a/crates/screenpipe-audio/src/speaker/segment.rs
+++ b/crates/screenpipe-audio/src/speaker/segment.rs
@@ -72,8 +72,14 @@ fn create_speech_segment(
let embedding = match get_speaker_embedding(embedding_extractor, segment_samples) {
Ok(embedding) => embedding,
Err(e) => {
- error!("Failed to compute speaker embedding, skipping segment: {}", e);
- return Err(anyhow::anyhow!("speaker embedding extraction failed: {}", e));
+ error!(
+ "Failed to compute speaker embedding, skipping segment: {}",
+ e
+ );
+ return Err(anyhow::anyhow!(
+ "speaker embedding extraction failed: {}",
+ e
+ ));
}
};
let speaker = {
diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rs
index 877a8c1fd..9b9440731 100644
--- a/crates/screenpipe-core/src/agents/pi.rs
+++ b/crates/screenpipe-core/src/agents/pi.rs
@@ -748,8 +748,11 @@ impl AgentExecutor for PiExecutor {
Self::ensure_web_search_extension(working_dir, Some(&resolved_provider))?;
- let pi_path = find_pi_executable()
- .ok_or_else(|| anyhow!("pi not found. try restarting the app or delete ~/.screenpipe/pi-agent and restart"))?;
+ let pi_path = find_pi_executable().ok_or_else(|| {
+ anyhow!(
+ "pi not found. try restarting the app or delete ~/.screenpipe/pi-agent and restart"
+ )
+ })?;
let resolved_model = Self::resolve_model(model, &resolved_provider);
info!(
@@ -830,8 +833,11 @@ impl AgentExecutor for PiExecutor {
Self::ensure_screenpipe_skill_auto(working_dir)?;
Self::ensure_web_search_extension(working_dir, Some(&resolved_provider))?;
- let pi_path = find_pi_executable()
- .ok_or_else(|| anyhow!("pi not found. try restarting the app or delete ~/.screenpipe/pi-agent and restart"))?;
+ let pi_path = find_pi_executable().ok_or_else(|| {
+ anyhow!(
+ "pi not found. try restarting the app or delete ~/.screenpipe/pi-agent and restart"
+ )
+ })?;
info!(
"pipe streaming using provider: {}, model: {}",
@@ -911,8 +917,7 @@ impl AgentExecutor for PiExecutor {
info!("installing pi into {} via bun …", install_dir.display());
let mut cmd = std::process::Command::new(&bun);
- cmd.current_dir(&install_dir)
- .args(["add", PI_PACKAGE]);
+ cmd.current_dir(&install_dir).args(["add", PI_PACKAGE]);
#[cfg(windows)]
{
diff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rs
index 10041870c..980489cf0 100644
--- a/crates/screenpipe-core/src/pipes/mod.rs
+++ b/crates/screenpipe-core/src/pipes/mod.rs
@@ -1011,7 +1011,8 @@ impl PipeManager {
warn!("failed to pre-configure pi provider: {}", e);
}
- pipe_token = setup_pipe_permissions(&pipe_dir, &config, self.token_registry.as_ref()).await;
+ pipe_token =
+ setup_pipe_permissions(&pipe_dir, &config, self.token_registry.as_ref()).await;
}
let token_registry_ref = self.token_registry.clone();
@@ -1372,7 +1373,8 @@ impl PipeManager {
&self.pipes_dir.join(name),
&config,
self.token_registry.as_ref(),
- ).await;
+ )
+ .await;
}
// Run with timeout + streaming
@@ -1971,7 +1973,8 @@ impl PipeManager {
&pipes_dir.join(name),
config,
token_registry.as_ref(),
- ).await;
+ )
+ .await;
}
// Check if history/session continuation is enabled
diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rs
index 3ae6b7c63..67753b1ac 100644
--- a/crates/screenpipe-db/src/db.rs
+++ b/crates/screenpipe-db/src/db.rs
@@ -2902,11 +2902,7 @@ impl DatabaseManager {
.fetch_optional(&self.pool)
.await?;
- Ok((
- latest_frame.map(|f| f.0),
- latest_audio.map(|a| a.0),
- None,
- ))
+ Ok((latest_frame.map(|f| f.0), latest_audio.map(|a| a.0), None))
}
pub async fn add_tags(
diff --git a/crates/screenpipe-db/tests/db.rs b/crates/screenpipe-db/tests/db.rs
index 547d75da6..9dfdfea72 100644
--- a/crates/screenpipe-db/tests/db.rs
+++ b/crates/screenpipe-db/tests/db.rs
@@ -1425,7 +1425,10 @@ mod tests {
)
.await
.unwrap();
- assert_eq!(count, 3, "Should count OCR, Audio, and Accessibility results");
+ assert_eq!(
+ count, 3,
+ "Should count OCR, Audio, and Accessibility results"
+ );
// Test count with specific app filter
let count = db
@@ -1446,7 +1449,10 @@ mod tests {
)
.await
.unwrap();
- assert_eq!(count, 1, "Should count accessibility result with app filter");
+ assert_eq!(
+ count, 1,
+ "Should count accessibility result with app filter"
+ );
// Test count with non-matching query
let count = db
diff --git a/crates/screenpipe-integrations/src/remote_sync.rs b/crates/screenpipe-integrations/src/remote_sync.rs
index 8b24313cf..c82b2d5e2 100644
--- a/crates/screenpipe-integrations/src/remote_sync.rs
+++ b/crates/screenpipe-integrations/src/remote_sync.rs
@@ -399,7 +399,11 @@ async fn sync_to_remote_inner(config: &SyncConfig, data_dir: &Path) -> Result<Sy
.canonicalize(".")
.await
.unwrap_or_else(|_| "/home/".to_string() + &config.user);
- format!("{}/{}", home.trim_end_matches('/'), &config.remote_path[2..])
+ format!(
+ "{}/{}",
+ home.trim_end_matches('/'),
+ &config.remote_path[2..]
+ )
} else {
config.remote_path.clone()
};