Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Description generation was only available during PR creation. Users editing existing PR descriptions had no way to invoke AI-generated descriptions.

Changes

UI

  • Added sparkle icon to PR description edit textarea (appears when description provider available)
  • Icon toggles to stop-circle during generation with cancellation support
  • CSS positioning matches create PR view pattern

Backend

  • PullRequestOverviewPanel.generateDescription(): Collects commits, file patches, and template; invokes provider
  • Message handlers for pr.generate-description and pr.cancel-generate-description
  • Reuses existing getTitleAndDescriptionProvider() infrastructure

Types

  • DescriptionResult interface for webview messaging
  • PullRequest.generateDescriptionTitle optional property to signal feature availability

Context Collection

const [commits, rawFileChanges] = await Promise.all([
  this._item.getCommits(),
  this._item.getRawFileChangesInfo()
]);

const patches = rawFileChanges
  .filter(file => file.patch !== undefined)
  .map(file => ({
    patch: file.patch!,
    fileUri: vscode.Uri.joinPath(..., file.filename).toString(),
    previousFileUri: file.previous_filename ? ... : undefined
  }));

Feature only displays when a description provider (Copilot, etc.) is registered.

Original prompt

This section details on the original issue you should resolve

<issue_title>Enhancement Request: Enable Description Generation for Existing Pull Requests</issue_title>
<issue_description>## Issue:

Currently, the GitHub support for auto-generating descriptions is available only during the creation of a new pull request. Unfortunately, this feature is not extended to existing pull requests. It would be highly beneficial to incorporate this functionality for pre-existing pull requests as well.

Proposal:

To enhance the user experience and streamline the contribution process, we suggest implementing a feature that allows users to generate descriptions for already existing pull requests. This addition would not only save time but also ensure consistency in documentation across all stages of the pull request lifecycle.

Benefits:

Consistency:

Provides a uniform approach to documentation for both new and existing pull requests.
Time-Saving:

Saves contributors time by eliminating the need to manually create or update pull request descriptions.
Improved Workflow:

Enhances the overall workflow by simplifying the documentation process and reducing potential errors.
Implementation:

Consider adding a button or option within the GitHub interface that triggers the description generation for existing pull requests. This feature could utilize similar logic to the one employed during the creation of new pull requests.

Note:

This improvement aligns with the goal of creating a more efficient and user-friendly environment for collaboration within the GitHub platform.

image

Comments on the Issue (you are @copilot in this section)

@alexr00 Closing as there's not enough interest in this feature. @alexr00 By "not enough interest" I mean that I haven't heard from other users (either from upvotes/comments here, in other GitHub issues, or from folks on the VS Code team) that this is something they want.

If you want to contribute to it, that would be great! However, given that there's limited interested I would not be able to provide a lot of guidance on where to get started. We did discus this a bit, and the UX that sounded good was to have a sparkle that shows in the PR description input box when you use the "Edit Comment" action on the PR description. I think the bulk of the work would actually be to add this UI for a sparkle icon in the PR description input box. </comment_new>
<comment_new>@alexr00
Sure, happy to reopen and see if there's more interest.</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits December 10, 2025 09:47
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
…iption generation

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feature for generating descriptions for existing pull requests Add description generation for existing pull requests Dec 10, 2025
Copilot AI requested a review from alexr00 December 10, 2025 10:15
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.

Enhancement Request: Enable Description Generation for Existing Pull Requests

2 participants