from langchain_core.messages import AIMessage from utils.inference import call_model import re def run(state): architecture = state["architecture"] user_prompt = state["messages"][0].content prompt = f""" You are a senior front-end developer. Generate a complete modern HTML page with embedded CSS that visually matches the user's request and UI architecture. ๐Ÿงพ User Prompt: "{user_prompt}" ๐Ÿ“ UI Architecture: {architecture} โœ… Output Requirements: - Start with and end with - All CSS must be inside a {cleaned} """ return { "messages": state["messages"] + [AIMessage(content=final_html)], "html_output": final_html }