mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Add some DebuggerDisplays / DebuggerTypeProxys to abstraction types (#1144)
This commit is contained in:
committed by
GitHub
Unverified
parent
c543dbaa92
commit
4daeeb0f07
@@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -23,6 +24,7 @@ namespace Microsoft.Agents.AI;
|
||||
/// unless explicitly serialized and restored.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public abstract class InMemoryAgentThread : AgentThread
|
||||
{
|
||||
/// <summary>
|
||||
@@ -118,6 +120,9 @@ public abstract class InMemoryAgentThread : AgentThread
|
||||
protected internal override Task MessagesReceivedAsync(IEnumerable<ChatMessage> newMessages, CancellationToken cancellationToken = default)
|
||||
=> this.MessageStore.AddMessagesAsync(newMessages, cancellationToken);
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private string DebuggerDisplay => $"Count = {this.MessageStore.Count}";
|
||||
|
||||
internal sealed class InMemoryAgentThreadState
|
||||
{
|
||||
public JsonElement? StoreState { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user