fix: fe communication
This commit is contained in:
		
							parent
							
								
									a02c8d237f
								
							
						
					
					
						commit
						9a7e18e651
					
				@ -278,7 +278,11 @@ const ext = {
 | 
				
			|||||||
          sendEventToCD("cd_plugin_onDeployChanges", prompt);
 | 
					          sendEventToCD("cd_plugin_onDeployChanges", prompt);
 | 
				
			||||||
        } else if (message.type === "queue_prompt") {
 | 
					        } else if (message.type === "queue_prompt") {
 | 
				
			||||||
          const prompt = await app.graphToPrompt();
 | 
					          const prompt = await app.graphToPrompt();
 | 
				
			||||||
 | 
					          if (typeof api.handlePromptGenerated === "function") {
 | 
				
			||||||
            api.handlePromptGenerated(prompt);
 | 
					            api.handlePromptGenerated(prompt);
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            console.warn("api.handlePromptGenerated is not a function");
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
          sendEventToCD("cd_plugin_onQueuePrompt", prompt);
 | 
					          sendEventToCD("cd_plugin_onQueuePrompt", prompt);
 | 
				
			||||||
        } else if (message.type === "get_prompt") {
 | 
					        } else if (message.type === "get_prompt") {
 | 
				
			||||||
          const prompt = await app.graphToPrompt();
 | 
					          const prompt = await app.graphToPrompt();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user