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
Bump app to v2.0.340, CLI to v0.3.126
Louis Beaumont0deb641ee9df
diff --git a/Cargo.toml b/Cargo.tomlindex 5af402419..602c9160d 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -6,7 +6,7 @@ exclude = ["apps/screenpipe-app-tauri/src-tauri"]resolver = "2"[workspace.package]-version = "0.3.125"+version = "0.3.126"authors = ["louis030195 <[email protected]>"]description = ""repository = "https://github.com/screenpipe/screenpipe"diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsxindex 1f1a18ef2..fc4002b3c 100644--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx@@ -599,6 +599,9 @@ export default function Timeline() {getStartDateAndSet();}, []);+ const dateRetryCountRef = useRef(0);+ const MAX_DATE_RETRIES = 7; // Don't walk back more than 7 days+useEffect(() => {// Wait for websocket to be ready before fetchingif (!websocket || websocket.readyState !== WebSocket.OPEN) {@@ -613,10 +616,20 @@ export default function Timeline() {// (e.g., user clicking day arrows). During navigation, handleDateChange// already handles finding dates with frames.if (!checkFramesForDate && !isNavigatingRef.current) {+ // Prevent infinite loop: stop walking back after MAX_DATE_RETRIES days+ if (dateRetryCountRef.current >= MAX_DATE_RETRIES) {+ console.warn("no frames found after checking", MAX_DATE_RETRIES, "days back, stopping");+ dateRetryCountRef.current = 0;+ return;+ }+ dateRetryCountRef.current += 1;setCurrentDate(subDays(currentDateEffect, 1));return; // Don't fetch frames for a date we're leaving}+ // Found frames — reset retry counter+ dateRetryCountRef.current = 0;+const startTime = new Date(currentDateEffect);startTime.setHours(0, 0, 0, 0);diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsxindex 78cfb1fd8..b5cf34acd 100644--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx@@ -1589,34 +1589,39 @@ export function StandaloneChat() {{ signal: abortControllerRef.current.signal });- for await (const chunk of stream) {- const delta = chunk.choices[0]?.delta;-- if (delta?.content) {- accumulatedText += delta.content;- setMessages((prev) =>- prev.map((m) =>- m.id === assistantMessageId- ? { ...m, content: accumulatedText }- : m- )- );- }+ try {+ for await (const chunk of stream) {+ const delta = chunk.choices[0]?.delta;++ if (delta?.content) {+ accumulatedText += delta.content;+ setMessages((prev) =>+ prev.map((m) =>+ m.id === assistantMessageId+ ? { ...m, content: accumulatedText }+ : m+ )+ );+ }- if (delta?.tool_calls) {- for (const toolCall of delta.tool_calls) {- const index = toolCall.index;- if (!toolCalls[index]) {- toolCalls[index] = {- id: toolCall.id || "",- function: { name: "", arguments: "" },- };+ if (delta?.tool_calls) {+ for (const toolCall of delta.tool_calls) {+ const index = toolCall.index;+ if (!toolCalls[index]) {+ toolCalls[index] = {+ id: toolCall.id || "",+ function: { name: "", arguments: "" },+ };+ }+ if (toolCall.id) toolCalls[index].id = toolCall.id;+ if (toolCall.function?.name) toolCalls[index].function.name = toolCall.function.name;+ if (toolCall.function?.arguments) toolCalls[index].function.arguments += toolCall.function.arguments;}- if (toolCall.id) toolCalls[index].id = toolCall.id;- if (toolCall.function?.name) toolCalls[index].function.name = toolCall.function.name;- if (toolCall.function?.arguments) toolCalls[index].function.arguments += toolCall.function.arguments;}}+ } catch (e: any) {+ if (e?.name === "AbortError") return;+ throw e;}if (toolCalls.length > 0) {@@ -1684,18 +1689,23 @@ export function StandaloneChat() {{ signal: abortControllerRef.current?.signal });- for await (const chunk of continueStream) {- const content = chunk.choices[0]?.delta?.content;- if (content) {- accumulatedText += content;- setMessages((prev) =>- prev.map((m) =>- m.id === assistantMessageId- ? { ...m, content: accumulatedText }- : m- )- );+ try {+ for await (const chunk of continueStream) {+ const content = chunk.choices[0]?.delta?.content;+ if (content) {+ accumulatedText += content;+ setMessages((prev) =>+ prev.map((m) =>+ m.id === assistantMessageId+ ? { ...m, content: accumulatedText }+ : m+ )+ );+ }}+ } catch (e: any) {+ if (e?.name === "AbortError") return;+ throw e;}}diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex c4628bc1f..980a95cf2 100755--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -9007,7 +9007,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.0.338"+version = "2.0.339"dependencies = ["anyhow","async-stream",diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex d0c2802d1..89564c83f 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.339"+version = "2.0.340"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs b/apps/screenpipe-app-tauri/src-tauri/src/tray.rsindex 0bc7a7e4b..33adb3e24 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs@@ -93,7 +93,10 @@ pub fn log_tray_position(app: &AppHandle) {pub fn recreate_tray(app: &AppHandle) {let app_for_thread = app.clone();+ // Wrap in catch_unwind: ObjC exceptions during tray operations can panic+ // across the FFI boundary (nounwind → abort). catch_unwind prevents this.let _ = app.run_on_main_thread(move || {+ if let Err(e) = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {let app = app_for_thread;let update_item = match UPDATE_MENU_ITEM.lock() {Ok(guard) => guard.clone(),@@ -148,6 +151,9 @@ pub fn recreate_tray(app: &AppHandle) {error!("failed to recreate tray icon: {}", e);}}+ })) {+ error!("panic caught in recreate_tray: {:?}", e);+ }});}@@ -433,17 +439,21 @@ async fn update_menu_if_needed(let update_item = update_item.clone();let has_perm_issue = new_state.has_permission_issue;let _ = app.run_on_main_thread(move || {- if let Some(tray) = app_for_thread.tray_by_id("screenpipe_main") {- if let Ok(menu) = create_dynamic_menu(&app_for_thread, &new_state, &update_item) {- let _ = tray.set_menu(Some(menu));+ if let Err(e) = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {+ if let Some(tray) = app_for_thread.tray_by_id("screenpipe_main") {+ if let Ok(menu) = create_dynamic_menu(&app_for_thread, &new_state, &update_item) {+ let _ = tray.set_menu(Some(menu));+ }+ // Update tooltip to show permission status+ let tooltip = if has_perm_issue {+ "screenpipe — ⚠️ permissions needed"+ } else {+ "screenpipe"+ };+ let _ = tray.set_tooltip(Some(tooltip));}- // Update tooltip to show permission status- let tooltip = if has_perm_issue {- "screenpipe — ⚠️ permissions needed"- } else {- "screenpipe"- };- let _ = tray.set_tooltip(Some(tooltip));+ })) {+ error!("panic caught in tray menu update: {:?}", e);}});}diff --git a/crates/screenpipe-audio/src/core/mod.rs b/crates/screenpipe-audio/src/core/mod.rsindex 50f1505c4..bc8dde018 100644--- a/crates/screenpipe-audio/src/core/mod.rs+++ b/crates/screenpipe-audio/src/core/mod.rs@@ -12,7 +12,7 @@ use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};use std::sync::Arc;use std::time::{Duration, SystemTime, UNIX_EPOCH};use stream::AudioStream;-use tracing::{error, warn};+use tracing::{error, info, warn};lazy_static! {// Global fallback timestamp for backward compatibility@@ -76,7 +76,10 @@ pub async fn record_and_transcribe(if is_normal_shutdown(&is_running) {return Err(e);}- warn!("record_and_transcribe error, restarting: {}", e);+ // Use info! instead of warn! — Sentry captures warn+ and this fires+ // on every successful auto-recovery (e.g., audio hijack → reconnect),+ // creating thousands of noise events. The error is expected & handled.+ info!("record_and_transcribe error, restarting: {}", e);tokio::time::sleep(Duration::from_secs(1)).await;}}