.NET: Rename workflows projects (#975)

* Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows

* Removing local settings.

* Removing remining old files from merge.
This commit is contained in:
Ben Thomas
2025-09-29 18:30:45 +00:00
committed by GitHub
parent aaf340096e
commit 647db9635a
340 changed files with 519 additions and 519 deletions
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Text.Json;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
using Microsoft.Shared.Diagnostics;
namespace Microsoft.Agents.AI.Workflows;
internal sealed class WorkflowThread : AgentThread
{
public WorkflowThread(string workflowId, string? workflowName, string runId)
{
this.MessageStore = new();
this.RunId = Throw.IfNullOrEmpty(runId, nameof(runId));
}
public WorkflowThread(JsonElement serializedThread, JsonSerializerOptions? jsonSerializerOptions = null)
{
throw new NotImplementedException("Pending Checkpointing work.");
}
public string RunId { get; }
public int Halts { get; }
public string ResponseId => $"{this.RunId}@{this.Halts}";
public override JsonElement Serialize(JsonSerializerOptions? jsonSerializerOptions = null)
=> throw new NotImplementedException("Pending Checkpointing work.");
public AgentRunResponseUpdate CreateUpdate(params AIContent[] parts)
{
Throw.IfNullOrEmpty(parts);
AgentRunResponseUpdate update = new(ChatRole.Assistant, parts)
{
CreatedAt = DateTimeOffset.UtcNow,
MessageId = Guid.NewGuid().ToString("N"),
};
this.MessageStore.AddMessages(update.ToChatMessage());
return update;
}
/// <inheritdoc/>
public WorkflowMessageStore MessageStore { get; }
}