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 plain-language trigger UI for pipes
Louis Beaumontfb70515931c7
diff --git a/apps/screenpipe-app-tauri/components/pipe-monitor.tsx b/apps/screenpipe-app-tauri/components/pipe-monitor.tsxindex b1a850375..554f305ef 100644--- a/apps/screenpipe-app-tauri/components/pipe-monitor.tsx+++ b/apps/screenpipe-app-tauri/components/pipe-monitor.tsx@@ -282,14 +282,14 @@ function PipeRow({? `events: ${pipe.config.trigger.events.join(", ")}`: pipe.config.schedule || "manual"}>- {pipe.config.trigger?.events?.length ? (+ {(pipe.config.trigger?.events?.length || pipe.config.trigger?.custom?.length) ? (<span className="text-primary/70">- ⚡{pipe.config.trigger.events.length} event{pipe.config.trigger.events.length > 1 ? "s" : ""}+ ⚡{(pipe.config.trigger?.events?.length || 0) + (pipe.config.trigger?.custom?.length || 0)} trigger{((pipe.config.trigger?.events?.length || 0) + (pipe.config.trigger?.custom?.length || 0)) > 1 ? "s" : ""}</span>) : (humanizeSchedule(pipe.config.schedule))}- {pipe.config.trigger?.events?.length && pipe.config.schedule && pipe.config.schedule !== "manual" ? (+ {(pipe.config.trigger?.events?.length || pipe.config.trigger?.custom?.length) && pipe.config.schedule && pipe.config.schedule !== "manual" ? (<span className="ml-1 text-muted-foreground/50">+ {humanizeSchedule(pipe.config.schedule)}</span>) : null}</span>@@ -406,7 +406,8 @@ function DeviceCard({const allPipes = (device.pipes || []).filter((p) =>(p.config.schedule && p.config.schedule !== "manual") ||- (p.config.trigger?.events && p.config.trigger.events.length > 0)+ (p.config.trigger?.events && p.config.trigger.events.length > 0) ||+ (p.config.trigger?.custom && p.config.trigger.custom.length > 0));const isOnline = device.status === "online";diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex 50508f15b..19b47fd49 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -686,7 +686,8 @@ export function PipesSection() {!p.config.schedule || p.config.schedule === "manual";const isScheduledPipe = (p: PipeStatus) =>(!!p.config.schedule && p.config.schedule !== "manual") ||- (!!p.config.trigger?.events?.length);+ (!!p.config.trigger?.events?.length) ||+ (!!p.config.trigger?.custom?.length);const filteredPipes = pipes.filter((p) => {@@ -1767,6 +1768,77 @@ export function PipesSection() {</div></div>+ {/* Event triggers */}+ <div>+ <Label className="text-xs flex items-center gap-1.5">+ triggers+ <span className="text-[10px] font-normal text-muted-foreground bg-muted px-1.5 py-0.5 rounded">cloud</span>+ </Label>+ <p className="text-[11px] text-muted-foreground mb-1.5">run this pipe when AI detects a workflow pattern</p>+ <div className="space-y-1.5">+ {(pipe.config.trigger?.custom || []).map((trigger, i) => (+ <div key={i} className="flex items-center gap-1.5">+ <span className="text-xs font-mono bg-muted px-2 py-1 rounded flex-1">{trigger}</span>+ <button+ className="text-xs text-muted-foreground hover:text-destructive"+ onClick={() => {+ const updated = (pipe.config.trigger?.custom || []).filter((_, j) => j !== i);+ const newTrigger = { ...pipe.config.trigger, custom: updated };+ setPipes((prev) =>+ prev.map((p) =>+ p.config.name === pipe.config.name+ ? { ...p, config: { ...p.config, trigger: newTrigger } }+ : p+ )+ );+ fetch(`http://localhost:3030/pipes/${pipe.config.name}/config`, {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ trigger: newTrigger }),+ }).then(() => fetchPipes());+ }}+ >+ ×+ </button>+ </div>+ ))}+ <form+ className="flex gap-1.5"+ onSubmit={(e) => {+ e.preventDefault();+ const input = e.currentTarget.querySelector("input") as HTMLInputElement;+ const value = input?.value?.trim();+ if (!value) return;+ const existing = pipe.config.trigger?.custom || [];+ const newTrigger = { ...pipe.config.trigger, custom: [...existing, value] };+ setPipes((prev) =>+ prev.map((p) =>+ p.config.name === pipe.config.name+ ? { ...p, config: { ...p.config, trigger: newTrigger } }+ : p+ )+ );+ fetch(`http://localhost:3030/pipes/${pipe.config.name}/config`, {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ trigger: newTrigger }),+ }).then(() => fetchPipes());+ input.value = "";+ }}+ >+ <Input+ placeholder="e.g. when I switch from LinkedIn to a CRM"+ className="h-7 text-xs flex-1"+ spellCheck={false}+ autoCorrect="off"+ />+ <Button type="submit" variant="outline" size="sm" className="h-7 text-xs px-2">+ + add+ </Button>+ </form>+ </div>+ </div>+<div><div className="flex items-center gap-2"><Label className="text-xs">pipe.md</Label>