This commit is contained in:
paisley
2026-03-07 17:27:31 +08:00
parent 990edec63c
commit c4f3749516
9 changed files with 611 additions and 487 deletions

View File

@@ -17,6 +17,9 @@ export async function handleAppRoutes(
});
res.write(': connected\n\n');
ctx.eventBus.addSseClient(res);
// Send a current-state snapshot immediately so renderer subscribers do not
// miss lifecycle transitions that happened before the SSE connection opened.
res.write(`event: gateway:status\ndata: ${JSON.stringify(ctx.gatewayManager.getStatus())}\n\n`);
return true;
}