Skip to content

[WIP] Generating VS Code Product Links for Chat Response Turn 2 #7415

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 28, 2025

  • Explore repository structure and understand the codebase
  • Identify the relevant files: src/github/copilotRemoteAgent.ts and src/common/uri.ts
  • Understand how toOpenPullRequestWebviewUri works and is used
  • Locate the chat response creation logic in parseSessionLogsIntoResponseTurn
  • Understand the ChatResponseTurn2 structure and available response parts
  • Implement link generation using toOpenPullRequestWebviewUri in chat response turn 2
  • Add the generated link as a reference part for the active response callback stream
  • Add the generated link as a reference part in parseSessionLogsIntoResponseTurn method
  • Test the implementation with basic URI generation test
  • Ensure the changes compile and lint correctly
  • Complete implementation and validation

Implementation Summary

Successfully implemented VS Code product link generation for chat response turn 2 using toOpenPullRequestWebviewUri. The solution:

  • ✅ Generates PR webview links using the existing utility function
  • ✅ Adds reference parts to both static and streaming chat responses
  • ✅ Targets the last stream session (active response callback stream) as requested
  • ✅ Uses proper error handling and logging
  • ✅ Includes appropriate git-pull-request icon
  • ✅ Maintains backward compatibility
  • ✅ Passes compilation and linting checks

The links are now included as clickable references in chat responses, allowing users to easily navigate to the pull request detail view.

Created from VS Code via the GitHub Pull Request extension.


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

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