Skip to content

Conversation

@Guo-astro
Copy link

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).

@Guo-astro Guo-astro requested a review from localden as a code owner October 3, 2025 01:28
Copilot AI review requested due to automatic review settings October 3, 2025 01:28
Copy link
Contributor

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 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.

Comment on lines +293 to +295
# If nothing selected, select current option
final_selection = [option_keys[selected_index]]
break
Copy link

Copilot AI Oct 3, 2025

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.

Suggested change
# 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

Copilot uses AI. Check for mistakes.
Comment on lines +686 to +688
# Create project directory only once for the first AI assistant
if i == 0 and not is_current_dir:
project_path.mkdir(parents=True)
Copy link

Copilot AI Oct 3, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +757 to +758
# 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():
Copy link

Copilot AI Oct 3, 2025

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.

Suggested change
# 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():

Copilot uses AI. Check for mistakes.
Comment on lines +1202 to +1203
all_steps = base_steps[:-2] + chmod_step + base_steps[-2:]

Copy link

Copilot AI Oct 3, 2025

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.

Suggested change
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))

Copilot uses AI. Check for mistakes.
@localden
Copy link
Collaborator

localden commented Oct 3, 2025

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 localden closed this Oct 3, 2025
@Guo-astro
Copy link
Author

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

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