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: add cli arg to disable vision
Louis Beaumonte5dcde7d8ae8
diff --git a/screenpipe-server/src/bin/screenpipe-server.rs b/screenpipe-server/src/bin/screenpipe-server.rsindex 16b0120c1..0cb2b5e95 100644--- a/screenpipe-server/src/bin/screenpipe-server.rs+++ b/screenpipe-server/src/bin/screenpipe-server.rs@@ -322,6 +322,7 @@ async fn main() -> anyhow::Result<()> {friend_wearable_uid_clone, // Use the cloned versionmonitor_id,cli.use_pii_removal,+ cli.disable_vision,).await;@@ -380,6 +381,7 @@ async fn main() -> anyhow::Result<()> {);println!("│ Port │ {:<34} │", cli.port);println!("│ Audio Disabled │ {:<34} │", cli.disable_audio);+ println!("│ Vision Disabled │ {:<34} │", cli.disable_vision);println!("│ Self Healing │ {:<34} │", cli.self_healing);println!("│ Save Text Files │ {:<34} │", cli.save_text_files);println!(diff --git a/screenpipe-server/src/cli.rs b/screenpipe-server/src/cli.rsindex f3601fb42..6b852fa70 100644--- a/screenpipe-server/src/cli.rs+++ b/screenpipe-server/src/cli.rs@@ -151,4 +151,8 @@ pub struct Cli {/// Restart recording process every X minutes (0 means no periodic restart) - NOT RECOMMENDED#[arg(long, default_value_t = 0)]pub restart_interval: u64,++ /// Disable vision recording+ #[arg(long, default_value_t = false)]+ pub disable_vision: bool,}\ No newline at end of filediff --git a/screenpipe-server/src/core.rs b/screenpipe-server/src/core.rsindex 0271b59bf..5f9165f63 100644--- a/screenpipe-server/src/core.rs+++ b/screenpipe-server/src/core.rs@@ -32,6 +32,7 @@ pub async fn start_continuous_recording(friend_wearable_uid: Option<String>,monitor_id: u32,use_pii_removal: bool,+ vision_disabled: bool,) -> Result<()> {let (whisper_sender, whisper_receiver, whisper_shutdown_flag) = if audio_disabled {// Create a dummy channel if no audio devices are available, e.g. audio disabled@@ -68,20 +69,27 @@ pub async fn start_continuous_recording());}- let video_handle = tokio::spawn(async move {- record_video(- db_manager_video,- output_path_video,- fps,- is_running_video,- save_text_files,- ocr_engine,- friend_wearable_uid_video,- monitor_id,- use_pii_removal,- )- .await- });+ let video_handle = if !vision_disabled {+ tokio::spawn(async move {+ record_video(+ db_manager_video,+ output_path_video,+ fps,+ is_running_video,+ save_text_files,+ ocr_engine,+ friend_wearable_uid_video,+ monitor_id,+ use_pii_removal,+ )+ .await+ })+ } else {+ tokio::spawn(async move {+ tokio::time::sleep(Duration::from_secs(60)).await;+ Ok(())+ })+ };let audio_handle = tokio::spawn(async move {record_audio(@@ -255,7 +263,8 @@ async fn record_audio(let device_control_clone = device_control_clone.clone();let new_file_name = Utc::now().format("%Y-%m-%d_%H-%M-%S").to_string();- let sanitized_device_name = audio_device_clone.to_string().replace(['/', '\\'], "_");+ let sanitized_device_name =+ audio_device_clone.to_string().replace(['/', '\\'], "_");let file_path = PathBuf::from(&*output_path_clone).join(format!("{}_{}.mp4", sanitized_device_name, new_file_name)).to_str()