Skip to content

Add File to Chat" does nothing when right-clicking a non-active editor tab - #315197

Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
microsoft:mainfrom
damonxue:patch-1
May 8, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 3 commits into
microsoft:mainfrom
damonxue:patch-1

Conversation

@damonxue

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings May 8, 2026 07:18

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.

Pull request overview

Fixes the Chat “Add File to Chat” editor-tab context menu action so it correctly attaches the file from the right-clicked (non-active) editor tab by forwarding the command arguments properly into editor context resolution.

Changes:

  • Passes _getResources rest arguments through to _getEditorResources using spread (...args) to avoid nesting and ensure resolveCommandsContext receives the expected shape.

@justschen Justin Chen (justschen) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!!

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) enabled auto-merge (squash) May 8, 2026 22:52
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 7eb62d2 into microsoft:main May 8, 2026
26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 2026
@damonxue
DamonXue (damonxue) deleted the patch-1 branch May 9, 2026 10:51
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants