Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

【回合】fix(send_file_tool): 更新文件发送工具的参数说明与类型定义

white2025974a5bd19f3b
diff --git a/jiuwenswarm/agents/harness/common/tools/send_file_to_user.py b/jiuwenswarm/agents/harness/common/tools/send_file_to_user.py
index 4e6dc6af71..253f5c6bbb 100644
--- a/jiuwenswarm/agents/harness/common/tools/send_file_to_user.py
+++ b/jiuwenswarm/agents/harness/common/tools/send_file_to_user.py
@@ -348,8 +348,8 @@ class SendFileToolkit:
description=(
"【文件发送工具】当需要将生成的文件、导出的数据、创建的文档等发送给用户时使用此工具。"
"使用场景包括:用户请求导出/下载文件、任务完成后需要交付文件、生成报告/文档后发送给用户。"
- "参数格式:abs_file_path_list 接受单个路径字符串或路径数组,路径必须是绝对路径。"
- "示例:'/tmp/report.pdf' 或 ['/tmp/file1.csv', '/tmp/file2.xlsx']。"
+ "参数格式:abs_file_path_list 接受路径数组,路径必须是绝对路径。"
+ "示例:['/tmp/file1.csv', '/tmp/file2.xlsx']。"
"target_channels 可选:指定文件投递目标,每项可以是 channel id(如 'web')"
"或 team 人类席位名(如 'human-player-1')。"
"省略时默认投给最近发起请求的人类成员(按 session 记录的发起者);web 发起或无人类成员时投 web。"
@@ -360,11 +360,12 @@ class SendFileToolkit:
"type": "object",
"properties": {
"abs_file_path_list": {
- "type": "string",
+ "type": "array",
+ "items": {"type": "string"},
"description": (
- "要发送的文件绝对路径。"
- "可以是单个路径字符串如 '/path/to/file.pdf',"
- "或 JSON 数组字符串如 '[\"/path/file1.csv\", \"/path/file2.xlsx\"]'。"
+ "要发送的文件绝对路径。\n"
+ "必须是数组格式,例如 ['/path/file1.csv', '/path/file2.xlsx']。\n"
+ "建议使用 get_effective_request_output_dir() 获取的 output_dir 作为文件保存位置。\n"
"支持任意文件类型(pdf、xlsx、docx、png、zip等)。"
),
},