Skip to content

Fix copilotprovider citations godoc: field is on SessionConfig - #1146

Open
PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:fix/copilot-godoc-enablecitations
Open

PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanaveFork:fix/copilot-godoc-enablecitations

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

The comment above the citation-surfacing code says native citations are enabled via AgentConfig.EnableCitations, but AgentConfig has no such field (only the embedded agent.Config, SessionConfig, and Instructions). The flag actually lives on the Copilot SDK SessionConfig — copied through as EnableCitations: source.EnableCitations where source is a *copilot.SessionConfig. So the setting is AgentConfig.SessionConfig.EnableCitations.

Comment-only fix.

The comment said native citations are enabled via AgentConfig.EnableCitations,
but AgentConfig has no such field; the flag lives on
AgentConfig.SessionConfig.EnableCitations (the Copilot SDK SessionConfig).
Correct the reference.
Copilot AI lite review requested due to automatic review settings September 22, 2026 03:10
@github-actions github-actions Bot added area:provider Changes files in the provider area area:provider/copilot Changes files in the provider / copilot area size:small At most 30 changed lines across at most 2 files labels Sep 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Comment-only correction accurately reflects the existing AgentConfig.SessionConfig.EnableCitations configuration path.

Review effort: Lite
Findings: None

What changed in this PR

Updates an in-code comment in the Copilot provider to correctly document how native model citations are enabled, aligning the godoc-style guidance with the actual AgentConfig structure used by the provider.

Changes:

  • Corrects the comment to reference AgentConfig.SessionConfig.EnableCitations (rather than a non-existent AgentConfig.EnableCitations).
  • Improves comment readability by wrapping it across lines.
File Description
provider/​copilotprovider/​copilot.go Fixes comment to accurately describe the configuration field controlling citation surfacing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Scope: internal-only (documentation/comment fix)

Changed Go contract: None — this PR only corrects a Go comment/godoc string in provider/copilotprovider/copilot.go (line pointing to AgentConfig.EnableCitations is corrected to AgentConfig.SessionConfig.EnableCitations). No exported identifiers, signatures, defaults, or runtime behavior are changed.

Upstream evidence reviewed: Not applicable — no upstream comparison is needed since no public API or observable behavior changed.

Result: out of scope. This is a comment-only documentation fix with no cross-repo parity implications.

Generated by Go API Consistency Review Agent · copilot · auto · 12.4 AIC · ⌖ 5.08 AIC · ⊞ 9.2K ·

@github-actions github-actions Bot added the kind:docs Changes documentation or comments label Sep 22, 2026

@qmuntal Quim Muntal (qmuntal) left a comment

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.

Thanks. Please don't submit single-line comment changes. Batch all the doc updates into a single PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:provider/copilot Changes files in the provider / copilot area area:provider Changes files in the provider area kind:docs Changes documentation or comments size:small At most 30 changed lines across at most 2 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants