<#@ template language="C#" inherits="ActionTemplate" visibility="internal" linePragmas="false" #> <#@ output extension=".cs" #> <#@ assembly name="System.Core" #> <#@ import namespace="Microsoft.Agents.ObjectModel" #> <#@ include file="Snippets/AssignVariableTemplate.tt" once="true" #> /// /// Creates a new conversation and stores the identifier value to the "<#= this.Model.ConversationId #>" variable. /// internal sealed class <#= this.Name #>Executor(FormulaSession session, ResponseAgentProvider agentProvider) : ActionExecutor(id: "<#= this.Id #>", session) { protected override async ValueTask ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken) { string conversationId = await agentProvider.CreateConversationAsync(cancellationToken).ConfigureAwait(false);<# AssignVariable(this.ConversationId, "conversationId");#> await context.AddEventAsync(new ConversationUpdateEvent(conversationId)).ConfigureAwait(false); return default; } }