fix: Adjust message handling in process method; ensure correct image assignment and add next steps output
This commit is contained in:
		@@ -67,12 +67,19 @@ class AIProcessor:
 | 
			
		||||
                    )
 | 
			
		||||
                    outputs.append(r) if r else None
 | 
			
		||||
                # Make sure the two last messages from user has an image, but set disable_image to True for the others
 | 
			
		||||
                for msg in self.session.messages[-2:]:
 | 
			
		||||
                for msg in self.session.messages[:-2]:
 | 
			
		||||
                    msg.image = None
 | 
			
		||||
                logger.debug(
 | 
			
		||||
                    self.session.messages
 | 
			
		||||
                )
 | 
			
		||||
                if reexec:
 | 
			
		||||
                    self.session.messages.append(
 | 
			
		||||
                        aic.Message(
 | 
			
		||||
                            role="user",
 | 
			
		||||
                            content="Tool Output: Next Steps: " + nextsteps,
 | 
			
		||||
                        )
 | 
			
		||||
                    )
 | 
			
		||||
 | 
			
		||||
                    img = ai.compute.screenshot_to_base64(
 | 
			
		||||
                        ai.compute.take_screenshot()
 | 
			
		||||
                    )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user