The MCP server runs with cwd set to the plugin directory, not the user's project directory. This caused git remote auto-detection to fail because it was looking at the wrong directory. Changes: - Added _find_project_directory() method with multiple strategies: 1. CLAUDE_PROJECT_DIR environment variable 2. PWD environment variable (if it has .git or .env) 3. Current working directory (if it has .git or .env) - Updated _detect_repo_from_git() to accept project_dir parameter - Added 3 new tests for project directory detection Fixes #70 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7.6 KiB
7.6 KiB