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: VAD sensitivity in CLI & app ui settings
Louis Beaumontfc1f92797b10
diff --git a/screenpipe-app-tauri/components/log-viewer-v2.tsx b/screenpipe-app-tauri/components/log-viewer-v2.tsxindex 699976576..2c4306d88 100644--- a/screenpipe-app-tauri/components/log-viewer-v2.tsx+++ b/screenpipe-app-tauri/components/log-viewer-v2.tsx@@ -1,28 +1,50 @@import React, { useEffect, useState, useRef } from "react";import { listen } from "@tauri-apps/api/event";import { cn } from "@/lib/utils";-import Convert from 'ansi-to-html';+import Convert from "ansi-to-html";+import localforage from "localforage";+import { Button } from "./ui/button"; // import Button componentinterface LogViewerProps {className?: string;}-const convert = new Convert({newline: true});+const convert = new Convert({ newline: true });const LogViewer: React.FC<LogViewerProps> = ({ className }) => {const [logs, setLogs] = useState<string[]>([]);const logContainerRef = useRef<HTMLDivElement>(null);useEffect(() => {+ const initLogs = async () => {+ // load logs from localforage+ const storedLogs = await localforage.getItem<string[]>("sidecar_logs");+ if (storedLogs) {+ setLogs(storedLogs);+ }+ };++ initLogs();+const unlisten = listen<string>("sidecar_log", (event) => {- setLogs((prevLogs) => [...prevLogs, event.payload].slice(-100)); // Keep last 100 logs+ setLogs((prevLogs) => {+ const newLogs = [...prevLogs, event.payload].slice(-100);+ localforage.setItem("sidecar_logs", newLogs);+ return newLogs;+ });});return () => {- unlisten.then((f) => f()); // Cleanup listener when component unmounts+ unlisten.then((f) => f());};}, []);+ // function to clear logs+ const clearLogs = async () => {+ await localforage.removeItem("sidecar_logs");+ setLogs([]);+ };+useEffect(() => {if (logContainerRef.current) {logContainerRef.current.scrollTop = logContainerRef.current.scrollHeight;@@ -32,21 +54,31 @@ const LogViewer: React.FC<LogViewerProps> = ({ className }) => {const htmlLogs = logs.map((log) => convert.toHtml(log));return (- <div- ref={logContainerRef}- className={cn(- "h-64 overflow-y-auto bg-black p-2 font-mono text-sm text-white",- "whitespace-pre-wrap break-words",- className- )}- >- {htmlLogs.map((log, index) => (- <div- key={index}- dangerouslySetInnerHTML={{ __html: log }}- className="leading-5"- />- ))}+ <div className="flex flex-col py-2">+ <Button+ onClick={clearLogs}+ className="mb-2 self-end"+ variant="outline"+ size="sm"+ >+ clear logs+ </Button>+ <div+ ref={logContainerRef}+ className={cn(+ "h-64 overflow-y-auto bg-black p-2 font-mono text-sm text-white",+ "whitespace-pre-wrap break-words",+ className+ )}+ >+ {htmlLogs.map((log, index) => (+ <div+ key={index}+ dangerouslySetInnerHTML={{ __html: log }}+ className="leading-5"+ />+ ))}+ </div></div>);};diff --git a/screenpipe-app-tauri/components/recording-settings.tsx b/screenpipe-app-tauri/components/recording-settings.tsxindex 28b59a2c3..feb3e15b2 100644--- a/screenpipe-app-tauri/components/recording-settings.tsx+++ b/screenpipe-app-tauri/components/recording-settings.tsx@@ -272,17 +272,12 @@ export function RecordingSettings({setLocalSettings({ ...localSettings, fps: value[0] });};- const vadSensitivityOptions = [- { value: 0, label: "low" },- { value: 1, label: "medium" },- { value: 2, label: "high" },- ];const handleVadSensitivityChange = (value: number[]) => {const sensitivityMap: { [key: number]: VadSensitivity } = {- 0: "high",+ 2: "high",1: "medium",- 2: "low",+ 0: "low",};setLocalSettings({...localSettings,diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 58f4fd7b1..479e9f47c 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.50"+version = "0.2.51"description = ""authors = ["you"]license = ""