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

fix: daily summary and reminders improvements

Louis Beaumont4d07f22a9776
diff --git a/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx b/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx
index a9c819063..8e41d8751 100644
--- a/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx
@@ -32,18 +32,24 @@ interface DailySummary {
oneLiner: string;
}
-const SUMMARY_PROMPT = `Analyze this audio transcript data from the user's day. Respond with ONLY a valid JSON object (no other text).
-
-The JSON must have this exact structure:
-{"oneLiner":"casual 1-sentence summary","keyMoments":[{"time":"2:30 PM","description":"what happened"}],"actionItems":[{"text":"thing to do","urgency":"high"}],"peopleMentioned":[{"name":"Name","context":"what about them"}]}
-
-Rules:
-- oneLiner: casual summary of the day in one sentence
-- keyMoments: max 5 most important events from the transcripts
-- actionItems: things to do mentioned in conversations, urgency is "high"/"medium"/"low"
-- peopleMentioned: real people names only (not apps), with context
+const SUMMARY_PROMPT = `Analyze this audio transcript data. Respond with ONLY a single valid JSON object on one line (no other text, no line breaks between fields).
+
+Format: {"oneLiner":"...","keyMoments":[{"time":"2:30 PM","description":"..."}],"actionItems":[{"text":"...","urgency":"high"}],"peopleMentioned":[{"name":"...","context":"..."}]}
+
+CRITICAL rules for oneLiner:
+- MUST be under 15 words, ALL LOWERCASE, no period at the end
+- casual like texting a friend, reference SPECIFIC topics from transcripts
+- Good: "mostly debugging auth, quick call with sarah about launch"
+- Good: "deep api refactor morning, slack catchup afternoon"
+- Bad: "Had a productive day with various activities" (formal, generic)
+- Bad: "Louis brainstorms potential features for the PipeStore, like user-driven sales" (too long, formal)
+
+Other rules:
+- keyMoments: max 5, with real timestamps from the data, specific descriptions
+- actionItems: only real tasks mentioned in speech, urgency "high"/"medium"/"low"
+- peopleMentioned: real people names ONLY (not apps/products), with context
- Empty arrays are fine if nothing found
-- Output ONLY the JSON object, nothing else`;
+- Output the JSON object on a SINGLE LINE, nothing else`;
function getStorageKey(date: string) {
return `daily-summary-${date}`;
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index e6a19696a..655d70056 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8097,7 +8097,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.509"
+version = "2.0.510"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/reminders.rs b/apps/screenpipe-app-tauri/src-tauri/src/reminders.rs
index b65838b7a..0879bd50d 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/reminders.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/reminders.rs
@@ -650,20 +650,20 @@ async fn fetch_recent_context(audio_only: bool) -> Result<String, String> {
Ok(parts.join("\n"))
}
-const REMINDERS_PROMPT: &str = r#"You are an assistant that extracts actionable reminders from screen and audio activity.
+const REMINDERS_PROMPT: &str = r#"Extract actionable reminders from screen and audio activity. Respond with ONLY a single-line JSON object.
-Analyze the activity data below and extract ONLY clear, actionable items that the user should be reminded about.
+Format: {"reminders":[{"title":"short task","notes":"where this was mentioned","due":"today"}]}
Rules:
-- Only extract things that are clearly tasks, to-dos, or commitments
-- Do NOT extract vague observations or general activity descriptions
-- Include a due date if one is mentioned or clearly implied
-- Due dates: use "today", "tomorrow", a weekday name, or YYYY-MM-DD format
-- Maximum 5 reminders per scan
-- If nothing actionable, return empty array
+- ONLY extract tasks that are EXPLICITLY mentioned in the activity data below
+- NEVER invent tasks — if nothing actionable exists, return {"reminders":[]}
+- titles: short imperative phrases using words from the actual data
+- notes: MUST reference the specific app or conversation where the task was mentioned
+- due dates: only if a deadline was explicitly stated. Omit "due" field if no deadline mentioned.
+- Maximum 5 reminders
+- Output ONLY the JSON on a SINGLE LINE
-Respond with ONLY this JSON format, no other text:
-{"reminders":[{"title":"short task description","notes":"additional context from the activity","due":"today"}]}"#;
+IMPORTANT: Do NOT copy these examples. Every reminder must come from the data below."#;
/// Call Apple Intelligence (via local /ai/chat/completions) to extract action items.
#[cfg(target_os = "macos")]
@@ -779,26 +779,46 @@ pub(crate) fn parse_action_items(response: &str) -> Vec<ActionItemParsed> {
None => return Vec::new(),
};
- match serde_json::from_str::<AiRemindersResponse>(json_str) {
- Ok(parsed) => parsed
+ // Try standard format: {"reminders":[...]}
+ if let Ok(parsed) = serde_json::from_str::<AiRemindersResponse>(json_str) {
+ return parsed
.reminders
.into_iter()
.filter(|item| !item.title.trim().is_empty())
.take(5)
- .collect(),
- Err(e) => {
- warn!(
- "reminders: failed to parse AI response: {} | raw: {}",
- e,
- {
- let mut end = response.len().min(200);
- while !response.is_char_boundary(end) { end -= 1; }
- &response[..end]
- }
- );
- Vec::new()
+ .collect();
+ }
+
+ // Try single bare object: {"title":"...","notes":"...","due":"..."}
+ if let Ok(item) = serde_json::from_str::<ActionItemParsed>(json_str) {
+ if !item.title.trim().is_empty() {
+ return vec![item];
+ }
+ }
+
+ // Try comma-separated objects: {"title":"..."},{"title":"..."}
+ let wrapped = format!("{{\"reminders\":[{}]}}", json_str);
+ if let Ok(parsed) = serde_json::from_str::<AiRemindersResponse>(&wrapped) {
+ let items: Vec<ActionItemParsed> = parsed
+ .reminders
+ .into_iter()
+ .filter(|item| !item.title.trim().is_empty())
+ .take(5)
+ .collect();
+ if !items.is_empty() {
+ return items;
}
}
+
+ warn!(
+ "reminders: failed to parse AI response | raw: {}",
+ {
+ let mut end = response.len().min(200);
+ while !response.is_char_boundary(end) { end -= 1; }
+ &response[..end]
+ }
+ );
+ Vec::new()
}
/// Strip URLs and emails to reduce safety filter triggers.