Improve session reconnect behavior

This commit is contained in:
Federico Jaramillo Martinez
2026-05-07 13:00:10 +02:00
parent fd28af3c93
commit ad05497319
10 changed files with 114 additions and 15 deletions
+4
View File
@@ -113,6 +113,10 @@ app.get<{ Params: { sessionId: string } }>("/api/sessions/:sessionId/events", {
eventHub.add(request.params.sessionId, socket);
});
app.get("/api/sessions/events", { websocket: true }, (socket) => {
eventHub.addGlobal(socket);
});
app.get<{ Querystring: { cwd?: string; q?: string; kind?: "tracked" | "untracked" | "other" } }>("/api/files", async (request, reply) => {
if (!request.query.cwd) return reply.code(400).send({ error: "cwd query parameter is required" });
try {