From 4f5b0e0319f8ef02606f826dde3fda01a8aa93fc Mon Sep 17 00:00:00 2001 From: Ankita Khera <40616383+akhera99@users.noreply.github.com> Date: Thu, 30 Jul 2026 11:07:47 -0700 Subject: [PATCH 1/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../CopilotGenerateDocumentationCommentManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs b/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs index 8d6650a45f84c..bc9748af9bad5 100644 --- a/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs +++ b/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs @@ -107,7 +107,7 @@ private async Task GenerateAndApplyDocumentationAsync(Document document, // Apply the edit fire-and-forget: returning tears the session down (cancelling the token), so the write // must run afterward and not flow that token. var token = _asyncListener.BeginAsyncOperation(nameof(ApplyDocumentationEditsAsync)); - _ = ApplyDocumentationEditsAsync(textView.TextBuffer, snapshot, edits).CompletesAsyncOperation(token); + _ = ApplyDocumentationEditsAsync(snapshot.TextBuffer, snapshot, edits).CompletesAsyncOperation(token); } private async Task ApplyDocumentationEditsAsync(ITextBuffer buffer, ITextSnapshot snapshot, ImmutableArray edits) From bb8d924782ec6581f1c4feb64faf83aecafe29ac Mon Sep 17 00:00:00 2001 From: Ankita Khera Date: Thu, 30 Jul 2026 11:57:04 -0700 Subject: [PATCH 2/2] remove unused param --- .../CopilotGenerateDocumentationCommentManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs b/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs index bc9748af9bad5..52c6fb1e0d8e3 100644 --- a/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs +++ b/src/EditorFeatures/Core/DocumentationComments/CopilotGenerateDocumentationCommentManager.cs @@ -68,7 +68,7 @@ private async Task ShowGenerateDocumentationPromptAsync(Document document, _inlinePromptService!.Show( textView, caret, - onAcceptAsync: dismissToken => GenerateAndApplyDocumentationAsync(document, snippet, snapshot, textView, dismissToken), + onAcceptAsync: dismissToken => GenerateAndApplyDocumentationAsync(document, snippet, snapshot, dismissToken), new InlinePromptOptions { ProviderName = GenerateDocumentationProviderName, @@ -81,7 +81,7 @@ private async Task ShowGenerateDocumentationPromptAsync(Document document, } private async Task GenerateAndApplyDocumentationAsync(Document document, - DocumentationCommentSnippet snippet, ITextSnapshot snapshot, ITextView textView, CancellationToken cancellationToken) + DocumentationCommentSnippet snippet, ITextSnapshot snapshot, CancellationToken cancellationToken) { // Re-check Copilot availability / file-exclusion at accept time; degrade quietly otherwise. var copilotService = await IsGenerateDocumentationAvailableAsync(document, snippet.MemberNode, cancellationToken).ConfigureAwait(false);