mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-05 22:54:23 +01:00
refactor sse
This commit is contained in:
@@ -444,6 +444,7 @@ export const routes = (app: HonoAppType) => {
|
||||
) => {
|
||||
stream.writeSSE("taskChanged", {
|
||||
aliveTasks: event.aliveTasks,
|
||||
changed: event.changed,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -451,6 +452,7 @@ export const routes = (app: HonoAppType) => {
|
||||
eventBus.on("sessionChanged", onSessionChanged);
|
||||
eventBus.on("taskChanged", onTaskChanged);
|
||||
const { connectionPromise } = adaptInternalEventToSSE(rawStream, {
|
||||
timeout: 5 /* min */ * 60 /* sec */ * 1000,
|
||||
cleanUp: () => {
|
||||
eventBus.off("sessionListChanged", onSessionListChanged);
|
||||
eventBus.off("sessionChanged", onSessionChanged);
|
||||
|
||||
Reference in New Issue
Block a user