Skip to content

Commit 2e02360

Browse files
author
Jicheng Lu
committed
change to description
1 parent f65d64c commit 2e02360

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

src/Infrastructure/BotSharp.Abstraction/Rules/Options/RuleFlowOptions.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ namespace BotSharp.Abstraction.Rules.Options;
22

33
public class RuleFlowOptions
44
{
5-
/// <summary>
6-
/// Flow topology provider
7-
/// </summary>
8-
[JsonPropertyName("topology_provider")]
9-
public string? TopologyProvider { get; set; }
10-
115
/// <summary>
126
/// Flow topology name
137
/// </summary>

src/Infrastructure/BotSharp.Abstraction/Rules/RuleGraph.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void AddEdge(RuleNode from, RuleNode to, GraphItemPayload payload)
112112
Type = payload.Type,
113113
Labels = [.. payload.Labels ?? []],
114114
Weight = payload.Weight,
115-
Purpose = payload.Purpose,
115+
Description = payload.Description,
116116
Config = new(payload.Config ?? [])
117117
});
118118
}
@@ -174,7 +174,7 @@ public class RuleNode : GraphItem
174174

175175
public override string ToString()
176176
{
177-
return $"Node ({Id}): {Name} ({Type} => {Purpose})";
177+
return $"Node ({Id}): {Name} ({Type} => {Description})";
178178
}
179179
}
180180

@@ -202,7 +202,7 @@ public RuleEdge(RuleNode from, RuleNode to) : base()
202202

203203
public override string ToString()
204204
{
205-
return $"Edge ({Id}): {Name} ({Type} => {Purpose}), Connects from Node ({From?.Name}) to Node ({To?.Name})";
205+
return $"Edge ({Id}): {Name} ({Type} => {Description}), Connects from Node ({From?.Name}) to Node ({To?.Name})";
206206
}
207207
}
208208

@@ -213,7 +213,7 @@ public class GraphItem
213213
public virtual string Type { get; set; } = null!;
214214
public virtual IEnumerable<string> Labels { get; set; } = [];
215215
public virtual double Weight { get; set; } = 1.0;
216-
public virtual string? Purpose { get; set; }
216+
public virtual string? Description { get; set; }
217217
public virtual Dictionary<string, string?> Config { get; set; } = [];
218218
}
219219

src/Plugins/BotSharp.Plugin.Membase/Services/DemoRuleGraph.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private RuleGraph BuildGraph(GraphQueryResult result)
172172
Weight = sourceNodeWeight,
173173
Name = GetGraphItemAttribute(sourceNodeProps, key: "name", defaultValue: "node"),
174174
Type = GetGraphItemAttribute(sourceNodeProps, key: "type", defaultValue: "action"),
175-
Purpose = GetGraphItemAttribute(sourceNodeProps, key: "purpose", defaultValue: "unknown"),
175+
Description = GetGraphItemAttribute(sourceNodeProps, key: "description", defaultValue: "unknown"),
176176
Config = GetConfig(sourceNodeProps)
177177
};
178178

@@ -184,7 +184,7 @@ private RuleGraph BuildGraph(GraphQueryResult result)
184184
Weight = targetNodeWeight,
185185
Name = GetGraphItemAttribute(targetNodeProps, key: "name", defaultValue: "node"),
186186
Type = GetGraphItemAttribute(targetNodeProps, key: "type", defaultValue: "action"),
187-
Purpose = GetGraphItemAttribute(targetNodeProps, key: "purpose", defaultValue: "unknown"),
187+
Description = GetGraphItemAttribute(targetNodeProps, key: "description", defaultValue: "unknown"),
188188
Config = GetConfig(targetNodeProps)
189189
};
190190

@@ -194,7 +194,7 @@ private RuleGraph BuildGraph(GraphQueryResult result)
194194
Id = edgeId ?? Guid.NewGuid().ToString(),
195195
Name = GetGraphItemAttribute(edgeProps, key: "name", defaultValue: "edge"),
196196
Type = GetGraphItemAttribute(edgeProps, key: "type", defaultValue: "next"),
197-
Purpose = GetGraphItemAttribute(edgeProps, key: "purpose", defaultValue: "unknown"),
197+
Description = GetGraphItemAttribute(edgeProps, key: "description", defaultValue: "unknown"),
198198
Weight = edgeWeight,
199199
Config = GetConfig(edgeProps)
200200
};

0 commit comments

Comments
 (0)