use rag_module::RagModule;
use anyhow::Result;
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt()
.with_env_filter("info")
.init();
println!("╔══════════════════════════════════════════════════════════════╗");
println!("║ Delete Context from Chat History - Example Demo ║");
println!("╚══════════════════════════════════════════════════════════════╝\n");
println!("📦 Step 1: Initializing RAG Module");
println!("─────────────────────────────────────────────────────────────\n");
let rag_module = RagModule::new(
"/Users/aparnapitchikala/Library/Application Support/Escher"
).await?;
rag_module.initialize().await?;
println!("✅ RAG Module initialized successfully\n");
let context_id = "c0a53fe9-0ff0-4911-85bf-3fa01982ce9d";
let user_id = "148854b8-9091-70e0-ed07-40553c514535";
let chat_title = Some("Test Conversation");
println!("📝 Step 2: Creating Chat Messages");
println!("─────────────────────────────────────────────────────────────");
println!(" Context ID: {}", context_id);
println!(" User ID: {}", user_id);
println!(" Chat Title: {:?}\n", chat_title);
println!("🗑️ Step 5: Deleting Context");
println!("─────────────────────────────────────────────────────────────");
println!(" Deleting context_id: {}\n", context_id);
let deleted_count = rag_module.delete_context_from_chat_history(context_id, user_id).await?;
println!("\n✅ Context deletion completed!");
println!(" Documents deleted: {}\n", deleted_count);
println!("🎉 Example completed successfully!\n");
Ok(())
}