From 6197a1c14da2dda6b3c8e2ccbebef04fa8d89c47 Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Thu, 7 May 2026 17:27:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E5=85=B7=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E7=9A=84description=E4=BD=BF=E7=94=A8=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=9A=84=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/packages/harness/deerflow/sandbox/tools.py | 14 +++++++------- .../harness/deerflow/tools/builtins/task_tool.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/packages/harness/deerflow/sandbox/tools.py b/backend/packages/harness/deerflow/sandbox/tools.py index b52131ff..5b3d17be 100644 --- a/backend/packages/harness/deerflow/sandbox/tools.py +++ b/backend/packages/harness/deerflow/sandbox/tools.py @@ -973,7 +973,7 @@ def bash_tool(runtime: ToolRuntime[ContextT, ThreadState], description: str, com - Use `python -m pip` (inside the virtual environment) to install Python packages. Args: - description: Explain why you are running this command in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are running this command in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. command: The bash command to execute. Always use absolute paths for files and directories. """ try: @@ -1017,7 +1017,7 @@ def ls_tool(runtime: ToolRuntime[ContextT, ThreadState], description: str, path: """List the contents of a directory up to 2 levels deep in tree format. Args: - description: Explain why you are listing this directory in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are listing this directory in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. path: The **absolute** path to the directory to list. """ try: @@ -1060,7 +1060,7 @@ def glob_tool( """Find files or directories that match a glob pattern under a root directory. Args: - description: Explain why you are searching for these paths in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are searching for these paths in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. pattern: The glob pattern to match relative to the root path, for example `**/*.py`. path: The **absolute** root directory to search under. include_dirs: Whether matching directories should also be returned. Default is False. @@ -1112,7 +1112,7 @@ def grep_tool( """Search for matching lines inside text files under a root directory. Args: - description: Explain why you are searching file contents in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are searching file contents in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. pattern: The string or regex pattern to search for. path: The **absolute** root directory to search under. glob: Optional glob filter for candidate files, for example `**/*.py`. @@ -1179,7 +1179,7 @@ def read_file_tool( """Read the contents of a text file. Use this to examine source code, configuration files, logs, or any text-based file. Args: - description: Explain why you are reading this file in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are reading this file in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. path: The **absolute** path to the file to read. start_line: Optional starting line number (1-indexed, inclusive). Use with end_line to read a specific range. end_line: Optional ending line number (1-indexed, inclusive). Use with start_line to read a specific range. @@ -1234,7 +1234,7 @@ def write_file_tool( """Write text content to a file. Args: - description: Explain why you are writing to this file in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are writing to this file in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. path: The **absolute** path to the file to write to. ALWAYS PROVIDE THIS PARAMETER SECOND. content: The content to write to the file. ALWAYS PROVIDE THIS PARAMETER THIRD. """ @@ -1276,7 +1276,7 @@ def str_replace_tool( If `replace_all` is False (default), the substring to replace must appear **exactly once** in the file. Args: - description: Explain why you are replacing the substring in short words. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: Explain why you are replacing the substring in short words in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. path: The **absolute** path to the file to replace the substring in. ALWAYS PROVIDE THIS PARAMETER SECOND. old_str: The substring to replace. ALWAYS PROVIDE THIS PARAMETER THIRD. new_str: The new substring. ALWAYS PROVIDE THIS PARAMETER FOURTH. diff --git a/backend/packages/harness/deerflow/tools/builtins/task_tool.py b/backend/packages/harness/deerflow/tools/builtins/task_tool.py index 963590a2..c732757a 100644 --- a/backend/packages/harness/deerflow/tools/builtins/task_tool.py +++ b/backend/packages/harness/deerflow/tools/builtins/task_tool.py @@ -54,7 +54,7 @@ async def task_tool( - Tasks requiring user interaction or clarification Args: - description: A short (3-5 word) description of the task for logging/display. ALWAYS PROVIDE THIS PARAMETER FIRST. + description: A short (3-5 word) description of the task for logging/display, in the user's language. ALWAYS PROVIDE THIS PARAMETER FIRST. prompt: The task description for the subagent. Be specific and clear about what needs to be done. ALWAYS PROVIDE THIS PARAMETER SECOND. subagent_type: The type of subagent to use. ALWAYS PROVIDE THIS PARAMETER THIRD. max_turns: Optional maximum number of agent turns. Defaults to subagent's configured max.