From 1a80103eaf9d770354ea1e9780af70cda7ec06d9 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Tue, 6 May 2025 11:46:23 -0400 Subject: [PATCH] Silence error log when deserializing agent panel navigation history (#30011) Closes #ISSUE Release Notes: - N/A --- crates/agent/src/history_store.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/agent/src/history_store.rs b/crates/agent/src/history_store.rs index 688f9557a997a007ee0c18e4c13e05828548b670..c2018e1c3baa5b82d48a773af6927b44a9eae21b 100644 --- a/crates/agent/src/history_store.rs +++ b/crates/agent/src/history_store.rs @@ -97,9 +97,10 @@ impl HistoryStore { let contents = cx .background_spawn(async move { std::fs::read_to_string(path) }) .await - .context("reading persisted agent panel navigation history")?; + .ok()?; let entries = serde_json::from_str::>(&contents) - .context("deserializing persisted agent panel navigation history")? + .context("deserializing persisted agent panel navigation history") + .log_err()? .into_iter() .take(MAX_RECENTLY_OPENED_ENTRIES) .map(|serialized| match serialized { @@ -134,10 +135,10 @@ impl HistoryStore { }) .ok(); - anyhow::Ok(()) + Some(()) } }) - .detach_and_log_err(cx); + .detach(); Self { thread_store,