Skip to content

Conversation

@TanNhatCMS
Copy link

This pull request updates the platform detection logic and project configuration for the Copilot CLI integration, improving compatibility and detection accuracy across different operating systems and project setups.

Platform detection improvements:

  • Updated the systemDetectionConfig method to use a match expression, providing platform-specific commands for detecting the Copilot CLI: command -v copilot for Darwin/Linux and where copilot 2>nul for Windows.

Project detection enhancements:

  • Expanded the projectDetectionConfig method to include a new paths key for .github/instructions and added additional files for detection: .github/instructions/laravel-boost.instructions.md, AGENTS.md, CLAUDE.md, and GEMINI.md.

Dependency and import updates:

  • Added imports for FileNotFoundException and JsonException to support enhanced error handling and JSON operations.

@TanNhatCMS TanNhatCMS marked this pull request as ready for review December 19, 2025 18:44
Copilot AI review requested due to automatic review settings December 19, 2025 18:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the platform detection logic and expands project detection capabilities for the Copilot CLI integration. However, it introduces Windows platform support that conflicts with the project's documented constraints.

Key Changes:

  • Replaced simple command detection with platform-specific match expression for Darwin, Linux, and Windows
  • Added new detection paths and files including .github/instructions directory and various AI assistant instruction files (AGENTS.md, CLAUDE.md, GEMINI.md)
  • Enhanced error handling with explicit JSON_THROW_ON_ERROR flags and added @throws annotations

Comment on lines +39 to +41
Platform::Windows => [
'command' => 'where copilot 2>nul',
],
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of Windows platform detection conflicts with the project's documented constraint that native Windows is not supported (only WSL). According to the README and project guidelines, this package explicitly does not support native Windows. The Windows-specific command 'where copilot 2>nul' should not be added, as it would incorrectly suggest Windows compatibility. Users on Windows should use WSL, which would be detected as Platform::Linux.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +35 to +42
return match ($platform) {
Platform::Darwin, Platform::Linux => [
'command' => 'command -v copilot',
],
Platform::Windows => [
'command' => 'where copilot 2>nul',
],
};
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new platform-specific detection logic lacks test coverage. Tests should be added to verify that Platform::Linux returns 'command -v copilot', and the Windows case should be removed or tested appropriately based on the resolution of the Windows support issue.

Copilot uses AI. Check for mistakes.
Comment on lines 52 to 55
return [
'files' => ['.github/copilot-instructions.md'],
'paths' => ['.github/instructions'],
'files' => ['.github/copilot-instructions.md', '.github/instructions/laravel-boost.instructions.md', 'AGENTS.md', 'CLAUDE.md', 'GEMINI.md'],
];
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new 'paths' key and additional files in the detection configuration lack test coverage. Tests should verify that the projectDetectionConfig includes the '.github/instructions' path and all the newly added files ('.github/instructions/laravel-boost.instructions.md', 'AGENTS.md', 'CLAUDE.md', 'GEMINI.md').

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +54
'paths' => ['.github/instructions'],
'files' => ['.github/copilot-instructions.md', '.github/instructions/laravel-boost.instructions.md', 'AGENTS.md', 'CLAUDE.md', 'GEMINI.md'],
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added detection files ('AGENTS.md', 'CLAUDE.md', 'GEMINI.md') and the '.github/instructions' path are not documented in the README or other documentation. Users should be informed about what these files are for and how they relate to the project detection mechanism, particularly how they differ from the standard '.github/copilot-instructions.md' file.

Copilot uses AI. Check for mistakes.
@kawax
Copy link
Member

kawax commented Dec 20, 2025

There are no plans for native Windows support.

projectDetectionConfig() is really just a hint when installing Boost for the first time. In most cases, users will need to manually select the items they need.

@kawax kawax closed this Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants