.NET: [BREAKING] Remove UserInputRequests property (#3682)

* Remove UserInputRequests property

* Fix formatting issue.
This commit is contained in:
westey
2026-02-05 12:07:07 +00:00
committed by GitHub
Unverified
parent eaad042241
commit aa88195dcd
11 changed files with 92 additions and 186 deletions
@@ -6,7 +6,6 @@ using System.Buffers;
#endif
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#if NET
using System.Text;
@@ -125,21 +124,6 @@ public class AgentResponse
[JsonIgnore]
public string Text => this._messages?.ConcatText() ?? string.Empty;
/// <summary>
/// Gets all user input requests present in the response messages.
/// </summary>
/// <value>
/// An enumerable collection of <see cref="UserInputRequestContent"/> instances found
/// across all messages in the response.
/// </value>
/// <remarks>
/// User input requests indicate that the agent is asking for additional information
/// from the user before it can continue processing. This property aggregates all such
/// requests across all messages in the response.
/// </remarks>
[JsonIgnore]
public IEnumerable<UserInputRequestContent> UserInputRequests => this._messages?.SelectMany(x => x.Contents).OfType<UserInputRequestContent>() ?? [];
/// <summary>
/// Gets or sets the identifier of the agent that generated this response.
/// </summary>
@@ -4,7 +4,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text.Json.Serialization;
using Microsoft.Extensions.AI;
using Microsoft.Shared.Diagnostics;
@@ -95,13 +94,6 @@ public class AgentResponseUpdate
[JsonIgnore]
public string Text => this._contents is not null ? this._contents.ConcatText() : string.Empty;
/// <summary>Gets the user input requests associated with the response.</summary>
/// <remarks>
/// This property concatenates all <see cref="UserInputRequestContent"/> instances in the response.
/// </remarks>
[JsonIgnore]
public IEnumerable<UserInputRequestContent> UserInputRequests => this._contents?.OfType<UserInputRequestContent>() ?? [];
/// <summary>Gets or sets the agent run response update content items.</summary>
[AllowNull]
public IList<AIContent> Contents