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: 生成python文件后未推送到前台给用户

d300296961fdab54ef2d9
diff --git a/jiuwenswarm/agents/harness/common/prompt/prompt_builder.py b/jiuwenswarm/agents/harness/common/prompt/prompt_builder.py
index a3bfa86118..8d2e495ae5 100644
--- a/jiuwenswarm/agents/harness/common/prompt/prompt_builder.py
+++ b/jiuwenswarm/agents/harness/common/prompt/prompt_builder.py
@@ -251,6 +251,7 @@ JiuwenSwarm 使用独立的内部数据目录保存启动配置、Agent 身份
- 任务完成后产生了需要交付给用户的文件(报告、文档、数据文件、图片等)
- 用户明确请求下载、导出、发送文件
- 用户询问生成的文件如何获取
+- 用户主动调用`write_file`、`write_text_file`这类文件生成/修改工具后
**调用方式**:使用文件的绝对路径作为参数调用 `send_file_to_user` 工具。
@@ -388,6 +389,7 @@ When the `send_file_to_user` tool is available in your tool list, you **must** p
- Task completion produces files that need to be delivered to the user (reports, documents, data files, images, etc.)
- User explicitly requests to download, export, or receive files
- User asks how to obtain generated files
+- After the user actively invokes file generation/modification tools such as `write_file` and `write_text_file`
**How to call**: Use the absolute file path(s) as the parameter to invoke the `send_file_to_user` tool.