2025-02-21 04:52:02 +00:00
|
|
|
using BotSharp.Abstraction.Plugins.Models;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Core.Instructs;
|
|
|
|
|
|
|
|
|
|
public class InsturctionPlugin : IBotSharpPlugin
|
|
|
|
|
{
|
|
|
|
|
public string Id => "8189e133-819c-4505-9f82-84f793bc1be0";
|
|
|
|
|
public string Name => "Instruction";
|
|
|
|
|
public string Description => "Handle agent instruction request";
|
|
|
|
|
|
|
|
|
|
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool AttachMenu(List<PluginMenuDef> menu)
|
|
|
|
|
{
|
|
|
|
|
var section = menu.First(x => x.Label == "Apps");
|
2025-03-05 23:22:46 +00:00
|
|
|
menu.Add(new PluginMenuDef("Instruction", icon: "bx bx-book-content", weight: section.Weight + 5)
|
|
|
|
|
{
|
|
|
|
|
SubMenu = new List<PluginMenuDef>
|
|
|
|
|
{
|
2025-03-06 17:11:45 +00:00
|
|
|
new PluginMenuDef("Testing", link: "page/instruction/testing"),
|
|
|
|
|
new PluginMenuDef("Log", link: "page/instruction/log")
|
2025-03-05 23:22:46 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-02-21 04:52:02 +00:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|