Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix fs tool path splitting

Tomas Valentad5cff60618f6
diff --git a/api-service/codegen/tools/playground/tools/filesystem.py b/api-service/codegen/tools/playground/tools/filesystem.py
index 08115faa2..d55849562 100644
--- a/api-service/codegen/tools/playground/tools/filesystem.py
+++ b/api-service/codegen/tools/playground/tools/filesystem.py
@@ -31,7 +31,8 @@ def create_filesystem_tools(playground: NodeJSPlayground, **kwargs):
The input should be a path to a file followed by the content of the file.
Separate the path and content by a newline character.
"""
- path, content = input.split("\n", 1)
+ path, content = input.lstrip().split("\n", 1)
+
playground.write_file(path, content)
return "File saved"