Files
aigen/server/api/generate/[id].get.ts
T
TowstyandCursor c4e6af9f77 Fix generation progress getting stuck at 1% after Comfy finishes.
Poll Comfy history and the job snapshot so the browser still gets the video when the live stream is buffered or the websocket misses completion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 18:23:23 -05:00

9 lines
252 B
TypeScript

export default defineEventHandler((event) => {
const id = getRouterParam(event, 'id')
const job = id ? getJob(id) : undefined
if (!job) {
throw createError({ statusCode: 404, statusMessage: 'Job not found' })
}
return jobSnapshot(job)
})