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: suppress warnings + handle flexible AI response fields
Louis Beaumontbc1c2a3145c3
diff --git a/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx b/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsxindex 8f302f53a..d34de0074 100644--- a/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx+++ b/apps/screenpipe-app-tauri/components/settings/apple-intelligence-card.tsx@@ -43,15 +43,10 @@ interface TodoItem {const API = "http://localhost:3030";-const SYSTEM_PROMPT = `You extract action items from screen recordings and audio transcripts.-Rules:-- Only extract clear, actionable tasks-- Each item: short, clear sentence-- Set urgency: high (deadline/urgent), medium (should do soon), low (nice to have)-- Include the app name if visible-- Respond ONLY with a JSON array, no other text-- Example: [{"text":"Review PR #42","app":"GitHub","urgency":"high"}]-- If none found, respond with: []`;+const SYSTEM_PROMPT = `Extract action items as JSON. Output ONLY a JSON array, nothing else.+Each item must have exactly these fields: "text" (string), "app" (string), "urgency" (one of: "high", "medium", "low").+Example: [{"text":"Review PR #42","app":"GitHub","urgency":"high"}]+If no action items, output: []`;// ─── Component ──────────────────────────────────────────────────────────────@@ -208,8 +203,17 @@ export function AppleIntelligenceCard() {.join("\n");}- const items: TodoItem[] = JSON.parse(jsonStr);- const valid = items.filter((t) => t.text?.trim());+ const rawItems: any[] = JSON.parse(jsonStr);+ // Normalize — model sometimes uses "task"/"category" instead of "text"/"app"+ const valid: TodoItem[] = rawItems+ .map((t: any) => ({+ text: t.text || t.task || t.action || t.item || "",+ app: t.app || t.category || t.source || "",+ urgency: (["high", "medium", "low"].includes(t.urgency)+ ? t.urgency+ : "medium") as "high" | "medium" | "low",+ }))+ .filter((t) => t.text.trim());setTodos(valid);setLastRun(new Date());diff --git a/crates/screenpipe-server/src/apple_intelligence_api.rs b/crates/screenpipe-server/src/apple_intelligence_api.rsindex 4b52e790b..e5b9111f1 100644--- a/crates/screenpipe-server/src/apple_intelligence_api.rs+++ b/crates/screenpipe-server/src/apple_intelligence_api.rs@@ -18,8 +18,10 @@ static PREWARM: Once = Once::new();pub struct ChatCompletionRequest {messages: Vec<Message>,#[serde(default)]+ #[allow(dead_code)]temperature: Option<f64>,#[serde(default)]+ #[allow(dead_code)]max_tokens: Option<u32>,}