Skip to content

refactor(copilotcli): enhance session handling with branch name generation#308956

Merged
DonJayamanne merged 1 commit intomainfrom
don/practical-amphibian
Apr 10, 2026
Merged

refactor(copilotcli): enhance session handling with branch name generation#308956
DonJayamanne merged 1 commit intomainfrom
don/practical-amphibian

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 10, 2026 06:30
@DonJayamanne DonJayamanne self-assigned this Apr 10, 2026
@DonJayamanne DonJayamanne force-pushed the don/practical-amphibian branch from 24777bb to 710422d Compare April 10, 2026 06:32
Copy link
Copy Markdown
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

Refactors the Copilot CLI chat session flow to optionally generate an AI-suggested git branch name for new sessions and plumb it into folder/worktree initialization, gated by configuration.

Changes:

  • Adds an optional GitBranchNameGenerator dependency to the Copilot CLI session participant (V1) and forwards a newBranch promise into folder/worktree initialization.
  • Wires up the branch name generator in the Copilot CLI services registration (V1) when chat.cli.aiGenerateBranchNames.enabled is enabled.
  • Updates unit tests to account for the new constructor parameter.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts Generates/forwards an AI branch name during session creation and passes it into folder repository initialization.
extensions/copilot/src/extension/chatSessions/vscode-node/chatSessions.ts Conditionally instantiates and injects GitBranchNameGenerator into the V1 participant based on configuration.
extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts Updates test instantiations/import ordering for the participant’s new constructor signature.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

@DonJayamanne DonJayamanne marked this pull request as ready for review April 10, 2026 06:49
@DonJayamanne DonJayamanne enabled auto-merge (squash) April 10, 2026 06:49
@DonJayamanne DonJayamanne merged commit e8b4191 into main Apr 10, 2026
26 checks passed
@DonJayamanne DonJayamanne deleted the don/practical-amphibian branch April 10, 2026 06:56
@vs-code-engineering vs-code-engineering Bot added this to the 1.116.0 milestone Apr 10, 2026
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.

3 participants