Skip to content

Add inline 'Create pull request' confirmation for completed tasks without PRs#319629

Merged
osortega merged 7 commits into
mainfrom
osortega/agents/autopilot-button-implementation
Jun 5, 2026
Merged

Add inline 'Create pull request' confirmation for completed tasks without PRs#319629
osortega merged 7 commits into
mainfrom
osortega/agents/autopilot-button-implementation

Conversation

@osortega
Copy link
Copy Markdown
Contributor

@osortega osortega commented Jun 2, 2026

Introduce an inline confirmation button for creating pull requests after tasks complete without one. This change enhances user experience by allowing users to opt-in for PR creation directly from the task history.

Copilot AI review requested due to automatic review settings June 2, 2026 17:50
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

Adds an inline, opt-in “Create pull request” confirmation at the end of v2 Task API session history when a task completes without an attached PR, and wires a new backend API call to materialize the PR on demand.

Changes:

  • Extend the v2 task backend surface with createPullRequestForTask(...) and disable auto-PR creation on task creation (create_pull_request: false).
  • Append a ChatResponseConfirmationPart (“Create pull request”) to completed/idle PR-less task histories and route its click handling via a new kind: 'create-pr' confirmation discriminator.
  • Add tests covering the inline confirmation rendering, create-PR delegation plumbing, URL repo parsing, and confirmation metadata validation/back-compat.
Show a summary per file
File Description
src/vs/monaco.d.ts Minor doc alignment for folding markers comment.
extensions/copilot/src/extension/chatSessions/vscode/cloudAgentBackend.ts Adds v2 backend API shape for creating PRs after task completion.
extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCloudSessionsProvider.spec.ts Adds tests for inline create-PR confirmation, backend behavior, URL parsing, and metadata validation.
extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts Disables auto-PR creation on task create and implements createPullRequestForTask; exports parseRepoFromTaskUrl.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts Adds create-PR confirmation discriminator routing + handler and passes inline create-PR context into history building.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts Appends the inline “Create pull request” confirmation to task history when appropriate.
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts Updates delegation metadata to include kind: 'delegation'.

Copilot's findings

  • Files reviewed: 6/7 changed files
  • Comments generated: 4

@stasyu2009-ux
Copy link
Copy Markdown

const prInfo = await this.cloudSessionProvider.delegate(request, stream, context, token, {
prompt: request.prompt,
chatContext: context,
kind: 'delegationConfirmation' // Add this line
}); Додати код та запустити заново а там все я сам зробив

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.

Copilot's findings

  • Files reviewed: 11/12 changed files
  • Comments generated: 5

Comment thread extensions/copilot/src/extension/chatSessions/vscode-node/taskApiBackend.ts Outdated
Comment thread extensions/copilot/src/extension/chatSessions/vscode/cloudAgentBackend.ts Outdated
Comment thread extensions/copilot/src/extension/chatSessions/vscode-node/pullArtifactResolver.ts Outdated
@osortega osortega marked this pull request as ready for review June 5, 2026 21:10
@osortega osortega enabled auto-merge (squash) June 5, 2026 21:10
@osortega osortega merged commit 373aead into main Jun 5, 2026
25 checks passed
@osortega osortega deleted the osortega/agents/autopilot-button-implementation branch June 5, 2026 21:29
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 5, 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.

4 participants