mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* skeleton * wip * rename + fix tests * implement workflow tests * fix comments * Update dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fixes * proto * fix worfklow build logic * build it / no reflection / no generics / extensions on aiagent * rollback + new overload on workflow builder * address PR comments * fix build * take from main * correct based on latest API * apply suggestion * address PR comments x1 * address PR comments 2 * renames * *With* * refactor api a bit * refactor + merge main + apply suggestions --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
26 lines
920 B
C#
26 lines
920 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.Agents.AI.Hosting;
|
|
|
|
/// <summary>
|
|
/// This store implementation does not have any store under the hood and operates with empty threads.
|
|
/// It is the "noop" store, and could be used if you are keeping the thread contents on the client side for example.
|
|
/// </summary>
|
|
public sealed class NoopAgentThreadStore : AgentThreadStore
|
|
{
|
|
/// <inheritdoc/>
|
|
public override ValueTask SaveThreadAsync(AIAgent agent, string conversationId, AgentThread thread, CancellationToken cancellationToken = default)
|
|
{
|
|
return new ValueTask();
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public override ValueTask<AgentThread> GetThreadAsync(AIAgent agent, string conversationId, CancellationToken cancellationToken = default)
|
|
{
|
|
return new ValueTask<AgentThread>(agent.GetNewThread());
|
|
}
|
|
}
|