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: prefill context banner not clearing after send in Pi mode

Louis Beaumont1a30a191d144
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index d1497e341..9d5ad656f 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -1320,6 +1320,13 @@ export function StandaloneChat() {
setPrefillFrameId(null);
}
+ // Clear prefill context banner (was only cleared in non-Pi path)
+ if (prefillContext) {
+ // Prepend search context to the user message so Pi sees it
+ userMessage = `[Context from search: ${prefillContext}]\n\n${userMessage}`;
+ setPrefillContext(null);
+ }
+
if (pastedImage) {
// pastedImage is a data URL like "data:image/png;base64,..."
const match = pastedImage.match(/^data:(image\/[^;]+);base64,(.+)$/);