CET patterns cleanup

frdel committed Sep 25, 2025 at 11:52 UTC ce2cc521818e15ade9b11528c6c65a94c69c1376
1 file changed -16
python/tools/code_execution_tool.py
-16
@@ -246,22 +246,6 @@ class CodeExecution(Tool):
246 dialog_timeout = timeouts.get("dialog_timeout", dialog_timeout)
247 max_exec_timeout = timeouts.get("max_exec_timeout", max_exec_timeout)
248
249 - # Common shell prompt regex patterns (add more as needed)
250 - prompt_patterns = [
251 - re.compile(r"\(venv\).+[$#] ?$"), # (venv) ...$ or (venv) ...#
252 - re.compile(r"root@[^:]+:[^#]+# ?$"), # root@container:~#
253 - re.compile(r"[a-zA-Z0-9_.-]+@[^:]+:[^$#]+[$#] ?$"), # user@host:~$
254 - re.compile(r"bash-\d+\.\d+\$ ?$"), # bash-3.2$ (version can vary)
255 - ]
256 -
257 - # potential dialog detection
258 - dialog_patterns = [
259 - re.compile(r"Y/N", re.IGNORECASE), # Y/N anywhere in line
260 - re.compile(r"yes/no", re.IGNORECASE), # yes/no anywhere in line
261 - re.compile(r":\s*$"), # line ending with colon
262 - re.compile(r"\?\s*$"), # line ending with question mark
263 - ]
264 -
249 start_time = time.time()
250 last_output_time = start_time
251 full_output = ""