Store workflow ID and title in prompt extra data

This commit is contained in:
space-nuko
2023-05-22 20:49:22 -05:00
parent e90773fdc8
commit 27b6e81b7f
4 changed files with 17 additions and 15 deletions

View File

@@ -141,14 +141,11 @@
const subgraphs: string[] | null = entry.extraData?.extra_pnginfo?.comfyBoxPrompt?.subgraphs;
let message = "Prompt";
if (entry.workflowID != null) {
const workflow = workflowState.getWorkflow(entry.workflowID);
if (workflow != null && workflow.attrs.title) {
message = `${workflow.attrs.title}`
}
if (subgraphs?.length > 0)
message += ` (${subgraphs.join(', ')})`
if (entry.extraData?.workflowTitle != null) {
message = `${entry.extraData.workflowTitle}`
}
if (subgraphs?.length > 0)
message += ` (${subgraphs.join(', ')})`
let submessage = `Nodes: ${Object.keys(entry.prompt).length}`