From 0c1c6afb7f26a8ead6b235d42a5b106cf3041017 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 12:53:10 +0000 Subject: [PATCH 1/4] Initial plan From daa439fe6cbd5004e158255894632ff66a96e46d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 12:59:04 +0000 Subject: [PATCH 2/4] Improve LLM response stream logs: add thoughts, fix double print Co-authored-by: 0xba1a <2942888+0xba1a@users.noreply.github.com> --- src/microbots/MicroBot.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/microbots/MicroBot.py b/src/microbots/MicroBot.py index 30ee722..fd6d290 100644 --- a/src/microbots/MicroBot.py +++ b/src/microbots/MicroBot.py @@ -190,6 +190,10 @@ def run( while llm_response.task_done is False: logger.info("%s Step-%d %s", "-" * 20, iteration_count, "-" * 20) + if llm_response.thoughts: + logger.info( + f" 💭 LLM thoughts : {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", + ) logger.info( f" ➡️ LLM tool call : {LogTextColor.OKBLUE}{json.dumps(llm_response.command)}{LogTextColor.ENDC}", ) @@ -222,13 +226,6 @@ def run( llm_command_output = self.environment.execute(llm_response.command) - logger.info( - " ⬅️ Command executed.\nReturn Code: %d\nStdout:\n%s\nStderr:\n%s", - llm_command_output.return_code, - llm_command_output.stdout, - llm_command_output.stderr, - ) - if llm_command_output.return_code == 0: if llm_command_output.stdout: output_text = llm_command_output.stdout @@ -237,9 +234,13 @@ def run( else: output_text = f"COMMAND EXECUTION FAILED\nreturn code: {llm_command_output.return_code}\nstdout: {llm_command_output.stdout}\nstderr: {llm_command_output.stderr}" - logger.info("📨 Message to LLM:\n%s", output_text) + logger.info(" ⬅️ Command output:\n%s", output_text) llm_response = self.llm.ask(output_text) + if llm_response.thoughts: + logger.info( + f" 💭 LLM final thoughts : {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", + ) logger.info("🔚 TASK COMPLETED : %s...", task[0:15]) return BotRunResult(status=True, result=llm_response.thoughts, error=None) From f727605afa99c1df52c822b9d35b5a0ba0e2a438 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 13:00:42 +0000 Subject: [PATCH 3/4] Fix code review comments: remove extra space before colon Co-authored-by: 0xba1a <2942888+0xba1a@users.noreply.github.com> --- src/microbots/MicroBot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/microbots/MicroBot.py b/src/microbots/MicroBot.py index fd6d290..ba46490 100644 --- a/src/microbots/MicroBot.py +++ b/src/microbots/MicroBot.py @@ -192,7 +192,7 @@ def run( logger.info("%s Step-%d %s", "-" * 20, iteration_count, "-" * 20) if llm_response.thoughts: logger.info( - f" 💭 LLM thoughts : {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", + f" 💭 LLM thoughts: {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", ) logger.info( f" ➡️ LLM tool call : {LogTextColor.OKBLUE}{json.dumps(llm_response.command)}{LogTextColor.ENDC}", @@ -239,7 +239,7 @@ def run( if llm_response.thoughts: logger.info( - f" 💭 LLM final thoughts : {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", + f" 💭 LLM final thoughts: {LogTextColor.OKCYAN}{llm_response.thoughts}{LogTextColor.ENDC}", ) logger.info("🔚 TASK COMPLETED : %s...", task[0:15]) return BotRunResult(status=True, result=llm_response.thoughts, error=None) From 11f2cfff240049299967f64b34b40b104e1ec30a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:02:29 +0000 Subject: [PATCH 4/4] =?UTF-8?q?Convert=20command=20execution=20log=20to=20?= =?UTF-8?q?debug=20level=20with=20=F0=9F=94=A7=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 0xba1a <2942888+0xba1a@users.noreply.github.com> --- src/microbots/MicroBot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/microbots/MicroBot.py b/src/microbots/MicroBot.py index ba46490..ca59bbb 100644 --- a/src/microbots/MicroBot.py +++ b/src/microbots/MicroBot.py @@ -226,6 +226,13 @@ def run( llm_command_output = self.environment.execute(llm_response.command) + logger.debug( + " 🔧 Command executed.\nReturn Code: %d\nStdout:\n%s\nStderr:\n%s", + llm_command_output.return_code, + llm_command_output.stdout, + llm_command_output.stderr, + ) + if llm_command_output.return_code == 0: if llm_command_output.stdout: output_text = llm_command_output.stdout