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
refactor(chat): drop query-time privacy filter toggle (redaction now at rest) (#3790)
Louis Beaumonte929512859ba
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsxindex f6fb14807..2902dd4e5 100644--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx@@ -18,7 +18,7 @@ import { Button } from "@/components/ui/button";import { Tooltip, TooltipContent, TooltipTrigger, TooltipProvider } from "@/components/ui/tooltip";import { useSettings, ChatMessage, ChatConversation } from "@/lib/hooks/use-settings";import { cn } from "@/lib/utils";-import { Loader2, Send, Square, Settings, ExternalLink, X, ImageIcon, History, Search, Trash2, ChevronLeft, ChevronRight, ChevronDown, ChevronUp, Plus, Copy, Check, Clock, Calendar, Paperclip, Filter, RefreshCw, GitBranch, MoreHorizontal, Pencil, Pin, Shield, ShieldCheck, Sparkles, Plug, CornerDownRight } from "lucide-react";+import { Loader2, Send, Square, Settings, ExternalLink, X, ImageIcon, History, Search, Trash2, ChevronLeft, ChevronRight, ChevronDown, ChevronUp, Plus, Copy, Check, Clock, Calendar, Paperclip, Filter, RefreshCw, GitBranch, MoreHorizontal, Pencil, Pin, Sparkles, Plug, CornerDownRight } from "lucide-react";import { SchedulePromptDialog } from "@/components/chat/schedule-prompt-dialog";import { PipeContextBanner } from "@/components/chat/pipe-context-banner";import { SourceCitationFooter } from "@/components/chat/source-citation-footer";@@ -7426,8 +7426,6 @@ export function StandaloneChat({};const renderComposerUtilityMenu = () => {- const isPro = settings.user?.cloud_subscribed === true;- const privacyOn = isPro && settings.piPrivacyFilter === true;const timeLabels: Record<string, string> = {"today's activity": "today","yesterday": "yesterday",@@ -7451,66 +7449,6 @@ export function StandaloneChat({<Paperclip className="h-4 w-4 text-muted-foreground shrink-0" /><span>add photos & files</span></button>- <TooltipProvider delayDuration={150}>- <Tooltip>- <TooltipTrigger asChild>- <button- type="button"- disabled={isLoading}- onClick={() => {- if (!isPro) {- setAppFilterOpen(false);- openUrl("https://screenpipe.com/onboarding");- return;- }- updateSettings({ piPrivacyFilter: !privacyOn });- }}- className="w-full flex items-center gap-2 px-2 py-2 text-left text-sm rounded-md hover:bg-muted disabled:opacity-40 disabled:pointer-events-none transition-colors"- >- {privacyOn ? (- <ShieldCheck className="h-4 w-4 text-foreground shrink-0" />- ) : (- <Shield className="h-4 w-4 text-muted-foreground shrink-0" />- )}- <span className="flex-1 min-w-0">privacy filter</span>- <span className="text-[10px] uppercase tracking-wider text-muted-foreground">- {!isPro ? "pro" : privacyOn ? "on" : "off"}- </span>- </button>- </TooltipTrigger>- <TooltipContent- side="right"- align="start"- className="max-w-[320px] p-3 space-y-2 text-xs leading-relaxed"- >- <div className="font-medium text-sm">- {!isPro- ? "Privacy filter — Pro"- : privacyOn- ? "Privacy filter: ON"- : "Privacy filter: OFF"}- </div>- <div className="text-muted-foreground">- {!isPro- ? "Remove names, emails, phone numbers and other personal info from your screen data before the AI sees it. Adds ~1-2s per search. Click to upgrade."- : privacyOn- ? "Names, emails, phone numbers and other personal info are removed from your screen data before it reaches the AI. Adds ~1-2s per search. Click to turn off."- : "Turn this on to strip personal info (names, emails, phones, addresses, account numbers) from your screen data before the AI sees it. Adds ~1-2s per search."}- </div>- <button- type="button"- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- openUrl("https://docs.screenpi.pe/privacy-filter");- }}- className="text-[11px] underline text-muted-foreground hover:text-foreground transition-colors"- >- How it works →- </button>- </TooltipContent>- </Tooltip>- </TooltipProvider></div><div className="px-2 py-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground bg-muted/30 border-b border-border/50 flex items-center gap-1.5">diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 981be4f96..07fa8e97c 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -252,9 +252,6 @@ export type Settings = SettingsStore & {filterMusic?: boolean;/** Maximum batch transcription duration in seconds (0 = engine default: Deepgram 5000s, OpenAI 3000s, Whisper 600s) */batchMaxDurationSecs?: number;- /** Redact PII from screenpipe API responses before they reach the LLM.- * Pro-only; enforced client-side (UI hides the toggle for non-pro). */- piPrivacyFilter?: boolean;/** Show periodic notifications suggesting pipe ideas based on user's data (default: true) */pipeSuggestionsEnabled?: boolean;/** Hours between pipe suggestion notifications (default: 24) */diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rsindex e99a0c236..db61ac722 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs@@ -1488,26 +1488,6 @@ pub async fn pi_start_inner(cmd.env("BASH_ENV", p);}- // Privacy filter: if the user enabled the toggle in chat, set the env- // var the shim reads so every `curl .../search*` gets rewritten with- // `filter_pii=1`. Pro-gated client-side — non-pro can't flip the UI- // toggle so this branch won't fire for them.- if let Some(home) = dirs::home_dir() {- let store_path = home.join(".screenpipe").join("store.bin");- if let Ok(data) = std::fs::read_to_string(&store_path) {- if let Ok(store) = serde_json::from_str::<serde_json::Value>(&data) {- let settings = store.get("settings").unwrap_or(&store);- if settings- .get("piPrivacyFilter")- .and_then(|v| v.as_bool())- .unwrap_or(false)- {- cmd.env("SCREENPIPE_FILTER_PII", "1");- }- }- }- }-// Pass the user's API key as env var for non-screenpipe providersif let Some(ref config) = provider_config {// ChatGPT OAuth: inject token from secret store (no api_key in config)diff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rsindex 0d9e3013c..98616d140 100644--- a/crates/screenpipe-core/src/pipes/mod.rs+++ b/crates/screenpipe-core/src/pipes/mod.rs@@ -159,8 +159,9 @@ pub struct PipeConfig {/// parties (Slack, Notion, Google Docs, etc.).////// NOTE: the front-matter field parses but the pipe runner does NOT- /// yet read it into the spawned Pi env. Wire-up is pending — tracked- /// separately from the chat-side feature which is already live.+ /// yet read it into the spawned Pi env. Wire-up is pending. The+ /// chat-side toggle that used to set this env was removed once PII+ /// redaction moved to the at-rest redact worker.#[serde(default, skip_serializing_if = "is_false")]pub privacy_filter: bool,