-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.NET: Add ability to mark the source of Agent request messages and use that for filtering #3540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,106 @@ | ||||||||||||||||||||||
| // Copyright (c) Microsoft. All rights reserved. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| using System; | ||||||||||||||||||||||
| using Microsoft.Extensions.AI; | ||||||||||||||||||||||
|
||||||||||||||||||||||
| using Microsoft.Extensions.AI; |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary currently describes AgentRequestMessageSource as an "enumeration", but this type is implemented as a sealed class; consider updating the wording to avoid confusion for consumers and keep documentation aligned with the implementation.
| /// An enumeration representing the source of an agent request message. | |
| /// </summary> | |
| /// <remarks> | |
| /// Input messages for a specific agent run can originate from various sources. | |
| /// This enumeration helps to identify whether a message came from outside the agent pipeline, | |
| /// Represents the source of an agent request message. | |
| /// </summary> | |
| /// <remarks> | |
| /// Input messages for a specific agent run can originate from various sources. | |
| /// This type helps to identify whether a message came from outside the agent pipeline, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing
InvokingAsyncfrom an abstract method to a non-virtual wrapper over the new protectedInvokingCoreAsyncis an API surface change that breaks existing derived implementations (both at compile-time and potentially at runtime for pre-compiled consumers). This likely needs to be treated and documented as a breaking change (including updating release notes / PR title), and guidance should be provided to external implementers on how to migrate their overrides toInvokingCoreAsync.