diff --git a/backend/agent/prompt.py b/backend/agent/prompt.py index 4436d551..dd901d1a 100644 --- a/backend/agent/prompt.py +++ b/backend/agent/prompt.py @@ -281,6 +281,17 @@ Your approach is deliberately methodical and persistent: - Use flowing paragraphs rather than lists; provide detailed content with proper citations - Strictly follow requirements in writing rules, and avoid using list formats in any files except todo.md +## 6.2 DESIGN GUIDELINES +- For any design-related task, first create the design in HTML+CSS to ensure maximum flexibility +- Designs should be created with print-friendliness in mind - use appropriate margins, page breaks, and printable color schemes +- After creating designs in HTML+CSS, convert directly to PDF as the final output format +- When designing multi-page documents, ensure consistent styling and proper page numbering +- Test print-readiness by confirming designs display correctly in print preview mode +- For complex designs, test different media queries including print media type +- Package all design assets (HTML, CSS, images, and PDF output) together when delivering final results +- Ensure all fonts are properly embedded or use web-safe fonts to maintain design integrity in the PDF output +- Set appropriate page sizes (A4, Letter, etc.) in the CSS using @page rules for consistent PDF rendering + # 7. COMMUNICATION & USER INTERACTION ## 7.1 CONVERSATIONAL INTERACTIONS diff --git a/backend/agent/run.py b/backend/agent/run.py index 365d8820..613797ce 100644 --- a/backend/agent/run.py +++ b/backend/agent/run.py @@ -39,7 +39,7 @@ async def run_agent(thread_id: str, project_id: str, stream: bool = True, thread # thread_manager.add_tool(SandboxBrowseTool, sandbox_id=sandbox_id, password=sandbox_pass) thread_manager.add_tool(SandboxShellTool, sandbox_id=sandbox_id, password=sandbox_pass) thread_manager.add_tool(SandboxFilesTool, sandbox_id=sandbox_id, password=sandbox_pass) - # thread_manager.add_tool(MessageTool) + thread_manager.add_tool(MessageTool) system_message = { "role": "system", "content": get_system_prompt() } diff --git a/backend/agent/tools/message_tool.py b/backend/agent/tools/message_tool.py index 1959c9cf..fe63545e 100644 --- a/backend/agent/tools/message_tool.py +++ b/backend/agent/tools/message_tool.py @@ -129,7 +129,7 @@ if __name__ == "__main__": # Test question ask_result = await message_tool.ask( - "Would you like to proceed with the next phase?", + text="Would you like to proceed with the next phase?", attachments="summary.pdf" ) print("Question result:", ask_result) diff --git a/backend/sandbox/docker/Dockerfile b/backend/sandbox/docker/Dockerfile index ae60f101..5ed0e3bf 100644 --- a/backend/sandbox/docker/Dockerfile +++ b/backend/sandbox/docker/Dockerfile @@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y \ tmux \ # PDF Processing Tools poppler-utils \ + wkhtmltopdf \ # Document Processing Tools antiword \ unrtf \