diff --git a/src/server/deep_agent/agents/main_agent.py b/src/server/deep_agent/agents/main_agent.py index 9ced4fb..df3de7b 100755 --- a/src/server/deep_agent/agents/main_agent.py +++ b/src/server/deep_agent/agents/main_agent.py @@ -106,20 +106,18 @@ def user_role_prompt(request: ModelRequest) -> str: # ==================== 家具设计背景(加强版) ==================== design_context = f""" - [Highest priority directive - must be strictly followed] - The furniture design background currently selected by the user is as follows: - - - Category/Type: {ctx.type or 'unspecified'} + [Internal highest priority design background - only for thinking, not output to users] + Furniture design settings selected by the current user: + - Category: {ctx.type or 'unspecified'} - Region: {ctx.region or 'unspecified'} - - Style / Style: {ctx.style or 'unspecified'} + - Style: {ctx.style or 'unspecified'} - 【Core Execution Rules】 - 1. When the user requires the generation of any visual content such as line drafts, sketches, design drawings, renderings, pictures, renderings, etc., the design must be 100% based on the above three settings. - 2. When thinking about tasks related to generating images, the first step must be to state: [Current design background] Type: {ctx.type} | Region: {ctx.region} | Style: {ctx.style} - 3. When generating plain text (reports, analyses, suggestions), there is no need to repeatedly emphasize the above settings, just reply in a normal professional tone. - 4. If the user wants pictures + reports at the same time, they must be processed separately. - - Now the user says: "Design it" → Please start designing directly based on the above background, and do not ask for known information such as type, style, region, etc. + [Strict implementation of requirements] + - When generating any pictures, line drawings, or renderings, the design must be strictly based on the above three settings. + - The above background information is only for your internal thinking and decision-making. **Never** directly tell the user "The current design background is..." or list the Type/Region/Style in the reply. + - Respond naturally and fluently, giving design plans and descriptions directly like a professional furniture designer. + - It is forbidden to say "I need to generate prompt words", "I will generate line draft prompt words", "XX style has been generated" and other internal processes. + - Simply describe the design results naturally from the user's perspective. """ # ==================== Report 状态 ==================== diff --git a/src/server/deep_agent/tools/structured_retrieval_tool.py b/src/server/deep_agent/tools/structured_retrieval_tool.py index 22bc1aa..a737b37 100755 --- a/src/server/deep_agent/tools/structured_retrieval_tool.py +++ b/src/server/deep_agent/tools/structured_retrieval_tool.py @@ -222,12 +222,13 @@ def create_structured_retrieval_tool(workspace_dir): indent=2 ) + json_path = json_path.replace(workspace_dir, "") # ── 6. 只回傳摘要 ────────────────────────────────────────────── return { "status": "success", "items_count": len(top_items), "json_path": json_path, - "summary": f"已提取 {len(top_items)} 個高相關片段,儲存於 {json_path}" + "summary": f"{len(top_items)} highly relevant fragments have been extracted and stored in {json_path}" } return structured_retrieval