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.52
Louis Beaumont4fb5e1e41d9f
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsxindex 513336c56..a04435475 100644--- a/screenpipe-app-tauri/components/global-chat.tsx+++ b/screenpipe-app-tauri/components/global-chat.tsx@@ -241,10 +241,11 @@ export function GlobalChat() {}, [messages]);// Execute search tool by calling Screenpipe API+ // Keep responses small to avoid exceeding model context windowasync function executeSearchTool(args: Record<string, unknown>): Promise<string> {- const MAX_LIMIT = 15; // Cap results to prevent huge responses- const MAX_RESPONSE_CHARS = 8000; // Truncate if response is too large- const MAX_TEXT_PER_RESULT = 500; // Truncate individual result text+ const MAX_LIMIT = 10; // Cap results to prevent huge responses+ const MAX_RESPONSE_CHARS = 4000; // ~1000 tokens - keep small to fit in context+ const MAX_TEXT_PER_RESULT = 300; // Truncate individual result text aggressivelytry {const params = new URLSearchParams();@@ -390,9 +391,12 @@ Always use these exact start_time and end_time values when searching, unless the}// Build conversation history for OpenAI format+ // Limit to last 10 messages to prevent context overflow+ const MAX_HISTORY = 10;+ const recentMessages = messages.slice(-MAX_HISTORY);const conversationMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [{ role: "system", content: systemPrompt },- ...messages.map((m) => ({+ ...recentMessages.map((m) => ({role: m.role as "user" | "assistant",content: m.content,})),@@ -550,6 +554,16 @@ Always use these exact start_time and end_time values when searching, unless theerrorMessage = "Rate limit exceeded. Please wait a moment and try again.";} else if (errorMessage.includes("Failed to fetch") || errorMessage.includes("NetworkError")) {errorMessage = "Network error. Please check your internet connection and that the API endpoint is correct.";+ } else if (+ errorMessage.includes("context") ||+ errorMessage.includes("token") ||+ errorMessage.includes("too large") ||+ errorMessage.includes("exceed") ||+ errorMessage.includes("maximum")+ ) {+ errorMessage = "Response too large for model context. Try a more specific search with shorter time range.";+ // Clear old messages to free up context for next query+ setMessages([]);}setMessages((prev) => {diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 909de5a29..6540b1abb 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.51"+version = "2.0.52"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""