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.2.20

Louis Beaumont9b4eef34184c
diff --git a/Cargo.lock b/Cargo.lock
index 30efa2bbf..109c34bf4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5512,7 +5512,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"anyhow",
"audiopipe",
@@ -5569,7 +5569,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -5611,7 +5611,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"anyhow",
"chrono",
@@ -5636,7 +5636,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"anyhow",
"chrono",
@@ -5654,7 +5654,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"anyhow",
"chrono",
@@ -5674,7 +5674,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"anyhow",
"async-trait",
@@ -5735,7 +5735,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.163"
+version = "0.3.164"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
index 1507ba405..4a22b782a 100644
--- a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
@@ -737,22 +737,23 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({
const info = renderedInfoRef.current;
if (!info) return;
+ // Debounce: wait 300ms after last frame change before analyzing.
+ // This prevents hammering VisionKit during fast scroll.
let cancelled = false;
- const frameUrl = `http://localhost:3030/frames/${debouncedFrame.frameId}`;
- (async () => {
- try {
- await invoke("livetext_analyze", {
- imagePath: frameUrl,
- x: info.offsetX,
- y: info.offsetY,
- w: info.width,
- h: info.height,
- });
- } catch (e) {
+ const timer = setTimeout(() => {
+ if (cancelled) return;
+ const frameUrl = `http://localhost:3030/frames/${debouncedFrame.frameId}`;
+ invoke("livetext_analyze", {
+ imagePath: frameUrl,
+ x: info.offsetX,
+ y: info.offsetY,
+ w: info.width,
+ h: info.height,
+ }).catch((e: unknown) => {
if (!cancelled) console.warn("live text analyze failed:", e);
- }
- })();
- return () => { cancelled = true; };
+ });
+ }, 300);
+ return () => { cancelled = true; clearTimeout(timer); };
}, [nativeLiveTextActive, debouncedFrame?.frameId]);
// Update overlay position on resize (native Live Text)
diff --git a/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx b/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx
index 24dab6244..2207b8c14 100644
--- a/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/ai-presets.tsx
@@ -906,7 +906,7 @@ const AISection = ({
{piAvailable && (
<AIProviderCard
type="pi"
- title="Pi Agent"
+ title="Screenpipe Cloud"
description="AI coding agent powered by Screenpipe Cloud. Requires login."
imageSrc="/images/screenpipe.png"
selected={settingsPreset?.provider === "pi"}
diff --git a/apps/screenpipe-app-tauri/components/text-overlay.tsx b/apps/screenpipe-app-tauri/components/text-overlay.tsx
index ed7a84eb8..d6566fe90 100644
--- a/apps/screenpipe-app-tauri/components/text-overlay.tsx
+++ b/apps/screenpipe-app-tauri/components/text-overlay.tsx
@@ -284,6 +284,20 @@ export const TextOverlay = memo(function TextOverlay({
if (blockWidth <= 0 || blockHeight <= 0) continue;
+ // Skip if this highlight largely overlaps an existing one
+ // (OCR + accessibility can return near-identical bounding boxes)
+ const isDuplicate = result.some(existing => {
+ const overlapLeft = Math.max(existing.left, blockLeft);
+ const overlapTop = Math.max(existing.top, blockTop);
+ const overlapRight = Math.min(existing.left + existing.width, blockLeft + blockWidth);
+ const overlapBottom = Math.min(existing.top + existing.height, blockTop + blockHeight);
+ if (overlapRight <= overlapLeft || overlapBottom <= overlapTop) return false;
+ const overlapArea = (overlapRight - overlapLeft) * (overlapBottom - overlapTop);
+ const thisArea = blockWidth * blockHeight;
+ return overlapArea > thisArea * 0.5;
+ });
+ if (isDuplicate) continue;
+
result.push({
key: `hl-${result.length}`,
left: blockLeft,
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index b1caa7a4e..001ab20f4 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.2.19"
+version = "2.2.20"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/livetext.rs b/apps/screenpipe-app-tauri/src-tauri/src/livetext.rs
index f33f2b765..9556ddcab 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/livetext.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/livetext.rs
@@ -25,6 +25,12 @@ unsafe fn extract_and_free(ptr: *mut std::os::raw::c_char) -> Option<String> {
Some(s)
}
+/// Generation counter — incremented on every analyze call.
+/// The spawned thread checks this before doing expensive work;
+/// if a newer request has arrived, it bails out early.
+#[cfg(target_os = "macos")]
+static ANALYZE_GENERATION: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
+
// ---------- Tauri commands ----------
#[tauri::command]
@@ -88,20 +94,26 @@ pub async fn livetext_analyze(
) -> Result<String, String> {
#[cfg(target_os = "macos")]
{
- info!("livetext_analyze called for {}", image_path);
+ // Bump generation — any in-flight analysis with an older generation will bail out.
+ let gen = ANALYZE_GENERATION.fetch_add(1, std::sync::atomic::Ordering::SeqCst) + 1;
+
// Run on a dedicated thread to avoid blocking tokio runtime
// (the Swift semaphore.wait() inside lt_analyze_image would deadlock
// if called from a tokio worker thread)
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
let result = (|| -> Result<String, String> {
+ // Check if a newer request has already been issued
+ if ANALYZE_GENERATION.load(std::sync::atomic::Ordering::SeqCst) != gen {
+ return Err("skipped: newer analyze request pending".to_string());
+ }
+
let path_c =
CString::new(image_path.clone()).map_err(|e| format!("invalid path: {}", e))?;
let mut out_text: *mut std::os::raw::c_char = std::ptr::null_mut();
let mut out_error: *mut std::os::raw::c_char = std::ptr::null_mut();
- info!("calling lt_analyze_image FFI...");
let status = unsafe {
livetext_ffi::lt_analyze_image(
path_c.as_ptr(),
@@ -113,19 +125,16 @@ pub async fn livetext_analyze(
&mut out_error,
)
};
- info!("lt_analyze_image returned status={}", status);
unsafe {
if status != 0 {
let err =
extract_and_free(out_error).unwrap_or_else(|| "unknown error".to_string());
extract_and_free(out_text);
- info!("live text analysis error: {}", err);
return Err(format!("live text analysis failed: {}", err));
}
let text = extract_and_free(out_text).unwrap_or_default();
extract_and_free(out_error);
- info!("live text recognized {} chars", text.len());
Ok(text)
}
})();
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift b/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
index fe5834d79..1a6735285 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
@@ -87,6 +87,14 @@ public func ltInit(_ windowPtr: UInt64) -> Int32 {
guard let contentView = window.contentView else { return -3 }
let mgr = LiveTextManager.shared
+
+ // Clean up any existing overlay from a previous init call
+ // (component remounts, HMR, etc. can trigger multiple inits)
+ MainActor.assumeIsolated {
+ mgr.overlayView?.removeFromSuperview()
+ }
+ mgr.overlayView = nil
+ mgr.currentAnalysis = nil
mgr.hostContentView = contentView
// Create overlay — caller (lt_init) is invoked from main thread via
diff --git a/packages/ai-gateway/src/providers/gemini.ts b/packages/ai-gateway/src/providers/gemini.ts
index 65c715018..a1164cbff 100644
--- a/packages/ai-gateway/src/providers/gemini.ts
+++ b/packages/ai-gateway/src/providers/gemini.ts
@@ -515,6 +515,9 @@ export class GeminiProvider implements AIProvider {
contents,
generationConfig: {
temperature: body.temperature ?? 0.7,
+ // Disable thinking to avoid thought_signature requirements on tool calls
+ // (OpenAI format can't round-trip thought signatures)
+ thinkingConfig: { thinkingBudget: 0 },
},
};