Skip to content

Remove UserInputRequests methods - #70

Merged
qmuntal merged 2 commits into
mainfrom
dev/qmuntal/remuir
Feb 5, 2026
Merged

Remove UserInputRequests methods#70
qmuntal merged 2 commits into
mainfrom
dev/qmuntal/remuir

Conversation

@qmuntal

@qmuntal qmuntal commented Feb 5, 2026

Copy link
Copy Markdown
Member

It doesn't add any value, as demonstrated by the examples changes in this PR. .NET just remove it in microsoft/agent-framework#3682.

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.

Pull request overview

This PR removes the UserInputRequests() methods from the Message, Response, ResponseUpdate, and Contents types, replacing them with a more generic Contents() method on the Response type. The motivation is to simplify the API, as demonstrated by the updated examples and alignment with the .NET implementation.

Changes:

  • Removed filtering helper methods (UserInputRequests()) that only returned FunctionApprovalRequestContent items
  • Added a generic Contents() method on Response that returns all content types
  • Updated example code to iterate over all contents and filter for the desired type

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
message/content.go Removed UserInputRequests() method from Contents type and unused iter import
message/message.go Removed UserInputRequests() from Message and ResponseUpdate; added generic Contents() method to Response
examples/getting_started/azure_openai/step04_using_function_tools_with_approvals/main.go Updated to use Contents() instead of UserInputRequests()
examples/getting_started/agent/step04_using_function_tools_with_approvals/main.go Updated to use Contents() instead of UserInputRequests()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/getting_started/agent/step04_using_function_tools_with_approvals/main.go Outdated
@qmuntal
qmuntal enabled auto-merge (squash) February 5, 2026 15:57
@qmuntal
qmuntal merged commit 5bd85c7 into main Feb 5, 2026
4 checks passed
@qmuntal
qmuntal deleted the dev/qmuntal/remuir branch February 5, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants