bc25dc7b07
Implement the core application server as an ASP.NET web host with: - SignalR ChatHub for real-time client communication - Session management with token estimation for context windowing - Extensible tool system with attribute-based tool discovery - Chat stream update builder for streaming AI responses - App configuration with appsettings for development and production
24 lines
725 B
C#
24 lines
725 B
C#
namespace Luna.Core.Tools.BuiltIn;
|
|
|
|
public class CoreTools : IToolbox
|
|
{
|
|
public string Name => "core";
|
|
|
|
public record Channel(string Name, string Health, bool IsConnected);
|
|
public record ListChannelsResult(IEnumerable<Channel> Channels);
|
|
|
|
[Tool("list_channels", "List available communication channels")]
|
|
public ListChannelsResult ListChannels()
|
|
{
|
|
return new ListChannelsResult([
|
|
new Channel("cli", "healthy", true),
|
|
new Channel("web", "healthy", false),
|
|
new Channel("telegram", "healthy", false)
|
|
]);
|
|
}
|
|
|
|
[Tool("change_channel", "Change the active communication channel")]
|
|
public void ChangeChannel(string channelName)
|
|
{
|
|
}
|
|
} |