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
fix: revert windows ffmpeg mirror change, re-enable sidebar, changelog, reduce verbosity of pre_build.js
Louis Beaumont37e3523c7328
diff --git a/.github/workflows/style.yml b/.github/workflows/style.ymlindex 03b5ce0b5..c18bf4193 100644--- a/.github/workflows/style.yml+++ b/.github/workflows/style.yml@@ -1,4 +1,4 @@-name: Rust Style+name: Code Quality & Optimizationon: [push]@@ -6,11 +6,39 @@ env:CARGO_TERM_COLOR: alwaysjobs:- machete:- name: Cargo Machete- runs-on: ubuntu-latest+ optimize:+ name: Dependency & Performance Checks+ strategy:+ matrix:+ os: [ubuntu-latest, windows-latest, macos-latest]+ runs-on: ${{ matrix.os }}steps:- uses: actions/checkout@v4+- name: Check for unused dependenciesuses: bnjbvr/cargo-machete@main++ - name: Install cargo-udeps+ run: cargo install cargo-udeps --locked++ - name: Run cargo-udeps+ run: cargo udeps++ - name: Install cargo-bloat+ run: cargo install cargo-bloat++ - name: Analyze binary size+ run: cargo bloat --release++ - name: Install cargo-audit+ run: cargo install cargo-audit++ - name: Security audit+ run: cargo audit++ - name: Install cargo-deny+ run: cargo install cargo-deny++ - name: Check duplicate dependencies+ run: cargo deny check duplicatesdiff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsxindex 121834089..c49c0c681 100644--- a/screenpipe-app-tauri/app/page.tsx+++ b/screenpipe-app-tauri/app/page.tsx@@ -72,105 +72,111 @@ export default function Home() {};return (- // <SidebarProvider defaultOpen={false}>- // {settings.aiUrl && (- // <AppSidebar- // searches={searches}- // currentSearchId={currentSearchId}- // onSelectSearch={setCurrentSearchId}- // onDeleteSearch={deleteSearch}- // />- // )}- // <SidebarInset>- <div className="flex flex-col items-center flex-1">- <div className="fixed top-4 left-4 z-50 flex items-center gap-2">- {/* <SidebarTrigger className="h-8 w-8" /> */}- <Button- variant="ghost"- size="icon"- onClick={handleNewSearch}- className="h-8 w-8"- >- <Plus className="h-4 w-4" />- </Button>- </div>- <NotificationHandler />- {showOnboarding && <Onboarding />}- {/* <ChangelogDialog /> */}- <Header />- <div className="my-4" />- {settings.isLoading ? (- <div className="flex flex-col items-center justify-center h-full space-y-4">- <Skeleton className="w-[200px] h-[24px] rounded-full" />- <Skeleton className="w-[300px] h-[20px] rounded-full" />- <div className="grid grid-cols-1 md:grid-cols-2 gap-4 w-full max-w-2xl">- {[...Array(5)].map((_, index) => (- <Card key={index}>- <CardContent className="p-4">- <Skeleton className="w-full h-[40px]" />+ <SidebarProvider defaultOpen={false}>+ {settings.aiUrl && (+ <AppSidebar+ searches={searches}+ currentSearchId={currentSearchId}+ onSelectSearch={setCurrentSearchId}+ onDeleteSearch={deleteSearch}+ />+ )}+ <SidebarInset>+ <div className="flex flex-col items-center flex-1">+ <div className="fixed top-4 left-4 z-50 flex items-center gap-2">+ <SidebarTrigger className="h-8 w-8" />+ <Button+ variant="ghost"+ size="icon"+ onClick={handleNewSearch}+ className="h-8 w-8"+ >+ <Plus className="h-4 w-4" />+ </Button>+ </div>+ <NotificationHandler />+ {showOnboarding && <Onboarding />}+ <ChangelogDialog />+ <Header />+ <div className="my-4" />+ {settings.isLoading ? (+ <div className="flex flex-col items-center justify-center h-full space-y-4">+ <Skeleton className="w-[200px] h-[24px] rounded-full" />+ <Skeleton className="w-[300px] h-[20px] rounded-full" />+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4 w-full max-w-2xl">+ {[...Array(5)].map((_, index) => (+ <Card key={index}>+ <CardContent className="p-4">+ <Skeleton className="w-full h-[40px]" />+ </CardContent>+ </Card>+ ))}+ </div>+ </div>+ ) : settings.aiUrl ? (+ <>+ <div className="mb-8 text-center">+ <h1 className="text-2xl font-bold text-center mb-2 flex items-center justify-center gap-3">+ <span className="flex items-center gap-1">+ <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">+ 1+ </span>+ search for a keyword+ </span>+ <span className="text-gray-400">→</span>+ <span className="flex items-center gap-1">+ <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">+ 2+ </span>+ filter results+ </span>+ <span className="text-gray-400">→</span>+ <span className="flex items-center gap-1">+ <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">+ 3+ </span>+ ask AI a question+ </span>+ </h1>+ <p className="text-xl text-muted-foreground -mt-0">+ where pixels become magic+ </p>+ </div>+ <SearchChat+ currentSearchId={currentSearchId}+ onAddSearch={addSearch}+ searches={searches}+ />+ </>+ ) : (+ <div className="flex flex-col items-center justify-center h-[calc(80vh-200px)]">+ <Card className="w-[600px]">+ <CardHeader>+ <CardTitle>Welcome to Screenpipe playground</CardTitle>+ <CardDescription>+ Make sure to set your AI provider settings to ask questions+ about your data.+ <br />+ <br />+ <div className="aspect-w-16 aspect-h-9">+ <iframe+ src="https://www.youtube.com/embed/u2GfjvEY6tk"+ title="Onboarding Video"+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"+ allowFullScreen+ className="w-full h-[300px] rounded-lg shadow-lg"+ ></iframe>+ </div>+ </CardDescription>+ </CardHeader>+ <CardContent>+ <Settings /></CardContent></Card>- ))}- </div>+ </div>+ )}</div>- ) : settings.aiUrl ? (- <>- <div className="mb-8 text-center">- <h1 className="text-2xl font-bold text-center mb-2 flex items-center justify-center gap-3">- <span className="flex items-center gap-1">- <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">1</span>- search for a keyword- </span>- <span className="text-gray-400">→</span>- <span className="flex items-center gap-1">- <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">2</span>- filter results- </span>- <span className="text-gray-400">→</span>- <span className="flex items-center gap-1">- <span className="inline-flex items-center justify-center w-7 h-7 rounded-full bg-black text-white text-sm">3</span>- ask AI a question- </span>- </h1>- <p className="text-xl text-muted-foreground -mt-0">- where pixels become magic- </p>- </div>- <SearchChat- currentSearchId={currentSearchId}- onAddSearch={addSearch}- searches={searches}- />- </>- ) : (- <div className="flex flex-col items-center justify-center h-[calc(80vh-200px)]">- <Card className="w-[600px]">- <CardHeader>- <CardTitle>Welcome to Screenpipe playground</CardTitle>- <CardDescription>- Make sure to set your AI provider settings to ask questions- about your data.- <br />- <br />- <div className="aspect-w-16 aspect-h-9">- <iframe- src="https://www.youtube.com/embed/u2GfjvEY6tk"- title="Onboarding Video"- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"- allowFullScreen- className="w-full h-[300px] rounded-lg shadow-lg"- ></iframe>- </div>- </CardDescription>- </CardHeader>- <CardContent>- <Settings />- </CardContent>- </Card>- </div>- )}- </div>- // </SidebarInset>- // </SidebarProvider>+ </SidebarInset>+ </SidebarProvider>);}diff --git a/screenpipe-app-tauri/components/changelog-dialog.tsx b/screenpipe-app-tauri/components/changelog-dialog.tsxindex 0dca59d24..03b1206f0 100644--- a/screenpipe-app-tauri/components/changelog-dialog.tsx+++ b/screenpipe-app-tauri/components/changelog-dialog.tsx@@ -28,6 +28,7 @@ export const ChangelogDialog: React.FC = () => {<div className="max-w-max prose prose-medium prose-slate w-full h-full"><h1>Changelog</h1><MemoizedReactMarkdown+ // className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0"remarkPlugins={[remarkGfm, remarkMath]}components={{p({ children }) {@@ -49,6 +50,17 @@ export const ChangelogDialog: React.FC = () => {const content = String(children).replace(/\n$/, "");const match = /language-(\w+)/.exec(className || "");+ if (!match) {+ return (+ <code+ className="px-1 py-0.5 rounded-sm font-mono text-sm"+ {...props}+ >+ {content}+ </code>+ );+ }+return (<CodeBlockkey={Math.random()}diff --git a/screenpipe-app-tauri/components/header.tsx b/screenpipe-app-tauri/components/header.tsxindex 8822509e7..2ccee13b3 100644--- a/screenpipe-app-tauri/components/header.tsx+++ b/screenpipe-app-tauri/components/header.tsx@@ -197,13 +197,13 @@ export default function Header() {<Play className="mr-2 h-4 w-4" /><span>show onboarding</span></DropdownMenuItem>- {/* <DropdownMenuItem+ <DropdownMenuItemclassName="cursor-pointer"onClick={() => setShowChangelogDialog(true)}><Folder className="mr-2 h-4 w-4" /><span>show changelog</span>- </DropdownMenuItem> */}+ </DropdownMenuItem></DropdownMenuContent></DropdownMenu></div>diff --git a/screenpipe-app-tauri/components/search-chat.tsx b/screenpipe-app-tauri/components/search-chat.tsxindex d51e962c2..ae206d1c3 100644--- a/screenpipe-app-tauri/components/search-chat.tsx+++ b/screenpipe-app-tauri/components/search-chat.tsx@@ -68,7 +68,6 @@ import {TooltipTrigger,} from "./ui/tooltip";import { Separator } from "./ui/separator";-import { useInputHistory } from "@/lib/hooks/use-input-history";import { ContextUsageIndicator } from "./context-usage-indicator";import { Checkbox } from "@/components/ui/checkbox";import { formatISO } from "date-fns";diff --git a/screenpipe-app-tauri/components/ui/sidebar.tsx b/screenpipe-app-tauri/components/ui/sidebar.tsxindex eeb2d7aeb..cb0e31450 100644--- a/screenpipe-app-tauri/components/ui/sidebar.tsx+++ b/screenpipe-app-tauri/components/ui/sidebar.tsx@@ -5,7 +5,7 @@ import { Slot } from "@radix-ui/react-slot"import { VariantProps, cva } from "class-variance-authority"import { PanelLeft } from "lucide-react"-import { useIsMobile } from "@/hooks/use-mobile"+import { useIsMobile } from "@/lib/hooks/use-mobile"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import { Input } from "@/components/ui/input"diff --git a/screenpipe-app-tauri/hooks/use-mobile.tsx b/screenpipe-app-tauri/lib/hooks/use-mobile.tsxsimilarity index 100%rename from screenpipe-app-tauri/hooks/use-mobile.tsxrename to screenpipe-app-tauri/lib/hooks/use-mobile.tsxdiff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.jsindex 0e34cf00a..de8fc3ab0 100644--- a/screenpipe-app-tauri/scripts/pre_build.js+++ b/screenpipe-app-tauri/scripts/pre_build.js@@ -24,8 +24,8 @@ const mkdirp = async (dir) => await fs.mkdir(dir, { recursive: true });const config = {ffmpegRealname: 'ffmpeg',windows: {- ffmpegName: 'ffmpeg-7.0.2-full_build-shared',- ffmpegUrl: 'https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-7.0.2-full_build-shared.7z',+ ffmpegName: 'ffmpeg-7.0-windows-desktop-vs2022-default',+ ffmpegUrl: 'https://unlimited.dl.sourceforge.net/project/avbuild/windows-desktop/ffmpeg-7.0-windows-desktop-vs2022-default.7z?viasf=1',vcpkgPackages: ['opencl', 'onnxruntime-gpu'],},linux: {@@ -317,6 +317,7 @@ if (platform == 'windows') {await $`'C:\\Program Files\\7-Zip\\7z.exe' x ${config.windows.ffmpegName}.7z`await $`mv ${config.windows.ffmpegName} ${config.ffmpegRealname}`await $`rm -rf ${config.windows.ffmpegName}.7z`+ await $`mv ${config.ffmpegRealname}/lib/x64/* ${config.ffmpegRealname}/lib/`}// Setup ONNX Runtime@@ -448,8 +449,8 @@ if (platform == 'macos') {try {if (await fs.exists('screenpipe-aarch64-apple-darwin')) {- // Get existing rpaths- const otoolOutput = await $`otool -l ./screenpipe-aarch64-apple-darwin`.catch(() => ({ stdout: '' }));+ // Get existing rpaths but suppress detailed output+ const otoolOutput = await $`otool -l ./screenpipe-aarch64-apple-darwin`.quiet();const rpathRegex = /LC_RPATH.*?\n.*?path\s+(.*?)\s/gs;const existingRpaths = [];let match;@@ -459,13 +460,9 @@ if (platform == 'macos') {existingRpaths.push(match[1]);}- console.log('existing rpaths:', existingRpaths);-- // Remove existing rpaths+ // Remove existing rpaths silentlyfor (const rpath of existingRpaths) {- await $`install_name_tool -delete_rpath "${rpath}" ./screenpipe-aarch64-apple-darwin`.catch(() => {- console.log(`note: couldn't delete rpath ${rpath}`);- });+ await $`install_name_tool -delete_rpath "${rpath}" ./screenpipe-aarch64-apple-darwin`.quiet();}// Add the rpaths we need@@ -478,9 +475,7 @@ if (platform == 'macos') {];for (const rpath of rpathsToAdd) {- await $`install_name_tool -add_rpath "${rpath}" ./screenpipe-aarch64-apple-darwin`.catch(() => {- console.log(`note: couldn't add rpath ${rpath}`);- });+ await $`install_name_tool -add_rpath "${rpath}" ./screenpipe-aarch64-apple-darwin`.quiet();}// Update the dylib reference@@ -498,9 +493,9 @@ if (platform == 'macos') {console.error(`${dylib} not found at ${dyLibSrc}`);}- console.log('verifying final configuration:');- await $`otool -L ./screenpipe-aarch64-apple-darwin`;- await $`otool -l ./screenpipe-aarch64-apple-darwin | grep -A2 LC_RPATH`;+ // console.log('verifying final configuration:');+ // await $`otool -L ./screenpipe-aarch64-apple-darwin`;+ // await $`otool -l ./screenpipe-aarch64-apple-darwin | grep -A2 LC_RPATH`;}} catch (error) {console.error('error updating dylib paths:', error);diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lockindex bd459d180..951c97259 100755--- a/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -3777,7 +3777,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"[[package]]name = "screenpipe-app"-version = "0.9.21"+version = "0.9.24"dependencies = ["anyhow","axum",diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 7199d4a52..8687029b8 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.9.24"+version = "0.9.25"description = ""authors = ["you"]license = ""diff --git a/screenpipe-app-tauri/src-tauri/tauri.conf.json b/screenpipe-app-tauri/src-tauri/tauri.conf.jsonindex d821bff8f..7503dec5b 100644--- a/screenpipe-app-tauri/src-tauri/tauri.conf.json+++ b/screenpipe-app-tauri/src-tauri/tauri.conf.json@@ -11,7 +11,12 @@"active": true,"category": "DeveloperTool","copyright": "",- "targets": ["app", "dmg", "appimage", "nsis"],+ "targets": [+ "app",+ "dmg",+ "appimage",+ "nsis"+ ],"externalBin": [],"icon": ["icons/32x32.png",@@ -24,16 +29,34 @@"icons/icon.ico"],"longDescription": "",- "resources": ["assets/*"],+ "resources": [+ "assets/*"+ ],"shortDescription": "","fileAssociations": [{"description": "Video files",- "ext": ["mp4", "mkv", "avi", "mov", "wmv", "webm"]+ "ext": [+ "mp4",+ "mkv",+ "avi",+ "mov",+ "wmv",+ "webm"+ ]},{"description": "Audio files",- "ext": ["mp3", "wav", "aac", "flac", "oga", "ogg", "opic", "opus"]+ "ext": [+ "mp3",+ "wav",+ "aac",+ "flac",+ "oga",+ "ogg",+ "opic",+ "opus"+ ]}]},@@ -92,10 +115,19 @@],"media-src": "'self' mediadevices: asset: http://asset.localhost file: blob: tauri://localhost file: blob: https://youtube.com https://github.com https://youtu.be","img-src": "'self' asset: http://asset.localhost blob: data: https://*.githubusercontent.com https://*.github.com https://github.com https://*.s3.amazonaws.com",- "style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com *",+ "style-src": [+ "'unsafe-inline'",+ "'self'",+ "https://fonts.googleapis.com",+ "tauri://localhost",+ "http://tauri.localhost",+ "http://localhost:*",+ "data:",+ "*"+ ],"frame-src": "https://www.youtube.com http://localhost:*"}},"macOSPrivateApi": true}-}+}\ No newline at end of file