@@ -213,7 +213,7 @@ protected async IAsyncEnumerable<ChatMessageContent> InvokeAgentAsync(
213
213
{
214
214
this . SetActivityOrThrow ( ) ; // Disallow concurrent access to chat history
215
215
216
- this . Logger . LogAgentChatInvokingAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
216
+ this . Logger . LogAgentChatInvokingAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
217
217
218
218
try
219
219
{
@@ -226,7 +226,7 @@ protected async IAsyncEnumerable<ChatMessageContent> InvokeAgentAsync(
226
226
227
227
await foreach ( ( bool isVisible , ChatMessageContent message ) in channel . InvokeAsync ( agent , cancellationToken ) . ConfigureAwait ( false ) )
228
228
{
229
- this . Logger . LogAgentChatInvokedAgentMessage ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , message ) ;
229
+ this . Logger . LogAgentChatInvokedAgentMessage ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) , message ) ;
230
230
231
231
messages . Add ( message ) ;
232
232
@@ -248,7 +248,7 @@ protected async IAsyncEnumerable<ChatMessageContent> InvokeAgentAsync(
248
248
. Select ( kvp => new ChannelReference ( kvp . Value , kvp . Key ) ) ;
249
249
this . _broadcastQueue . Enqueue ( channelRefs , messages ) ;
250
250
251
- this . Logger . LogAgentChatInvokedAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
251
+ this . Logger . LogAgentChatInvokedAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
252
252
}
253
253
finally
254
254
{
@@ -272,7 +272,7 @@ protected async IAsyncEnumerable<StreamingChatMessageContent> InvokeStreamingAge
272
272
{
273
273
this . SetActivityOrThrow ( ) ; // Disallow concurrent access to chat history
274
274
275
- this . Logger . LogAgentChatInvokingAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
275
+ this . Logger . LogAgentChatInvokingAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
276
276
277
277
try
278
278
{
@@ -290,7 +290,7 @@ protected async IAsyncEnumerable<StreamingChatMessageContent> InvokeStreamingAge
290
290
291
291
this . History . AddRange ( messages ) ;
292
292
293
- this . Logger . LogAgentChatInvokedStreamingAgentMessages ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , messages ) ;
293
+ this . Logger . LogAgentChatInvokedStreamingAgentMessages ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) , messages ) ;
294
294
295
295
// Broadcast message to other channels (in parallel)
296
296
// Note: Able to queue messages without synchronizing channels.
@@ -300,7 +300,7 @@ protected async IAsyncEnumerable<StreamingChatMessageContent> InvokeStreamingAge
300
300
. Select ( kvp => new ChannelReference ( kvp . Value , kvp . Key ) ) ;
301
301
this . _broadcastQueue . Enqueue ( channelRefs , messages ) ;
302
302
303
- this . Logger . LogAgentChatInvokedAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
303
+ this . Logger . LogAgentChatInvokedAgent ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
304
304
}
305
305
finally
306
306
{
@@ -433,7 +433,7 @@ private async Task<AgentChannel> GetOrCreateChannelAsync(Agent agent, Cancellati
433
433
AgentChannel ? channel = await this . SynchronizeChannelAsync ( channelKey , cancellationToken ) . ConfigureAwait ( false ) ;
434
434
if ( channel is null )
435
435
{
436
- this . Logger . LogAgentChatCreatingChannel ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
436
+ this . Logger . LogAgentChatCreatingChannel ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
437
437
438
438
channel = await agent . CreateChannelAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
439
439
@@ -445,7 +445,7 @@ private async Task<AgentChannel> GetOrCreateChannelAsync(Agent agent, Cancellati
445
445
await channel . ReceiveAsync ( this . History , cancellationToken ) . ConfigureAwait ( false ) ;
446
446
}
447
447
448
- this . Logger . LogAgentChatCreatedChannel ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id ) ;
448
+ this . Logger . LogAgentChatCreatedChannel ( nameof ( InvokeAgentAsync ) , agent . GetType ( ) , agent . Id , agent . GetDisplayName ( ) ) ;
449
449
}
450
450
451
451
return channel ;
0 commit comments