Revert Filter cached/canceled results (#1586) (#1703)

* Revert "Filter cached/canceled results (#1586)"

This reverts commit 6fbf1248f4.

* nit
This commit is contained in:
Chenlei Hu
2024-11-26 10:17:26 -08:00
committed by GitHub
parent b7008dfc5c
commit c54b675a48
7 changed files with 16 additions and 159 deletions

View File

@@ -30,7 +30,6 @@ export class ResultItemImpl {
filename: string
subfolder: string
type: string
cached: boolean
nodeId: NodeId
// 'audio' | 'images' | ...
@@ -44,7 +43,6 @@ export class ResultItemImpl {
this.filename = obj.filename ?? ''
this.subfolder = obj.subfolder ?? ''
this.type = obj.type ?? ''
this.cached = obj.cached
this.nodeId = obj.nodeId
this.mediaType = obj.mediaType
@@ -151,13 +149,6 @@ export class TaskItemImpl {
if (!this.outputs) {
return []
}
const cachedEntries = new Set(
this.status?.messages?.find((message) => {
return message[0] === 'execution_cached'
})?.[1].nodes
)
return Object.entries(this.outputs).flatMap(([nodeId, nodeOutputs]) =>
Object.entries(nodeOutputs).flatMap(([mediaType, items]) =>
(items as ResultItem[]).map(
@@ -165,8 +156,7 @@ export class TaskItemImpl {
new ResultItemImpl({
...item,
nodeId,
mediaType,
cached: cachedEntries.has(nodeId)
mediaType
})
)
)