mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Workflows - Add unit tests for CopyConversationMessagesExecutor (Declarative Workflows) (#3834)
* Initial plan * Add CopyConversationMessagesExecutorTest with 7 comprehensive test cases Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> * Simplify ExecuteTestAsync to avoid duplicate event filtering logic Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> * Refine --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> Co-authored-by: Chris Rickman <crickman@microsoft.com>
This commit is contained in:
co-authored by
crickman
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Chris Rickman
parent
7db6c4ab4e
commit
692fcd1888
+4
-7
@@ -42,14 +42,11 @@ internal sealed class CopyConversationMessagesExecutor(CopyConversationMessages
|
||||
|
||||
private IEnumerable<ChatMessage>? GetInputMessages()
|
||||
{
|
||||
DataValue? messages = null;
|
||||
Throw.IfNull(this.Model.Messages, $"{nameof(this.Model)}.{nameof(this.Model.Messages)}");
|
||||
|
||||
if (this.Model.Messages is not null)
|
||||
{
|
||||
EvaluationResult<DataValue> expressionResult = this.Evaluator.GetValue(this.Model.Messages);
|
||||
messages = expressionResult.Value;
|
||||
}
|
||||
EvaluationResult<DataValue> expressionResult = this.Evaluator.GetValue(this.Model.Messages);
|
||||
DataValue messages = expressionResult.Value;
|
||||
|
||||
return messages?.ToChatMessages();
|
||||
return messages.ToChatMessages();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user