unity-mcp/MCPForUnity/Editor/Windows
whatevertogo 322a3d1846
fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550
* fix: resolve UV path override not being detected in System Requirements

Fixes #538

The System Requirements panel showed "UV Package Manager: Not Found" even
when a valid UV path override was configured in Advanced Settings.

Root cause: PlatformDetectorBase.DetectUv() only searched PATH with bare
command names ("uvx", "uv") and never consulted PathResolverService which
respects the user's override setting.

Changes:
- Refactor DetectUv() to use PathResolverService.GetUvxPath() which checks
  override path first, then system PATH, then falls back to "uvx"
- Add TryValidateUvExecutable() to verify executables by running --version
  instead of just checking File.Exists
- Prioritize PATH environment variable in EnumerateUvxCandidates() for
  better compatibility with official uv install scripts
- Fix process output read order (ReadToEnd before WaitForExit) to prevent
  potential deadlocks

Co-Authored-By: ChatGLM 4.7 <noreply@zhipuai.com>

* fix: improve uv/uvx detection robustness on macOS and Linux

- Read both stdout and stderr when validating uv/uvx executables
- Respect WaitForExit timeout return value instead of ignoring it
- Fix version parsing to handle extra tokens like "(Homebrew 2025-01-01)"
- Resolve bare commands ("uv"/"uvx") to absolute paths after validation
- Rename FindExecutableInPath to FindUvxExecutableInPath for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: unify process execution with ExecPath.TryRun and add Windows PATH augmentation

Replace direct Process.Start calls with ExecPath.TryRun across all platform detectors.
This change:
- Fixes potential deadlocks by using async output reading
- Adds proper timeout handling with process termination
- Removes redundant fallback logic and simplifies version parsing
- Adds Windows PATH augmentation with common uv, npm, and Python installation paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: improve version parsing to handle both spaces and parentheses

The version extraction logic now properly handles outputs like:
- "uvx 0.9.18" -> "0.9.18"
- "uvx 0.9.18 (hash date)" -> "0.9.18"
- "uvx 0.9.18 extra info" -> "0.9.18"

Uses Math.Min to find the first occurrence of either space or parenthesis.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: improve platform detectors with absolute path resolution

- Add absolute path resolution in TryValidatePython and TryValidateUvWithPath for better UI display
- Fix BuildAugmentedPath to avoid PATH duplication
- Add comprehensive comments for version parsing logic
- Ensure cross-platform consistency across all three detectors
- Fix override path validation logic with clear state handling
- Fix platform detector path resolution and Python version detection
- Use UserProfile consistently in GetClaudeCliPath instead of Personal
- All platforms now use protected BuildAugmentedPath method

This change improves user experience by displaying full paths in the UI
while maintaining robust fallback behavior if path resolution fails.

Co-Authored-By: GLM4.7 <noreply@zhipuai.com>

* fix: improve error handling in PathResolverService by logging exceptions

* Remove .meta files added after fork and update .gitignore

* Update .gitignore

* save .meta

* refactor: unify uv/uvx naming and path detection across platforms

- Rename TryValidateUvExecutable -> TryValidateUvxExecutable for consistency
- Add cross-platform FindInPath() helper in ExecPath.cs
- Remove platform-specific where/which implementations in favor of unified helper
- Add Windows-specific DetectUv() override with enhanced uv/uvx detection
- Add WinGet shim path support for Windows uvx installation
- Update UI labels: "UV Path" -> "UVX Path"
- Only show uvx path status when override is configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: improve validation light(uvxPathStatus) logic for UVX path overrides and system paths

* refactor: streamline UV version validation and unify path detection methods across platform detectors

* fix: add type handling for Claude Code client in config JSON builder

* fix: correct command from 'uvx' to 'uv' for Python version listing in WindowsPlatformDetector

* feat: add uvx path fallback with warning UI

  - When override path is invalid, automatically fall back to system path
  - Add HasUvxPathFallback flag to track fallback state
  - Show yellow warning indicator when using fallback
  - Display clear messages for invalid override paths
  - Updated all platform detectors (Windows, macOS, Linux) to support fallback logic

* refactor: remove GetDetails method from PlatformDetectorBase

* Update ExecPath.cs

update Windows Path lookup

---------

Co-authored-by: ChatGLM 4.7 <noreply@zhipuai.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Shutong Wu <51266340+Scriptwonder@users.noreply.github.com>
2026-01-17 18:34:40 -05:00
..
Components fix: resolve Claude Code HTTP Remote UV path override not being detected in System Requirements .#550 2026-01-17 18:34:40 -05:00
EditorPrefs Fix HTTP/Stdio Transport UX and Test Bug (#530) 2026-01-07 23:33:22 -04:00
Components.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
EditorPrefs.meta Add EditorPrefs management window for MCP configuration debugging (#491) 2025-12-29 13:30:45 -04:00
MCPForUnityEditorWindow.cs HTTP setup overhaul: transport selection (HTTP local/remote vs stdio), safer lifecycle, cleaner UI, better Claude Code integration (#499) 2026-01-01 17:08:51 -08:00
MCPForUnityEditorWindow.cs.meta Add .meta files (#472) 2025-12-19 18:59:19 -04:00
MCPForUnityEditorWindow.uss Test/478 matrix4x4 serialization crash (#481) 2025-12-23 15:53:14 -08:00
MCPForUnityEditorWindow.uss.meta Add .meta files (#472) 2025-12-19 18:59:19 -04:00
MCPForUnityEditorWindow.uxml [FEATURE] Custom Tool Fix and Add inspection window for all the tools (#414) 2025-12-07 19:38:32 -05:00
MCPForUnityEditorWindow.uxml.meta Add .meta files (#472) 2025-12-19 18:59:19 -04:00
MCPSetupWindow.cs feat: Mark setup as completed when user clicks Done button (#529) 2026-01-07 18:58:36 -04:00
MCPSetupWindow.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPSetupWindow.uss HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPSetupWindow.uss.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPSetupWindow.uxml HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPSetupWindow.uxml.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00