// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Agents.AI.DurableTask;
///
/// Handler for processing responses from the agent. This is typically used to send messages to the user.
///
public interface IAgentResponseHandler
{
///
/// Handles a streaming response update from the agent. This is typically used to send messages to the user.
///
///
/// The stream of messages from the agent.
///
///
/// Signals that the operation should be cancelled.
///
ValueTask OnStreamingResponseUpdateAsync(
IAsyncEnumerable messageStream,
CancellationToken cancellationToken);
///
/// Handles a discrete response from the agent. This is typically used to send messages to the user.
///
///
/// The message from the agent.
///
///
/// Signals that the operation should be cancelled.
///
ValueTask OnAgentResponseAsync(
AgentResponse message,
CancellationToken cancellationToken);
}