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.158
Louis Beaumont2909859ac4b2
diff --git a/.github/workflows/release-app-beta.yml b/.github/workflows/release-app-beta.ymlindex ead5ed169..729bf39cd 100644--- a/.github/workflows/release-app-beta.yml+++ b/.github/workflows/release-app-beta.yml@@ -93,17 +93,17 @@ jobs:- platform: "macos-latest"args: "--target aarch64-apple-darwin --features metal"target: aarch64-apple-darwin- tauri-args: "--target aarch64-apple-darwin"+ tauri-args: "--target aarch64-apple-darwin --features official-build"os_type: "macos"- platform: "macos-latest"args: "--target x86_64-apple-darwin --features metal"target: x86_64-apple-darwin- tauri-args: "--target x86_64-apple-darwin"+ tauri-args: "--target x86_64-apple-darwin --features official-build"os_type: "macos"- platform: "windows-2019"args: "--target x86_64-pc-windows-msvc --features mkl"pre-build-args: ""- tauri-args: "--target x86_64-pc-windows-msvc"+ tauri-args: "--target x86_64-pc-windows-msvc --features official-build"os_type: "windows"# Linux disabled - too many bundling issues# - platform: "ubuntu-22.04"diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex b9b187c26..3d17bcafe 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -93,17 +93,17 @@ jobs:- platform: "macos-latest"args: "--target aarch64-apple-darwin --features metal"target: aarch64-apple-darwin- tauri-args: "--target aarch64-apple-darwin"+ tauri-args: "--target aarch64-apple-darwin --features official-build"os_type: "macos"- platform: "macos-latest"args: "--target x86_64-apple-darwin --features metal"target: x86_64-apple-darwin- tauri-args: "--target x86_64-apple-darwin"+ tauri-args: "--target x86_64-apple-darwin --features official-build"os_type: "macos"- platform: "windows-2019"args: "--target x86_64-pc-windows-msvc --features mkl"pre-build-args: ""- tauri-args: "--target x86_64-pc-windows-msvc"+ tauri-args: "--target x86_64-pc-windows-msvc --features official-build"os_type: "windows"# Linux disabled - too many bundling issues# - platform: "ubuntu-22.04"diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lockindex 192304ac5..0cb9e3f90 100755--- a/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -5629,7 +5629,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"[[package]]name = "screenpipe-app"-version = "2.0.152"+version = "2.0.157"dependencies = ["anyhow","async-stream",diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 11d9115a6..6de24fb39 100644--- a/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.0.157"+version = "2.0.158"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""@@ -155,6 +155,10 @@ default = ["custom-protocol"]# DO NOT REMOVE!!custom-protocol = ["tauri/custom-protocol"]+# Set by GitHub Actions release workflow - enables auto-updates+# Source builds without this flag will show "auto-updates unavailable"+official-build = []+[package.metadata.cargo-machete]ignored = ["tauri-utils"]diff --git a/screenpipe-app-tauri/src-tauri/src/updates.rs b/screenpipe-app-tauri/src-tauri/src/updates.rsindex e6ba710ba..604217fac 100644--- a/screenpipe-app-tauri/src-tauri/src/updates.rs+++ b/screenpipe-app-tauri/src-tauri/src/updates.rs@@ -9,11 +9,20 @@ use tauri::menu::{MenuItem, MenuItemBuilder};use tauri::{Emitter, Manager, Wry};use tauri_plugin_dialog::DialogExt;use tauri_plugin_dialog::MessageDialogButtons;+use tauri_plugin_opener::OpenerExt;use tauri_plugin_updater::UpdaterExt;use tokio::sync::oneshot;use tokio::sync::Mutex;use tokio::time::interval;+/// Check if this is a source/community build (not an official release)+/// Official releases are built with --features official-build in GitHub Actions+pub fn is_source_build(_app: &tauri::AppHandle) -> bool {+ // The official-build feature is only enabled during CI releases+ // Source builds will not have this feature enabled+ !cfg!(feature = "official-build")+}+pub struct UpdatesManager {interval: Duration,update_available: Arc<Mutex<bool>>,@@ -24,13 +33,20 @@ pub struct UpdatesManager {impl UpdatesManager {pub fn new(app: &tauri::AppHandle, interval_minutes: u64) -> Result<Self, Error> {+ // Show different menu text for source builds+ let menu_text = if is_source_build(app) {+ "auto-updates unavailable (source build)"+ } else {+ "screenpipe is up to date"+ };+Ok(Self {interval: Duration::from_secs(interval_minutes * 60),update_available: Arc::new(Mutex::new(false)),update_installed: Arc::new(Mutex::new(false)),app: app.clone(),- update_menu_item: MenuItemBuilder::with_id("update_now", "screenpipe is up to date")- .enabled(false)+ update_menu_item: MenuItemBuilder::with_id("update_now", menu_text)+ .enabled(is_source_build(app)) // Enable for source builds to show info dialog.build(app)?,})}@@ -39,6 +55,15 @@ impl UpdatesManager {&self,show_dialog: bool,) -> Result<bool, Box<dyn std::error::Error>> {+ // Handle source/community builds+ if is_source_build(&self.app) {+ info!("source build detected, auto-updates not available");+ if show_dialog {+ self.show_source_build_dialog().await?;+ }+ return Result::Ok(false);+ }+if let Ok(val) = std::env::var("TAURI_ENV_DEBUG") {if val == "true" {info!("dev mode is enabled, skipping update check");@@ -166,6 +191,38 @@ impl UpdatesManager {self.app.restart();}+ /// Show dialog explaining auto-updates are not available for source builds+ async fn show_source_build_dialog(&self) -> Result<(), Box<dyn std::error::Error>> {+ let (tx, rx) = oneshot::channel();+ let dialog = self+ .app+ .dialog()+ .message(+ "auto-updates are only available in the pre-built version.\n\n\+ source builds require manual updates from github.",+ )+ .title("source build detected")+ .buttons(MessageDialogButtons::OkCancelCustom(+ "download pre-built".to_string(),+ "view on github".to_string(),+ ));++ dialog.show(move |answer| {+ let _ = tx.send(answer);+ });++ let clicked_download = rx.await?;+ if clicked_download {+ // Open download page+ let _ = self.app.opener().open_url("https://screenpi.pe/download", None::<&str>);+ } else {+ // Open GitHub releases+ let _ = self.app.opener().open_url("https://github.com/mediar-ai/screenpipe/releases", None::<&str>);+ }++ Ok(())+ }+pub async fn start_periodic_event(&self) {let mut interval = interval(self.interval);