Skip to content

Commit 6ce0afc

Browse files
patnikoCopilot
andauthored
docs: add citations guide (#2267)
* docs: add citations guide Add docs/features/citations.md covering the experimental citations surface: enabling `enableCitations` on session create/resume in all six SDKs, reading the `citations` payload from `assistant.message` events, the payload/type reference, how to supply citable material via document attachments or tool `citableSources`, and current limitations. Link the new guide from the features index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c184f59-0104-4a89-a350-4096597a89b3 * docs: address review feedback on citations guide * Fix UTF-16 span offset handling. Python slices by code point and Go and Rust strings are UTF-8, so all three examples now convert the content to UTF-16 code units before slicing. Corrected the accompanying tip, which wrongly implied only non-BMP characters were affected in Go and Rust. * Replace the Rust example's raw JSON dump with a real span-to-source walk using typed_data::<AssistantMessageData>(), matching the other languages. * Fall back through url, path, and id when a CitationSource has no title, in the Java, .NET, Go, Python, and TypeScript examples. * Narrow the image-input.md link descriptions, since that guide covers image attachments rather than document support. * Drop the "(experimental)" suffix from the features index entry; the guide body still carries the experimental warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c184f59-0104-4a89-a350-4096597a89b3 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0c184f59-0104-4a89-a350-4096597a89b3
1 parent 737551b commit 6ce0afc

2 files changed

Lines changed: 444 additions & 0 deletions

File tree

docs/features/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ These guides cover the capabilities you can add to your Copilot SDK application.
1616
| [Skills](./skills.md) | Load reusable prompt modules from directories |
1717
| [Plugin Directories](./plugin-directories.md) | Bundle skills, hooks, MCP servers, and agents as a single loadable plugin |
1818
| [Session limits](./session-limits.md) | Set an AI Credits budget for a session and observe budget events |
19+
| [Citations](./citations.md) | Link assistant responses back to their supporting sources |
1920
| [Image Input](./image-input.md) | Send images to sessions as attachments |
2021
| [Streaming Events](./streaming-events.md) | Subscribe to real-time session events (40+ event types) |
2122
| [Usage and Billing](./usage-and-billing.md) | Read token counts, context-window utilization, AI credit cost, and account quota |

0 commit comments

Comments
 (0)