#222 Fix multi-select for file tabs in editor/title/context commands#341
Open
#222 Fix multi-select for file tabs in editor/title/context commands#341
Conversation
Co-authored-by: JoernBerkefeld <1917227+JoernBerkefeld@users.noreply.github.com> Agent-Logs-Url: https://github.com/Accenture/sfmc-devtools-vscode/sessions/890554e4-99a1-4371-911d-182edd5c095e
Copilot
AI
changed the title
[WIP] #222 Fix multi-select not working for file tabs
#222 Fix multi-select for file tabs in editor/title/context commands
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes context-menu multi-select behavior for file tabs by aligning command handler signatures with VS Code’s actual (clickedUri, allSelectedUris) argument contract, so tab multi-selection is processed the same way as Explorer multi-selection.
Changes:
- Update the command registration wrapper to explicitly accept
(clickedUri?: Uri, allSelectedUris?: Uri[]), merge both inputs, and dedupe paths. - Clarify the
activateMenuCommandsfallback comment to correctly describe theeditor/context(editor body) behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/editor/commands.ts | Adjusts command handler signature to correctly collect all selected tab URIs (plus clicked URI) and deduplicate paths. |
| src/devtools/index.ts | Corrects a comment describing when the “active editor path” fallback applies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Ctrl+Click multi-select on file tabs only processed the right-clicked file — not all selected tabs — while explorer multi-select worked correctly.
Root Cause
registerCommandused...files: VSCode.Uri[]+.flat(), which obscured VS Code's actual two-argument contract for context menu commands:args[0](clickedUri: Uri): right-clicked itemargs[1](allSelectedUris: Uri[]): all Ctrl+Click selected items (passed for bothexplorer/contextandeditor/title/contextsince VS Code 1.82)Changes
src/editor/commands.tsReplaced the implicit rest-param + flatten approach with an explicit two-arg signature matching VS Code's API contract. Merges both args and deduplicates, covering the edge case where
clickedUrimay not appear inallSelectedUris:src/devtools/index.tsCorrected misleading comment in
activateMenuCommands: theactiveTabFilePathfallback applies toeditor/context(right-click inside editor body, no URI passed by VS Code), not to file tabs.Documentation
N/A
Issues
Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.