A developer has finished a public utility function and wants Copilot to draft a documentation comment describing its parameters and return value directly above the function in the editor. Which Copilot capability is the most direct fit for this task?
- APull request summaries, which Copilot writes on GitHub to describe the overall changes in a branch rather than documenting one function inside the editor.
- BAsking Copilot to generate a documentation comment for the function, which it drafts inline or in Chat covering the parameters and the return value. Correct
- CContent exclusions, which restrict which files Copilot may read as context and therefore cannot author a documentation comment above the function for the developer.
- DSeat administration in Copilot Business, which lets an admin assign licences through the REST API but does not draft any documentation for a function.
Why A is wrong: Tempting because summaries are documentation, but they describe a whole pull request on GitHub, not a single function's parameters and return value in the file.
Why B is correct: Correct: Copilot can generate a doc comment for the selected function, describing its parameters and return value, which is exactly the task described.
Why C is wrong: Content exclusions only limit context sources; they perform no authoring and so cannot produce a documentation comment for the function.
Why D is wrong: Seat administration manages licences for an organisation; it has nothing to do with writing a documentation comment for a function in the editor.