""" Configuration for Claude Vision Auto """ import os from pathlib import Path # Ollama configuration OLLAMA_URL = os.getenv("OLLAMA_URL", "http://localhost:11434/api/generate") VISION_MODEL = os.getenv("VISION_MODEL", "minicpm-v:latest") # Timing configuration IDLE_THRESHOLD = float(os.getenv("IDLE_THRESHOLD", "3.0")) # seconds of no output before screenshot RESPONSE_DELAY = float(os.getenv("RESPONSE_DELAY", "1.0")) # seconds to wait before sending response # Buffer configuration OUTPUT_BUFFER_SIZE = int(os.getenv("OUTPUT_BUFFER_SIZE", "4096")) # bytes # Keywords that suggest we're waiting for approval APPROVAL_KEYWORDS = [ "Yes", "No", "(y/n)", "[y/n]", "Approve", "Do you want to", "create", "edit", "delete" ] # Screenshot configuration SCREENSHOT_TIMEOUT = int(os.getenv("SCREENSHOT_TIMEOUT", "5")) # seconds SCREENSHOT_TOOLS = ["scrot", "gnome-screenshot", "import", "maim"] # Vision analysis timeout VISION_TIMEOUT = int(os.getenv("VISION_TIMEOUT", "30")) # seconds # Debug mode DEBUG = os.getenv("DEBUG", "false").lower() in ("true", "1", "yes") def get_cache_dir() -> Path: """Get cache directory for screenshots""" cache_dir = Path.home() / ".cache" / "claude-vision-auto" cache_dir.mkdir(parents=True, exist_ok=True) return cache_dir