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: pipe suggestion notification not opening chat reliably

Louis Beaumontc742086e2c92
diff --git a/apps/screenpipe-app-tauri/app/notification-panel/page.tsx b/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
index 8f81fdc64..c394d0648 100644
--- a/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
+++ b/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
@@ -9,6 +9,7 @@ import { listen, emit } from "@tauri-apps/api/event";
import { invoke } from "@tauri-apps/api/core";
import posthog from "posthog-js";
import ReactMarkdown from "react-markdown";
+import { showChatWithPrefill } from "@/lib/chat-utils";
interface NotificationAction {
label: string;
@@ -67,7 +68,12 @@ export default function NotificationPanelPage() {
} else if (action === "open_chat") {
await invoke("show_window", { window: "Chat" });
} else if (action === "open_pipe_suggestions") {
- await emit("open-pipe-suggestions", {});
+ await showChatWithPrefill({
+ context: PIPE_SUGGESTION_PROMPT,
+ prompt: "what pipes should i create based on my recent activity?",
+ autoSend: true,
+ source: "pipe-suggestion-notification",
+ });
} else if (action === "restart_recording") {
try {
await invoke("stop_screenpipe");
@@ -341,3 +347,33 @@ export default function NotificationPanelPage() {
</div>
);
}
+
+const PIPE_SUGGESTION_PROMPT = `you are a screenpipe automation advisor. the user wants ideas for pipes (scheduled AI agents) they can create based on their actual workflow.
+
+## what is screenpipe?
+
+screenpipe is a desktop app that continuously captures screen text (via accessibility APIs) and audio (transcription).
+it runs a local API at http://localhost:3030 that lets you query everything you've seen, said, or heard.
+
+## what is a pipe?
+
+a pipe is a scheduled AI agent defined as a single markdown file: ~/.screenpipe/pipes/{name}/pipe.md
+every N minutes, screenpipe runs a coding agent with the pipe's prompt.
+the agent can query screen data, write files, call external APIs, send notifications, etc.
+
+## your task
+
+1. first, query the user's recent screen data from the last 24 hours:
+ curl "http://localhost:3030/search?limit=50&content_type=all&start_time=<24h_ago_ISO>&end_time=<now_ISO>"
+
+2. analyze what apps they use, what they work on, what patterns you see
+
+3. suggest 3-5 specific, practical pipe ideas based on their ACTUAL data. each suggestion should:
+ - have a short name
+ - explain what it automates in one sentence
+ - mention which APIs or tools it would connect to
+ - be something they'd actually want running daily/hourly
+
+focus on things like: summarizing meetings, tracking time on projects, syncing notes, monitoring specific topics, auto-journaling, sending digest emails, etc.
+
+be specific to what you see in their data — not generic suggestions.`;