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
feat: add ignored & included windows in settings
Louis Beaumont836c55ef1659
diff --git a/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx b/examples/apps/screenpipe-app-tauri/components/recording-settings.tsxindex d3e8b5985..0a79cf84b 100644--- a/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx+++ b/examples/apps/screenpipe-app-tauri/components/recording-settings.tsx@@ -16,6 +16,7 @@ import {HelpCircle,Mic,Monitor,+ X,} from "lucide-react";import { cn } from "@/lib/utils";import {@@ -149,6 +150,8 @@ export function RecordingSettings({usePiiRemoval: localSettings.usePiiRemoval,restartInterval: localSettings.restartInterval,disableAudio: localSettings.disableAudio,+ ignoredWindows: localSettings.ignoredWindows,+ includedWindows: localSettings.includedWindows,};console.log("Settings to update:", settingsToUpdate);await updateSettings(settingsToUpdate);@@ -175,6 +178,38 @@ export function RecordingSettings({}};+ const handleAddIgnoredWindow = (value: string) => {+ if (value && !localSettings.ignoredWindows.includes(value)) {+ setLocalSettings({+ ...localSettings,+ ignoredWindows: [...localSettings.ignoredWindows, value],+ });+ }+ };++ const handleRemoveIgnoredWindow = (value: string) => {+ setLocalSettings({+ ...localSettings,+ ignoredWindows: localSettings.ignoredWindows.filter((w) => w !== value),+ });+ };++ const handleAddIncludedWindow = (value: string) => {+ if (value && !localSettings.includedWindows.includes(value)) {+ setLocalSettings({+ ...localSettings,+ includedWindows: [...localSettings.includedWindows, value],+ });+ }+ };++ const handleRemoveIncludedWindow = (value: string) => {+ setLocalSettings({+ ...localSettings,+ includedWindows: localSettings.includedWindows.filter((w) => w !== value),+ });+ };+const handleAudioTranscriptionModelChange = (value: string) => {setLocalSettings({ ...localSettings, audioTranscriptionEngine: value });};@@ -477,6 +512,126 @@ export function RecordingSettings({</div></div>+ <div className="flex flex-col space-y-2">+ <Label+ htmlFor="ignoredWindows"+ className="flex items-center space-x-2"+ >+ <span>ignored windows</span>+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger>+ <HelpCircle className="h-4 w-4" />+ </TooltipTrigger>+ <TooltipContent>+ <p>+ windows to ignore during screen recording+ (case-insensitive)+ </p>+ </TooltipContent>+ </Tooltip>+ </TooltipProvider>+ </Label>+ <div className="flex flex-wrap gap-2 mb-2">+ {localSettings.ignoredWindows.map((window) => (+ <Badge+ key={window}+ variant="secondary"+ className="flex items-center gap-1"+ >+ {window}+ <X+ className="h-3 w-3 cursor-pointer"+ onClick={() => handleRemoveIgnoredWindow(window)}+ />+ </Badge>+ ))}+ </div>+ <div className="flex gap-2">+ <Input+ id="ignoredWindows"+ placeholder="add window to ignore"+ onKeyPress={(e) => {+ if (e.key === "Enter") {+ handleAddIgnoredWindow(e.currentTarget.value);+ e.currentTarget.value = "";+ }+ }}+ />+ <Button+ onClick={() => {+ const input = document.getElementById(+ "ignoredWindows"+ ) as HTMLInputElement;+ handleAddIgnoredWindow(input.value);+ input.value = "";+ }}+ >+ add+ </Button>+ </div>+ </div>++ <div className="flex flex-col space-y-2">+ <Label+ htmlFor="includedWindows"+ className="flex items-center space-x-2"+ >+ <span>included windows</span>+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger>+ <HelpCircle className="h-4 w-4" />+ </TooltipTrigger>+ <TooltipContent>+ <p>+ windows to include during screen recording+ (case-insensitive)+ </p>+ </TooltipContent>+ </Tooltip>+ </TooltipProvider>+ </Label>+ <div className="flex flex-wrap gap-2 mb-2">+ {localSettings.includedWindows.map((window) => (+ <Badge+ key={window}+ variant="secondary"+ className="flex items-center gap-1"+ >+ {window}+ <X+ className="h-3 w-3 cursor-pointer"+ onClick={() => handleRemoveIncludedWindow(window)}+ />+ </Badge>+ ))}+ </div>+ <div className="flex gap-2">+ <Input+ id="includedWindows"+ placeholder="add window to include"+ onKeyPress={(e) => {+ if (e.key === "Enter") {+ handleAddIncludedWindow(e.currentTarget.value);+ e.currentTarget.value = "";+ }+ }}+ />+ <Button+ onClick={() => {+ const input = document.getElementById(+ "includedWindows"+ ) as HTMLInputElement;+ handleAddIncludedWindow(input.value);+ input.value = "";+ }}+ >+ add+ </Button>+ </div>+ </div>+<div className="flex flex-col space-y-2"><ButtononClick={handleUpdate}diff --git a/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex a669378ed..2412e30e7 100644--- a/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/examples/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -35,6 +35,8 @@ const defaultSettings: Settings = {port: 3030,dataDir: "default",disableAudio: false,+ ignoredWindows: [],+ includedWindows: [],};export interface Settings {@@ -56,6 +58,8 @@ export interface Settings {port: number;dataDir: string;disableAudio: boolean;+ ignoredWindows: string[];+ includedWindows: string[];}let store: Store | null = null;@@ -129,6 +133,10 @@ export function useSettings() {const savedDataDir = ((await store!.get("dataDir")) as string) || "";const savedDisableAudio =((await store!.get("disableAudio")) as boolean) || false;+ const savedIgnoredWindows =+ ((await store!.get("ignoredWindows")) as string[]) || [];+ const savedIncludedWindows =+ ((await store!.get("includedWindows")) as string[]) || [];setSettings({openaiApiKey: savedKey,useOllama: savedUseOllama,@@ -148,6 +156,8 @@ export function useSettings() {port: savedPort,dataDir: savedDataDir,disableAudio: savedDisableAudio,+ ignoredWindows: savedIgnoredWindows,+ includedWindows: savedIncludedWindows,});} catch (error) {console.error("Failed to load settings:", error);diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 623c7850e..1d71b07c6 100644--- a/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/examples/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "0.1.89"+version = "0.1.90"description = ""authors = ["you"]license = ""diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/src/sidecar.rs b/examples/apps/screenpipe-app-tauri/src-tauri/src/sidecar.rsindex 89617e1c5..fea813b64 100644--- a/examples/apps/screenpipe-app-tauri/src-tauri/src/sidecar.rs+++ b/examples/apps/screenpipe-app-tauri/src-tauri/src/sidecar.rs@@ -144,6 +144,26 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {}).map_err(|e| e.to_string())?;+ let ignored_windows = with_store(app.clone(), stores.clone(), path.clone(), |store| {+ Ok(store+ .get("ignoredWindows")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().filter_map(|v| v.as_str()).map(String::from).collect::<Vec<_>>())+ .unwrap_or_default())+ })+ .map_err(|e| e.to_string())?;++ let included_windows = with_store(app.clone(), stores.clone(), path.clone(), |store| {+ Ok(store+ .get("includedWindows")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().filter_map(|v| v.as_str()).map(String::from).collect::<Vec<_>>())+ .unwrap_or_default())+ })+ .map_err(|e| e.to_string())?;+++let port_str = port.to_string();let mut args = vec!["--port", port_str.as_str()];if cfg!(target_os = "macos") {@@ -189,6 +209,20 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {args.push("--disable-audio");}+ if !ignored_windows.is_empty() {+ for window in &ignored_windows {+ args.push("--ignored-windows");+ args.push(window);+ }+ }++ if !included_windows.is_empty() {+ for window in &included_windows {+ args.push("--included-windows");+ args.push(window);+ }+ }+// args.push("--debug");if cfg!(windows) {