feat: add web UI dashboard SPA with dashboard, chat, sessions, and settings pages

- Add SPA shell with hash-based router, sidebar navigation, and WebSocket RPC client
- Add dashboard page with system health cards, channel status, and auto-refresh
- Add chat page with session selector, streaming tool events, and markdown rendering
- Add sessions page with list, history viewer, and delete functionality
- Add settings page with hook pattern editor, tool list, and config viewer
- Add backend handlers: sessions.delete, sessions.switch, system.channels, system.usage
- Wire channelRegistry into gateway server for channel status reporting
- Extend static file server with .mjs, .png, .ico, .woff2 content types
This commit is contained in:
William Valentin
2026-02-07 10:07:45 -08:00
parent f7d889e35e
commit 22230a3e3f
14 changed files with 1836 additions and 207 deletions
+4 -2
View File
@@ -586,6 +586,9 @@ export async function startDaemon(config: Config): Promise<DaemonContext> {
systemPrompt = `${systemPrompt}\n\n# Available Skills\n\n${skillAdditions}`;
}
// Initialize channel registry (created early so the gateway can reference it)
const channelRegistry = new ChannelRegistry();
// Initialize gateway WebSocket server
const gateway = new GatewayServer({
port: config.server.port,
@@ -602,6 +605,7 @@ export async function startDaemon(config: Config): Promise<DaemonContext> {
authHttp: config.server.auth_http,
uiDir: resolve(import.meta.dirname, '../gateway/ui'),
config,
channelRegistry,
restart: async () => {
console.log('Restart requested via gateway');
await lifecycle.shutdown();
@@ -616,8 +620,6 @@ export async function startDaemon(config: Config): Promise<DaemonContext> {
// ── Channel Registry ──────────────────────────────────────────
const channelRegistry = new ChannelRegistry();
// Set up the unified message handler
channelRegistry.setMessageHandler(createMessageRouter({
sessionManager,