mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
eb1117fff4
* adds support for labels in edges, fixes rendering of labels in dot and mermaid, adds rendering of labels in edges * Update dotnet/src/Microsoft.Agents.AI.Workflows/Visualization/WorkflowVisualizer.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * escaping edge labels, adding tests for labels containing strange characters that would break the diagram and enabling the previous signature so the API has backwards compatibility. * Unify label in EdgeData * Edge API adjustments, removed useless "sanitizer" * fixed test --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jacob Alber <jaalber@microsoft.com> Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
33 lines
985 B
C#
33 lines
985 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Collections.Generic;
|
|
using Microsoft.Agents.AI.Workflows.Execution;
|
|
|
|
namespace Microsoft.Agents.AI.Workflows;
|
|
|
|
/// <summary>
|
|
/// Represents a connection from a set of nodes to a single node. It will trigger either when all edges have data.
|
|
/// </summary>
|
|
internal sealed class FanInEdgeData : EdgeData
|
|
{
|
|
internal FanInEdgeData(List<string> sourceIds, string sinkId, EdgeId id, string? label) : base(id, label)
|
|
{
|
|
this.SourceIds = sourceIds;
|
|
this.SinkId = sinkId;
|
|
this.Connection = new(sourceIds, [sinkId]);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The ordered list of Ids of the source <see cref="Executor"/> nodes.
|
|
/// </summary>
|
|
public List<string> SourceIds { get; }
|
|
|
|
/// <summary>
|
|
/// The Id of the destination <see cref="Executor"/> node.
|
|
/// </summary>
|
|
public string SinkId { get; }
|
|
|
|
/// <inheritdoc />
|
|
internal override EdgeConnection Connection { get; }
|
|
}
|