Skip to content

[cherry-pick] chat: restore GitHub issue and PR context attachments - #334620

Merged
Megan Rogge (meganrogge) merged 1 commit into
release/1.137from
cherry-pick/334544
Sep 5, 2026
Merged

[cherry-pick] chat: restore GitHub issue and PR context attachments#334620
Megan Rogge (meganrogge) merged 1 commit into
release/1.137from
cherry-pick/334544

Conversation

@vs-code-engineering

@vs-code-engineering vs-code-engineering Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #334544 from main.

Fixes #334548

Part of #334542

Summary

We only want to render Github issues/PRs as attachments when others get special treatment as well.

  • revert the compact inline reference treatment for pasted GitHub issue and pull request URLs
  • restore pasted issue and pull request URLs as context attachments
  • restore automatic GitHub context attachment synchronization in the Agents composer
  • remove the temporary chat.pasteGitHubLinksAsReferences setting and compact-reference serialization/rendering support

Validation

  • npm run transpile-client
  • ./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 (122 passing, 1 pending)

Screenshot

Pasted GitHub issue and pull request URLs retained in the prompt with issue and pull request context pills

Copilot AI balanced review requested due to automatic review settings September 4, 2026 20:56
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Sep 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved merge conflicts, compilation failures, and an attachment replacement bug block approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Restores pasted GitHub issue and pull-request URLs as context attachments while preserving prompt text.

Changes:

  • Creates and synchronizes GitHub URL attachments.
  • Updates attachment rendering and keyboard handling.
  • Adds regression coverage for paste and composer behavior.
File summaries
File Review
src/vs/workbench/contrib/chat/test/browser/widget/input/editor/chatPasteProviders.test.ts Tests GitHub URL paste behavior; no unresolved issue identified.
src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts Critical: Contains unresolved merge markers.
src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.ts Critical: Contains unresolved merge markers in two hunks.
src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputReferenceDecorations.ts Nit: Adds unused compact-reference decoration code that should remain deleted.
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts Critical: References undeclared isAnchorTarget.
src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts Critical: Multiple unresolved conflicts and missing import; moderate: fake deduplication differs from production.
src/vs/sessions/contrib/chat/common/newChatContextIds.ts Adds metadata for input-generated GitHub attachments; no unresolved issue identified.
src/vs/sessions/contrib/chat/browser/newChatInput.ts Critical: Unresolved conflicts prevent compilation; moderate: explicit attachments cannot replace generated attachments with the same ID.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 14
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/sessions/contrib/chat/browser/newChatInput.ts Outdated
Comment thread src/vs/sessions/contrib/chat/browser/newChatInput.ts Outdated
Comment thread src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts Outdated
Comment thread src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts Outdated
Comment thread src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.ts Outdated
Comment thread src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts Outdated
Comment thread src/vs/sessions/contrib/chat/browser/newChatInput.ts
Comment thread src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Paste cancellation handling and accessible attachment announcements remain unresolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread src/vs/sessions/contrib/chat/browser/newChatInput.ts
@meganrogge
Megan Rogge (meganrogge) changed the base branch from release/1.136 to release/1.137 September 5, 2026 00:07
* 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>
@meganrogge
Megan Rogge (meganrogge) merged commit dc5c57a into release/1.137 Sep 5, 2026
40 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the cherry-pick/334544 branch September 5, 2026 02:11
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants