-
Notifications
You must be signed in to change notification settings - Fork 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
Support for per-file content exclusion in Rename Suggestions #74903
Support for per-file content exclusion in Rename Suggestions #74903
Conversation
src/EditorFeatures/CSharp/InlineRename/CSharpEditorInlineRenameService.cs
Outdated
Show resolved
Hide resolved
…tk/BetterRenameContentExclusion
LGTM. Thank you, Oleg! |
Could you try to use the latest main and build this branch, and verify rename experience are working? (With Smart Rename on/off) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Should only merge once we validate the change works in VS main
Validated on latest main, with and without smart rename, automatic and non-automatic, in various C# files and various symbol types, looks good. |
To support intelligent Copilot content exclusion we need to associate each piece of context we provide to Rename suggestions with file path this context is coming from.
Switch to the new Editor API (RenameContext has file path property):
Task<IReadOnlyList<string>> GetSuggestionsAsync(ImmutableArray<RenameContext> context, CancellationToken cancellationToken);
from (this one has no file path):
Task<IReadOnlyList<string>> GetSuggestionsAsync(ImmutableDictionary<string, string[]> context, CancellationToken cancellationToken);