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
show toast when ffmpeg is being downloaded
Louis Beaumont86efeae90fda
diff --git a/screenpipe-app-tauri/components/model-download-tracker.tsx b/screenpipe-app-tauri/components/model-download-tracker.tsxindex cb8ad1d24..bcc0aa65c 100644--- a/screenpipe-app-tauri/components/model-download-tracker.tsx+++ b/screenpipe-app-tauri/components/model-download-tracker.tsx@@ -78,6 +78,12 @@ export function ModelDownloadTracker() {{ regex: /model downloaded/, group: 1 },];+ // ffmpeg installation patterns+ const ffmpegStartPattern = /ffmpeg not found\. installing/i;+ const ffmpegEndPattern = /ffmpeg (installed|ready)/i;+ const [ffmpegInstalling, setFfmpegInstalling] = useState(false);+ const [ffmpegToastRef, setFfmpegToastRef] = useState<any>(null);+// Function to extract model name from log lineconst getModelName = (line: string,@@ -99,11 +105,53 @@ export function ModelDownloadTracker() {if (!line.includes("download") &&!line.includes("model") &&- !line.includes("cache")+ !line.includes("cache") &&+ !line.includes("ffmpeg")) {return;}+ // Check for ffmpeg installation+ if (ffmpegStartPattern.test(line) && !ffmpegInstalling) {+ console.log("Detected ffmpeg installation starting");++ const toastRef = toast({+ title: "installing ffmpeg",+ description: (+ <div className="flex flex-col gap-2">+ <div className="flex items-center gap-2">+ <Download className="h-4 w-4" />+ </div>+ <Progress value={20} className="h-1" />+ </div>+ ),+ duration: Infinity,+ });++ setFfmpegInstalling(true);+ setFfmpegToastRef(toastRef);+ }++ // Check for ffmpeg installation completion+ if (ffmpegEndPattern.test(line) && ffmpegInstalling) {+ console.log("Detected ffmpeg installation completed");++ // Close the "installing" toast+ if (ffmpegToastRef) {+ dismiss(ffmpegToastRef.id);+ }++ // Show completion toast+ toast({+ title: "ffmpeg installed",+ description: "ffmpeg is ready to use",+ duration: 3000,+ });++ setFfmpegInstalling(false);+ setFfmpegToastRef(null);+ }+// Check for download startconst modelStarting = getModelName(line, downloadStartPatterns);if (modelStarting && !activeDownloads[modelStarting]) {