From 9c46b549e6189870317bcd46166a76b5cc58a705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=82=E9=B8=A2?= Date: Tue, 17 Mar 2026 16:41:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BAFileUploadTool=E4=B8=8EFileDo?= =?UTF-8?q?wnloadTool=E7=9A=84description=E4=BD=BFAI=E8=83=BD=E5=87=86?= =?UTF-8?q?=E7=A1=AE=E5=8C=BA=E5=88=86=E5=B9=B6=E8=B0=83=E7=94=A8=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/computer/tools/fs.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/astrbot/core/computer/tools/fs.py b/astrbot/core/computer/tools/fs.py index 31b7f3f513..4e4a084b20 100644 --- a/astrbot/core/computer/tools/fs.py +++ b/astrbot/core/computer/tools/fs.py @@ -80,7 +80,12 @@ @dataclass class FileUploadTool(FunctionTool): name: str = "astrbot_upload_file" - description: str = "Upload a local file to the sandbox. The file must exist on the local filesystem." + description: str = ( + "Upload a file from LOCAL filesystem to SANDBOX (direction: LOCAL -> SANDBOX). " + "Use this only when the source file is already on the local machine and the sandbox " + "needs it as input. Do NOT use this to retrieve/export results from sandbox; use " + "astrbot_download_file for that." + ) parameters: dict = field( default_factory=lambda: { "type": "object", @@ -140,7 +145,12 @@ async def call( @dataclass class FileDownloadTool(FunctionTool): name: str = "astrbot_download_file" - description: str = "Download a file from the sandbox. Only call this when user explicitly need you to download a file." + description: str = ( + "Download a file from SANDBOX to LOCAL filesystem (direction: SANDBOX -> LOCAL). " + "Use this when the file already exists in sandbox and the user wants to retrieve, " + "export, or receive it. Do NOT use this to provide local input files to sandbox; " + "use astrbot_upload_file for that." + ) parameters: dict = field( default_factory=lambda: { "type": "object",