From 5ba1dacf25085d038db09bf27c5120821f61a777 Mon Sep 17 00:00:00 2001 From: Shawn Jasper Date: Tue, 21 Apr 2026 16:10:14 +0800 Subject: [PATCH] fix: rename present_file to present_files in docs and prompts (#2393) The tool is registered as `present_files` (plural) in present_file_tool.py, but four references in documentation and prompt strings incorrectly used the singular form `present_file`. This could cause confusion and potentially lead to incorrect tool invocations. Changed files: - backend/docs/GUARDRAILS.md - backend/docs/ARCHITECTURE.md - backend/packages/harness/deerflow/agents/lead_agent/prompt.py (2 occurrences) --- backend/docs/ARCHITECTURE.md | 2 +- backend/docs/GUARDRAILS.md | 2 +- backend/packages/harness/deerflow/agents/lead_agent/prompt.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/docs/ARCHITECTURE.md b/backend/docs/ARCHITECTURE.md index 3b60cfea8..cc0993f7f 100644 --- a/backend/docs/ARCHITECTURE.md +++ b/backend/docs/ARCHITECTURE.md @@ -199,7 +199,7 @@ class ThreadState(AgentState): │ Built-in Tools │ │ Configured Tools │ │ MCP Tools │ │ (packages/harness/deerflow/tools/) │ │ (config.yaml) │ │ (extensions.json) │ ├─────────────────────┤ ├─────────────────────┤ ├─────────────────────┤ -│ - present_file │ │ - web_search │ │ - github │ +│ - present_files │ │ - web_search │ │ - github │ │ - ask_clarification │ │ - web_fetch │ │ - filesystem │ │ - view_image │ │ - bash │ │ - postgres │ │ │ │ - read_file │ │ - brave-search │ diff --git a/backend/docs/GUARDRAILS.md b/backend/docs/GUARDRAILS.md index 81fc4be47..28a309ca3 100644 --- a/backend/docs/GUARDRAILS.md +++ b/backend/docs/GUARDRAILS.md @@ -296,7 +296,7 @@ These are the tool names your provider will see in `request.tool_name`: | `web_search` | Web search query | | `web_fetch` | Fetch URL content | | `image_search` | Image search | -| `present_file` | Present file to user | +| `present_files` | Present file to user | | `view_image` | Display image | | `ask_clarification` | Ask user a question | | `task` | Delegate to subagent | diff --git a/backend/packages/harness/deerflow/agents/lead_agent/prompt.py b/backend/packages/harness/deerflow/agents/lead_agent/prompt.py index 71af2e653..dda49a1de 100644 --- a/backend/packages/harness/deerflow/agents/lead_agent/prompt.py +++ b/backend/packages/harness/deerflow/agents/lead_agent/prompt.py @@ -420,7 +420,7 @@ You: "Deploying to staging..." [proceed] - Treat `/mnt/user-data/workspace` as your default current working directory for coding and file-editing tasks - When writing scripts or commands that create/read files from the workspace, prefer relative paths such as `hello.txt`, `../uploads/data.csv`, and `../outputs/report.md` - Avoid hardcoding `/mnt/user-data/...` inside generated scripts when a relative path from the workspace is enough -- Final deliverables must be copied to `/mnt/user-data/outputs` and presented using `present_file` tool +- Final deliverables must be copied to `/mnt/user-data/outputs` and presented using `present_files` tool {acp_section} @@ -648,7 +648,7 @@ def _build_acp_section() -> str: "- ACP agents (e.g. codex, claude_code) run in their own independent workspace — NOT in `/mnt/user-data/`\n" "- When writing prompts for ACP agents, describe the task only — do NOT reference `/mnt/user-data` paths\n" "- ACP agent results are accessible at `/mnt/acp-workspace/` (read-only) — use `ls`, `read_file`, or `bash cp` to retrieve output files\n" - "- To deliver ACP output to the user: copy from `/mnt/acp-workspace/` to `/mnt/user-data/outputs/`, then use `present_file`" + "- To deliver ACP output to the user: copy from `/mnt/acp-workspace/` to `/mnt/user-data/outputs/`, then use `present_files`" )