mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Fix lists in XML comments so they render properly in the documentation. (#1113)
* fix lists in XML comments so they render properly in documentation. * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/Extensions/A2ACardResolverExtensions.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> * Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs Co-authored-by: Stephen Toub <stoub@microsoft.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
b1282254df
commit
56beb52124
@@ -14,16 +14,19 @@ namespace Microsoft.Agents.AI.A2A;
|
||||
/// <remarks>
|
||||
/// This implementation only handles:
|
||||
/// <list type="bullet">
|
||||
/// <item><code>TaskManager.OnMessageReceived</code></item>
|
||||
/// <item><code>TaskManager.OnAgentCardQuery</code></item>
|
||||
/// <item><description>TaskManager.OnMessageReceived</description></item>
|
||||
/// <item><description>TaskManager.OnAgentCardQuery</description></item>
|
||||
/// </list>
|
||||
/// Support for task management will be added later as part of the long-running task execution work.
|
||||
/// </remarks>
|
||||
public sealed class A2AHostAgent
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the SemanticKernelTravelAgent
|
||||
/// Initializes a new instance of the <see cref="A2AHostAgent"/> class.
|
||||
/// </summary>
|
||||
/// <param name="agent">The <see cref="AIAgent"/> to host.</param>
|
||||
/// <param name="agentCard">The <see cref="AgentCard"/> for the hosted agent.</param>
|
||||
/// <param name="taskManager">The <see cref="ITaskManager"/> for handling agent tasks.</param>
|
||||
public A2AHostAgent(AIAgent agent, AgentCard agentCard, TaskManager? taskManager = null)
|
||||
{
|
||||
Throw.IfNull(agent);
|
||||
@@ -36,19 +39,19 @@ public sealed class A2AHostAgent
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The associated <see cref="AIAgent"/>
|
||||
/// Gets the associated <see cref="AIAgent"/>.
|
||||
/// </summary>
|
||||
public AIAgent? Agent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The associated <see cref="ITaskManager"/>
|
||||
/// Gets the associated <see cref="ITaskManager"/> for handling agent tasks.
|
||||
/// </summary>
|
||||
public TaskManager? TaskManager { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Attach the <see cref="A2AAgent"/> to the provided <see cref="ITaskManager"/>
|
||||
/// Attaches the <see cref="A2AAgent"/> to the provided <see cref="ITaskManager"/>.
|
||||
/// </summary>
|
||||
/// <param name="taskManager"></param>
|
||||
/// <param name="taskManager">The <see cref="ITaskManager"/> to attach to.</param>
|
||||
public void Attach(TaskManager taskManager)
|
||||
{
|
||||
Throw.IfNull(taskManager);
|
||||
@@ -59,9 +62,9 @@ public sealed class A2AHostAgent
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle a received message
|
||||
/// Handles a received message.
|
||||
/// </summary>
|
||||
/// <param name="messageSend">The <see cref="MessageSendParams"/> to handle</param>
|
||||
/// <param name="messageSend">The <see cref="MessageSendParams"/> to handle.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
|
||||
public async Task<Message> OnMessageReceivedAsync(MessageSendParams messageSend, CancellationToken cancellationToken = default)
|
||||
{
|
||||
@@ -89,9 +92,9 @@ public sealed class A2AHostAgent
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the <see cref="AgentCard"/> associated with this hosted agent.
|
||||
/// Gets the <see cref="AgentCard"/> associated with this hosted agent.
|
||||
/// </summary>
|
||||
/// <param name="agentUrl">Current URL for the agent</param>
|
||||
/// <param name="agentUrl">Current URL for the agent.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
|
||||
public Task<AgentCard> GetAgentCardAsync(string agentUrl, CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
@@ -29,10 +29,10 @@ public static class A2ACardResolverExtensions
|
||||
/// Retrieves an instance of <see cref="AIAgent"/> for an existing A2A agent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method can be used to create AI agents for A2A agents whose hosts support one of the A2A discovery mechanisms:
|
||||
/// Creates an AI agent for an A2A agent whose host supports one of the A2A discovery mechanisms:
|
||||
/// <list type="bullet">
|
||||
/// <item><see href="https://github.com/a2aproject/A2A/blob/main/docs/topics/agent-discovery.md#1-well-known-uri">Well-Known URI</see></item>
|
||||
/// <item><see href="https://github.com/a2aproject/A2A/blob/main/docs/topics/agent-discovery.md#2-curated-registries-catalog-based-discovery">Curated Registries (Catalog-Based Discovery)</see></item>
|
||||
/// <item><description><see href="https://github.com/a2aproject/A2A/blob/main/docs/topics/agent-discovery.md#1-well-known-uri">Well-Known URI</see></description></item>
|
||||
/// <item><description><see href="https://github.com/a2aproject/A2A/blob/main/docs/topics/agent-discovery.md#2-curated-registries-catalog-based-discovery">Curated Registries (Catalog-Based Discovery)</see></description></item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
/// <param name="resolver">The <see cref="A2ACardResolver" /> to use for the agent creation.</param>
|
||||
|
||||
@@ -24,13 +24,13 @@ public static partial class AgentAbstractionsJsonUtilities
|
||||
/// <para>
|
||||
/// It additionally turns on the following settings:
|
||||
/// <list type="number">
|
||||
/// <item>Enables <see cref="JsonSerializerDefaults.Web"/> defaults.</item>
|
||||
/// <item>Enables <see cref="JsonIgnoreCondition.WhenWritingNull"/> as the default ignore condition for properties.</item>
|
||||
/// <item>Enables <see cref="JsonNumberHandling.AllowReadingFromString"/> as the default number handling for number types.</item>
|
||||
/// <item>
|
||||
/// <item><description>Enables <see cref="JsonSerializerDefaults.Web"/> defaults.</description></item>
|
||||
/// <item><description>Enables <see cref="JsonIgnoreCondition.WhenWritingNull"/> as the default ignore condition for properties.</description></item>
|
||||
/// <item><description>Enables <see cref="JsonNumberHandling.AllowReadingFromString"/> as the default number handling for number types.</description></item>
|
||||
/// <item><description>
|
||||
/// Enables <see cref="JavaScriptEncoder.UnsafeRelaxedJsonEscaping"/> when escaping JSON strings.
|
||||
/// Consuming applications must ensure that JSON outputs are adequately escaped before embedding in other document formats, such as HTML and XML.
|
||||
/// </item>
|
||||
/// </description></item>
|
||||
/// </list>
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
||||
@@ -80,8 +80,8 @@ public class ChatClientAgentThread : AgentThread
|
||||
/// <para>
|
||||
/// This property may be null in the following cases:
|
||||
/// <list type="bullet">
|
||||
/// <item>The thread stores messages via the <see cref="ChatMessageStore"/> and not in the agent service.</item>
|
||||
/// <item>This thread object is new and a server managed thread has not yet been created in the agent service.</item>
|
||||
/// <item><description>The thread stores messages via the <see cref="ChatMessageStore"/> and not in the agent service.</description></item>
|
||||
/// <item><description>This thread object is new and a server managed thread has not yet been created in the agent service.</description></item>
|
||||
/// </list>
|
||||
/// </para>
|
||||
/// <para>
|
||||
@@ -124,8 +124,8 @@ public class ChatClientAgentThread : AgentThread
|
||||
/// <para>
|
||||
/// This property may be null in the following cases:
|
||||
/// <list type="bullet">
|
||||
/// <item>The thread stores messages in the agent service and just has an id to the remove thread, instead of in an <see cref="ChatMessageStore"/>.</item>
|
||||
/// <item>This thread object is new it is not yet clear whether it will be backed by a server managed thread or an <see cref="ChatMessageStore"/>.</item>
|
||||
/// <item><description>The thread stores messages in the agent service and just has an id to the remove thread, instead of in an <see cref="ChatMessageStore"/>.</description></item>
|
||||
/// <item><description>This thread object is new it is not yet clear whether it will be backed by a server managed thread or an <see cref="ChatMessageStore"/>.</description></item>
|
||||
/// </list>
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
||||
Reference in New Issue
Block a user