diff --git a/src-tauri/src/commands/llm.rs b/src-tauri/src/commands/llm.rs index 970d43e..5c820e2 100644 --- a/src-tauri/src/commands/llm.rs +++ b/src-tauri/src/commands/llm.rs @@ -412,11 +412,19 @@ pub async fn cleanup_transcript_text_cmd( /// synchronous llama-cpp inference) is wrapped in spawn_blocking so it /// does not stall the Tauri runtime, with the same App-Nap power /// assertion the other LLM commands use. +/// +/// Trust-4 (conf 85, code-atomiser-fix 2026-05-12): added the +/// `ensure_main_window` guard that every other command in this file +/// already enforces. The `window: tauri::WebviewWindow` parameter is +/// injected by Tauri automatically — frontend invoke call sites +/// (HistoryPage) do not need updating. #[tauri::command] pub async fn extract_content_tags_cmd( + window: tauri::WebviewWindow, state: State<'_, AppState>, transcript: String, ) -> Result { + ensure_main_window(&window)?; if !state.llm_engine.is_loaded() { return Err("LLM not loaded. Download an AI model in Settings.".to_string()); }