fix: Strip leading whitespace from first output line

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-01-09 14:01:14 +01:00
parent 1c33ea7b31
commit 2412df1d01
+4
View File
@@ -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)