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: pipe store ui ready to go
Louis Beaumontd8be8783dd65
diff --git a/examples/apps/screenpipe-app-tauri/app/page.tsx b/examples/apps/screenpipe-app-tauri/app/page.tsxindex 13e9ee097..4bdd891b3 100644--- a/examples/apps/screenpipe-app-tauri/app/page.tsx+++ b/examples/apps/screenpipe-app-tauri/app/page.tsx@@ -40,7 +40,6 @@ export default function Home() {return (<main className="flex min-h-screen flex-col items-center p-8">- {/* <DevSettings /> */}<NotificationHandler />{/* <UpdateNotification checkIntervalHours={3} /> */}{/* <ScreenpipeInstanceChecker /> */}diff --git a/examples/apps/screenpipe-app-tauri/components/pipe-store.tsx b/examples/apps/screenpipe-app-tauri/components/pipe-store.tsxindex b3c505293..9a84c24b8 100644--- a/examples/apps/screenpipe-app-tauri/components/pipe-store.tsx+++ b/examples/apps/screenpipe-app-tauri/components/pipe-store.tsx@@ -91,6 +91,7 @@ const PipeDialog: React.FC = () => {// Update installed pipes in settingsconst updatedInstalledPipes = [...settings.installedPipes, pipe];+ console.log("updated installed pipes", updatedInstalledPipes);await updateSettings({ installedPipes: updatedInstalledPipes });// Kill existing screenpipe processes@@ -99,6 +100,8 @@ const PipeDialog: React.FC = () => {// Spawn new screenpipe process with the pipeawait invoke("spawn_screenpipe");+ await new Promise((resolve) => setTimeout(resolve, 1000));+toast({title: "Pipe installed successfully",description: "Screenpipe has been restarted with the new pipe.",@@ -126,11 +129,13 @@ const PipeDialog: React.FC = () => {const updatedInstalledPipes = settings.installedPipes.filter((p) => p.name !== pipe.name);+ console.log("updated installed pipes", updatedInstalledPipes);await updateSettings({ installedPipes: updatedInstalledPipes });// restart screenpipe with no pipeawait invoke("kill_all_sreenpipes");await invoke("spawn_screenpipe");+ await new Promise((resolve) => setTimeout(resolve, 1000));toast({title: "Pipe uninstalled successfully",@@ -221,67 +226,60 @@ const PipeDialog: React.FC = () => {</Button></div><Separator className="my-4" />- {isInstalled ? (- <div className="mt-4">- <h3 className="text-xl font-semibold mb-2">Controls</h3>- {/* Add controls for the installed pipe here */}- <p>Pipe controls will be displayed here.</p>- </div>- ) : (- <div className="mt-4">- <h3 className="text-xl font-semibold mb-2">About this pipe</h3>- <MemoizedReactMarkdown- className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 w-full"- remarkPlugins={[remarkGfm, remarkMath]}- components={{- p({ children }) {- return <p className="mb-2 last:mb-0">{children}</p>;- },- code({ node, className, children, ...props }) {- const content = String(children).replace(/\n$/, "");- const match = /language-(\w+)/.exec(className || "");- if (!match) {- return (- <code- className="py-0.5 rounded-sm font-mono text-sm"- {...props}- >- {content}- </code>- );- }+ <div className="mt-4">+ <h3 className="text-xl font-semibold mb-2">About this pipe</h3>+ <MemoizedReactMarkdown+ className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 w-full"+ remarkPlugins={[remarkGfm, remarkMath]}+ components={{+ p({ children }) {+ return <p className="mb-2 last:mb-0">{children}</p>;+ },+ code({ node, className, children, ...props }) {+ const content = String(children).replace(/\n$/, "");+ const match = /language-(\w+)/.exec(className || "");+ if (!match) {return (- <CodeBlock- key={Math.random()}- language={(match && match[1]) || ""}- value={content}+ <code+ className="py-0.5 rounded-sm font-mono text-sm"{...props}- />- );- },- img({ src, alt }) {- return (- /* eslint-disable @next/next/no-img-element */- <img- src={src}- alt={alt}- className="max-w-full h-auto"- onError={(e) => {- const target = e.target as HTMLImageElement;- target.onerror = null;- target.src = "path/to/fallback/image.png"; // Replace with your fallback image- }}- />+ >+ {content}+ </code>);- },- }}- >- {selectedPipe.fullDescription.replace(/Â/g, "")}- </MemoizedReactMarkdown>- </div>- )}+ }++ return (+ <CodeBlock+ key={Math.random()}+ language={(match && match[1]) || ""}+ value={content}+ {...props}+ />+ );+ },+ img({ src, alt }) {+ return (+ /* eslint-disable @next/next/no-img-element */+ <img+ src={src}+ alt={alt}+ className="max-w-full h-auto"+ onError={(e) => {+ const target = e.target as HTMLImageElement;+ target.onerror = null;+ target.src = "path/to/fallback/image.png"; // Replace with your fallback image+ }}+ />+ );+ },+ }}+ >+ {selectedPipe.fullDescription.replace(/Â/g, "")}+ </MemoizedReactMarkdown>+ </div></>);};diff --git a/examples/apps/screenpipe-app-tauri/components/screenpipe-status.tsx b/examples/apps/screenpipe-app-tauri/components/screenpipe-status.tsxindex f4ea27196..75e23fc04 100644--- a/examples/apps/screenpipe-app-tauri/components/screenpipe-status.tsx+++ b/examples/apps/screenpipe-app-tauri/components/screenpipe-status.tsx@@ -25,6 +25,7 @@ import { Button } from "./ui/button";import { Separator } from "./ui/separator";import { Card, CardContent, CardFooter } from "./ui/card";import { useHealthCheck } from "@/lib/hooks/use-health-check";+import { DevSettings } from "./dev-dialog";const getDebuggingCommands = (os: string | null) => {let cliInstructions = "";@@ -309,6 +310,7 @@ const DevModeSettings = () => {and ask ChatGPT for curl commands to interact with the API.</p></div>+ <DevSettings /></>)}</>diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 31e144356..919686fb1 100755--- a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -183,7 +183,9 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {.map(|arr| arr.to_vec()))}).map_err(|e| e.to_string())?- .unwrap_or_default();+.unwrap_or_default();++ debug!("pipes: {:?}", pipes);let port = with_store(app.clone(), stores.clone(), path.clone(), |store| {Ok(store.get("port")@@ -250,13 +252,16 @@ fn spawn_sidecar(app: &tauri::AppHandle) -> Result<CommandChild, String> {}if !pipes.is_empty() {+ info!("adding pipes: {:?}", pipes);let mut added_pipes = std::collections::HashSet::new();for pipe in &pipes {- if let Some(pipe_str) = pipe.as_str() {- if added_pipes.insert(pipe_str) {- args.push("--pipe");- args.push(pipe_str);- info!("adding pipe: {}", pipe_str);+ if let Some(obj) = pipe.as_object() {+ if let Some(main_file) = obj.get("mainFile").and_then(Value::as_str) {+ if added_pipes.insert(main_file) {+ args.push("--pipe");+ args.push(main_file);+ info!("adding pipe: {}", main_file);+ }}}}