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 "publish to store" button in pipe three-dot menu
Louis Beaumonte52fa5d45fd4
diff --git a/apps/screenpipe-app-tauri/components/pipe-store.tsx b/apps/screenpipe-app-tauri/components/pipe-store.tsxindex 01a66d804..bf26068c5 100644--- a/apps/screenpipe-app-tauri/components/pipe-store.tsx+++ b/apps/screenpipe-app-tauri/components/pipe-store.tsx@@ -1320,21 +1320,23 @@ function redactSecrets(text: string): { redacted: string; count: number } {return { redacted: result, count };}-function PublishDialog({+export function PublishDialog({open,onOpenChange,token,onPublished,+ defaultPipe,}: {open: boolean;onOpenChange: (v: boolean) => void;token?: string | null;onPublished: () => void;+ defaultPipe?: string;}) {const { toast } = useToast();const [localPipes, setLocalPipes] = useState<LocalPipe[]>([]);const [loadingPipes, setLoadingPipes] = useState(false);- const [selectedPipe, setSelectedPipe] = useState("");+ const [selectedPipe, setSelectedPipe] = useState(defaultPipe || "");const [title, setTitle] = useState("");const [description, setDescription] = useState("");const [icon, setIcon] = useState("🔧");@@ -1344,6 +1346,7 @@ function PublishDialog({useEffect(() => {if (!open) return;+ if (defaultPipe) setSelectedPipe(defaultPipe);setLoadingPipes(true);fetch("http://localhost:3030/pipes").then((r) => r.json())@@ -1353,7 +1356,7 @@ function PublishDialog({}).catch(() => setLocalPipes([])).finally(() => setLoadingPipes(false));- }, [open]);+ }, [open, defaultPipe]);const handlePublish = async () => {if (!selectedPipe || !title) return;diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex 2033f721e..3856311b9 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -26,6 +26,7 @@ import {Search,Share2,Link,+ Upload,} from "lucide-react";import { Textarea } from "@/components/ui/textarea";import { Label } from "@/components/ui/label";@@ -56,6 +57,7 @@ import { useTeam } from "@/lib/hooks/use-team";import { useToast } from "@/components/ui/use-toast";import { HelpTooltip } from "@/components/ui/help-tooltip";import { UpgradeDialog } from "@/components/upgrade-dialog";+import { PublishDialog } from "@/components/pipe-store";import posthog from "posthog-js";const PIPE_CREATION_PROMPT = `create a screenpipe pipe that does the following.@@ -601,6 +603,7 @@ export function PipesSection() {const isTeamAdmin = !!team.team && team.role === "admin";const [sharingPipe, setSharingPipe] = useState<string | null>(null);const [sharingPublic, setSharingPublic] = useState<string | null>(null);+ const [publishPipeName, setPublishPipeName] = useState<string | null>(null);const [pipeFilter, setPipeFilter] = useState<"all" | "personal" | "team">(() => {if (typeof window !== "undefined") {return (localStorage.getItem("pipes-pipe-filter") as "all" | "personal" | "team") || "all";@@ -1320,6 +1323,12 @@ export function PipesSection() {</DropdownMenuItem></>)}+ <DropdownMenuItem+ onClick={() => setPublishPipeName(pipe.config.name)}+ >+ <Upload className="h-3.5 w-3.5 mr-2" />+ publish to store+ </DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItemclassName="text-destructive"@@ -1814,6 +1823,17 @@ export function PipesSection() {source="pipes"/>+ <PublishDialog+ open={!!publishPipeName}+ onOpenChange={(v) => { if (!v) setPublishPipeName(null); }}+ token={settings.user?.token}+ onPublished={() => {+ setPublishPipeName(null);+ toast({ title: "pipe published to store" });+ }}+ defaultPipe={publishPipeName || undefined}+ />+</div>);}