Robert Brennan 1 год назад
Родитель
Сommit
96151d9147
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      opendevin/runtime/e2b/runtime.py
  2. 1 1
      opendevin/runtime/e2b/sandbox.py

+ 3 - 0
opendevin/runtime/e2b/runtime.py

@@ -31,6 +31,9 @@ class E2BRuntime(ServerRuntime):
         return FileReadObservation(code_view, path=action.path)
 
     async def write(self, action: FileWriteAction) -> Observation:
+        if action.start == 0 and action.end == -1:
+            self.filesystem.write(action.path, action.content)
+            return FileWriteObservation(content='', path=action.path)
         files = self.filesystem.list(action.path)
         if action.path in files:
             all_lines = self.filesystem.read(action.path)

+ 1 - 1
opendevin/runtime/e2b/sandbox.py

@@ -74,7 +74,7 @@ class E2BBox(Sandbox):
         return '\n'.join([m.line for m in proc.output_messages])
 
     def execute(self, cmd: str) -> Tuple[int, str]:
-        process = self.sandbox.process.start(cmd, envVars=self._env)
+        process = self.sandbox.process.start(cmd, env_vars=self._env)
         try:
             process_output = process.wait(timeout=self.timeout)
         except TimeoutException: