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

Support for per-file content exclusion in Rename Suggestions #74903

Merged
merged 9 commits into from
Sep 19, 2024

Conversation

olegtk
Copy link
Contributor

@olegtk olegtk commented Aug 26, 2024

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);

image

@olegtk olegtk requested a review from a team as a code owner August 26, 2024 18:09
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 26, 2024
@dotnet-policy-service dotnet-policy-service bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Aug 26, 2024
global.json Outdated Show resolved Hide resolved
@olegtk olegtk changed the title [WIP] per-file content exclusion Support for per-file content exclusion in Rename Suggestions Sep 5, 2024
@AmadeusW
Copy link
Contributor

LGTM. Thank you, Oleg!

@Cosifne
Copy link
Member

Cosifne commented Sep 13, 2024

Could you try to use the latest main and build this branch, and verify rename experience are working? (With Smart Rename on/off)
Asking this because we used to break the rename function because Lightup helper in public preview. So it would be worthy to make validate the modify light up helper part works before merge

Copy link
Member

@Cosifne Cosifne left a 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

@olegtk
Copy link
Contributor Author

olegtk commented Sep 19, 2024

Validated on latest main, with and without smart rename, automatic and non-automatic, in various C# files and various symbol types, looks good.

@olegtk olegtk closed this Sep 19, 2024
@olegtk olegtk reopened this Sep 19, 2024
@Cosifne Cosifne merged commit 05f09e1 into dotnet:main Sep 19, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants