Skip to content

Commit 40b0141

Browse files
author
Jicheng Lu
committed
clean code
1 parent e4ac049 commit 40b0141

5 files changed

Lines changed: 2 additions & 352 deletions

File tree

src/Infrastructure/BotSharp.Core/data/agents/01e2fc5c-2c89-4ec7-8470-7688608b496c/agent.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,5 @@
1414
"model": "gpt-5-mini",
1515
"max_recursion_depth": 3,
1616
"reasoning_effort_level": "minimal"
17-
},
18-
"rules": [
19-
{
20-
"trigger_name": "DemoRuleTrigger"
21-
}
22-
]
17+
}
2318
}

src/Infrastructure/BotSharp.OpenAPI/Controllers/Agent/AgentController.Rule.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,4 @@ public IEnumerable<AgentRuleViewModel> GetRuleTriggers()
4040
OutputArgs = x.OutputArgs
4141
}).OrderBy(x => x.TriggerName);
4242
}
43-
44-
[HttpGet("/rule/config/options")]
45-
public async Task<IDictionary<string, RuleConfigModel>> GetRuleConfigOptions()
46-
{
47-
var dict = new Dictionary<string, RuleConfigModel>();
48-
var flows = _services.GetServices<IRuleFlow<RuleGraph>>();
49-
50-
foreach (var flow in flows)
51-
{
52-
var config = await flow.GetTopologyConfigAsync();
53-
if (string.IsNullOrEmpty(config.TopologyName))
54-
{
55-
continue;
56-
}
57-
dict[config.TopologyName] = config;
58-
}
59-
60-
return dict;
61-
}
6243
}

src/Plugins/BotSharp.Plugin.Membase/MembasePlugin.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using BotSharp.Abstraction.Plugins.Models;
2-
using BotSharp.Abstraction.Rules;
32
using BotSharp.Plugin.Membase.GraphDb;
43
using BotSharp.Plugin.Membase.Handlers;
54
using Refit;
65

76
namespace BotSharp.Plugin.Membase;
87

8+
[PluginDependency("BotSharp.Plugin.KnowledgeBase")]
99
public class MembasePlugin : IBotSharpPlugin
1010
{
1111
public string Id => "8df12767-9a44-45d9-93cd-12a10adf3933";
@@ -39,10 +39,6 @@ public void RegisterDI(IServiceCollection services, IConfiguration config)
3939

4040
_membaseCredential = config.GetValue<string>("Membase:ApiKey") ?? string.Empty;
4141
_membaseProjectId = config.GetValue<string>("Membase:ProjectId") ?? string.Empty;
42-
43-
#if DEBUG
44-
services.AddScoped<IRuleFlow<RuleGraph>, DemoRuleGraph>();
45-
#endif
4642
}
4743

4844
public bool AttachMenu(List<PluginMenuDef> menu)

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

Lines changed: 0 additions & 321 deletions
This file was deleted.

src/Plugins/BotSharp.Plugin.Membase/Using.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
global using BotSharp.Abstraction.Plugins;
1818
global using BotSharp.Abstraction.Settings;
1919
global using BotSharp.Plugin.Membase.Models;
20-
global using BotSharp.Plugin.Membase.Services;
2120
global using BotSharp.Plugin.Membase.Settings;
2221
global using BotSharp.Abstraction.Graph;
2322
global using BotSharp.Abstraction.Graph.Models;

0 commit comments

Comments
 (0)