From 906b874f2eaaf0319bee662d1b0aaa9b1f8b2611 Mon Sep 17 00:00:00 2001 From: Mery-Sanz Date: Mon, 19 May 2025 13:26:25 +0200 Subject: [PATCH] inside ctf is working --- src/cai/tools/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cai/tools/common.py b/src/cai/tools/common.py index a338302f..577f122f 100644 --- a/src/cai/tools/common.py +++ b/src/cai/tools/common.py @@ -1014,7 +1014,7 @@ def run_command(command, ctf=None, stdout=False, # pylint: disable=too-many-arg return _run_local(command, stdout, timeout, stream, call_id, tool_name, _get_workspace_dir(), args) # noqa E501 # --- CTF Execution --- - if ctf: + if ctf and os.getenv('CTF_INSIDE', True) == "True": # If streaming is enabled and we have a call_id, show streaming UI for CTF too if stream: # Import the streaming utilities from util @@ -1037,8 +1037,8 @@ def run_command(command, ctf=None, stdout=False, # pylint: disable=too-many-arg call_id = start_tool_streaming(tool_name, tool_args, call_id) target_dir = _get_workspace_dir() - full_command = f"cd '{target_dir}' && {command}" - + #full_command = f"cd '{target_dir}' && {command}" + full_command = command # Update with "executing" status update_tool_streaming( tool_name,