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
chore(tauri): clear cargo dead-code warnings
Louis Beaumontf08de29b391f
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rsindex 443daa919..33a176002 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs@@ -73,6 +73,7 @@ const READY_EVENT: &str = "owned-browser:ready";/// user's real browser. The sidebar answers through the/// `owned_browser_resolve_session_access` command.const SESSION_ACCESS_REQUEST_EVENT: &str = "owned-browser:session-access-request";+#[cfg(target_os = "windows")]const V20_COOKIE_BLOCK_EVENT: &str = "owned-browser:v20-cookie-blocked";const SESSION_ACCESS_TIMEOUT: Duration = Duration::from_secs(60);@@ -129,6 +130,7 @@ struct BrowserSessionAccessRequestPayload {host: String,}+#[cfg(target_os = "windows")]#[derive(serde::Serialize, Clone)]#[serde(rename_all = "camelCase")]struct V20CookieBlockPayload {diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rsindex ea9fae5a9..0b74322ea 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs@@ -604,34 +604,6 @@ fn find_local_pi_entrypoint() -> Option<String> {}}-/// Extract the plain-text content from a pi-mono `message` JSON value (the-/// shape that ships in `message_start`/`message_end` events). pi-mono encodes-/// user messages as either `content: "string"` or-/// `content: [{type: "text", text: "..."}, ...]`. We concatenate all text-/// parts in order. Used to match an incoming user message against the queued-/// prompt rail's preview text.-fn extract_user_message_text(msg: &serde_json::Value) -> String {- let content = match msg.get("content") {- Some(c) => c,- None => return String::new(),- };- if let Some(s) = content.as_str() {- return s.to_string();- }- if let Some(arr) = content.as_array() {- let mut out = String::new();- for part in arr {- if part.get("type").and_then(|t| t.as_str()) == Some("text") {- if let Some(t) = part.get("text").and_then(|v| v.as_str()) {- out.push_str(t);- }- }- }- return out;- }- String::new()-}-fn find_pi_executable() -> Option<String> {// 1. Check screenpipe-managed local install first (preferred — we control the deps)if let Some(js) = find_local_pi_entrypoint() {diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi_command_queue.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi_command_queue.rsindex ca5f9c4dd..dd4fa7683 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/pi_command_queue.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi_command_queue.rs@@ -64,10 +64,6 @@ pub struct PiCommand {/// How the queue waits after writing a command to stdin.#[derive(Debug, Clone, Copy, PartialEq, Eq)]pub enum WaitMode {- /// Write to stdin, reply Ok, advance immediately. Used for commands that- /// are allowed to interrupt or redirect the current turn (for example- /// native `steer`).- WriteOnly,/// Write a prompt, acknowledge the write, then wait for the agent to/// become idle before the next queued prompt is written. This keeps/// follow-ups in Rust's cancellable queue until their actual turn starts.@@ -564,12 +560,6 @@ pub fn spawn_queue(}match cmd.wait_mode {- WaitMode::WriteOnly => {- if let Some(pid) = &prompt_id {- state.dequeue_prompt(pid);- }- let _ = cmd.reply.send(Ok(()));- }WaitMode::Prompt => {// The prompt has now left the waiting queue and// entered the transcript as the active turn.@@ -720,16 +710,6 @@ async fn wait_for_done_or_terminated(#[cfg(test)]mod tests {use super::*;- use std::io::Read;- use std::sync::atomic::{AtomicU32, Ordering};-- /// Create a pipe-based fake stdin for testing.- fn fake_stdin() -> (Arc<Mutex<ChildStdin>>, std::fs::File) {- // We can't easily create a ChildStdin directly, so we test- // the queue logic via the public API with a real subprocess.- // For unit tests, we verify the signal/wait logic instead.- unimplemented!("Integration tests use real Pi process")- }#[tokio::test]async fn test_queue_state_done_signal() {@@ -778,7 +758,7 @@ mod tests {// Send a command in the backgroundlet h = tokio::spawn(async move {let result = handle- .send(json!({"type": "prompt"}), WaitMode::WriteOnly)+ .send(json!({"type": "prompt"}), WaitMode::Prompt).await;assert!(result.is_ok());// The receiver should work@@ -788,7 +768,7 @@ mod tests {// Receive from the channel and complete itif let Some(QueueMessage::Command(cmd)) = rx.recv().await {- assert_eq!(cmd.wait_mode, WaitMode::WriteOnly);+ assert_eq!(cmd.wait_mode, WaitMode::Prompt);let _ = cmd.reply.send(Ok(()));}@@ -810,7 +790,7 @@ mod tests {let h1 = {let h = handle.clone();tokio::spawn(- async move { h.send(json!({"type": "prompt"}), WaitMode::WriteOnly).await },+ async move { h.send(json!({"type": "prompt"}), WaitMode::Prompt).await },)};let h2 = {