Ship extension queues, library extend, and smoother seam stitching.

Users can pre-queue extensions, extend from the library with p2 titles, blend seams with xfade, and a unreadable catalog is no longer replaced with an empty one.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-26 00:01:25 -05:00
co-authored by Cursor
parent 22d99f18db
commit f5c709924b
7 changed files with 653 additions and 79 deletions
+20 -1
View File
@@ -20,6 +20,9 @@ export interface JobEvent {
folderLocked?: boolean
jobId?: string
draftId?: string
chainStep?: number
chainTotal?: number
chainLabel?: string
}
export interface Job {
@@ -61,12 +64,18 @@ export interface Job {
duration?: number
sound?: boolean
draftId?: string
extensions?: { prompt: string; duration: number }[]
chainIndex?: number
chainStep?: number
chainTotal?: number
chainLabel?: string
extendTmpDir?: string
extendPart1Path?: string
extendSourceClipId?: string
}
error?: string
socketReady?: boolean
segmentBuffer?: Buffer
events: JobEvent[]
listeners: Set<(event: JobEvent) => void>
}
@@ -121,7 +130,10 @@ export function jobSnapshot(job: Job) {
hideThumbnail: job.hideThumbnail,
error: job.error,
folderLocked: job.library?.folderLocked,
draftId: job.library?.draftId
draftId: job.library?.draftId,
chainStep: job.library?.chainStep,
chainTotal: job.library?.chainTotal,
chainLabel: job.library?.chainLabel
}
}
@@ -131,6 +143,13 @@ export function emitJob(job: Job, event: JobEvent) {
if (typeof event.progress === 'number') job.progress = event.progress
if (typeof event.step === 'number') job.step = event.step
if (typeof event.maxStep === 'number') job.maxStep = event.maxStep
if (typeof event.chainStep === 'number') {
if (job.library) job.library.chainStep = event.chainStep
}
if (typeof event.chainTotal === 'number') {
if (job.library) job.library.chainTotal = event.chainTotal
}
if (event.chainLabel && job.library) job.library.chainLabel = event.chainLabel
event.elapsedMs = Date.now() - job.startedAt
job.events.push(event)
if (job.events.length > 200) job.events.shift()