Skip to content

Adopt editor InlinePromptService for documentation comments#84282

Draft
cdblake1 wants to merge 2 commits into
dotnet:mainfrom
cdblake1:dev/calebblake/inlineprompt-doc-comment
Draft

Adopt editor InlinePromptService for documentation comments#84282
cdblake1 wants to merge 2 commits into
dotnet:mainfrom
cdblake1:dev/calebblake/inlineprompt-doc-comment

Conversation

@cdblake1

@cdblake1 cdblake1 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Replaces the grey-text SuggestionService UX for Copilot documentation-comment generation with the editor's InlinePrompt chip. Typing /// above a member shows a Tab to generate documentation chip; accepting it generates the comment and writes it to the buffer.

CSharpGenDocComments

Changes

  • Remove the grey-text path (CopilotGenerateDocumentationCommentProvider, DocumentationCommentSuggestion, StartSuggestionSession).
  • Extract an editor-agnostic generation core into the Features layer (CopilotDocumentationCommentGenerator, DocumentationCommentEdit) shared by the chip-accept path.
  • Show the chip only when Copilot is available, the generate-documentation option is enabled, and the file is not Copilot-excluded.
  • Localize the chip accept text; move the provider id to a constant.
  • Add tests (InlinePrompt, ApplyEdits, generator) and editor package uptake to consume InlinePromptServiceBase.

Notes

  • Draft / prototype.
  • The eng/Packages.props VS-package version bumps are the editor-uptake values used for local validation, not final coordinated versions.

@cdblake1 cdblake1 requested review from a team as code owners June 25, 2026 16:28
@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 Jun 25, 2026
@cdblake1 cdblake1 changed the title Prototype: adopt editor InlinePromptService for doc comments [Demo Jun 25, 2026
@cdblake1 cdblake1 changed the title [Demo [WIP] Consuming InlinePromptService in CopilotGenerateDocumentation Jun 25, 2026
Replace the grey-text SuggestionService UX for Copilot documentation-comment
generation with the editor's InlinePrompt chip: typing `///` shows a
"Tab to generate documentation" chip, and accepting it generates the comment
and writes it to the buffer.

- Remove the grey-text path (CopilotGenerateDocumentationCommentProvider,
  DocumentationCommentSuggestion, StartSuggestionSession).
- Extract an editor-agnostic generation core into the Features layer
  (CopilotDocumentationCommentGenerator, DocumentationCommentEdit) shared by
  the chip-accept path.
- Show the chip only when Copilot is available, the generate-documentation
  option is enabled, and the file is not Copilot-excluded.
- Localize the chip accept text; move the provider id to a constant.
- Add tests (InlinePrompt, ApplyEdits, generator) and editor package uptake
  to consume InlinePromptServiceBase.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cdblake1 cdblake1 force-pushed the dev/calebblake/inlineprompt-doc-comment branch from 9e367b4 to c496f25 Compare June 29, 2026 23:06
@cdblake1 cdblake1 marked this pull request as draft June 29, 2026 23:07
@cdblake1 cdblake1 changed the title [WIP] Consuming InlinePromptService in CopilotGenerateDocumentation Adopt editor InlinePromptService for documentation comments Jun 29, 2026
Comment thread eng/Packages.props Outdated
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="$(SystemThreadingTasksDataflowVersion)" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
<PackageVersion Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" />
<PackageVersion Include="System.ValueTuple" Version="4.6.2" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted and the change should be made in Versions.props

@@ -918,4 +945,8 @@
<value>Chat limit reached, [upgrade now] or wait for the limit to reset.</value>
<comment>The text surrounded by "[" and "]" characters will be hyperlinked. Please ensure the localized text still has "[" and "]" characters.</comment>
</data>
<data name="Generate_documentation" xml:space="preserve">
<value>generate documentation</value>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<value>generate documentation</value>
<value>Generate documentation</value>

@cdblake1

cdblake1 commented Jul 1, 2026

Copy link
Copy Markdown
Author

@cdblake1 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree company="Microsoft"

…prompt-doc-comment

# Conflicts:
#	eng/Packages.props
#	eng/Version.Details.props
#	src/EditorFeatures/TestUtilities/EditorTestCompositions.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community The pull request was submitted by a contributor who is not a Microsoft employee. VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants