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
fix: tray shows only recording monitors, whatsapp history sync, default pi model to gemini-3.1-pro
Louis Beaumontaeff3ba4b963
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex efd2dfc7b..3fe3bc9c1 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -196,8 +196,8 @@ const DEFAULT_PI_PRESET: AIPreset = {id: "pi-agent",provider: "pi",url: "",- model: "claude-haiku-4-5",- maxContextChars: 200000,+ model: "gemini-3.1-pro",+ maxContextChars: 1000000,defaultPreset: true,prompt: "",};@@ -393,6 +393,16 @@ function createSettingsStore() {needsUpdate = true;}+ // Migration: Switch default pi-agent preset from claude-haiku to gemini-3.1-pro+ const piPresetToMigrate = settings.aiPresets?.find(+ (p: any) => p.id === "pi-agent" && p.provider === "pi" && p.model === "claude-haiku-4-5"+ );+ if (piPresetToMigrate) {+ (piPresetToMigrate as any).model = "gemini-3.1-pro";+ (piPresetToMigrate as any).maxContextChars = 1000000;+ needsUpdate = true;+ }+// Migration: Add chat history for existing usersif (!settings.chatHistory) {settings.chatHistory = {diff --git a/apps/screenpipe-app-tauri/src-tauri/src/health.rs b/apps/screenpipe-app-tauri/src-tauri/src/health.rsindex edde13b3a..ee85d325a 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/health.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/health.rs@@ -276,8 +276,30 @@ pub async fn start_health_check(app: tauri::AppHandle) -> Result<()> {current_status,);- // Parse device info from health response- let devices = parse_devices_from_health(&health_result);+ // Parse device info from health response, filtered by monitor settings+ let mut devices = parse_devices_from_health(&health_result);++ // Filter monitors to only show actively recording ones+ if let Ok(Some(store)) = crate::store::SettingsStore::get(&app) {+ if !store.use_all_monitors && !store.monitor_ids.is_empty()+ && store.monitor_ids != vec!["default".to_string()]+ {+ devices.retain(|d| {+ if d.kind != DeviceKind::Monitor { return true; }+ store.monitor_ids.iter().any(|allowed| {+ // Stable ID format: "Display 3_1920x1080_0,0"+ // Extract name prefix before last '_' (position coords)+ let allowed_name = allowed.rsplitn(2, '_').last().unwrap_or(allowed);+ // Health monitor format: "Display 3 (1920x1080)"+ // Extract just the display name+ let health_name = d.name.split(" (").next().unwrap_or(&d.name);+ let allowed_short = allowed_name.split('_').next().unwrap_or(allowed_name);+ health_name == allowed_short+ })+ });+ }+ }+set_recording_info(status, devices);let current_status = status_to_icon_key(status);diff --git a/crates/screenpipe-connect/src/whatsapp/gateway.mjs b/crates/screenpipe-connect/src/whatsapp/gateway.mjsindex 8de66b1f7..7a6d918a9 100644--- a/crates/screenpipe-connect/src/whatsapp/gateway.mjs+++ b/crates/screenpipe-connect/src/whatsapp/gateway.mjs@@ -247,6 +247,63 @@ async function start() {sock.ev.on("creds.update", saveCreds);+ // Load existing chats/contacts on initial sync (Baileys sends history on connect)+ sock.ev.on("messaging-history.set", ({ chats, contacts, messages }) => {+ if (contacts) {+ for (const contact of contacts) {+ if (contact.id) {+ contactStore[contact.id] = { ...contactStore[contact.id], ...contact };+ }+ }+ }+ if (chats) {+ for (const chat of chats) {+ if (chat.id) {+ chatStore[chat.id] = chatStore[chat.id] || { updatedAt: 0, count: 0 };+ chatStore[chat.id].updatedAt = Math.max(+ chatStore[chat.id].updatedAt,+ chat.conversationTimestamp ? Number(chat.conversationTimestamp) : 0+ );+ if (chat.unreadCount) {+ chatStore[chat.id].count += chat.unreadCount;+ }+ }+ }+ }+ if (messages) {+ for (const { messages: msgs } of messages) {+ for (const msg of msgs) {+ if (!msg.message) continue;+ const jid = msg.key.remoteJid;+ if (!jid || jid === "status@broadcast") continue;+ const text =+ msg.message.conversation ||+ msg.message.extendedTextMessage?.text ||+ msg.message.imageMessage?.caption ||+ msg.message.videoMessage?.caption ||+ null;+ const mediaType =+ msg.message.imageMessage ? "image" :+ msg.message.videoMessage ? "video" :+ msg.message.audioMessage ? "audio" :+ msg.message.documentMessage ? "document" :+ msg.message.stickerMessage ? "sticker" :+ null;+ storeMessage(jid, {+ id: msg.key.id,+ fromMe: !!msg.key.fromMe,+ from: msg.key.fromMe ? "me" : (contactName(jid) || jid.split("@")[0]),+ text,+ mediaType,+ timestamp: msg.messageTimestamp ? Number(msg.messageTimestamp) : Math.floor(Date.now() / 1000),+ pushName: msg.pushName || null,+ });+ }+ }+ }+ emit({ type: "history-sync", contacts: Object.keys(contactStore).length, chats: Object.keys(chatStore).length });+ });+// Sync contacts into our in-memory storesock.ev.on("contacts.update", (updates) => {for (const contact of updates) {diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rsindex b0c9510b1..dc5b5ec88 100644--- a/crates/screenpipe-core/src/agents/pi.rs+++ b/crates/screenpipe-core/src/agents/pi.rs@@ -74,6 +74,15 @@ pub fn screenpipe_cloud_models() -> serde_json::Value {"cost": {"input": 1.25, "output": 10.00, "cacheRead": 0, "cacheWrite": 0},"contextWindow": 1000000,"maxTokens": 65536+ },+ {+ "id": "gemini-3.1-pro",+ "name": "Gemini 3.1 Pro",+ "reasoning": true,+ "input": ["text", "image"],+ "cost": {"input": 1.25, "output": 10.00, "cacheRead": 0, "cacheWrite": 0},+ "contextWindow": 1000000,+ "maxTokens": 65536}])}