Make issue links clickable in @githubpr chat output #7707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The @githubpr chat participant was outputting issue numbers like
#7280
as plain text that users couldn't click to navigate to the corresponding GitHub issues or pull requests.This PR implements automatic conversion of issue/PR references in chat output to clickable markdown links. The solution processes chat content in the participant where responses are streamed to users and converts them to proper markdown links using repository context.
Changes Made
Modified
src/lm/participants.ts
:RepositoriesManager
dependency to access repository contextprocessIssueReferences()
method that uses existingfindLinksInIssue
utilitystream.markdown()
for both direct responses and tool outputsModified
src/github/markdownUtils.ts
:findLinksInIssue
function to make it available for reuseModified
src/extension.ts
:ChatParticipant
instantiation to passRepositoriesManager
Features
#7280
,microsoft/vscode#789
, andhttps://github.com/microsoft/vscode/issues/123
#123
use current repository contextExample
Before:
After:
The implementation reuses existing utilities from the codebase and processes references at the correct location where chat responses are streamed to users.
Fixes #7333.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.