mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 04:14:30 +00:00
feat(chat): send SSE keep-alive ping heartbeats during polling
This commit is contained in:
@@ -109,6 +109,12 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
})
|
||||
}
|
||||
lastEntryId = newEntries[newEntries.length - 1].id
|
||||
} else {
|
||||
await stream.writeSSE({
|
||||
data: JSON.stringify({
|
||||
type: 'ping',
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
// Check if workflow has finished
|
||||
|
||||
Reference in New Issue
Block a user