From 2412df1d01cca0b189846f6d9d0f10ae87ffcb9c Mon Sep 17 00:00:00 2001 From: MarekWo Date: Fri, 9 Jan 2026 14:01:14 +0100 Subject: [PATCH] fix: Strip leading whitespace from first output line Co-Authored-By: Claude Opus 4.5 --- app/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/main.py b/app/main.py index 1359432..f4e95cd 100644 --- a/app/main.py +++ b/app/main.py @@ -105,6 +105,10 @@ def clean_console_output(output: str, command: str) -> str: while cleaned_lines and not cleaned_lines[-1].strip(): cleaned_lines.pop() + # Strip leading whitespace from first line (leftover from prompt removal) + if cleaned_lines: + cleaned_lines[0] = cleaned_lines[0].lstrip() + return '\n'.join(cleaned_lines)