feat: update deploy method
This commit is contained in:
		
							parent
							
								
									d592a6ba12
								
							
						
					
					
						commit
						be5d5d2b54
					
				@ -165,7 +165,7 @@ const ext = {
 | 
				
			|||||||
  async setup() {
 | 
					  async setup() {
 | 
				
			||||||
    // const graphCanvas = document.getElementById("graph-canvas");
 | 
					    // const graphCanvas = document.getElementById("graph-canvas");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    window.addEventListener("message", (event) => {
 | 
					    window.addEventListener("message", async (event) => {
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        const message = JSON.parse(event.data);
 | 
					        const message = JSON.parse(event.data);
 | 
				
			||||||
        if (message.type === "graph_load") {
 | 
					        if (message.type === "graph_load") {
 | 
				
			||||||
@ -178,7 +178,12 @@ const ext = {
 | 
				
			|||||||
            app.loadGraphData(comfyUIWorkflow);
 | 
					            app.loadGraphData(comfyUIWorkflow);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        } else if (message.type === "deploy") {
 | 
					        } else if (message.type === "deploy") {
 | 
				
			||||||
          deployWorkflow();
 | 
					          // deployWorkflow();
 | 
				
			||||||
 | 
					          const prompt = await app.graphToPrompt();
 | 
				
			||||||
 | 
					          sendEventToCD("cd_plugin_onDeployChanges", prompt);
 | 
				
			||||||
 | 
					        } else if (message.type === "queue_prompt") {
 | 
				
			||||||
 | 
					          const prompt = await app.graphToPrompt();
 | 
				
			||||||
 | 
					          sendEventToCD("cd_plugin_onQueuePrompt", prompt);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } catch (error) {
 | 
					      } catch (error) {
 | 
				
			||||||
        // console.error("Error processing message:", error);
 | 
					        // console.error("Error processing message:", error);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user