Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
chore(tool): let the backend create Write's parent directories (#3015)
Ziyang Guo2909097b7785
diff --git a/src/agentscope/tool/_builtin/_write.py b/src/agentscope/tool/_builtin/_write.pyindex 4b016c761..54f3910af 100644--- a/src/agentscope/tool/_builtin/_write.py+++ b/src/agentscope/tool/_builtin/_write.py@@ -2,7 +2,6 @@"""The write tool in agentscope."""import difflibimport fnmatch-from pathlib import Pathfrom typing import Any, Listfrom .._base import ToolBase, ToolMiddlewareBase@@ -292,12 +291,6 @@ Usage:# render a best-effort "add" diff in the UI.previous_content = ""- # Create parent directories if they don't exist- parent_dir = Path(file_path).parent- await self._backend.exec_shell(- ["mkdir", "-p", str(parent_dir)],- )-# Write content to file (backend handles parent dir creation)await self._backend.write_file(file_path,