Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions cannot contribute to scm/resourceState/context if the SCM provider is in another extension host #242003

Open
a-stewart opened this issue Feb 26, 2025 · 0 comments
Assignees

Comments

@a-stewart
Copy link
Contributor

This is a bit of a niche one but something that may become more prevalent as extension hosts are used more.

If an extension is in a different host to the SCM provider and wants to contribute to the context menu for files in SCM (something that can reasonably be done with no knowledge of the SCM system), when that command is called the vscode.SourceControlResourceState that is passed in is invalid.

For example, the state might look something like this:

Image

When in the same host as the SCM extension, this is resolved into the instance of the vscode.SourceControlResourceState that the SCM extension creates, so it works fine for the SCM extension itself which can get the exact implementation that it creates.

For other extensions though, would it be possible to create the raw SCM state?

Or even just passing the vscode.Uri would be enough.

It is possible for extensions to add to the right clock context of a file via the explorer/context contribution point. It would be great if the same items could be contributed via the scm/resourceState/context contribution point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants