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: fix broken link, hide broken log component
Louis Beaumont4b40d12034cb
diff --git a/examples/apps/screenpipe-app-tauri/app/page.tsx b/examples/apps/screenpipe-app-tauri/app/page.tsxindex cd89fe9db..fb9bc3aad 100644--- a/examples/apps/screenpipe-app-tauri/app/page.tsx+++ b/examples/apps/screenpipe-app-tauri/app/page.tsx@@ -73,33 +73,43 @@ function Header({ onKeyChange }: { onKeyChange: (key: string) => void }) {{" "}{/* Added margin-top for spacing */}<Settings onKeyChange={onKeyChange} />- <LogViewer />- <Button- asChild- className="cursor-pointer"- onClick={- () =>- window.open(- "https://github.com/louis030195/screen-pipe/tree/main/examples/ts"- )- // open(- // "https://github.com/louis030195/screen-pipe/tree/main/examples/ts"- // )- }- >- <h2 className="mb-3 text-2xl font-semibold">Examples</h2>- </Button>- <Button- asChild- className="cursor-pointer"- onClick={() =>- window.open(- "mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe"- )- }- >- <h2 className="mb-3 text-2xl font-semibold">Send feedback</h2>- </Button>+ {/* <LogViewer /> */}+ <PrettyLink href="https://github.com/louis030195/screen-pipe/tree/main/examples/ts">+ <span className="mr-2">Examples</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>+ <PrettyLink 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></div></div>);@@ -119,6 +129,7 @@ import { cn } from "@/lib/utils";import { LogViewer } from "@/components/log-viewer";import { Skeleton } from "@/components/ui/skeleton";+import { PrettyLink } from "@/components/pretty-link";export default function Home() {const [openAiKey, setOpenAiKey] = useState<string | null>(null);diff --git a/examples/apps/screenpipe-app-tauri/components/log-viewer.tsx b/examples/apps/screenpipe-app-tauri/components/log-viewer.tsxindex 1decd18be..c5b1cca99 100644--- a/examples/apps/screenpipe-app-tauri/components/log-viewer.tsx+++ b/examples/apps/screenpipe-app-tauri/components/log-viewer.tsx@@ -30,22 +30,44 @@ export function LogViewer() {loadLogs();- const setupWatcher = async () => {- const logPath = await resolveResource(".screenpipe/screenpipe.log");- const stopWatching = await watch(logPath, async () => {- await loadLogs();- });+ /*+ [Error] Error reading log file: – "failed to read file as text at path: /Applications/screenpipe.app/Contents/Resources/.screenpipe/screenpipe.log with error: No such file o…"+ "failed to read file as text at path: /Applications/screenpipe.app/Contents/Resources/.screenpipe/screenpipe.log with error: No such file or directory (os error 2)"+ (anonymous function) (733-ce7d083d9f39eae2.js:1:3977)+ (anonymous function) (page-c4b19e5f4f41f600.js:1:31308)+ [Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (plugin:fs|watch, line 0)+ [Error] Unhandled Promise Rejection: Command watch not found+ [Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (plugin:fs|read_text_file, line 0)+ [Error] Error reading log file: – "failed to read file as text at path: /Applications/screenpipe.app/Contents/Resources/.screenpipe/screenpipe.log with error: No such file o…"+ "failed to read file as text at path: /Applications/screenpipe.app/Contents/Resources/.screenpipe/screenpipe.log with error: No such file or directory (os error 2)"+ (anonymous function) (733-ce7d083d9f39eae2.js:1:3977)+ (anonymous function) (page-54e78c62d5f111c4.js:1:31314)+ */+ // const setupWatcher = async () => {+ // const logPath = await resolveResource(".screenpipe/screenpipe.log");+ // const stopWatching = await watch(logPath, async () => {+ // await loadLogs();+ // });- return stopWatching;- };+ // return stopWatching;+ // };++ // let unwatch: (() => void) | undefined;+ // setupWatcher().then((stopWatching) => {+ // unwatch = stopWatching;+ // });- let unwatch: (() => void) | undefined;- setupWatcher().then((stopWatching) => {- unwatch = stopWatching;- });+ // return () => {+ // if (unwatch) unwatch();+ // };+ // Polling every x ms (customizable)+ const pollingInterval = 500; // Customize this value+ const intervalId = setInterval(() => {+ loadLogs();+ }, pollingInterval);return () => {- if (unwatch) unwatch();+ clearInterval(intervalId); // Clear the interval on cleanup};}}, [isOpen]);diff --git a/examples/apps/screenpipe-app-tauri/components/pretty-link.tsx b/examples/apps/screenpipe-app-tauri/components/pretty-link.tsxnew file mode 100644index 000000000..6e721dc3f--- /dev/null+++ b/examples/apps/screenpipe-app-tauri/components/pretty-link.tsx@@ -0,0 +1,25 @@+import { cn } from "@/lib/utils";++export function PrettyLink({+ href,+ children,+}: {+ href: string;+ children: React.ReactNode;+}) {+ return (+ <a+ href={href}+ target="_blank"+ rel="noopener noreferrer"+ className={cn(+ "inline-flex items-center rounded-md bg-gray-600 px-4 py-2",+ "text-sm font-medium text-white shadow-sm",+ "hover:bg-gray-700 focus:outline-none focus:ring-2",+ "focus:ring-gray-500 focus:ring-offset-2 transition-colors duration-200"+ )}+ >+ {children}+ </a>+ );+}diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json b/examples/apps/screenpipe-app-tauri/src-tauri/capabilities/main.jsonindex f4c9703aa..9e68a5fb3 100644--- a/examples/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json+++ b/examples/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json@@ -14,6 +14,7 @@"menu:default","tray:default","shell:default",+ "shell:allow-open","store:allow-get","store:allow-set","store:allow-save",@@ -22,6 +23,14 @@"fs:default","fs:allow-read-file","fs:allow-watch",+ "fs:default",+ "fs:allow-read-file",+ "fs:allow-write-file",+ "fs:read-dirs",+ "fs:allow-copy-file",+ "fs:allow-exists",+ "fs:allow-watch",+ "fs:allow-read-text-file",{"identifier": "fs:scope","allow": [@@ -30,6 +39,24 @@},{"path": "$APPDATA/**"+ },+ {+ "path": "$APPCONFIG/*"+ },+ {+ "path": "$RESOURCE/*"+ },+ {+ "path": "$RESOURCE/.screenpipe/*"+ },+ {+ "path": "$HOME/*"+ },+ {+ "path": "$HOME/.screenpipe/*"+ },+ {+ "path": "$APP/*"}]},diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json b/examples/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.jsonindex 577d4f7be..97f7acf0a 100644--- a/examples/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json+++ b/examples/apps/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json@@ -1 +1 @@-{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","tray:default","shell:default","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open",{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},"cli:default","shell:default"]}}\ No newline at end of file+{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","tray:default","shell:default","shell:allow-open","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open","fs:default","fs:allow-read-file","fs:allow-watch","fs:default","fs:allow-read-file","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-watch","fs:allow-read-text-file",{"identifier":"fs:scope","allow":[{"path":"$APPDATA/*"},{"path":"$APPDATA/**"},{"path":"$APPCONFIG/*"},{"path":"$RESOURCE/*"},{"path":"$RESOURCE/.screenpipe/*"},{"path":"$HOME/*"},{"path":"$HOME/.screenpipe/*"},{"path":"$APP/*"}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},"cli:default","shell:default"]}}\ No newline at end of filediff --git a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 977acc062..945912b4c 100755--- a/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/examples/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -227,7 +227,12 @@ use tauri_plugin_shell::ShellExt;fn start_screenpipe_server_new(app: tauri::AppHandle) -> tauri::Result<()> {let sidecar = app.shell().sidecar("screenpipe").unwrap();let (mut rx, _child) = sidecar- .args(["--port", "3030", "--debug"]) // "--disable-audio"+ .args(vec!["--port", "3030", "--debug"])+ // .args(if cfg!(target_os = "macos") { // ! hack?+ // vec!["--port", "3030", "--debug", "--data-dir", "/Applications/screenpipe.app/Contents/Resources"]+ // } else {+ // vec!["--port", "3030", "--debug"] // "--disable-audio"+ // }).spawn().expect("Failed to spawn sidecar");diff --git a/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json b/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.jsonindex b1c64ef62..2bdadf683 100644--- a/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json+++ b/examples/apps/screenpipe-app-tauri/src-tauri/tauri.conf.json@@ -65,12 +65,16 @@"removeFile": true,"renameFile": true,"exists": true,+ "watch": true,+ "readTextFile": true,"scope": ["$APPDATA/*","$APPCONFIG/*","$RESOURCE/*",+ "$RESOURCE/.screenpipe/*","$HOME/*",- "$HOME/.screenpipe/*"+ "$HOME/.screenpipe/*",+ "$APP/*"]}},diff --git a/screenpipe-core/src/llm.rs b/screenpipe-core/src/llm.rsindex 1d2d9049b..95279a356 100755--- a/screenpipe-core/src/llm.rs+++ b/screenpipe-core/src/llm.rs@@ -1,7 +1,6 @@use anyhow::Result;use candle::{DType, Device, Tensor};use candle_nn::VarBuilder;-use candle_transformers::models::llama::{Cache, Llama, LlamaConfig};use candle_transformers::models::phi3::{Config as Phi3Config, Model as Phi3};use hf_hub::{api::sync::Api, Repo, RepoType};