Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand All @@ -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);
Comment thread
akhera99 marked this conversation as resolved.
}

private async Task ApplyDocumentationEditsAsync(ITextBuffer buffer, ITextSnapshot snapshot, ImmutableArray<DocumentationCommentEdit> edits)
Expand Down
Loading