chat: restore GitHub issue and PR context attachments - #334544
Merged
Justin Chen (justschen) merged 5 commits intoSep 4, 2026
Conversation
Revert compact inline references for pasted GitHub issue and pull request URLs until attachment rendering is unified. Restore automatic context attachment synchronization in the Agents composer.\n\nRefs #334542\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Megan Rogge (meganrogge)
September 4, 2026 16:28
View session
Alexandru Dima (alexdima)
previously approved these changes
Sep 4, 2026
Keep pasted issue and pull request URLs in the prompt while adding context attachments in regular Chat. Share URL parsing with the Agents composer and preserve undo behavior.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Three moderate URL-matching and link-interaction regressions remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 3
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/sessions/contrib/chat/browser/newChatInput.ts — The trailing word boundary accepts a valid number prefix from an invalid path, so text like… |
|
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts — Keyboard events from a focused request link bubble to this listener. Without excluding anchor… |
|
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts — This only recognizes clicks whose direct target is the anchor. Rich links still mount nested spans… |
What changed in this PR
Restores GitHub issue and pull-request URLs as context attachments while removing temporary compact-reference behavior.
Changes:
- Removes compact-reference parsing, rendering, decoration, and configuration.
- Restores automatic GitHub attachment synchronization.
- Updates paste, attachment lifecycle, and regression tests.
Required fixes:
- Reject invalid issue paths such as
/issues/333845-not-an-issue. - Preserve keyboard activation of request links by excluding anchor targets.
- Detect nested rich-link click targets via their closest anchor.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/common/requestParser/chatRequestParser.test.ts |
Removes compact-reference range tests. |
src/vs/workbench/contrib/chat/test/browser/widget/input/editor/chatPasteProviders.test.ts |
Removes compact GitHub paste cases. |
src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts |
Removes compact-link rendering tests. |
src/vs/workbench/contrib/chat/test/browser/attachments/chatVariables.test.ts |
Removes compact-reference behavior tests. |
src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.ts |
Stops forwarding prompt-text overrides. |
src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.ts |
Simplifies prompt text and dynamic variables. |
src/vs/workbench/contrib/chat/common/model/chatModel.ts |
Restores simple range adjustment. |
src/vs/workbench/contrib/chat/common/constants.ts |
Removes the temporary setting identifier. |
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts |
Adapts callers to restored range updates. |
src/vs/workbench/contrib/chat/common/attachments/chatVariables.ts |
Removes compact-reference metadata. |
src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.ts |
Removes GitHub-specific paste transformation. |
src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.ts |
Removes compact-reference decorations. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Reverts compact-link interaction handling. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.ts |
Removes compact-link rendering support. |
src/vs/workbench/contrib/chat/browser/chat.ts |
Simplifies the paste-target interface. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Removes the temporary configuration. |
src/vs/workbench/contrib/chat/browser/attachments/chatWidgetPasteTarget.ts |
Simplifies inline-reference handling. |
src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.ts |
Removes compact-reference model support. |
src/vs/sessions/contrib/chat/test/browser/newChatInputPaste.test.ts |
Tests attachment paste undo/redo behavior. |
src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts |
Tests GitHub attachment synchronization. |
src/vs/sessions/contrib/chat/common/newChatContextIds.ts |
Adds input-derived GitHub context metadata. |
src/vs/sessions/contrib/chat/browser/newChatInputPasteTarget.ts |
Restores attachment-backed paste handling. |
src/vs/sessions/contrib/chat/browser/newChatInput.ts |
Synchronizes GitHub URLs with attachments. |
src/vs/sessions/contrib/chat/browser/media/chatInput.css |
Removes compact-reference styling. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Aiday Marlen Kyzy (aiday-mar)
previously approved these changes
Sep 4, 2026
Represent pasted GitHub links as generic context so issue and pull request pills render their respective Codicons without generic pasted-content chrome.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
Reject invalid GitHub issue and pull request URL continuations, and keep nested request links keyboard- and pointer-operable when inline request editing is enabled.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wrap the GitHub attachment parser callback so Array.prototype.flatMap does not pass its numeric index into the optional metadata parameter.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sandeep Somavarapu (sandy081)
approved these changes
Sep 4, 2026
Justin Chen (justschen)
deleted the
agents/revert-issue-pr-context-attachment
branch
September 4, 2026 18:54
Megan Rogge (meganrogge)
added a commit
that referenced
this pull request
Sep 5, 2026
* chat: restore GitHub issue and PR context attachments Revert compact inline references for pasted GitHub issue and pull request URLs until attachment rendering is unified. Restore automatic context attachment synchronization in the Agents composer.\n\nRefs #334542\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: attach pasted GitHub links as context Keep pasted issue and pull request URLs in the prompt while adding context attachments in regular Chat. Share URL parsing with the Agents composer and preserve undo behavior.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: use semantic icons for GitHub context Represent pasted GitHub links as generic context so issue and pull request pills render their respective Codicons without generic pasted-content chrome.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: preserve request link interactions Reject invalid GitHub issue and pull request URL continuations, and keep nested request links keyboard- and pointer-operable when inline request editing is enabled.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: avoid forwarding flatMap index as metadata Wrap the GitHub attachment parser callback so Array.prototype.flatMap does not pass its numeric index into the optional metadata parameter.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Megan Rogge (meganrogge)
added a commit
that referenced
this pull request
Sep 5, 2026
…334620) chat: restore GitHub issue and PR context attachments (#334544) * chat: restore GitHub issue and PR context attachments Revert compact inline references for pasted GitHub issue and pull request URLs until attachment rendering is unified. Restore automatic context attachment synchronization in the Agents composer.\n\nRefs #334542\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: attach pasted GitHub links as context Keep pasted issue and pull request URLs in the prompt while adding context attachments in regular Chat. Share URL parsing with the Agents composer and preserve undo behavior.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: use semantic icons for GitHub context Represent pasted GitHub links as generic context so issue and pull request pills render their respective Codicons without generic pasted-content chrome.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chat: preserve request link interactions Reject invalid GitHub issue and pull request URL continuations, and keep nested request links keyboard- and pointer-operable when inline request editing is enabled.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: avoid forwarding flatMap index as metadata Wrap the GitHub attachment parser callback so Array.prototype.flatMap does not pass its numeric index into the optional metadata parameter.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Megan Rogge <merogge@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Fixes #334548
Part of #334542
Summary
chat.pasteGitHubLinksAsReferencessetting and compact-reference serialization/rendering supportValidation
npm run transpile-clientnpm run hygiene./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/attachments/chatVariables.test.ts --run src/vs/workbench/contrib/chat/test/browser/widget/input/editor/chatPasteProviders.test.ts --run src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts --run src/vs/workbench/contrib/chat/test/common/requestParser/chatRequestParser.test.ts --run src/vs/sessions/contrib/chat/test/browser/newChatInputPaste.test.ts --run src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts(120 passing, 1 pending)npm run typecheck-clientwas also attempted, but this checkout is missing Electron andoriginal-fstype dependencies; the resulting errors are repository-wide missing-module errors outside the changed files.Screenshot