From bf587765de93036e973acc56af80d00338155280 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 1 Feb 2026 18:13:23 +0800 Subject: [PATCH] feat: enhance FileDownloadTool to confirm file removal and successful download --- astrbot/core/computer/tools/fs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astrbot/core/computer/tools/fs.py b/astrbot/core/computer/tools/fs.py index b6823c122..a1c0f848f 100644 --- a/astrbot/core/computer/tools/fs.py +++ b/astrbot/core/computer/tools/fs.py @@ -187,6 +187,8 @@ class FileDownloadTool(FunctionTool): os.remove(local_path) except Exception as e: logger.error(f"Error removing temp file {local_path}: {e}") + + return f"File downloaded successfully to {local_path} and sent to user. The file has been removed from local storage." return f"File downloaded successfully to {local_path}" except Exception as e: