.NET Workflows - Capture the identifier of the LastMessage (the workflow input) (#1372)

* Fixed

* Test fix
This commit is contained in:
Chris
2025-10-10 06:45:09 +00:00
committed by GitHub
parent 2c9cf6f59d
commit 7e1fd67e76
8 changed files with 99 additions and 9 deletions
@@ -40,8 +40,8 @@ internal sealed class DeclarativeWorkflowExecutor<TInput>(
}
await declarativeContext.QueueConversationUpdateAsync(conversationId, isExternal: true, cancellationToken).ConfigureAwait(false);
await options.AgentProvider.CreateMessageAsync(conversationId, input, cancellationToken).ConfigureAwait(false);
await declarativeContext.SetLastMessageAsync(input).ConfigureAwait(false);
ChatMessage inputMessage = await options.AgentProvider.CreateMessageAsync(conversationId, input, cancellationToken).ConfigureAwait(false);
await declarativeContext.SetLastMessageAsync(inputMessage).ConfigureAwait(false);
await context.SendResultMessageAsync(this.Id, cancellationToken).ConfigureAwait(false);
}