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
Louis Beaumontaa034299b358
diff --git a/crates/screenpipe-connect/src/connections/mod.rs b/crates/screenpipe-connect/src/connections/mod.rsindex 5de98184a..a314bc303 100644--- a/crates/screenpipe-connect/src/connections/mod.rs+++ b/crates/screenpipe-connect/src/connections/mod.rs@@ -217,12 +217,7 @@ impl ConnectionManager {let connected = if is_oauth {oauth::list_oauth_instances(def.id).iter()- .any(|inst| {- oauth::is_oauth_instance_connected(- def.id,- inst.as_deref(),- )- })+ .any(|inst| oauth::is_oauth_instance_connected(def.id, inst.as_deref()))} else {store.get(def.id)diff --git a/crates/screenpipe-connect/src/oauth.rs b/crates/screenpipe-connect/src/oauth.rsindex 277b6e3a2..7d32b2544 100644--- a/crates/screenpipe-connect/src/oauth.rs+++ b/crates/screenpipe-connect/src/oauth.rs@@ -121,10 +121,8 @@ pub fn read_oauth_token_instance(integration_id: &str, instance: Option<&str>) -/// Check if an OAuth instance is recoverable — has a valid token or a/// refresh token that can be used to obtain a new one.pub fn is_oauth_instance_connected(integration_id: &str, instance: Option<&str>) -> bool {- let content = match std::fs::read_to_string(oauth_token_path_instance(- integration_id,- instance,- )) {+ let content = match std::fs::read_to_string(oauth_token_path_instance(integration_id, instance))+ {Ok(c) => c,Err(_) => return false,};diff --git a/crates/screenpipe-engine/src/connections_api.rs b/crates/screenpipe-engine/src/connections_api.rsindex f849ded38..6aa993922 100644--- a/crates/screenpipe-engine/src/connections_api.rs+++ b/crates/screenpipe-engine/src/connections_api.rs@@ -673,9 +673,7 @@ async fn gcal_token(client: &reqwest::Client, instance: Option<&str>) -> anyhow:}/// GET /connections/google-calendar/status — check connection + email.-async fn gcal_status(- Query(q): Query<GoogleCalendarInstanceQuery>,-) -> (StatusCode, Json<Value>) {+async fn gcal_status(Query(q): Query<GoogleCalendarInstanceQuery>) -> (StatusCode, Json<Value>) {let client = reqwest::Client::new();let instance = q.instance.as_deref();@@ -713,9 +711,7 @@ async fn gcal_status(}/// GET /connections/google-calendar/events — fetch Google Calendar events.-async fn gcal_events(- Query(params): Query<GoogleCalendarEventsQuery>,-) -> (StatusCode, Json<Value>) {+async fn gcal_events(Query(params): Query<GoogleCalendarEventsQuery>) -> (StatusCode, Json<Value>) {let client = reqwest::Client::new();match gcal_events_inner(&client, params).await {Ok(events) => (StatusCode::OK, Json(json!(events))),@@ -887,7 +883,10 @@ where// Google Calendar routes (must be before /:id to avoid conflict).route("/google-calendar/events", get(gcal_events)).route("/google-calendar/status", get(gcal_status))- .route("/google-calendar/disconnect", axum::routing::delete(gcal_disconnect))+ .route(+ "/google-calendar/disconnect",+ axum::routing::delete(gcal_disconnect),+ )// Gmail-specific routes (must be before /:id to avoid conflict).route("/gmail/instances", get(gmail_list_instances)).route("/gmail/messages", get(gmail_list_messages))