-
Notifications
You must be signed in to change notification settings - Fork 107
refactor: simplify InstallCommand by consolidating CodeEnvironment handling and removing legacy agents #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ashleyhindle
merged 16 commits into
main
from
ai-53-cleaner-agentide-management-in-installcommand-pair
Aug 12, 2025
Merged
refactor: simplify InstallCommand by consolidating CodeEnvironment handling and removing legacy agents #29
ashleyhindle
merged 16 commits into
main
from
ai-53-cleaner-agentide-management-in-installcommand-pair
Aug 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ndling and removing legacy agents - Removed `Agents` directory and deprecated agent-related classes. - Consolidated IDE and agent selection logic into `CodeEnvironment`. - Implemented MCP installation strategies in `CodeEnvironment`. - Added `McpInstallationStrategy` enum for shell, file, or none-based configurations. - Updated `InstallCommand` to use consolidated `CodeEnvironment` functionality. - Enhanced `CodeEnvironment` with support for MCP installation and guideline paths.
- Removed `Agent` and `Ide` contracts, introducing `CodingAgent` and `McpClient` interfaces. - Updated `CodeEnvironment` subclasses to implement the new contracts. - Renamed and adjusted methods in `CodeEnvironment` for better clarity (`supportsAgent` -> `isCodingAgent`, `supportsIde` -> `isMcpClient`). - Updated `GuidelineWriter` and related tests to use `CodingAgent`. - Simplified `InstallCommand` filtering logic by adopting new contract methods.
…e agent name handling logic
…and remove unused MCP strategies - Replaced `CodingAgent` interface with `Agent` and updated all references. - Removed redundant `mcpInstallationStrategy` and `frontmatter` methods in favor of simplified logic. - Improved `CodeEnvironment` with consolidated detection methods (`isCodingAgent` -> `IsAgent`). - Adjusted related classes, tests, and docblocks for consistency and clarity.
…d for MCP handling - Introduced comprehensive tests for `CodeEnvironment`, covering detection, MCP installation, and interface logic. - Renamed variables in `InstallCommand` for clarity (`selectedTargetIdes` -> `selectedTargetMcpClient`). - Replaced `enact` method in `InstallCommand` with `performInstallation`. - Adjusted MCP installation logic for streamlined and consistent implementation.
…ling - Replaced `ideName` references with `mcpClientName` for clarity. - Updated `InstallCommand` to use specific type hints (`Agent`, `McpClient`) for better consistency and readability. - Added docblocks and exceptions for improved code documentation and error handling. - Adjusted tests to reflect the `McpClient` changes and renamed corresponding test cases. - Minor updates in `VSCode` and contract interfaces to align with the new naming convention.
…ent enum naming convention - Renamed enum cases in `McpInstallationStrategy` to uppercase for standardization. - Updated references across codebase and adjusted related test cases.
…rename methods for consistency - Updated method names in `InstallCommand` to reflect contract-specific responsibilities (`selectTargetIdes` -> `selectTargetMcpClients`). - Introduced `getSelectionConfig` to centralize configuration for contract-based selection. - Standardized `CodeEnvironment` method behaviors (`name()` -> `displayName()`). - Adjusted tests to align with updated method and property names. - Included exception handling for unsupported contract classes.
…method - Replaced `getAllPrograms` with `getCodeEnvironments` for consistency and public access. - Removed the private `getAllPrograms` method in favor of consolidated logic. - Adjusted usage across detection methods to align with the updated method structure.
402dba1
to
b623165
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clean up Agent/IDE Management in InstallCommand
This MR refactors the
InstallCommand
to improve clarity and maintainability around agent and IDE management.Key Changes
Contract Updates:
Ide
interface withMcpClient
interface for better naming clarityAgent
contract withagentName()
method and improved documentation/Install/Agents/
InstallCommand Improvements:
enact()
→performInstallation()
enactGuidelines()
→installGuidelines()
enactMcpServers()
→installMcpServerConfig()
selectCodeEnvironments()
methodCodeEnvironment
approachselectedTargetIdes
→selectedTargetMcpClient
Code Cleanup:
projectInstalledAgents
property and related discovery logicReflectionClass
import and reflection-based codeBenefits