mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 09:00:16 +00:00
Update ws message schema on reconnecting (#390)
* Update ws message schema on reconnecting * nit
This commit is contained in:
@@ -16,7 +16,7 @@ export function getInteruptButton(visibility: string) {
|
||||
api.addEventListener(
|
||||
'status',
|
||||
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
|
||||
const sz = detail.exec_info.queue_remaining
|
||||
const sz = detail?.exec_info?.queue_remaining
|
||||
btn.enabled = sz > 0
|
||||
}
|
||||
)
|
||||
|
||||
@@ -85,7 +85,7 @@ export class ComfyQueueButton {
|
||||
api.addEventListener(
|
||||
'status',
|
||||
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
|
||||
this.#internalQueueSize = detail.exec_info.queue_remaining
|
||||
this.#internalQueueSize = detail?.exec_info?.queue_remaining
|
||||
if (this.#internalQueueSize != null) {
|
||||
if (!this.#internalQueueSize && !app.lastExecutionError) {
|
||||
if (
|
||||
|
||||
@@ -214,7 +214,7 @@ export const useQueuePendingTaskCountStore = defineStore(
|
||||
}),
|
||||
actions: {
|
||||
update(e: CustomEvent<StatusWsMessageStatus>) {
|
||||
this.count = e.detail.exec_info.queue_remaining
|
||||
this.count = e.detail?.exec_info?.queue_remaining || 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const zStatusWsMessageStatus = z.object({
|
||||
})
|
||||
|
||||
const zStatusWsMessage = z.object({
|
||||
status: zStatusWsMessageStatus
|
||||
status: zStatusWsMessageStatus.nullable().optional()
|
||||
})
|
||||
|
||||
const zProgressWsMessage = z.object({
|
||||
|
||||
Reference in New Issue
Block a user