-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Supporting multi ai agent editor #722
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
Conversation
There was a problem hiding this 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 PR adds support for multi-AI agent editing capabilities, allowing users to configure multiple AI assistants simultaneously (e.g., Claude Code Opus 4.1 for planning and GPT-5 Codex for implementation). The changes enable the "/" command to work across different AI tools by initializing multiple AI providers for both Claude Code and VS Code Copilot (Agent Mode).
- Adds multi-selection UI component for choosing multiple AI assistants
- Implements template downloading and merging for multiple AI assistants
- Updates command line interface to accept comma-separated AI assistant values
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # If nothing selected, select current option | ||
| final_selection = [option_keys[selected_index]] | ||
| break |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Enter is pressed with no selections, the code falls back to selecting the current option, but this contradicts the multi-selection purpose. Consider requiring at least one selection or providing a clear indication that the current option will be auto-selected.
| # If nothing selected, select current option | |
| final_selection = [option_keys[selected_index]] | |
| break | |
| # If nothing selected, prompt user to select at least one | |
| console.print("[yellow]Please select at least one option (use Space to select).[/yellow]") | |
| continue |
| # Create project directory only once for the first AI assistant | ||
| if i == 0 and not is_current_dir: | ||
| project_path.mkdir(parents=True) |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project directory creation logic only considers the first AI assistant (i == 0), but if the first AI assistant fails, subsequent assistants won't create the directory. This could cause extraction failures for remaining assistants.
| # Clean up project directory if created and not current directory (only for first AI) | ||
| if i == 0 and not is_current_dir and project_path.exists(): |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cleanup logic in the exception handler only removes the project directory for the first AI assistant (i == 0). If a later AI assistant fails, the partially populated project directory will remain, potentially in an inconsistent state.
| # Clean up project directory if created and not current directory (only for first AI) | |
| if i == 0 and not is_current_dir and project_path.exists(): | |
| # Clean up project directory if created and not current directory | |
| if not is_current_dir and project_path.exists(): |
| all_steps = base_steps[:-2] + chmod_step + base_steps[-2:] | ||
|
|
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded slice indices [:-2] and [-2:] are fragile and assume that base_steps always ends with exactly 2 elements. If the base steps structure changes, this logic could break silently.
| all_steps = base_steps[:-2] + chmod_step + base_steps[-2:] | |
| # Insert "chmod" step before "git" step, regardless of position | |
| all_steps = [] | |
| inserted = False | |
| for key, label in base_steps: | |
| if not inserted and key == "git": | |
| all_steps.extend(chmod_step) | |
| inserted = True | |
| all_steps.append((key, label)) |
|
Thanks for the contribution, @Guo-astro - we're re-working the multi-agent scenario as it will require some additional modifications to the scripts and templates. This is not just about the coding agent files. |
@localden Thanks very much for the clearification , is there a link of issue or PR I can track into? Very happy to learn and comment |
The scenario is: planning with Claude Code Opus 4.1 and implementation with GPT-5 Codex. To enable the “/” command across tools, we need to initialize multiple AI providers so it works in both Claude Code and VS Code Copilot (Agent Mode). Copilot doesn’t expose certain models (e.g., Claude Code Opus 4.1).