diff --git a/src-tauri/src/ollama/installer.rs b/src-tauri/src/ollama/installer.rs index 6048d93c..6d33081c 100644 --- a/src-tauri/src/ollama/installer.rs +++ b/src-tauri/src/ollama/installer.rs @@ -10,7 +10,12 @@ pub async fn check_ollama() -> anyhow::Result { let which_result = std::process::Command::new(which_cmd).arg("ollama").output(); - let installed = which_result.map(|o| o.status.success()).unwrap_or(false); + // Check common install paths explicitly — Tauri's process PATH may omit /usr/local/bin + let in_common_path = ["/usr/local/bin/ollama", "/opt/homebrew/bin/ollama", "/usr/bin/ollama"] + .iter() + .any(|p| std::path::Path::new(p).exists()); + + let installed = which_result.map(|o| o.status.success()).unwrap_or(false) || in_common_path; let version = if installed { std::process::Command::new("ollama") @@ -32,6 +37,9 @@ pub async fn check_ollama() -> anyhow::Result { .map(|r| r.status().is_success()) .unwrap_or(false); + // If the API is responding, Ollama is definitely installed even if binary wasn't found in PATH + let installed = installed || running; + Ok(OllamaStatus { installed, version, diff --git a/src/pages/Settings/AIProviders.tsx b/src/pages/Settings/AIProviders.tsx index 2ed1a2d3..2c06fb1d 100644 --- a/src/pages/Settings/AIProviders.tsx +++ b/src/pages/Settings/AIProviders.tsx @@ -195,9 +195,18 @@ export default function AIProviders() {