From 2e3e46d6a19e0366f86774667554612c165999ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Mon, 16 Sep 2024 18:07:43 +0530 Subject: [PATCH] reword exit code hint --- agenthub/codeact_agent/codeact_agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agenthub/codeact_agent/codeact_agent.py b/agenthub/codeact_agent/codeact_agent.py index 7eaa4d53e8a2..cd4615993b25 100644 --- a/agenthub/codeact_agent/codeact_agent.py +++ b/agenthub/codeact_agent/codeact_agent.py @@ -160,6 +160,8 @@ def get_observation_message(self, obs: Observation) -> Message | None: ansi_color_escape = re.compile(r'\x1b\[[0-9;]*m') obs.content = ansi_color_escape.sub('', obs.content) text = obs_prefix + truncate_content(obs.content, max_message_chars) + if obs.exit_code != 0: + text += f'\n[Command finished with exit code {obs.exit_code}. Why did you run this command?]' # text += ( # f'\n[Command finished with exit code {obs.exit_code}]' # )