.NET Workflows - Integrate Element Aliasing (#835)

* Checkpoint

* Update test workflows

* Update workflows/MathChat.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update folder

* Cleanup

* Signed package version

* Rollback nuget.config

* Cleanup

* Set `ProductContext`

* Move product initialization.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Chris
2025-09-23 18:08:35 +00:00
committed by GitHub
co-authored by Copilot
parent 7a0b0b7995
commit 0f913bcdeb
32 changed files with 124 additions and 142 deletions
@@ -20,7 +20,7 @@ internal sealed class AddConversationMessageExecutor(AddConversationMessage mode
StringExpression conversationExpression = Throw.IfNull(this.Model.ConversationId, $"{nameof(this.Model)}.{nameof(this.Model.ConversationId)}");
string conversationId = this.State.Evaluator.GetValue(conversationExpression).Value;
ChatMessage newMessage = new(this.GetRole(), [.. this.GetContent()]) { AdditionalProperties = this.GetMetadata() };
ChatMessage newMessage = new(this.Model.Role.Value.ToChatRole(), [.. this.GetContent()]) { AdditionalProperties = this.GetMetadata() };
await agentProvider.CreateMessageAsync(conversationId, newMessage, cancellationToken).ConfigureAwait(false);
@@ -41,18 +41,6 @@ internal sealed class AddConversationMessageExecutor(AddConversationMessage mode
}
}
private ChatRole GetRole()
{
if (this.Model.Role is null)
{
return ChatRole.User;
}
AgentMessageRoleWrapper roleWrapper = this.State.Evaluator.GetValue(this.Model.Role).Value;
return roleWrapper.Value.ToChatRole();
}
private AdditionalPropertiesDictionary? GetMetadata()
{
if (this.Model.Metadata is null)