From 5b35df400766002f56b083893e9e7be914d82ae5 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 11 Jan 2026 14:42:25 -0500 Subject: [PATCH] Remove unused function --- src/ai/insight_generator.rs | 50 +------------------------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/src/ai/insight_generator.rs b/src/ai/insight_generator.rs index 273b78c..d677041 100644 --- a/src/ai/insight_generator.rs +++ b/src/ai/insight_generator.rs @@ -611,17 +611,6 @@ impl InsightGenerator { } } - /// Generate AI insight for a single photo with optional custom model - /// (Deprecated: Use generate_insight_for_photo_with_config instead) - pub async fn generate_insight_for_photo_with_model( - &self, - file_path: &str, - custom_model: Option, - ) -> Result<()> { - self.generate_insight_for_photo_with_config(file_path, custom_model, None, None) - .await - } - /// Generate AI insight for a single photo with custom configuration pub async fn generate_insight_for_photo_with_config( &self, @@ -890,7 +879,7 @@ impl InsightGenerator { log::info!( "Fetched {} SMS messages closest to {}", sms_messages.len(), - chrono::DateTime::from_timestamp(timestamp, 0) + DateTime::from_timestamp(timestamp, 0) .map(|dt| dt.format("%Y-%m-%d %H:%M:%S").to_string()) .unwrap_or_else(|| "unknown time".to_string()) ); @@ -1109,43 +1098,6 @@ Return ONLY the comma-separated list, nothing else."#, } } - /// Find relevant messages using RAG with topic-enriched query - async fn find_relevant_messages_rag_enriched( - &self, - date: chrono::NaiveDate, - contact: Option<&str>, - topics: &[String], - limit: usize, - ) -> Result> { - // Build enriched query from date + topics - let mut query_parts = Vec::new(); - - query_parts.push(format!("On {}", date.format("%B %d, %Y"))); - - if !topics.is_empty() { - query_parts.push(format!("about {}", topics.join(", "))); - } - - if let Some(c) = contact { - query_parts.push(format!("conversation with {}", c)); - } - - // Add day of week - let weekday = date.format("%A"); - query_parts.push(format!("it was a {}", weekday)); - - let query = query_parts.join(", "); - - log::info!("========================================"); - log::info!("ENRICHED RAG QUERY: {}", query); - log::info!("Extracted topics: {:?}", topics); - log::info!("========================================"); - - // Use existing RAG method with enriched query - self.find_relevant_messages_rag(date, None, contact, None, limit) - .await - } - /// Summarize pre-formatted message strings using LLM (concise version for historical context) async fn summarize_messages( &self,