Add Luna.Core server with SignalR hub, session management, and tool system
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
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user