Skip to content

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

chore: improve pipe + ui

Louis Beaumontbba11df95533
diff --git a/examples/typescript/pipe-email-daily-log/pipe.json b/examples/typescript/pipe-email-daily-log/pipe.json
index 47fe15071..a566fe72a 100644
--- a/examples/typescript/pipe-email-daily-log/pipe.json
+++ b/examples/typescript/pipe-email-daily-log/pipe.json
@@ -4,7 +4,7 @@
"name": "interval",
"type": "number",
"default": 60,
- "description": "Interval in seconds to read your screen data"
+ "description": "Interval in seconds to read your screen data and extract structured logs (will be used to summarize and send an email). Increase this value if using audio."
},
{
"name": "summaryFrequency",
@@ -22,49 +22,55 @@
"name": "emailAddress",
"type": "string",
"default": "<fill your email address here>",
- "description": "Email Address"
+ "description": "Email address to send the daily summary to"
},
{
"name": "emailPassword",
"type": "string",
"default": "<fill your email password here>",
- "description": "Email Password https://support.google.com/accounts/answer/185833?hl=en"
+ "description": "App specific password for your gmail account, https://support.google.com/accounts/answer/185833?hl=en"
},
{
"name": "ollamaApiUrl",
"type": "string",
"default": "http://localhost:11434/api",
- "description": "Ollama API URL"
+ "description": "AI API URL, can be ollama, openai, any openai compatible API, risky to use cloud providers due to high usage"
},
{
"name": "ollamaModel",
"type": "string",
"default": "llama3.2:3b-instruct-q4_K_M",
- "description": "Ollama Model"
+ "description": "AI Model"
},
{
"name": "pageSize",
"type": "number",
"default": 100,
- "description": "Number of records to retrieve from screenpipe per page, keep in mind LLMs have a context window limit"
+ "description": "Number of records to retrieve from screenpipe per page for structured extraction, keep in mind LLMs have a context window limit. Increase this value if using audio."
},
{
"name": "customPrompt",
"type": "string",
"default": "You are an AI assistant tasked with extracting structured information from screen data (OCR). Analyze the following screen data and extract relevant information about my daily activity.",
- "description": "Custom prompt for the AI assistant"
+ "description": "Custom prompt for the AI assistant that will be used to extract information from the screen data every few minutes"
},
{
"name": "summaryPrompt",
"type": "string",
"default": "You are an AI assistant tasked with summarizing information that has previously been extracted from screen data (OCR) by another AI assistant. Analyze the following structured data extracted from my screen data and summarize my daily activity, this will be send as a mail to my email address.",
- "description": "Summary prompt for the AI assistant"
+ "description": "Summary prompt for the AI assistant that will be used to summarize the logs previously extracted and send a mail"
},
{
"name": "windowName",
"type": "window",
"default": "",
- "description": "Specific window name to filter the screen data, for example 'gmail', 'john', 'slack', 'myCodeFile.tsx', etc."
+ "description": "Specific window name to filter the screen data, for example 'gmail', 'john', 'slack', 'myCodeFile.tsx', etc. this will filter out audio"
+ },
+ {
+ "name": "contentType",
+ "type": "contentType",
+ "default": "ocr",
+ "description": "Type of content to analyze: 'ocr', 'audio', or 'all'. OCR usually contains more content, so it's recommended to choose either OCR or audio rather than 'all' for better performance."
}
]
}
\ No newline at end of file
diff --git a/examples/typescript/pipe-email-daily-log/pipe.ts b/examples/typescript/pipe-email-daily-log/pipe.ts
index cafa8170d..1ff8de48c 100644
--- a/examples/typescript/pipe-email-daily-log/pipe.ts
+++ b/examples/typescript/pipe-email-daily-log/pipe.ts
@@ -24,11 +24,12 @@ async function queryScreenpipe(
startTime: string,
endTime: string,
windowName: string,
- pageSize: number
+ pageSize: number,
+ contentType: string
): Promise<ScreenData> {
try {
const params: Record<string, string> = {
- content_type: "ocr",
+ content_type: contentType,
limit: pageSize.toString(),
offset: "0",
start_time: startTime,
@@ -263,6 +264,7 @@ async function dailyLogPipeline(): Promise<void> {
const ollamaApiUrl = config.ollamaApiUrl;
const windowName = config.windowName || "";
const pageSize = config.pageSize;
+ const contentType = config.contentType || 'ocr'; // Default to 'ocr' if not specified
console.log("creating logs dir");
const logsDir = `${process.env.PIPE_DIR}/logs`;
@@ -301,7 +303,8 @@ async function dailyLogPipeline(): Promise<void> {
oneMinuteAgo.toISOString(),
now.toISOString(),
windowName,
- pageSize
+ pageSize,
+ contentType
);
if (screenData.data && screenData.data.length > 0) {
diff --git a/screenpipe-app-tauri/components/header.tsx b/screenpipe-app-tauri/components/header.tsx
index d0408b968..653234304 100644
--- a/screenpipe-app-tauri/components/header.tsx
+++ b/screenpipe-app-tauri/components/header.tsx
@@ -13,6 +13,14 @@ import {
import React from "react";
import PipeDialog from "@/components/pipe-store";
import MeetingHistory from "@/components/meeting-history";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { MessageSquare, Heart, Menu } from "lucide-react";
+import { open } from "@tauri-apps/plugin-shell";
function IconNewChat() {
return (
@@ -71,8 +79,6 @@ export default function Header() {
</div>
</div>
<div className="flex space-x-4 absolute top-4 right-4">
- {" "}
- {/* Added margin-top for spacing */}
<HealthStatus className="mt-3" />
<Settings />
<MeetingHistory />
@@ -96,27 +102,36 @@ export default function Header() {
<line x1="10" y1="14" x2="21" y2="3" />
</svg>
</PrettyLink> */}
- <PrettyLink
- variant="outline"
- href="mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe"
- >
- <span className="mr-2">send feedback</span>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
- <polyline points="15 3 21 3 21 9" />
- <line x1="10" y1="14" x2="21" y2="3" />
- </svg>
- </PrettyLink>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button variant="ghost" size="icon">
+ <Menu className="h-[1.2rem] w-[1.2rem]" />
+ <span className="sr-only">menu</span>
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent className="mr-4" align="end">
+ <DropdownMenuItem
+ onClick={() =>
+ open(
+ "mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe",
+ )
+ }
+ >
+ <MessageSquare className="mr-2 h-4 w-4" />
+ <span>send feedback</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ onClick={() =>
+ open(
+ "https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20...",
+ )
+ }
+ >
+ <Heart className="mr-2 h-4 w-4" />
+ <span>support us</span>
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
</div>
</div>
);
diff --git a/screenpipe-app-tauri/components/meeting-history.tsx b/screenpipe-app-tauri/components/meeting-history.tsx
index 4b1eb613e..bb8379d6a 100644
--- a/screenpipe-app-tauri/components/meeting-history.tsx
+++ b/screenpipe-app-tauri/components/meeting-history.tsx
@@ -20,6 +20,7 @@ import {
Users,
FileText,
PlusCircle,
+ Calendar,
} from "lucide-react";
import { usePostHog } from "posthog-js/react";
import { Badge } from "./ui/badge";
@@ -537,6 +538,7 @@ export default function MeetingHistory() {
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button variant="ghost" onClick={() => setIsOpen(true)}>
+ <Calendar className="mr-2 h-4 w-4" />
meetings
</Button>
</DialogTrigger>
diff --git a/screenpipe-app-tauri/components/pipe-config-form.tsx b/screenpipe-app-tauri/components/pipe-config-form.tsx
index 24331908f..ea4d65d46 100644
--- a/screenpipe-app-tauri/components/pipe-config-form.tsx
+++ b/screenpipe-app-tauri/components/pipe-config-form.tsx
@@ -10,10 +10,18 @@ import {
TooltipProvider,
TooltipTrigger,
} from "./ui/tooltip";
-import { Layout, RefreshCw } from "lucide-react";
+import { Layers, Layout, RefreshCw } from "lucide-react";
import { toast } from "./ui/use-toast";
import { Pipe } from "./pipe-store";
import { SqlAutocompleteInput } from "./sql-autocomplete-input";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "./ui/select";
+import { HelpCircle } from "lucide-react";
type PipeConfigFormProps = {
pipe: Pipe;
@@ -202,6 +210,55 @@ export const PipeConfigForm: React.FC<PipeConfigFormProps> = ({
</TooltipProvider>
</div>
);
+ case "contentType":
+ return (
+ <div className="space-y-2">
+ <div className="flex items-center space-x-2">
+ <Select
+ value={value}
+ onValueChange={(newValue) =>
+ handleInputChange(field.name, newValue)
+ }
+ >
+ <SelectTrigger id={field.name} className="relative w-full">
+ <Layers
+ className="absolute left-2 top-1/2 transform -translate-y-1/2 text-gray-400"
+ size={18}
+ />
+ <SelectValue placeholder="content type" />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="all">
+ <span className="pl-6">all</span>
+ </SelectItem>
+ <SelectItem value="ocr">
+ <span className="pl-6">ocr</span>
+ </SelectItem>
+ <SelectItem value="audio">
+ <span className="pl-6">audio</span>
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ size="icon"
+ variant="ghost"
+ onClick={resetToDefault}
+ className="h-8 w-8"
+ >
+ <RefreshCw className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>Reset to default</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
+ </div>
+ );
default:
return (
<div className="flex items-center space-x-2">
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 8c57d9186..ff19e2771 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -29,12 +29,13 @@ import {
Power,
Link,
Heart,
+ Puzzle,
} from "lucide-react";
import { PipeConfigForm } from "./pipe-config-form";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
import posthog from "posthog-js";
import { open } from "@tauri-apps/plugin-dialog";
-
+import { open as openUrl } from "@tauri-apps/plugin-shell";
import {
Tooltip,
TooltipContent,
@@ -369,18 +370,6 @@ const PipeDialog: React.FC = () => {
return (
<>
<h2 className="text-2xl font-bold mb-2">{selectedPipe.id}</h2>
- <div className="flex justify-between items-center mb-4">
- <div>
- <a
- href={selectedPipe.source}
- target="_blank"
- rel="noopener noreferrer"
- className="underline"
- >
- repository
- </a>
- </div>
- </div>
<div className="flex space-x-2 mb-4">
<Button
@@ -411,12 +400,13 @@ const PipeDialog: React.FC = () => {
</TooltipProvider>
)}
- <Button disabled variant="outline">
- <Link className="mr-2 h-4 w-4" />
- copy share link
- <Badge variant="secondary" className="ml-2">
- soon
- </Badge>
+ <Button
+ onClick={() => openUrl(selectedPipe.source, "_blank")}
+ variant="outline"
+ disabled={!selectedPipe.source.startsWith("http")}
+ >
+ <ExternalLink className="mr-2 h-4 w-4" />
+ view source
</Button>
<Button disabled variant="outline">
<Heart className="mr-2 h-4 w-4" />
@@ -639,7 +629,10 @@ const PipeDialog: React.FC = () => {
return (
<Dialog>
<DialogTrigger asChild>
- <Button variant="ghost">pipe store</Button>
+ <Button variant="ghost">
+ <Puzzle className="mr-2 h-4 w-4" />
+ pipe store
+ </Button>
</DialogTrigger>
<DialogContent className="max-w-[90vw] w-full max-h-[90vh] h-full ">
<DialogHeader>
diff --git a/screenpipe-app-tauri/components/screenpipe-status.tsx b/screenpipe-app-tauri/components/screenpipe-status.tsx
index 062933b57..9e5e7c821 100644
--- a/screenpipe-app-tauri/components/screenpipe-status.tsx
+++ b/screenpipe-app-tauri/components/screenpipe-status.tsx
@@ -26,7 +26,7 @@ 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";
-import { Lock, Folder, FileText } from "lucide-react";
+import { Lock, Folder, FileText, Activity } from "lucide-react";
import { open } from "@tauri-apps/plugin-shell";
import { homeDir } from "@tauri-apps/api/path";
import LogViewer from "./log-viewer-v2";
@@ -467,6 +467,7 @@ const HealthStatus = ({ className }: { className?: string }) => {
className="cursor-pointer bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"
onClick={() => setIsDialogOpen(true)}
>
+ <Activity className="mr-2 h-4 w-4" />
status{" "}
<span
className={`ml-1 w-2 h-2 rounded-full ${statusColor} inline-block ${
diff --git a/screenpipe-app-tauri/components/settings.tsx b/screenpipe-app-tauri/components/settings.tsx
index 58c2c3371..89225685c 100644
--- a/screenpipe-app-tauri/components/settings.tsx
+++ b/screenpipe-app-tauri/components/settings.tsx
@@ -24,7 +24,7 @@ import { Textarea } from "./ui/textarea";
import { Slider } from "@/components/ui/slider"; // Add this import
import { platform } from "@tauri-apps/plugin-os";
-import { Eye, EyeOff, HelpCircle, RefreshCw } from "lucide-react";
+import { Eye, EyeOff, HelpCircle, RefreshCw, Settings2 } from "lucide-react";
import { RecordingSettings } from "./recording-settings";
export function Settings({ className }: { className?: string }) {
@@ -92,6 +92,7 @@ export function Settings({ className }: { className?: string }) {
>
<DialogTrigger asChild>
<Button variant="ghost" className={className}>
+ <Settings2 className="mr-2 h-4 w-4" />
settings
</Button>
</DialogTrigger>
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 6759acf56..d01929c4a 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.2.68"
+version = "0.2.69"
description = ""
authors = ["you"]
license = ""