-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix duplicated Fix with Assistant
code actions
#22911
Merged
Merged
Conversation
This file contains 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
cla-bot
bot
added
the
cla-signed
The user has signed the Contributor License Agreement
label
Jan 9, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 13, 2025
This PR is a follow-up to #22911 to further improve the registration of code action providers for the Assistant in order to prevent duplicates. The `CodeActionProvider` trait now has an `id` method that is used to return a unique ID for a code action provider. We use this to prevent registering duplicates of the same provider. The registration of the code action providers for Assistant1 and Assistant2 have also been reworked. Previously we were not call the registration function—and thus setting up the subscriptions—until we resolved the feature flags. However, this could lead to the registration happening too late for existing workspace items. We now perform the registration right away and then remove the undesired code action providers once the feature flags have been resolved. Release Notes: - N/A
/cherry-pick v0.169.x |
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Jan 14, 2025
This PR fixes the duplicated `Fix with Assistant` code actions that were being shown in the code actions menu. This fix isn't 100% ideal, as there is an edge case in buffers that are already open when the workspace loads, as we may not observe the feature flags in time to register the code action providers by the time we receive the event that an item was added to the workspace. Closes #22400. Release Notes: - Fixed duplicate "Fix with Assistant" entries showing in the code action list.
SomeoneToIgnore
pushed a commit
that referenced
this pull request
Jan 14, 2025
…#23118) Cherry-picked Fix duplicated `Fix with Assistant` code actions (#22911) This PR fixes the duplicated `Fix with Assistant` code actions that were being shown in the code actions menu. This fix isn't 100% ideal, as there is an edge case in buffers that are already open when the workspace loads, as we may not observe the feature flags in time to register the code action providers by the time we receive the event that an item was added to the workspace. Closes #22400. Release Notes: - Fixed duplicate "Fix with Assistant" entries showing in the code action list. Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Jan 14, 2025
This PR is a follow-up to #22911 to further improve the registration of code action providers for the Assistant in order to prevent duplicates. The `CodeActionProvider` trait now has an `id` method that is used to return a unique ID for a code action provider. We use this to prevent registering duplicates of the same provider. The registration of the code action providers for Assistant1 and Assistant2 have also been reworked. Previously we were not call the registration function—and thus setting up the subscriptions—until we resolved the feature flags. However, this could lead to the registration happening too late for existing workspace items. We now perform the registration right away and then remove the undesired code action providers once the feature flags have been resolved. Release Notes: - N/A
SomeoneToIgnore
pushed a commit
that referenced
this pull request
Jan 14, 2025
…23099) (#23136) Cherry-picked Improve registration for Assistant code action providers (#23099) This PR is a follow-up to #22911 to further improve the registration of code action providers for the Assistant in order to prevent duplicates. The `CodeActionProvider` trait now has an `id` method that is used to return a unique ID for a code action provider. We use this to prevent registering duplicates of the same provider. The registration of the code action providers for Assistant1 and Assistant2 have also been reworked. Previously we were not call the registration function—and thus setting up the subscriptions—until we resolved the feature flags. However, this could lead to the registration happening too late for existing workspace items. We now perform the registration right away and then remove the undesired code action providers once the feature flags have been resolved. Release Notes: - N/A Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
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.
This PR fixes the duplicated
Fix with Assistant
code actions that were being shown in the code actions menu.This fix isn't 100% ideal, as there is an edge case in buffers that are already open when the workspace loads, as we may not observe the feature flags in time to register the code action providers by the time we receive the event that an item was added to the workspace.
Closes #22400.
Release Notes: