Keep image jobs on the studio queue and confirm each job or library delete. Label stitch-frame slots when thumbs are hidden, and open output stills in a lightbox.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -220,7 +220,7 @@ function hostWithPort(host: string, port: number) {
|
||||
}
|
||||
}
|
||||
|
||||
async function ensureUnlocked(onStatus: StatusFn) {
|
||||
async function ensureUnlocked(onStatus: StatusFn, skipBusyWait = false) {
|
||||
const cfg = settings()
|
||||
const host = cfg.host
|
||||
onStatus({ state: 'offline', message: 'Checking ComfyUI...', host })
|
||||
@@ -228,7 +228,7 @@ async function ensureUnlocked(onStatus: StatusFn) {
|
||||
const health = await checkComfyHttp(cfg.healthTimeoutMs)
|
||||
if (health.ok) {
|
||||
log('http-ok', { host })
|
||||
await waitWhileBusy(onStatus)
|
||||
if (!skipBusyWait) await waitWhileBusy(onStatus)
|
||||
onStatus({ state: 'online', message: 'ComfyUI online', host })
|
||||
return
|
||||
}
|
||||
@@ -247,7 +247,7 @@ async function ensureUnlocked(onStatus: StatusFn) {
|
||||
if (viaProxy.ok) {
|
||||
setComfyHostOverride(proxyUrl)
|
||||
log('http-ok-proxy', { host: proxyUrl, localPort: remote.port || null })
|
||||
await waitWhileBusy(onStatus)
|
||||
if (!skipBusyWait) await waitWhileBusy(onStatus)
|
||||
onStatus({ state: 'online', message: 'ComfyUI online', host: proxyUrl, processRunning: true })
|
||||
return
|
||||
}
|
||||
@@ -269,7 +269,7 @@ async function ensureUnlocked(onStatus: StatusFn) {
|
||||
})
|
||||
const ready = await pollUntilHealthy(cfg.bootPollAttempts, cfg.bootPollDelayMs, onStatus, 'booting', 'Waiting for ComfyUI to finish booting')
|
||||
if (ready) {
|
||||
await waitWhileBusy(onStatus)
|
||||
if (!skipBusyWait) await waitWhileBusy(onStatus)
|
||||
onStatus({ state: 'online', message: 'ComfyUI online', host, processRunning: true })
|
||||
return
|
||||
}
|
||||
@@ -309,7 +309,7 @@ async function ensureUnlocked(onStatus: StatusFn) {
|
||||
const next = await checkComfyHttp()
|
||||
if (next.ok) {
|
||||
log('started', { attempt, reason: started.reason })
|
||||
await waitWhileBusy(onStatus)
|
||||
if (!skipBusyWait) await waitWhileBusy(onStatus)
|
||||
onStatus({ state: 'online', message: 'ComfyUI online', host, processRunning: true })
|
||||
return
|
||||
}
|
||||
@@ -322,8 +322,9 @@ async function ensureUnlocked(onStatus: StatusFn) {
|
||||
})
|
||||
}
|
||||
|
||||
export function ensureComfyReady(onStatus: StatusFn = () => undefined) {
|
||||
const run = gate.then(() => ensureUnlocked(onStatus))
|
||||
export function ensureComfyReady(onStatus: StatusFn = () => undefined, options?: { skipBusyWait?: boolean }) {
|
||||
const skipBusyWait = options?.skipBusyWait === true
|
||||
const run = gate.then(() => ensureUnlocked(onStatus, skipBusyWait))
|
||||
gate = run.then(() => undefined, () => undefined)
|
||||
return run
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user