Uh oh!
There was an error while loading. Please reload this page.
.NET: [BREAKING] Remove UserInputRequests property - #3682
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request removes the UserInputRequests convenience property from AgentResponse and AgentResponseUpdate classes, requiring users to manually filter content for user input requests. This breaking change addresses feedback from issue #2541, where there wasn't clear consensus on what constitutes a user input request.
Changes:
- Removed
UserInputRequestsproperty fromAgentResponseandAgentResponseUpdateclasses - Removed unused
System.Linqimports from abstraction files - Updated all sample code to use explicit filtering with
SelectMany(m => m.Contents).OfType<T>() - Removed associated unit tests for the deleted properties
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs | Removed UserInputRequests property and unused System.Linq import |
| dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs | Removed UserInputRequests property and unused System.Linq import |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs | Removed unit tests for deleted UserInputRequests property |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs | Removed unit tests for deleted UserInputRequests property |
| dotnet/samples/M365Agent/AFAgentApplication.cs | Updated to use explicit filtering for function approval requests with updated comments |
| dotnet/samples/GettingStarted/ModelContextProtocol/ResponseAgent_Hosted_MCP/Program.cs | Updated to filter MCP tool approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/Program.cs | Updated to filter MCP tool approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step12_Middleware/Program.cs | Updated middleware to filter function approval requests explicitly |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step04_UsingFunctionToolsWithApprovals/Program.cs | Updated to filter function approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/Agents/Agent_Step14_Middleware/Program.cs | Updated middleware to filter function approval requests explicitly |
| dotnet/samples/GettingStarted/Agents/Agent_Step04_UsingFunctionToolsWithApprovals/Program.cs | Updated to filter function approval requests explicitly, using explicit types |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation and Context
Updating based on review feedback: #2541
Description
Contribution Checklist