Fix PR comments

This commit is contained in:
Peter Ibekwe
2026-03-02 14:16:58 -08:00
Unverified
parent d685b1ce10
commit 7dbd68ea97
2 changed files with 7 additions and 10 deletions
@@ -159,7 +159,7 @@ internal sealed class WorkflowSession : AgentSession
.ConfigureAwait(false);
// Process messages: convert response content to ExternalResponse, send regular messages as-is
await this.SendMessagesWithResponseConversionAsync(run, messages, cancellationToken).ConfigureAwait(false);
await this.SendMessagesWithResponseConversionAsync(run, messages).ConfigureAwait(false);
return run;
}
@@ -175,7 +175,7 @@ internal sealed class WorkflowSession : AgentSession
/// Sends messages to the run, converting FunctionResultContent and UserInputResponseContent
/// to ExternalResponse when there's a matching pending request.
/// </summary>
private async ValueTask SendMessagesWithResponseConversionAsync(StreamingRun run, List<ChatMessage> messages, CancellationToken cancellationToken)
private async ValueTask SendMessagesWithResponseConversionAsync(StreamingRun run, List<ChatMessage> messages)
{
List<ChatMessage> regularMessages = [];
@@ -202,12 +202,9 @@ internal sealed class WorkflowSession : AgentSession
if (regularContents.Count > 0)
{
regularMessages.Add(new ChatMessage(message.Role, regularContents)
{
AuthorName = message.AuthorName,
MessageId = message.MessageId,
CreatedAt = message.CreatedAt
});
ChatMessage cloned = message.Clone();
cloned.Contents = regularContents;
regularMessages.Add(cloned);
}
}
@@ -194,8 +194,8 @@ public class WorkflowHostSmokeTests
{
// Arrange
const string RequestId = "test-request-id";
McpServerToolCallContent mcpCalll = new("call-id", "testToolName", "http://localhost");
UserInputRequestContent originalContent = new McpServerToolApprovalRequestContent(RequestId, mcpCalll);
McpServerToolCallContent mcpCall = new("call-id", "testToolName", "http://localhost");
UserInputRequestContent originalContent = new McpServerToolApprovalRequestContent(RequestId, mcpCall);
RequestEmittingAgent requestAgent = new(originalContent);
ExecutorBinding agentBinding = requestAgent.BindAsExecutor(
new AIAgentHostOptions { InterceptUserInputRequests = false, EmitAgentUpdateEvents = true });