mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 11:40:47 +00:00
Bundler prototype
Automated bundler for preinstalled packages. Bundling python executable and dependencies, imports project files respecting .gitignore.
This commit is contained in:
parent
ff6c196d15
commit
12d932df57
17 changed files with 2069 additions and 189 deletions
|
|
@ -137,7 +137,11 @@ class CodeExecution(Tool):
|
|||
return await self.get_terminal_output()
|
||||
|
||||
async def get_terminal_output(
|
||||
self, wait_with_output=3, wait_without_output=10, max_exec_time=60
|
||||
self,
|
||||
reset_full_output=True,
|
||||
wait_with_output=3,
|
||||
wait_without_output=10,
|
||||
max_exec_time=60,
|
||||
):
|
||||
idle = 0
|
||||
SLEEP_TIME = 0.1
|
||||
|
|
@ -147,8 +151,9 @@ class CodeExecution(Tool):
|
|||
while max_exec_time <= 0 or time.time() - start_time < max_exec_time:
|
||||
await asyncio.sleep(SLEEP_TIME) # Wait for some output to be generated
|
||||
full_output, partial_output = await self.state.shell.read_output(
|
||||
max_exec_time
|
||||
timeout=max_exec_time, reset_full_output=reset_full_output
|
||||
)
|
||||
reset_full_output = False # only reset once
|
||||
|
||||
await self.agent.handle_intervention() # wait for intervention and handle it, if paused
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue