diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs index afed5d1518..eae21955b4 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs @@ -19,7 +19,7 @@ namespace Microsoft.Agents.AI; /// and process user requests. An agent instance may participate in multiple concurrent conversations, and each conversation /// may involve multiple agents working together. /// -[DebuggerDisplay("{DisplayName,nq}")] +[DebuggerDisplay("{DebuggerDisplay,nq}")] public abstract class AIAgent { /// @@ -72,6 +72,9 @@ public abstract class AIAgent /// public virtual string? Description { get; } + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private string DebuggerDisplay => string.IsNullOrWhiteSpace(this.Name) ? $"Id = {this.Id}" : $"Name = {this.Name} ({this.Id})"; + /// Asks the for an object of the specified type . /// The type of object being requested. /// An optional key that can be used to help identify the target service.