2026-04-05 Session: Detect Ollama and improve AI settings UX

What was done

  • Added Ollama auto-detection in AI settings — pings localhost:11434/api/tags on view appear
  • Added "Use Ollama" button when Ollama is detected but not yet configured
  • Shows "Using Ollama" status when API base already points to Ollama (localhost, 127.x, LAN IPs on port 11434)
  • Changed HTTP security warning to only display when the URL actually violates the policy (was previously always visible), styled in red

Key decisions

  • Ollama detection covers localhost, 127.x, 0.0.0.0, and LAN IPs (10.x, 100.x, 192.168.x) on port 11434
  • Detection uses a 2-second timeout to avoid blocking the UI
  • HTTP warning changed from always-on informational to conditional error styling

Files changed

  • Planet/Settings/PlanetSettingsAIView.swift — Added ollamaDetected state, checkOllama() function, isUsingOllama and hasInsecureHTTPError computed properties, and conditional UI for Ollama row and HTTP warning