mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Remove AgentThread.GetMessagesAsync (#668)
* Remove AgentThread.GetMessagesAsync * Remove unecessary using
This commit is contained in:
committed by
GitHub
Unverified
parent
5c3c2fe634
commit
ec5ea3c8a8
@@ -344,9 +344,9 @@ public sealed class ChatClientAgent : AIAgent
|
||||
|
||||
// Add any existing messages from the thread to the messages to be sent to the chat client.
|
||||
List<ChatMessage> threadMessages = [];
|
||||
await foreach (ChatMessage message in thread.GetMessagesAsync(cancellationToken).ConfigureAwait(false))
|
||||
if (thread.MessageStore is not null)
|
||||
{
|
||||
threadMessages.Add(message);
|
||||
threadMessages.AddRange(await thread.MessageStore.GetMessagesAsync(cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
|
||||
// Add the input messages to the end of thread messages.
|
||||
|
||||
Reference in New Issue
Block a user