Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gui_agent_loop_core/backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
except SyntaxError:
logger.error(f"Syntax error in Python file")
return []
except Exception as e:
logger.error(f"Unexpected error while parsing Python file: {str(e)}")
return []

Check warning on line 62 in gui_agent_loop_core/backend/app.py

View check run for this annotation

Codecov / codecov/patch

gui_agent_loop_core/backend/app.py#L60-L62

Added lines #L60 - L62 were not covered by tests


@app.get("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ def sandbox_server(interpreter_manager: InterpreterManager):

def _change_agent(agent_name):
print("_change_agent agent_name=", agent_name)
if agent_name == AgentName.AGENT_EXECUTOR.value:
return AgentName.SUPERVISOR.value
else:
return AgentName.AGENT_EXECUTOR.value
return AgentName.SUPERVISOR.value if agent_name == AgentName.AGENT_EXECUTOR.value else AgentName.AGENT_EXECUTOR.value

app.load(
fn=_change_agent,
Expand Down
8 changes: 7 additions & 1 deletion gui_agent_loop_core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@
stream: bool = False,
blocking: bool = False,
) -> GuiAgentInterpreterChatResponseAny:
content_res = request_core.content + "\ndisplay=" + display + "stream=" + stream + "blocking=" + blocking
content_res = (

Check warning on line 26 in gui_agent_loop_core/cli.py

View check run for this annotation

Codecov / codecov/patch

gui_agent_loop_core/cli.py#L26

Added line #L26 was not covered by tests
f"{request_core.content}\n"
f"display={display}\n"
f"stream={stream}\n"
f"blocking={blocking}\n"
f"dummy_response=This is a dummy response for testing purposes."
)
response = GuiAgentInterpreterChatResponse(content=content_res)
return response

Expand Down